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
Explain the function of dd disp parameter?
Explain the purpose of the dd keylen parameter?
Where & How Do You Code Identifier In Jcl?
what JCL Procedures?
what is DSN in JCL and what are the parameters to declare the DSN?
Explain how can a jobs execution priority be modified?
How to submit a jcl from cics?
What parameter directs the output of the job log dataset?
which utility is used to run a cobol-db2 program?
List the various advantages of using jcl language?
//S10 EXEC PGM=ICETOOL //TOOLMSG DD SYSOUT=* //DFSMSG DD SYSOUT=* //CON DD DSN=VAR.INPUT1,DISP=SHR // DD DSN=VAR.INPUT2,DISP=SHR //OUT DD DSN=VAR.OUTPUT,DISP=(NEW,CATLG,DELETE), // SPACE=(CYL,(5,5)),UNIT=SYSDA //TOOLIN DD * * Splice the needed data from the two VB files together SPLICE FROM(CON) TO(OUT) ON(5,5,CH) WITHALL - WITH(12,5) WITH(22,20) VLENMAX /*
Explain the function of the steplib dd statement?
Brief description of inline procedure of jcl.
What is NOTCAT ?
what disp parameter we mention for creation of temporary dataset so that we can use it in later steps?