900-JULIAN-TO-DATE

900-JULIAN-TO-DATE converts a Julian date to a calendar date. The Julian date number is based on the Gregorian start date of October 15, 1582. If the output generated is an invalid date, an error number is returned.

Library CALRTNS

Required Input

Field Type and length Definition
WSDR-JULIAN-DAYS N 8 Julian date.

Output

Field Type and length Definition
WSDR-FR-DATE N 8

Calendar date.

If the input date century equals 00, it changes to 19 or 20. See Century Parameter Processing.

WSDR-ERROR-NBR N 9

Error number.

See Error Number.

WSDR-ERROR-VAR A 20 Input in error. Calculated calendar date in error that was calculated from the Julian date input.

Programming Example

     IF (PRM-AGING-DAYS          NOT = ZEROES)  
         MOVE PRM-CUTOFF-DATE        TO WSDR-FR-DATE
         PERFORM 900-DATE-TO-JULIAN
         SUBTRACT PRM-AGING-DAYS     FROM WSDR-JULIAN-DAYS
         PERFORM 900-JULIAN-TO-DATE
         MOVE WSDR-FR-DATE           TO AP130WS-RECON-DATE