1 /* START OF* time_value.incl.pl1 * * * * * * * * */ 2 3 /* * * * * * * * * * * * * * * * * * * * * * * * * */ 4 /* */ 5 /* Name: time_value.incl.pl1 */ 6 /* */ 7 /* This structure holds output from date_time_$from_clock */ 8 /* and input to date_time_$to_clock */ 9 /* (A clock value is a combination of a day portion and a time portion. */ 10 /* clock_days represents one part and clock_time the other.) */ 11 /* to_clock accepts "day" (as opposed to "time") data only in certain */ 12 /* combinations. This table shows with the *'s which fields may be present */ 13 /* together. All others must be zero. */ 14 /* +-1-+-2-+-3-+-4-+--------------+ */ 15 /* | * | * | | | year | In cases 1, 2, & 4, if day_in_week is */ 16 /* | * | | | | mm | present, it is used to verify the */ 17 /* | * | | | | dd | value converted. */ 18 /* | | | * | | fiscal_week | In case 3 it actually defines a day. */ 19 /* | | |(*)| | day_in_week | If not present, Monday is assumed. */ 20 /* | | * | | | day_in_year | */ 21 /* | | | | * | day_in_clock | */ 22 /* +-v-+-v-+-v-+-v-+--------------+ */ 23 /* | | | +-- clock_days = day_in_calendar */ 24 /* | | +------ clock_days = converted (fiscal_week,day_in_week) */ 25 /* | +---------- clock_days = converted (year,day_in_year) */ 26 /* +-------------- clock_days = converted (year,mm,dd) */ 27 /* */ 28 /* clock_time = converted (HH,MM,SS,UUUUUU) */ 29 /* */ 30 /* The zone adjustment may be in one of two forms: */ 31 /* if zone^="" then zone_index = INDEX_IN_time_info_OF (zone); */ 32 /* [ERROR if not found] */ 33 /* if zone="" & zone_index=0 then zone_index = time_defaults_$zone_index */ 34 /* After these two steps, if zone_index=0, it is an ERROR. */ 35 /* The value in time_info_ of zone_delta (zone_index) is used to adjust */ 36 /* clock_time. */ 37 /* */ 38 /* If leap_year^=0 it is an ERROR. All values are range checked, e.g. */ 39 /* year<0 or year>9999. Out-of-range is an ERROR. */ 40 /* */ 41 /* Refer to time_offset_.incl.pl1 for the structure used to input data to */ 42 /* date_time_$offset_to_clock. */ 43 /* */ 44 /* Status */ 45 /* */ 46 /* 0) Created by: J. Falksen - 06/20/78 */ 47 /* 1) Updated: jaf - 84-11-01 US & fw enlarged to bin(20) */ 48 /* */ 49 /* * * * * * * * * * * * * * * * * * * * * * * * * */ 50 51 /* All values in this structure are zone adjusted, not GMT. */ 52 53 dcl 1 time_value aligned based(Ptime_value), 54 2 version char (8), 55 2 yc fixed bin, /* Year part of date (eg, 1978) */ 56 2 my fixed bin, /* Month part of date (eg, 7= July) */ 57 2 dm fixed bin, /* Day of month part of date (eg, 4) */ 58 2 Hd fixed bin, /* Hour of the day (eg, 18) */ 59 2 MH fixed bin, /* Minute of the hour (eg, 35) */ 60 2 SM fixed bin, /* Second of the minute (eg, 59) */ 61 2 US fixed bin (20), /* Microseconds in excess of second */ 62 2 fw fixed bin (20), /* the digits are yyyyww [OUT] */ 63 2 dw fixed bin, /* Day of the week (1=Mon, 7=Sun). */ 64 2 dy fixed bin, /* Day of the year */ 65 /* (eg, 12/31 = 365 or 366). */ 66 2 dc fixed bin(22), /* Day in calendar value */ 67 /* (eg, 1 = Jan 1, 0001). */ 68 2 Uc fixed bin(71), /* Microsecond in calendar value */ 69 /* (eg, 0 = 0001-01-01m) */ 70 2 za char (5), /* Zone abbreviation */ 71 2 zone_index fixed bin, /* Index in time_table_$zone_names, */ 72 /* of zone in which time expressed */ 73 2 leap_year fixed bin, /* 1- this is a leap year [OUT] */ 74 75 Ptime_value ptr, 76 Vtime_value_3 char(8) int static options(constant) init("timeval3"); 77 78 /* END OF* time_value.incl.pl1 * * * * * * * * */