How to identify in JCL that an input file is empty without
reading it?

Answer Posted / mainframeking

Usinf IDCAMS we can check:

//step01 dd exec pgm=idcams
//sysprint dd sysout=*
//input dd dsn=file name to check, disp=shr
//sysin dd *
print infile(input)character count(1)

if return code is 0, file is not empty
if return code is 4, file is empty

Is This Answer Correct ?    17 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

IIN APITUDE THEY GAVE ONLY 10 QUESTIONS.. THEY ARE SIMPLE ONE FROM NUMBER SERIES,BOATS,TIME & DISTANCE,PROFIT &LOSS,FIND OUT THE NUMBER ? 9 25 4 36 81 64 49 AND surveillance SPELLINGS E.T.C

1625


What are s0c1, s0c4, s0c5, s0c7 and socb?

695


What are steplib and joblib? What for they are used?

685


What are some jcl statements that are not allowed in procedures?

722


What parameter directs the output of the job log dataset?

763






When The Define Jcl Is Not Available, How Can You Get Information About A Vsam File's Organisation ?

741


Describe the various parameters utilized in the creation of a gdg?

680


Explain how can a jobs execution priority be modified?

733


What parameters can be used to limit the number of records written to a sysout dataset?

743


When space is allocated for an output dataset, what units can be used?

740


In job processing, what happens in execution stage?

696


What statement marks the beginning of a job step; assigns a name to the step; identifies the program or catalogued or in-stream procedure to be executed in the step?

641


what happens in conversion stage in job processing?

724


how to do automated restart when a job abends?

839


In sms datasets, what is the function of the dd avgrec keyword?

648