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
what is use of disp parameter in dd statement?
how do you access an uncataloged dataset in a jcl?
How to execute 2nd and 4th steps among 5 steps in jcl proc?
Is it possible to define dd statements as you want?
what is the difference between JES3 and JES2?
What is one line to pass PARM from JCL to COBOL?
Explain in DD statement what is the use of DCB parameter?
List in order the hierarchical levels of jcl?
how to run batch program without jcl?
What is NOTCAT ?
For what purpose steplib and joblib are used ?
can any one plzzzzzz tell the jcl code for creating ps using idcams
When output dataset space is required, what quantity categories are used?
1) SORT FIELDS=(20,4,CH,D,10,3,CH,D) OUTREC FIELDS=(7:20,4,C' FUTURE ',20,2,10,3,1Z,1,9,13,7, 24,57,TRAN=LTOU,6X'FF') This example illustrates how a fixed-length input data set can be sorted and reformatted for output. The SORTIN LRECL is 80 bytes. The reformatted output records are fixed length with a record size of 103 bytes. SOLRF (the IBM-supplied default) is in effect, so unless the SORTOUT LRECL is specified or available, it will automatically be set to the reformatted record length of 103. in the above example i have some doubts that a) sort fields=(20,4,CH,D,10,3,CH,D) -what exactly it does and this fields related to output record fields or input record fields b)outrec used to refprmat the records after sorting that means could please reply me as soon as possible Thanks. Venkat
how can a gdg base be created in a jcl. What is the difference between empty and scratch parameter while defining/altering gdg base?