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,
|Is This Answer Correct ?||5 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
|Is This Answer Correct ?||5 Yes||3 No|
Answer / guest
by using dummy
|Is This Answer Correct ?||2 Yes||6 No|
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?
SORT card to eliminate duplicity.
hi guys what r the diff types of procs in jcl? bye ramya
I have two input SORTIN files and We need to create one SORTOUT file which contains data of both input files. What is the SortCard for this?. Suppose the length of the both files are different, then How we do it? Please reply ASAP
Hi Please try to be to-the-point. 1) How to INCLUDE a JCL segment in a JOB ? (A Small example) 2) What is SPOOL and what is SPOOL FULL ? and how to direct the output of a Jobstep to SPOOL ?
In which table PLAN is registered in ?
A statement about PROCs is " In PROCs, Symbolic Parameters can be assigned on PROC and EXEC", BUT On which EXEC, (i) On the JCL's EXEC which is calling to PROC1. (Inside JCL, EXEC PROC1) (ii) or On the PROC's EXEC where it calls the PGM1. (Inside PROC, EXEC PGM=PGM1)
What is the difference between static call & Dynamic call ?
What is the maximum length of a single line of jcl?
how can you check if a file is empty using jcl?
What is the difference between catalogue procedure and In-Stream procedure?
What is a COND parameter in JCL?