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
How to pass data to a program that is coded in an exec statement?
What is the difference between the positional and keyword parameters? Give examples.
How is the record format of an output dataset specified?
When The Define Jcl Is Not Available, How Can You Get Information About A Vsam File's Organisation ?
Explain how can values be passed from the job stream to an executable program?
what is use of dcb parameter in dd statement?
What dd statement is used to supply the name of a dataset?
if the submitter of a job wants to inform another user about the job completion, how can it be done?
what are JCLLIB and STEPLIB in JCL?
how do you code a null statement?
What is the function of job statement in jcl?
Can anybody tell what is tool used to generate the list of PROCS used in JCL to generate a PROCTREE
What are the 2 types of parameters in dd statement?
what is a jcl?
A dd statement consists of 4 fields. Name them?