How to check empty file in jcl?

Answers were Sorted based on User's Feedback



How to check empty file in jcl?..

Answer / muttaiah

There are so many utilities(ICetool, IDcams, Iebgener)
which we can make use to check whether a file is empty.

//Jobcard
//stepname exec pgm=idcams
//dd1 dd dsn=xxx.pds,disp=shr
//sysin dd *
print infile(dd1) count(1)
/*

Here the job will give a return code '0' if the file has
atleast 1 record and RC-4 if there are no records

Suppose you want to check whether any records are there
apart from header and trailer. then Make the count as Count
(3).

//sysin dd *
print infile(dd1) count(3)
/*

Is This Answer Correct ?    16 Yes 0 No

How to check empty file in jcl?..

Answer / sravani

using iebptpch

Is This Answer Correct ?    2 Yes 0 No

How to check empty file in jcl?..

Answer / arun sundar j

It can also be possible by using SPEMPTY

Is This Answer Correct ?    2 Yes 1 No

How to check empty file in jcl?..

Answer / pradeep k (cr)

Thanks all for ur valuable answers, but i have one small
doubt.
I tried with ICETOOL, by giving empty input file and i am
able to sumit job with maxcc 000 and outptu is comming fine
as total recard count as 0.

in same way, i am trying to submit jcl provided by Muttaiah
but i am getting jcl error message like 'ILLEGAL KEYWORD
INT RINT' at the place of PRINT statement.

Can anyone suggest me, what's my mistake?

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More JCL Interview Questions

suppose i have 10 job steps and i want to execute only step 6.How to write?

6 Answers  


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

0 Answers   IBM,


can we copy a file from fixed block to variable block and vice versa ....asap

1 Answers  


Explain the function of dd disp parameter?

0 Answers  


What is job control language?

0 Answers  






How to send notification to multiple users through jcl???

8 Answers  


If a jcl has just 1 step and the input file to this does not exist, then what will happen if we submit this job?

3 Answers  


WORKING-STORAGE SECTION. 77 W-A PIC 9(3)V99 VALUE 23.75. 77 W-B PIC ZZ9V99 VALUE 123.45. PROCEDURE DIVISION. MOVE W-A TO W-B. DISPLAY W-B. STOP RUN. compiler : IGYGR1080-S A "VALUE" clause literal was not compatible with the data category o subject data item. The "VALUE" clause was discarded. WORKING-STORAGE SECTION. 77 W-A PIC 9(3)V99 VALUE 23.75. 77 W-B PIC ZZ9V99. PROCEDURE DIVISION. MOVE 123.45 TO W-B. MOVE W-A TO W-B. DISPLAY W-B. STOP RUN. 2375

0 Answers  


what is DD statement is used in JCL?

0 Answers  


How Can we see all generations of a GDG ?

3 Answers   Polaris,


wht is sysudump n sysout,sysprint ?

1 Answers   L&T,


What is 'mounting' of volumes ? Is there anything that a programmer can do in it ? How to find currently mounted volume ?

0 Answers   IBM,


Categories