//JOHNEZC JOB 1,'TEST', CLASS=I,NOTIFY=&SYSUID(Tested code. Runs fine)
//STEP1 EXEC PGM=EZACSFM1
//SYSOUT DD SYSOUT=(,INTRDR) <= submit the below job via internal reader
//SYSIN DD DATA,DLM='..'
//TTEST JOB 1,'EZACSFM1',CLASS=I,NOTIFY=&SYSUID
//STEP2 EXEC PGM=IEFBR14
//MYDATA DD DSN=TEST.DATA.D&DAY.M&LMON ,
// DISP=(,CATLG,DELETE),
// SPACE=(CYL,(10,10),RLSE),
// DCB=(RECFM=FB,LRECL=10,BLKSIZE=0)
Explanation:
We are submitting the IEFBR14 job to create the dataset TEST.DATA.DMON.M04 via internal reader as mentioned above.
If you see, i have kept 'D&DAY' and 'M&LMON' in blue. Just to keep our attention there. The utility EZACSFM1 substitutes the value of day and month values there which will be created dynamically. &day, &lmon are the parameters of the utility.
If we submit the job, two jobs will be submitted. The first job will submit the second job creating the dataset with IEFBR14 dynamically with the date and time parameters.
To display the values in spool in sysout, try this piece of code.We will come across more options.
<Tested code >
//STEP1 EXEC PGM=EZACFSM1Some more parameters which EZACFSM1 takes. There are many more.
//SYSOUT DD SYSOUT=*
//SYSIN DD *
&YR.-&LMON.-&LDAY
&YR./&LMON./&LDAY
DATE IS : &YR.&LMON.&LDAY
/*
//
'&DAY'
'&HHMMSS'
'&HR'
'&JOBNAME'
'&SEC'
'&SEQ'
'&YYMMDD'
Test these small piece of code.M sure, you will find it very useful!!!
No comments:
Post a Comment