How to override EXEC PGM in a PROC thru JCL ?

Showing Answers 1 - 9 of 9 Answers

eli43

  • Jan 30th, 2008
 

Assuming you mean modifying the exec, and not eliminating it, you can use symbolic parameters like with any parameter substitution.  For example, lets say you are in a shop that manually assigns sequential number suffixes 01-04 to a program name to control releases (Yes, this happens!  In a shop I was in, the first version of program MS043 would be compiled as MS04301, the second as MS04301, etc.  After the 04 version, shop standards is to revert to 01.  It actually worked quite well.) 

Inside the proc, set up a symbolic for the program name:  MS043=MS043
and set the program execute statement in the proc as:    //EXEC PGM=&MS043 

In the JCL for the job set the symbolic parameter to the correct program version when you execute the proc:  MS043=MS04301

A couple things to point out.  When a new version of MS043 is compiled and available, you need only change the JCL, not the proc.  Also, since MS043 by itseslf is not a valid
program name, if you forget to specify the symboic in the JCL there will be a problem (S806) at execution time...which can be considered a safety advantage over having a vaild (and possibly outdated) program named (and executed) as the default.


  Was this answer useful?  Yes

subha2010

  • Sep 2nd, 2010
 

As far as I am concerned whenever you want to override kindly give a steplib statement for exec pgm within your job and within joblib statement

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions