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 |
How can you trap abends in the JCL?
what is the COND=EVEN ? Can anyone give me an example to explain the usage.
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 is alternate index?
What is model dataset label(Model DSCB)?
Is their any limit for data sets?
1.How to check for the errors using TYPRUN=SCAN?What will be the output if we give TYPRUN=SCAN?
State the uses of syspring, sysin, sort fields, sum fields and dummy.
I have Job A and Job B. I want to trigger Job B from Job A. Please advise.
can any one plzzzzzz tell the jcl code for creating ps using idcams
with out sorting how to copy records from one file to another file using jcl.Mean I have one input file in which the record are like 1,6,5,4,2,3(for example) and i want to copy to output file from top to bottom(without sorting) like 3,2,4,5,6,1.so I want the JCL for this.cna any one can answers?
Explain the function of //jcllib statement?