YYDDD: PROC(JULIAN_DATE) RETURNS(CHAR(*) VARYING); /* FUNCTION RETURNS DATE IN THE FORM YYDDD WHERE YY IS THE YEAR AND DDD IS THE NUMBER OF DAYS AFTER JANUARY 1 IN THE YEAR. ARGUMENT MUST BE THE FORM OF A COUNT OF DAYS AFTER DECEMBER 31, 1899 AUTHOR: AL JAWORSKI DATE: MAY 1, 1982 */ %INCLUDE YYMMDD; %INCLUDE JULDATE; DCL (JULIAN_DATE,JANUARY_FIRST) FIXED BINARY(31); DCL DATE_STRING CHAR(6); DCL YEAR CHAR(2) VARYING; DCL DAYS PIC'999'; DATE_STRING=YYMMDD(JULIAN_DATE); IF DATE_STRING=' ' THEN RETURN(''); YEAR=SUBSTR(DATE_STRING,1,2); JANUARY_FIRST=JULDATE(YEAR||'0101'); DAYS=JULIAN_DATE-JANUARY_FIRST+1; RETURN(YEAR||DAYS); END YYDDD;