Previous Topic

Next Topic

Book Contents

Book Index

AutoEdit Usage in the Job Scheduling Definition

Certain AutoEdit components can be used in job scheduling definitions. In job scheduling definitions, AutoEdit components in certain statements (SET VAR and DO SET) directly affect JCL. In other statements (SYSOUT and DO SYSOUT, SHOUT and DO SHOUT, MEMLIB and OVERLIB) they do not affect the JCL.

WARNING: When using AutoEdit variables in job scheduling definitions, always test the definitions for proper AutoEdit syntax with the AutoEdit simulation utility. For more information, see Testing AutoEdit Syntax.

In the job scheduling definition, AutoEdit components can be specified in the following parameters:

//STEP10 EXEC PGM=MYPGM

//OUTFILE  DD DSN=NEWFILE,DISP=(NEW,CATLG,DELETE),

//                 SPACE=(%%SPACE_TYPE,5),UNIT=SYSDA

The job scheduling definition contains the following SET VAR statement that sets the space type to "track":

SET VAR  %%SPACE_TYPE=TRK

In this case, the second line in the above DD statement resolves to:

//                 SPACE=(TRK,5),UNIT=SYSDA

The job scheduling definition also contains the following statements that are activated if the job abends due of lack of space (code S*37). These statements change the space type to "cylinder", which provides enough space, and rerun the job. If Control-M/Restart is active, the job is restarted from the abended step.

ON STEP STEP10 CODES S*37

DO SET %%SPACE_TYPE=CYL

[DO IFRERUN   FROM $ABEND] ===> If Control-M/Restart is active

DO RERUN

If the job abends as above, the second line of the earlier JCL DD statement resolves to:

//                  SPACE=(CYL,5),UNIT=SYSDA

when the job is submitted for rerun (or restart).

SYSOUT OP F PRM GPL.%%JOBNAME.D%%ODATE.%%JOBID.T%%TIME

MSG  JCL ERROR IN JOB %%JOBID %%STEP

Parent Topic

JCL and AutoEdit Facility