Answer Posted / muttaiah
There are so many utilities(ICetool, IDcams, Iebgener)
which we can make use to check whether a file is empty.
//Jobcard
//stepname exec pgm=idcams
//dd1 dd dsn=xxx.pds,disp=shr
//sysin dd *
print infile(dd1) count(1)
/*
Here the job will give a return code '0' if the file has
atleast 1 record and RC-4 if there are no records
Suppose you want to check whether any records are there
apart from header and trailer. then Make the count as Count
(3).
//sysin dd *
print infile(dd1) count(3)
/*
| Is This Answer Correct ? | 16 Yes | 0 No |
Post New Answer View All Answers
what is SOC4 error?
How to alter the parameters for the existing gdg?
what is the use of IEBGENER utility?
What is jcl in mainframe?
Where can program checkpoints be stored for use in a restart?
which utility is used to run a cobol-db2 program?
What are the difference between jcl and jes?
What dd statement is used to supply the name of a dataset?
Are there any set of rules for the names of the steps used in a job?
What is the motivation behind coding class parameter in job statement?
What is jcl in mainframe, and how many types of jcl statements are there for a job?
how can a gdg base be created in a jcl. What is the difference between empty and scratch parameter while defining/altering gdg base?
Must tape dataset definitions include vol=ser specifications?
What are steplib and joblib?
What is the syntax of JCL statement?