Previous Topic: AGENTMSG Command: Send Messages to a Scheduling ManagerNext Topic: CELLTRC Command: Trace Storage Cell Usage


APPLJOB(AJ) Command: Control Jobs

To control jobs, use the APPLJOB command.

The short form of this command name is AJ.

Type: General command

This command has the following syntax:

{APPLJOB|AJ} jobspec
       [LIST]
       [APPLICATION(applspec)]
       {COMPLETE}
       {READY}
       {RESUBMIT}                        See Expanded Syntax following
       [DISPLAY]
       [EXPEDITE]
       [CANCEL[(DUMP|PURGE)]]
RESUBMIT  [DATASET(dsname)]
          [MEMBER(membername)]
          [JOBNAME(name)]
          [RRJOBID(jobid)]
          [USER1(userinfo)]
          [USER2(userinfo)]
          [USER3(userinfo)]
          [USER4(userinfo)]
          [ENCPARM1(encparmoperand)]
          [ENCPARM2(encparmoperand)]
          [ENCPARM3(encparmoperand)]
          [ENCPARM4(encparmoperand)]
          [ENCPARM5(encparmoperand)]
          [ENCPARM6(encparmoperand)]
          [ENCPARM7(encparmoperand)]
          [ENCPARM8(encparmoperand)]
          [ENCPARM9(encparmoperand)]
          [ENCPARMA(encparmoperand)]
          [ENCPARMB(encparmoperand)]
          [ENCPARMC(encparmoperand)]
          [FROMSTEP(stepname)]
          [TOSTEP(stepname)]
          [EXCLSTEP(stepname,...)]
          [VERIFY|NOVERIFY]
          [RESTART]
          [CASESENSITIVE]
jobspec

Specifies the full name of the job.

LIST

Requests detailed information about the specified job. LIST is the default. If you specify LIST, APPLICATION is the only other valid operand.

APPLICATION(applspec)

Specifies the name and generation of the application containing the job that the APPLJOB command operates on. This operand is optional; however, it is mandatory when you specify REQUEST or RESUB. If the job is not yet submitted, specify the application name. If more than one generation of the application is active, you can specify the relative or absolute application generation (or the OLDEST keyword).

Format: Use one of the following formats for applspec:

COMPLETE

Simulates normal job completion. COMPLETE immediately posts successor jobs and external references. You can use COMPLETE when the job failed, but a rerun is unnecessary. You can also use COMPLETE before a job starts executing.

READY

Removes all job dependencies (except resources) from a job (including time, predecessors, manual hold).

RESUBMIT

Specifies the job is resubmitted. For more information about the RESUBMIT operands, see the section “RESUBMIT.”

DISPLAY

Displays the JES status for the job.

EXPEDITE

Expedites a job manually. Requires the CA WA Service Governor ESP Edition.

CANCEL[(DUMP|PURGE)]

Cancels an executing job and optionally, purges it or requests a dump.

RESUBMIT

The RESUBMIT operand requests that the job is resubmitted. Use the last data set from which the job was submitted, unless you use the DATASET keyword to specify an alternate data set.

The following list describes the operands for the RESUBMIT operand:

DATASET(dsname)

Specifies an explicit JCL library name from which a job is resubmitted. You can include the member name in dsname.

Note: If, when resubmitting a job, you specify a JCL library name, the JCL library that you supply in the RESUBMIT DATASET operand will continue to be used for future resubmits. To revert to the original JCL library, specify an asterisk in the RESUBMIT DATASET operand. This operand applies to the resubmitted job and any future resubmitted jobs when you code the asterisk.

Except for RESUBMIT, entering an asterisk in the DATASET operand has the same effect as entering a blank.

MEMBER(membername)

Specifies a member name of the JCL data set for the job to be resubmitted.

JOBNAME(name)

Specifies the job name for the rerun, if the name is different from the original name.

RRJOBID(jobid)

Specifies the JES job number of the job being rerun. You can use RRJOBID only for jobs being restarted using CA WA Restart Option ESP Edition. By default, RRJOBID corresponds to the previous run of the job.

USER1(userinfo) and USER2 to USER4

Specifies user data for resubmitted jobs. This data passes to the USER1-USER4 symbolic variables. Initially, these variables are set to a null string (' ').

You can specify up to 68 characters of information for each value.

If the user data must be in lower or mixed case, specify the CASESENSITIVE option.

ENCPARM1 (encparmoperand) and ENCPARM2 to ENCPARMC

Specifies an operand of the ENCPARM command. You can specify up to 60 characters of information for each operand. The ENCPARM command is available only for jobs whose restart manager is CA WA Restart Option ESP Edition.

FROMSTEP (stepname)

Specifies the first step of the job to be rerun. Use (stepname.procstepname) for steps in a z/OS Agent procedure. You can use FROMSTEP only with CA WA Restart Option ESP Edition. The ENCPARM command is available only for jobs whose restart manager is CA WA Restart Option ESP Edition.

TOSTEP (stepname)

Specifies the last step of the job to be rerun. Use (stepname.procstepname) for steps in a z/OS Agent procedure. The default is the last step. You can use TOSTEP only with CA WA Restart Option ESP Edition. The ENCPARM command is available only for jobs whose restart manager is CA WA Restart Option ESP Edition.

VERIFY

Verifies that a data set and member exist by opening and closing it.

NOVERIFY

Does not verify that a data set and member exist.

EXCLSTEP(stepname)

Excludes a specific step or a list of specific steps from the list specified with FROMSTEP and TOSTEP. You can exclude a maximum of 100 steps.

RESTART

Restarts the job using CA WA Restart Option ESP Edition.

CASESENSITIVE

Disables case translation. Without this option, z/OS Agent converts the values of all operands to uppercase. Use this option if the user parameters USER1-USER4 must be in lowercase or mixed case.

You can abbreviate CASESENSITIVE to CS.

Example: List Detailed Information About a Job

The following AJ LIST command requests a detailed display of job JOBNN, in application WS24002, generation 3.

AJ JOBNN APPL(WS24002.3)

Here is a sample response:

Job=JOBNN(23663), Completed->CC 0
  Submitted ................ 2006/10/25 10:39
  Started .................. 2006/10/25 10:40
  Completed ................ 2006/10/25 10:40
  JobProfile=JOBNN.WS24002, Class=A, Priority=7, Step=STEP05,
  SrvClass=JES SLOW, SysName=SYSA, Sysplex=SYSAPLEX, Asid=00EA,
  SmfId=SYSA, JesNode=CYBJES, EspProc=CYBER.CNTL.ESPPROCS(WS24002)

Appl=WS24002.3
  Scheduled ................ 2006/10/25 07:17
  Built .................... 2006/10/25 07:17
  DueOutPropagation, Event=CYBER.WS24002, TrigUser=CYBUSR1

The following AJ command requests a detailed display of job JOB003 that has the job qualifier J3 in application APPL001, generation 4.

APPLJOB JOB003.J3 LIST APPLICATION(APPL001.4)
Job=JOB003.J3, PredWait, Hold=1
  Expected completion ...... 2003/12/04 17:02
  EspProc=CYBUSR1.ESPPROC(PROC001)
Predecessors:
  Job=JOB001.J1(42255), Started, Step=1
Successors:
  Job=JOB004.J4, PredWait, Hold=2
Resources:
  3 RES001
Enqueues:
  Shr ENQRES01, Excl ENQRES02, Shr ENQRES03, Excl ENQRES4,
  Shr ESPENQ_JOB(JOB001.J1)_APPL(-.-), Shr ESPENQ_JOB(JOB002.J2)_APPL(-.-),
  Excl ESPENQ_JOB(JOB003.J3)_APPL(APPL001.4)
Appl=APPL001.4
  Scheduled ................ 2003/12/04 16:51
  Built .................... 2003/12/04 16:51
  DueOutPropagation, Event=CYBUSR1.EVENT01, TrigUser=CYBUSR1

Example: Resubmit a Job

The following AJ command resubmits PAYJOB18 using CA WA Restart Option ESP Edition.

AJ PAYJOB18 RESUB RESTART APPL(PAYROLL.0)

Example: Resubmit a Job and Select Which Steps are Rerun

The following AJ command resubmits PAYJOB2 and selects which steps are rerun.

AJ PAYJOB2 APPL(PAYROLL.0) RESTART RESUB -
FROMSTEP(STEP020) TOSTEP(STEP060) -
EXCLSTEP(STEP0030 STEP0050)

The AJ command reruns only the steps marked with an asterisk. PAYJOB2 has the following steps:

Example: Resubmit a Job From a Different Library

The following AJ command resubmits PAYJOB2 from the CYBER.COPY.JCL library.

AJ PAYJOB2 RESUB APPL(PAYROLL.0) -
DATASET('CYBER.COPY.JCL')

Example: Resubmit a Job With a Variable

The following AJ command resubmits PAYJOB10 using original JCL library. The character string ',RESTART=STEP20' is passed to the JCL as the USER1 variable.

AJ PAYJOB10 RESUB USER1(',RESTART=STEP20') -
APPL(CYBER1)

The following statement is a sample job statement and the corresponding job statement that is used for resubmission.

PAYJOB10 JOB...MSGCLASS=X%USER1

The job statement resolves to the following example:

PAYJOB10 JOB...MSGCLASS=X,RESTART=STEP20

Example: Resubmit a Job and Pass a Run Type Operand to a Restart Program

PAYJOB11 is resubmitted using the USER2 symbolic variable. USER2 passes a run type operand to a restart program. For the first run of the job, the run type operand is P. The run type operand is R when the job is resubmitted.

In the JCL
     //STEP1 EXEC UCC11RMS,RUNTYPE='%USER2'
In the Symbol Library
     IF USER2='' THEN USER2='P'
On Resubmit
     AJ PAYJOB11 RESUB USER2('R') APPL(PAYROLL)