Previous Topic

Next Topic

Book Contents

Book Index

%%$JULIAN

You can examine one more function before exiting the JCL.

  1. Add the following lines below the %%$CALCDTE function in 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.

  2. Exit the JCL. You can now run the job.
  3. Return to the Job List screen and order IDJOB6.
  4. Go to the Active Environment screen, request the Job Order Execution History screen for the job, then request the Sysout Viewing screen for the job execution, and check the Sysout of the job. Page down to the middle section of the Sysout.

    **** 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

AutoEdit Function Details