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
I have a job called careerride and some steps in it as step1,step2. But I want to execute step2 before step1 ? How do I do that?
which utility is used to run a cobol-db2 program?
For what purpose steplib and joblib are used ?
how do you code a null statement?
what is the purpose of coding notify parameter in job statement?
What is the significance of addrspc parameter in exec statement?
The disp in the JCL is MOD and the program opens the file in OUTPUT mode. What happens ? The disp in the JCL is SHR and the pgm opens the file in EXTEND mode. What happens ?
How can the attributes of one sms dataset be copied to another dataset?
How can the disposition of sysout datasets be set for an entire jobstream?
Name a few IBM utility programs, and explain its function.
What is the significance of addrspc parameter in the exec statement?
My Question is 1. How to cound no. of records in JCL. Please explain with an example. 2. How to execute only odd steps in JCL? I know EDIT TYPE = Inculde, Step Name = 1,3,5 and COND code for all even step. Anyone knows other than this.
if we want to use a gdg which is already created by some job, then how to use the reference of the last generation in a jcl?
how to compare two datasets without using superce because output is limited to 133 bytes
Which statement is used to identify the private libraries in job?