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


Please Help Members By Posting Answers For Below Questions

How to pass data to a program that is coded in an exec statement?

838


What is the difference between the positional and keyword parameters? Give examples.

716


How is the record format of an output dataset specified?

749


When The Define Jcl Is Not Available, How Can You Get Information About A Vsam File's Organisation ?

751


Explain how can values be passed from the job stream to an executable program?

633






what is use of dcb parameter in dd statement?

778


What dd statement is used to supply the name of a dataset?

780


if the submitter of a job wants to inform another user about the job completion, how can it be done?

760


what are JCLLIB and STEPLIB in JCL?

684


how do you code a null statement?

780


What is the function of job statement in jcl?

638


Can anybody tell what is tool used to generate the list of PROCS used in JCL to generate a PROCTREE

1972


What are the 2 types of parameters in dd statement?

654


what is a jcl?

693


A dd statement consists of 4 fields. Name them?

937