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

how do you create a dataset in a jcl with the same file organisation as that of another existing dataset?

1064


which utility is used a dummy utility?

1076


Explain the function of the steplib dd statement?

836


I have a cobol db2 program(PGM A) where other program (PGM B) will call this program and passes some 50 fields data to PGM A. PGM A has some layout in which it receives the data from PGM B. And this layout has been copied in the linkage section pf PGM A. After getting the data, PGM A writes the data in a flat file in the same layout which it receives from PGM B. PGM B is a simple COBOL pgm. Please provide a JCL to run these programs.

1981


How to override a dsn that is contained in a proc called by another proc? I need to do the override in the calling jcl?

912


Explain the function of //jcllib statement?

929


Differentiate between the joblib and the steplib statements?

1067


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

966


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

904


Explain dd statement in jcl?

848


I want to join to input files and write the matching fields on to an output file but i dont want the output file a sorted one

2126


what operation is performed by job statement?

838


What is condition checking in jcl? Is this possible?

836


How to do automated restart when a job abend?

1017


What are the rules employed while naming the steps in a job?

906