How do you handle empty files in a JCL ?

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

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?

826


how to compare two datasets without using superce because output is limited to 133 bytes

1495


What is the difference between run mode and addressing mode?

647


what is SOC4 error?

742


Can we call instream to catalog and catalog to instream?

691






I have a cobol db2 program(PGM A) where other program (PGM B) will call this program and passes some 50 fields data to PGM A. PGM A has some layout in which it receives the data from PGM B. And this layout has been copied in the linkage section pf PGM A. After getting the data, PGM A writes the data in a flat file in the same layout which it receives from PGM B. PGM B is a simple COBOL pgm. Please provide a JCL to run these programs.

1740


Brief description of inline procedure of jcl.

695


when does a dataset go uncataloged?

845


What is catelog procedure and how many catelog procedure to use in one job?

7485


What is the function of the steplib dd statement?

752


how do you code a null statement?

789


What is timing concept in mainframe?

1673


Name the parameters which can be used to limit the number of records written to a sysout dataset?

662


what happens when COND is coded in JOB statement and when COND is coded inside EXEC statement?

787


is there any way to execute more than one proc in the same exec statement at the same time..?

2117