You can examine one more function before exiting the JCL.
//* %%SET %%B=%%$JULIAN %%A
//* THE VALUE OF B IS: %%B
Function %%$JULIAN converts a Gregorian date with a 4-character year, to a Julian date with a 4-character year.
The format of function %%$JULIAN is:
%%$JULIAN date
where date must be, or must resolve to, a date in format yyyymmdd.
In your exercise, you know that %%A, which is defined in the preceding %%$CALCDTE function, resolves to your ODATE -1. Therefore, %%B should resolve to the Julian version of this date.
**** END OF DATA SET - ADDED BY CONTROL M **** DO NOT USE IT IN YOUR PROGRAM !!
1 //M21 JOB APERLMAN,CLASS=A,
// MSGCLASS=X,NOTIFY=M21,
// MSGLEVEL=(1,1)
//*---- SUBMITTED BY CONTROL-M (FROM MEMLIB) ODATE=010131
//*---- SCHEDULE CTM.TEST.SCHEDULE(IDGS3)
//*---- JCL CTM.TEST.JCL(IDJOB6)
//*---- CONTROL-M JOB IDENTIFICATION: ORDER ID=001S5 RUN NO.=00001
//* %%SET %%A=%%$CALCDTE 20010202 -1
//* THE VALUE OF A IS: 20010201
//* %%SET %%B=%%$JULIAN 20010201
//* THE VALUE OF B IS: 2001032
2 //S1 EXEC PGM=IEFBR14
**** END OF DATA SET - ADDED BY CONTROL M **** DO NOT USE IT IN YOUR PROGRAM !!
Observe the following:
Parent Topic |