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 |
suppose i have 10 job steps and i want to execute only step 6.How to write?
what is the purpose of coding notify parameter in job statement?
can we copy a file from fixed block to variable block and vice versa ....asap
Explain the function of dd disp parameter?
What is job control language?
How to send notification to multiple users through jcl???
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?
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
what is DD statement is used in JCL?
How Can we see all generations of a GDG ?
wht is sysudump n sysout,sysprint ?
What is 'mounting' of volumes ? Is there anything that a programmer can do in it ? How to find currently mounted volume ?