We are using 2 files , file one has data, file two is
empty.Using jcl how can we find the other file is empty?

Answer Posted / raghu

This can be done using ICETOOL.
//STEP1 EXEC PGM=ICETOOL
//IN DD DSN=……input file1
//TOOLMSGDD SYSOUT=*
//DFSMSG DD SYSOUT=*
//TOOLIN DD*
COUNT FROM(IN) EMPTY
/*

In the above JCL, Input file1 is empty. If we run this JCL
it will retrun NON-ZERO retrun code.
adv: It will be very helpful when we want to run some steps
after checking a particular file is empty or not.

Is This Answer Correct ?    8 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

what is use of disp parameter in dd statement?

647


What is notcat 2 - gs?

919


What do you understand by the term notcat 2 – gs?

737


What is the function of the dd avgrec keyword in sms datasets?

822


For what purpose steplib and joblib are used ?

678






what operation is performed by job statement?

649


Mainframes gets a text file that contains the name of the file. Now using JCL i want to locate that file name in the mainframe system and perform further processing. Please tell how to proceed

1957


What are the jcl procedures?

635


Name a few IBM utility programs, and explain its function.

4422


which parameter is used to check the syntax of a jcl without executing it?

789


when can a job time-out occur? How to overcome that?

737


Is their any set of rules for dd? Explain.

648


Which statement is used to identify the private libraries in job?

668


How to submit jcl through a cobol program?

665


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

631