Suppose i have 2 steps in my pgm. Step1- creates a file,
Step2 - generates report from file in step1, What changes
have to be made in Step2, so that if the file in Step1 is
empty Step2 should not be executed? No changes to be made to
Step1.
Answer Posted / reddy
After step1,before step2 , create another step , say stepA.
in step a , cheCk for the file in step1 is empty or not
using the IDCAMS utility
//STEP1 EXEC PGM=PG1
//DD1 DD DSN=TPAR.T01.A,DISP=(NEW,CATLG,DELETE),
DCB=(RECFM=FB,LRECL=80,BLKSIZE=800),
SPACE=(TRK,(5,5),RLSE),UNIT=PROD
//STEPA EXEC PGM=IDCAMS
//DD2 DD DSN=TPAR.T01.A,DISP=SHR
//SYNID DD *
PRINT INFILE(DD2) COUNT (1)
END
//IF (RC.STEPA = 4) THEN
//STEP2 EXEC PGM=REPORT
//DD3 DD DSN = XXX.XX.XX
//ELSE
//STEP3 EXEC PGM=PGM2
//ENDIF
if the file is empty , stepa will return 0 else it
reuns 4. If your file consists of the header and trailer
give count(3).
| Is This Answer Correct ? | 20 Yes | 1 No |
Post New Answer View All Answers
Mainframes gets a text file that contains the name of the file. Now using JCL i want to locate that file name in the mainframe system and perform further processing. Please tell how to proceed
Explain dfsort utility?
What is timing concept in mainframe?
Is it possible to left uncode disp? If yes, how?
What is the function of the steplib dd statement?
I need exexution process for JCL programs
What is the use of symbol // in jcl?
How does jcl act on a cobol code?
what is use of disp parameter in dd statement?
in order to execute step2 a job after a return code of 8 in step1, what condition you will code in step2?
Explain dd statement in jcl?
What are the rules employed while naming the steps in a job?
why should SYSIN DD * statement should not be included inside a PROCedure snippet??? please answer this.. i need to know.
When you specify multiple datasets in a JOBLIB or STEPLIB, what factor determines the order?
What is catelog procedure and how many catelog procedure to use in one job?