I am trying to create 2 files (File1, File2) of different LRECL in the same PROC (at different steps) such that at any given point when the PROC executes, only one of the files is created (either File1 or File2). The Proc executes from 6 different jobs, 5 of which need to create the File1 and 1 job should create the File2.
There are various parms that are being passed in all the 6 jobs and there is a paramter that I can use to identify that the 6th job (that creates File2) is being executed.
Another way I thought of was to code both the steps in the PROC and override the "not required" steps in the relevant jobs so that they don't execute. But, I find that this is not a very good way to write code - hence I don't want to use this.
Is there any way I can have only one PROC and execute different steps depending on which job executes the Proc?
Any ideas are welcome! Do let me know if I need to provide any more info.
How does this help the OP? Your example shows a PROC creating a single named file in a PROC with one step, it doesn't show how to create 2 files in the PROC when tbe PROC is used in one JOB and only 1 file in another JOB.