Modifying Job Parameters Programmatically

A useful option for multiple-step jobs that run repeatedly, but with different parameters each time, is to create a program to change the parameters. Lawson provides sample code in the SAMPLESRC source file that shows the main components of such a program.

To modify job parameters programmatically

  1. Use the Job Definition utility (jobdef) to define a multiple-step job.
  2. Create a program with the following main components (see the SAMPLESRC files for examples):
    Component Description
    Main program Includes the necessary header information, /COPY statements, code to retrieve the job information, code to loop through the job’s steps, and code to close the program. See the STEPMOD file of SAMPLESRC.
    Step modification Code that modifies the parameters for a step. For examples, see the STEP1 and STEP2 files of SAMPLESRC.
  3. Compile the program. How you compile it depends on whether you are referring to the UPDSTP binding directory or are binding the UPDSTP service program into your program. See STEPREADME in SAMPLESRC for more information.