How to identify in JCL that an input file is empty without
reading it?
Answer Posted / jeeva225
//job331ab job notify=&sysuid
//step1 exec pgm=idcams
//sysprint dd sysout=*
//input dd dsn=job331ab.prasad.infile,disp=shr
//sysin dd*
print infile(input)count(1)
/*
if return code rc=00 then it is not empty file,
return code rc=04 then it is empty
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
How is a type of file defined in the jcl that executes the cobol program?
Explain the function of the dd dcb keyword?
What are the difference between jcl and jes?
What are the parameter we cannot use in procedure?
I had Records in file Like this Company Code IBM 2 IBM 1 IBM 4 WIPRO 3 WIPRO 2 WIPRO 9 TCS 4 TCS 6 TCS 3 i want the record of every company with highest code How can i do that?
Explain in DD statement what is the use of DCB parameter?
Brief description of inline procedure of jcl.
how you can access an uncataloged dataset in a JCL?
I have many files which i am receiving from client everyday. I have one step for every file to check for empty or not. Here client gives 30 files i need to check for every file for empty or not and i need to perform 30 steps. Can I do it in single step. Dynamically i need to change the File name in my step.
How can return codes be tested before execution of a job step?
Describe the various parameters utilized in the creation of a gdg?
What dd statement is used to supply the name of a dataset?
why should SYSIN DD * statement should not be included inside a PROCedure snippet??? please answer this.. i need to know.
What is NOTCAT ?
How can the disposition of sysout datasets be set for an entire jobstream?