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

how can u understand ps and pds from their names ?

1 Answers   TCS,


is there any possibilities for sumbitting more than one job in single jcl? if yes...based on which thing they will execute..(priority,class,time,written order..?)

3 Answers   HSBC,


what is use of space parameter in dd statement?

0 Answers   IBM,


IIN APITUDE THEY GAVE ONLY 10 QUESTIONS.. THEY ARE SIMPLE ONE FROM NUMBER SERIES,BOATS,TIME & DISTANCE,PROFIT &LOSS,FIND OUT THE NUMBER ? 9 25 4 36 81 64 49 AND surveillance SPELLINGS E.T.C

0 Answers  


how would you create a temporary dataset? And where will you use them?

0 Answers  






i have 5 steps to execute in that i want to skip 3nd step and start execute from forth step how can u do this.

7 Answers   Syntel,


what operation is performed by job statement?

0 Answers   IBM,


how to increase the space of a dataset in instream procedure.

1 Answers   HCL,


How do you overcome this limitation ?

0 Answers  


Hi, Please clear me when COND=ONLY and COND=EVEN. Explain me with example.

2 Answers   GJ,


What is GDG and what is the maximum limit of versions that can be created?

9 Answers   Convergys,


What is the purpose of the PARM keyword in the EXEC statement?

3 Answers  


Categories