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
how do you code a null statement?
what operation is performed by job statement?
What is the function of //cntl statement?
What is jcl in mainframe, and how many types of jcl statements are there for a job?
What is the function of dd disp parameter?
Name the statement which can be used to send data to another mvs jes3 node?
How gdg are concatenated?
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?
what JCL Procedures?
what is DD statement is used in JCL?
Many jcl statements contain specific values designed to direct and control the execution of the statement. What are these fields called?
how you will the direct the data to spool using sysout option?
Where & How Do You Code Identifier In Jcl?
Can we use DISP=SHR in output file in JCL
what disp parameter we mention for creation of temporary dataset so that we can use it in later steps?