U@DAYFRDATE

U@DAYFRDATE calculates the day of the week for the input date. See Century Parameter Processing.

Module CALRTNS

Required Input

Field Type and length Definition
E@DRFRDATE N 8 Date to be converted.

Output

Field Type and length Definition
E@DRWEEKDAYN N 8 1 = Sunday, 2 = Monday, and so on.
E@DRERRORNBR N 9

Error number.

See Error Number

E@DRERRORVAR A 20 Input parameter is in error.

Programming Example

    EVAL      E@DRFRDATE     = DIYRFYFRDT 
     EVAL      E@DRTODATE     = DIYRFYTHDT       
     CALLP     U@NBDYINDTRNG             Nbr Days In Date Rng
     ADD       1             E@DRNBRDAYS                     
     CLEAR                   PIA80WS@OFFDYS             
     IF        F1@STRWKD <> *ZEROS                     
     CALLP     U@DAYFRDATE                 Day From Date 
     IF        E@DRWEEKDAYN < F1@STRWKD                     
     ADD       7             E@DRWEEKDAYN                   
     ENDIF