We are using 2 files , file one has data, file two is
empty.Using jcl how can we find the other file is empty?
Answer Posted / raghu
This can be done using ICETOOL.
//STEP1 EXEC PGM=ICETOOL
//IN DD DSN=……input file1
//TOOLMSGDD SYSOUT=*
//DFSMSG DD SYSOUT=*
//TOOLIN DD*
COUNT FROM(IN) EMPTY
/*
In the above JCL, Input file1 is empty. If we run this JCL
it will retrun NON-ZERO retrun code.
adv: It will be very helpful when we want to run some steps
after checking a particular file is empty or not.
| Is This Answer Correct ? | 8 Yes | 1 No |
Post New Answer View All Answers
which utility is used to run a cobol-db2 program?
Which statement is used to identify the private libraries in job?
What does a disposition of (MOD,DELETE,DELETE) mean ?
is there any way to execute more than one proc in the same exec statement at the same time..?
Is acct parameter mandatory?
Step 1 RC 4 Step 2 Step 3 I want to know the COND parameter which can be coded in step 2 or 3. Step 2 should be executed based on Step 1 RC and Step 3 should not be executed based on step 1's RC
What is Cataloged Procedures?
In sms datasets, what is the function of the dd avgrec keyword?
What are the utility programs in jcl?
Explain how can the submitting users racf authority be overridden in a job stream?
How can return codes be tested before execution of a job step?
What parameter of the job statement is used to limit the cpu time consumed by the job?
what are JCLLIB and STEPLIB in JCL?
List the different jcl statements that are not permitted in the procedures?
How to alter the parameters for the existing gdg?