How do you handle empty files in a JCL ?
Answers were Sorted based on User's Feedback
Answer / guest
Yes, we can handle empty file in JCL, there is utility
provided by IBM "UT939" ,eg //STEP1 EXEC PGM=UT939,
IF step1 return code is 4 then there is empty file and else
if return code is 0 (for non-empty file). We can handle
this with COND parameters whether to execute next step or
not if file is empty.
SUPPOSE WE DON'T WANT TO EXECUTE THEN
eg //STEP2 EXEC PGM=XXX,
COND=(4,EQ,STEP1)
| Is This Answer Correct ? | 6 Yes | 1 No |
Answer / bharani
Read first record of the file using IDCAMS, It will return
the cc=0 if the file is not empty, otherwise it returns
CC=4.
| Is This Answer Correct ? | 5 Yes | 3 No |
I have a sequential file in which there are 50 records. Now I want to copy all the 50 records in the reverse order into a new file? The last record in the original file should be the first record in the new file. How can I do it?
If we want to see the eliminated duplicate record thru SORT, how its output file will be managed
Could you provide an example and its effect OF, Using COND on JOB and EXEC both ?
Explain the purpose of dd * statement in jcl?
How many extents are possible for a sequential file ? For a VSAM file ?
how do you code a null statement?
what are JCLLIB and STEPLIB in JCL?
Explain about Specifying compiler options in the PROCESS (CBL) statement
We have an output dataset in job with disp parameter as SHR. Can we write data in that file dataset?
How we can code in a jcl to execute a job in a particular time and date without using any job shudular?. (Eg) i want to execute a particular job at 8 am on 01/01/2010.
What is GDG?
How do You skip a Step In JCL?