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
how do you create a dataset in a jcl with the same file organisation as that of another existing dataset?
which utility is used a dummy utility?
Explain the function of the steplib dd statement?
I have a cobol db2 program(PGM A) where other program (PGM B) will call this program and passes some 50 fields data to PGM A. PGM A has some layout in which it receives the data from PGM B. And this layout has been copied in the linkage section pf PGM A. After getting the data, PGM A writes the data in a flat file in the same layout which it receives from PGM B. PGM B is a simple COBOL pgm. Please provide a JCL to run these programs.
How to override a dsn that is contained in a proc called by another proc? I need to do the override in the calling jcl?
Explain the function of //jcllib statement?
Differentiate between the joblib and the steplib statements?
when can a job time-out occur? How to overcome that?
Which statement is used to identify the private libraries in job?
Explain dd statement in jcl?
I want to join to input files and write the matching fields on to an output file but i dont want the output file a sorted one
what operation is performed by job statement?
What is condition checking in jcl? Is this possible?
How to do automated restart when a job abend?
What are the rules employed while naming the steps in a job?