1 /* BEGIN INCLUDE FILE ..... time_offset.incl.pl1 ..... 08/23/79 J Falksen */
 2 
 3 /*  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *   */
 4 /*                                                                           */
 5 /* Name:  time_offset.incl.pl1                                               */
 6 /*                                                                           */
 7 /* 1) This structure provides input to date_time_$offset_to_clock.           */
 8 /*  Both integer and real fields may be supplied. Each field containing data */
 9 /*  must have its use bit set.  All values may be positive or negative.      */
10 /*  a) dw is applied first.                                                  */
11 /*  b) The size of a year is dependant upon WHICH year.  The base year is    */
12 /*   determined.  The (adjusted) clock value is the reference for this.      */
13 /*   The integral years (whether from fixed, float, or both) are added to    */
14 /*   this base year.  The new base year is used to determine what value the  */
15 /*   fraction is applied to.                                                 */
16 /*  c) The size of a month is dependant upon WHICH month of WHICH year.      */
17 /*   The base year/month is determined.  The (adjusted) clock value is the   */
18 /*   reference for this.  The integral months are added to this base month,  */
19 /*   forming a new base year/month.  The new base month in used to determine */
20 /*   value the fraction is applied to.                                       */
21 /*  d) Values smaller than a month are added "in parallel" because their     */
22 /*   size is always constant (leap-seconds ignored).                         */
23 /*                                                                           */
24 /* 2) This structure receives output from date_time_$from_clock_interval.    */
25 /*  time_offset.dw is not used.  The input values in val are ignored; they   */
26 /*  are reset.  flag specifies the units in which the output is to be        */
27 /*  expressed and whether the fractional amount is desired. If only the      */
28 /*  smallest unit is set to receive the fraction it leaves the structure in  */
29 /*  a state that it may be given to $offset_to_clock without modification.   */
30 /*                                                                           */
31 /* Status                                                                    */
32 /* 06/07/83 jaf 0) Created                                                   */
33 /* 84-11-19 jaf 1) Changed the form of the dw field, added named constants   */
34 /*                                                                           */
35 /*  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *   */
36 
37 dcl 1 time_offset   aligned based(Ptime_offset),
38       2 version     char (8),
39       2 flag,
40         3 yr        fixed bin,
41         3 mo        fixed bin,
42         3 wk        fixed bin,
43         3 da        fixed bin,
44         3 hr        fixed bin,
45         3 min       fixed bin,
46         3 sec       fixed bin,
47         3 Usec      fixed bin,
48       2 val,
49         3 yr        float dec (20),     /* years                             */
50         3 mo        float dec (20),     /* months                            */
51         3 wk        float dec (20),     /* weeks                             */
52         3 da        float dec (20),     /* days                              */
53         3 hr        float dec (20),     /* hours                             */
54         3 min       float dec (20),     /* minutes                           */
55         3 sec       float dec (20),     /* seconds                           */
56         3 Usec      float dec (20),     /* microseconds                      */
57       2 dw,
58         3 flag      fixed bin,          /* how to select day, if at all      */
59         3 val       fixed bin;          /* Day of the week (1=Mon...7=Sun).  */
60 
61 /**** time_offset.flag settings for $offset_to_clock                         */
62 dcl (UNUSED         init (0), /* this offset unit is unused                  */
63      USED           init (1), /* this offset unit has a value                */
64 /**** time_offset.flag settings for $from_clock_interval                     */
65 /****UNUSED         init (0), /* this offset unit is unused                  */
66      INTEGER        init (1), /* return interval unit as an integer          */
67      FRACTION       init (2), /* return interval unit as integer+fraction    */
68 /**** offset.dw.flag settings for $offset_to_clock. Tells how to select the  */
69                               /* day given in offset.dw.val                  */
70      BEFORE         init (-2),/*        before day given in clock_in         */
71      ON_OR_BEFORE   init (-1),/*  on or before day given in clock_in         */
72 /****UNUSED         init (0), /*     don't apply day of week offset          */
73      ON_OR_AFTER    init (1), /*  on or after  day given in clock_in         */
74      AFTER          init (2)  /*        after  day given in clock_in         */
75     )               fixed bin int static options (constant);
76 
77 dcl  Ptime_offset   ptr,
78      Vtime_offset_2 char (8) int static options(constant) init("timeoff2");
79 
80 /*  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *   */
81 /*                                                                           */
82 /* Name:  time_offset_array_.incl.pl1                                        */
83 /*                                                                           */
84 /* This is an array form of time_offset.                                     */
85 /*                                                                           */
86 /*  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *   */
87 
88 dcl 1 time_offset_array       aligned based(Ptime_offset),
89     2 version                 char (8),
90     2 flag                    (8) fixed bin,
91     2 val                     (8) float dec (20),
92     2 dw,
93       3 (flag, val)           fixed bin;
94 
95 /* END INCLUDE FILE ..... time_offset.incl.pl1 ..... */