How to identify where file is empty or not? How many ways are
there to identifying?
Answer Posted / swapnilkumar
There are two ways to check for the file empty or not.
1) With FILEAID
2) With IEBPTPCH
//STEPXX EXEC PGM=FILEAID
//DD01 DD DSN=P1.SEQUEN.INPUT.FILE,DISP=SHR
//DD01O DD DUMMY
//SYSPRINT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SYSIN DD DUMMY
other is
//STEPXX EXEC PGM=IEBPTPCH
//SYSPRINT DD SYSOUT=*
//SYSUT1 DD DSN=P1.SEQUEN.INPUT.FILE,DISP=SHR
//SYSUT2 DD DUMMY
//SYSIN DD DSN=SYS1.CTLLIB(P1CTL),DISP=SHR
where CTL card has
PRINT TYPORG=PS,CNTRL=1
The either of above step gets RC=04 then the file is empty
else if its zero then file has some data in it.
| Is This Answer Correct ? | 5 Yes | 2 No |
Post New Answer View All Answers
//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 /*
In sms datasets, what is the function of the dd avgrec keyword?
How can the attributes of one sms dataset be copied to another dataset?
What is the purpose of disp parameter?
What parameter directs the output of the job log dataset?
Is it possible to left uncode disp?
How does jcl specify the job to the operating system?
How does the jcl specify the job to os?
how JCL works?
Explain the function of dd name parameter with a 2 part structure; audit.report?
What is notcat 2 - gs?
what is the use of IEBGENER utility?
Explain the function of job statement in jcl?
What is 'mounting' of volumes ? Is there anything that a programmer can do in it ? How to find currently mounted volume ?
which parameter is use to declare the name of dataset in dd statement?