How to check empty file in jcl?
Answers were Sorted based on User's Feedback
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 |
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 |
I have multiple jobs ( JCLs with several JOB cards ) in a member. What happens if I submit it?
Explain COND used in JCL?
How to execute a set of JCL statements from a COBOL program ?
what is DSN parameter and DISP parameter is used for?
Immediate Job opening for mainframe professionals in Keane Bangalore. Please find the below details: Organization: Keane India Location: Bangalore Skill: COBOL, JCL,VSAM,DB2,CICS,IMS,REXX,CLIST Exp: 1 to 4 years only Employment Type: Permenant Employee Note: If you have attended keane interview in past 6 months please ignore this job opening. Please respond to email id keanemfjob@gmail.com OR keanemfjob@yahoo.in with your latest resume and following details, We will contact you within 24 hours: Total IT Exp: Exp in Mainframe: Current CTC: Expected CTC: Notice Period:
what is use of space parameter in dd statement?
I have a COBOL program that ACCEPTs some input data. How do you code the JCL statement for this?
WHAT IS DUMMY IN JCL? HOW TO USE IT? CAN ANYBODY SEND PROGRAM ON THIS?
do we need to mention the location of catalogued procedure for each it's call in a single job?
When a dataset is UNCATALOGED in a JOBSTEP, how to get its UNIT and VOL in JCL to refer in subsequent steps ?
I have a dataset with record length 40 in production, due to some requirements it was changed to 80. Then how can we know the jobs which are effected by this change and how can we resolve it.
What is a MODEL Paramater in GDG ?