How do you handle empty files in a JCL ?

Answers were Sorted based on User's Feedback



How do you handle empty files in a JCL ? ..

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

How do you handle empty files in a JCL ? ..

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

How do you handle empty files in a JCL ? ..

Answer / guest

by using dummy

Is This Answer Correct ?    2 Yes 6 No

Post New Answer

More JCL Interview Questions

can we bowse or edit the GDG dataset if it is a tape entry?

4 Answers  


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

1 Answers   Tesco,


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?

0 Answers   IBM,


Explain the function of a dd statement?

0 Answers  


The maximum number of in-stream procedure you can code in any JCL is ?

5 Answers  






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)?

5 Answers   Cognizant,


what is a cataloged procedure ?

1 Answers   Xansa,


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

4 Answers   Merrill Lynch,


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?

2 Answers  


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?

2 Answers   CTS,


At what stage, operator can change the class and priority of a submitted job?

2 Answers  


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?

1 Answers  


Categories