How to test thru JCL if any file(PS or VSAM) is empty or
not. I do not want to use any COBOL prog or Ezytrieve and
want to do using utility.

Answer Posted / deb

First SORT the input file.
Assume the sorted o/p is in MY.SORT.FILE, then run this step

//CHEKEMTY EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//MYFILE DD DSN=MY.SORT.FILE,DISP=SHR
//SYSIN DD *
PRINT INFILE(MYFILE) CHARACTER COUNT(1)

if the above step returns a RC=4, then the file is
empty

Is This Answer Correct ?    10 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Many jcl statements contain specific values designed to direct and control the execution of the statement. What are these fields called?

731


which parameter is use to declare the name of dataset in dd statement?

757


Is their any limit for data sets?

719


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

615


What parameter directs the output of the job log dataset?

774






what is the resolution for sb37 error

7738


Suppose I have a program in cobol name ”careerride” and want to execute the program by jcl. Specify the process?

679


What is jcl in mainframe, and how many types of jcl statements are there for a job?

641


List the different jcl statements that are not permitted in the procedures?

650


How can a fb file convert to vb file using sort program?

822


What do you understand by the term job time – out and how can you overcome that?

614


How to resolve the error "WER488A JOIN CAPACITY EXCEEDED" I am using SYNCSORT with JOINKEYS to compare 2 files. I am Getting error - > WER488A JOIN CAPACITY EXCEEDED There are 2 files to be compared with about 2 million records each. LRECL is 3665. Can somebody give a pointer as to how to resolve this problem? I am using SYNCSORT with JOINKEYS to compare 2 files. I am Getting error - > WER488A JOIN CAPACITY EXCEEDED There are 2 files to be compared with about 2 million records each. LRECL is 3665. Can somebody give a pointer as to how to resolve this problem?

7633


what is the purpose of coding notify parameter in job statement?

695


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

638


What statement marks the beginning of a job step; assigns a name to the step; identifies the program or catalogued or in-stream procedure to be executed in the step?

657