I need to create a step in my jcl that will handle the following:
A previous step in my JCL proc has determined that a file is empty and sets a return code of 33.
All other steps int the PROC are currently bypassed when the file is empty.
What I need to do is create a blank record and write it to the file when the return code of 33 is detected.
Changing the program that sets the return code is not an option.
This method would have to be as generic as possible. My PROC is used in different jobs for files with different record lengths. I don't want to have to create dummy files for each job.
The utility or method would have to take the file as input and create and write a blank record to the file without a dummy file as input.
This is how I invision the step in my PROC (all I need is the utility):
//STEP01 ... this is the step that returns a cond of 33 when file is empty
I will add the following after STEP01
// IF RC = 33 THEN
//STEP01A EXEC special utility
//SYSUT1 DD DSN=file from step01,DISP=SHR
//SYSUT2 DD DSN=file from step01,DISP=SHR
//SYSIN DD DSN=CTRLCARD.LIB(member to instruct utility to create blank record based on cataloged record length of SYSUT1 file)