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 ? | 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
CC=4.
Is This Answer Correct ? | 5 Yes | 3 No |
can we bowse or edit the GDG dataset if it is a tape entry?
1) SORT FIELDS=(20,4,CH,D,10,3,CH,D) OUTREC FIELDS=(7:20,4,C' FUTURE ',20,2,10,3,1Z,1,9,13,7, 24,57,TRAN=LTOU,6X'FF') This example illustrates how a fixed-length input data set can be sorted and reformatted for output. The SORTIN LRECL is 80 bytes. The reformatted output records are fixed length with a record size of 103 bytes. SOLRF (the IBM-supplied default) is in effect, so unless the SORTOUT LRECL is specified or available, it will automatically be set to the reformatted record length of 103. in the above example i have some doubts that a) sort fields=(20,4,CH,D,10,3,CH,D) -what exactly it does and this fields related to output record fields or input record fields b)outrec used to refprmat the records after sorting that means could please reply me as soon as possible Thanks. Venkat
in a jcl, a large volume dataset is loaded to a table using bmcload in step1 and an image copy of the loaded table is taken using bmccopy in step2. Step2 abends because the image copy dataset cannot hold the volume of the table. How can this be rectified?
Explain the function of a dd statement?
The maximum number of in-stream procedure you can code in any JCL is ?
Suppose I have 5 dataset listed under a single DD name in a catlogued PROC. How can I override one of those 5 dataset (say 3rd dataset)?
what is a cataloged procedure ?
Suppose I have Five Steps in PROC In this Case I want to Execute third Step in PROC using Main JCL don't use any COND Explain with Coding Thanks & Regards SHREE
I have 10 steps, I want to run STEP1 TO STEP4 then I should not run STEP5 and STEP6. Aganin I want to execute from STEP7 to STEP10. ONLY using CONDITION CODES how can we execute this process? 1. Where we can set cond codes for STEP5 and STEP6? 2. How can we execute remaining steps from STEP7 to STEP10?
Say I have a file with 12 records. Each record has the name of the month. I have to append data in these 12 records into 1 record. How is it possible?
At what stage, operator can change the class and priority of a submitted job?
I have 15 flat files. each record in the files have the monthly salary for 12 months with the employee number. Now I want to concatenate the 15 files such that for the employee numbers that are common the o/p file should have only one record and the salaries should be concatenated to that record. How can we do it with JCL?