We are using 2 files , file one has data, file two is
empty.Using jcl how can we find the other file is empty?
Answers were Sorted based on User's Feedback
Answer / mchava
using IDCAMS utitlity
Print infile(file name) count(1)
it will check whether the file is empty or not
Is This Answer Correct ? | 14 Yes | 0 No |
Answer / sundar
Using IDCAMS utility
In SYSIN:
PRINT(infile) COUNT(1)
If this step return 4 then the file is empty otherwise if
return 0 then the file is not empty.
Is This Answer Correct ? | 10 Yes | 0 No |
Answer / sham
using idcams and its command print we can find wheather the
fiel is empty or not
Is This Answer Correct ? | 8 Yes | 1 No |
Answer / 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 |
Answer / bala
Compare the file with another known empty file. IEBCOMPR
comparison of two empty files should give non empty RC.
Is This Answer Correct ? | 6 Yes | 3 No |
Answer / vinay sonar
Print the contents of file using IDCAMS utility if it is
empty you will get MAXCC 4
Is This Answer Correct ? | 2 Yes | 0 No |
Answer / rajesh_m13
stepname exec vsamempt=yes
that shows empty file
Is This Answer Correct ? | 2 Yes | 1 No |
Answer / deepak dada, jaipur
the handling would happen
if the file is empty then pass the zero to return code in
cobol program
then go to jcl step and check for the conditiom code( 0,
eq) where the program is getting called and do whatever you
want to do
Is This Answer Correct ? | 0 Yes | 3 No |
Answer / deepak dada, jaipur
the handling would happen
if the file is empty then pass the zero to return code in
cobol program
then go to jcl step and check for the conditiom code( 0,
eq) where the program is getting called and do whatever you
want to do
Is This Answer Correct ? | 0 Yes | 5 No |
Suppose I have five jobs to do. But I want to hold one?
What does a disposition of (NEW,CATLG,KEEP) mean?
If a job has 3 steps and step 1 and step 3 should get executed and step 2 should not get executed irrespective of the return code from the previous steps. How can it be done?
There are two input sorting files and there is a need to create one sort out file which contains data of both input files. What is the sort card for this. Write a sample JCL for this using a control card?
what modification we need to do in jcl if we use sort in cobol? I mean whether we need to include temporary file used for sorting in assign statement?
If we want to see the eliminated duplicate record thru SORT, how its output file will be managed
Hi, can any one tell about " How do u eliminate the duplicates "
The disp in the JCL is MOD and the program opens the file in OUTPUT mode. What happens ? The DISP in the JCL is SHR and the program opens the file in EXTEND mode. What happens ?
In a proc i will concatinate 4 dd statements.i want to overide 3 dd statement through jcl how?
how to code instream data in procedure?
how to count the number of members in pds?
A STEP has more than 1 file as INPUT. And we have to put all these records int 1 output file. How to do ? //InputF DD DSN=ID.File1 DSN=ID.File2 DSN=ID.File3