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
I have mainpgm(abc) this is the only cobol pgm(non-db2).And this pgm calling subpgm name "acd" this also only cobol(non- Db)and this pgm calling some other subpgm this pgm has cobol-db2 pgm. 1) IF you calling static mode how to run and how to compile? 2) IF you calling dynamic mode how to run and how to compile? plz suggestion me.
How can unused space allocation be returned to the system when a dataset is closed?
How to read and write a single record into a file. I would like to use it to enter a single 8-character piece of information and use it to put it into a variable for processing in JCL. Thank you
Name the parameters which can be used to limit the number of records written to a sysout dataset?
what is “Cond= even” and “Cond=only”?
how to do automated restart when a job abends?
what happens in conversion stage in job processing?
Is acct parameter mandatory?
which utility is used to run a cobol-db2 program?
What statement can be used to send data to another mvs jes3 node?
Explain the jcl exec statement?
How to code these statements in JCL: CLEANUP INITIAL(NO) RESTART(NO) DYNALLOC(NO) job definition..?
What is jcl in mainframe, and how many types of jcl statements are there for a job?
How do you submit a job for execution?
What happens if both JOBLIB & STEPLIB is specified ?