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
Define concatenating?
I want my job (careerride) to be executed in 1 minute and 2 seconds. How do I do that?
How to do automated restart when a job abend?
Explain how can the disposition of sysout datasets be set for an entire jobstream?
We can use PASS with permanent datasets also. THEN Which is the condition in which we may use PASS (instead of KEEP) with permanent data sets, while there is no need to specify UNIT and VOL for them like temporary data sets (in cas we use KEEP for permanent data sets) ?
How to run cobol program using jcl?
which utility is used to sort a file in jcl?
Explain how can an in-stream dataset be terminated?
How can return codes be tested before execution of a job step?
Explain the job statement in jcl?
What is concatenating?
How to compare two files in SYNCSORT and on the mismatch record should be deleted from second file.
What is timing concept in mainframe?
How can the disposition of sysout datasets be set for an entire jobstream?
What is the purpose of the dd keylen parameter?