U@LOADJOB

U@LOADJOB provides a practical method for easily modifying an existing job without redefining the whole job over again. By using the U@LOADJOB routine, the calling program does not need to know what the current job definition is all the way down to the current parameter settings.

U@LOADJOB populates the E@JR group from the an existing job definition. The E@JSPRINTER, E@JSDISTGRP, E@JSNBRCOPIES, and E@JSSAVE fields are retrieved from the JOBSTPRPT record for the default print file. In other words, the routine retrieves the field values assigned to the FormID .prt print file.

To use the U@LOADJOB routine

  1. Perform U@LOADJOB, which populates the E@JR group from the an existing job definition.

  2. Modify the E@JR group fields as needed.

  3. Perform U@CRTJOB or U@CRTSBMJOB.

Module JOBRTNS
Optional Fields (None)
Output Updates or adds job entries in the JOBSTP job definition file.

Required Fields

Field Type and length Definition
E@JRUSERNNAME A 10 Case-sensitive user name used to define the job.
E@JRJOBNNAME A 10 Actual job name used to define the job.

Unused Fields

The following fields are not populated by U@LOADJOB. The field values remain unchanged after the call to U@LOADJOB. This means that any field values or default values in these fields prior to the call to U@LOADJOB will be the same after the call.

Field Type and length Definition
E@JRCREATE A 1 Y = Deletes an existing job definition before creating a new one.
E@JRMODIFY A 1

Y = Deletes an existing job definition before creating a new one.

Note: If neither E@JRCREATE nor E@JRMODIFY has a value of Y, the routine sets E@JRMODIFY to Y.
E@JRDELQJB A 1 Deletes all Job Scheduler entries for the job except for running jobs. If the job already exists and it is running, then the routine fails and returns Y in the E@JRERROR field.
E@JRNOMODIFEX A 1 Forces the routine not to update the job if it already exists. If the job exists, then the routine returns Y in the E@JRERROR field.
E@JRJOBQUEUE A 5 Job queue you want to submit the job through. (If left blank, the default queue is used.)
E@JRSTARTTIME N 8 Date the job should start. (If left blank, the job starts now.)
E@JRSTARTDATE N 6 Time the job should start. (If left blank, the job starts now.)

Return Value

Field Type and length Definition
E@JRERROR A 1

Y = Call failed.

N = Call successful.

M = Maximum number of steps (20) have been read into E@JR. The job definition contains more steps but the E@JR group cannot load them all.