$T Job - Change a job's class, scheduling priority, or affinity
Function
To change the execution class, priority, or affinity for the specified jobs, or to SPIN either the JESLOG data sets or a particular SYSOUT DD associated with a job.
Syntax
- 1 offs can be coded up to 8 times
- 2 Multiple Sysaff values can be coded up to 33 times
Parameters
- Age|DAys<days | Age|DAys>days
- Specifies the age of affected jobs in days. Only jobs more (with DAYS>nn)
or less (with DAYS<nn) than the specified number of days in age are affected, The days are
counted from the current hour.Age is computed by subtracting the job's "begin time" from the current time. That is, the time that the job was initially added to its current queue is the "begin time" except:
- The "begin time" for jobs that are actively running is the same as the time the command was entered. That is, the age for running jobs is always zero days and hours.
- The "begin time" for jobs in the OUTPUT or HARDCPY queue is the time that the job ended execution. If the job does not run, then the time is the time that the job was placed in its prior queue.
- BUSY=
- Specifies
one of the following:
- The system name or number on which the job is busy. Note that you can specify a value of 0 to indicate the job is not busy. You can also specify values above 32 to match systems with invalid values in the BUSY value (for example, $TJOBQ,BUSY>32)
- YES or ANY, indicating that all busy jobs are to match
- NO or NONE, indicating that all non-busy jobs are to match
- CARDS=cards
- Specifies the number of input cards associated with the job.
- CC=(ABEND|ABENDED|CANcelled|CNVT_abend|CODE| COMPleted|ENDed_by_cc|EOM_failure|FLUSHED|JCLerror| SECurity_failure|TYPE)
- Specifies
the completion information associated with the job.
- ABENDED
- Specifies only jobs which have abnormally ended.
- ABEND
- Specifies the ABEND code associated with the job's termination.
- CANcelled
- Specifies only jobs which were cancelled by the operator.
- CNVT_abend
- Specifies only jobs which have abnormally ended during the conversion phase.
- CNVT_ERROR
- Specifies job that failed due to a converter error.
- CODE
- Specifies the last (or highest) completion code of steps in the job.
- COMPleted
- Specifies only jobs which completed.
- ENDed_by_cc
- Specifies only jobs which were ended by a step completion code.
- EOM_failure
- Specifies only jobs which failed in end-of-memory processing.
- FLUSHED
- The job was cancelled (flushed) and is no longer eligible to run.
- JCLerror
- Specifies jobs which did not execute due to a JCL error.
- SECurity_failure
- Specifies jobs which failed security validation.
- SYSTEM_FAILURE
- Specifies jobs that failed due to system failure.
- Class=class
- The new class that is assigned to the specified job(s).
You may not move jobs in the execution-batch-processing class to a
non-execution batch processing class, and vice versa. Note that wildcard
characters can be specified when used as a selection limiting keyword:
see Using wildcards for details.
- When changing the job class, be sure the new job class is defined on the member on which the job executes.
- The class change resulting from this command affects JES2 job
scheduling only. If you move a job from class P to class S with this
command, the job is eligible for initiators processing class S jobs,
and is no longer eligible for class P initiator processing.
If you enter the command before the job's conversion, the class remains P for conversion purposes, but is then scheduled for an initiator selecting class S jobs.
If you enter the command after conversion, job attributes determined by class during conversion (for example, default region size) are unchanged, but the job is scheduled for an initiator selecting class S jobs.
- If these values are modified for a job in execution note that the service class is not changed. If these changes would result in a different service class this takes effect only if the job is restarted. The service class of an executing job can be modified only by explicitly changing the service class.
- CMDauth=cmdauth
- Only
the jobs that can be affected from the specified remote(s) or node(s)
will be changed. The valid specifications are:
- LOCAL|ANYLOCAL
- Only the local devices at the local node can affect the output.
- Nnnnn|nodename
- Only local devices at the specified node can affect the output.
- Rnnnn
- Only the specified remote device can affect the output.
- NnnnnRnnnn|nodename.Rnnnn
- Only the specified remote device at the specified remote node can affect the output.
- destid
- A destid corresponding to any of the above remote devices. Note: Specification of the CMDAUTH filter does not override the authority of the console from which the command is issued; both the authority of the console and the specified CMDAUTH filter must match for the job to be affected.
- DELAY={BUSY_ON_HOLD|HOLD|LIMIT|LOCKED| No|QUEUE_ERROR|SCHENV|SECLABEL|SPOOLS_NOT_AVAILABLE|SYSAFF| MEMBER_STATUS|Yes}
- Specifies
reasons why a pre-execution job will not enter execution:
- BUSY_ON_DEVICE
- The job will not execute because it is busy on a device (such as an offload job transmitter).
- HOLD
- The job will not execute because it is held, its job class is held, or another job with the same jobname is executing.
- LIMIT
- The job will not execute because the job class execution limit has been reached (as specified by JOBCLASS XEQCOUNT=(MAX=)).
- LOCKED
- The job will not execute because it's being updated by JES2.
- SECLABEL
- The security label (SECLABEL) assigned to the job is not defined as active on any member that is active.
- SYSAFF
- Each of the members for which the job has affinity (SYSAFF) is inactive, or the job has specified independent state, and the JES2 member is not independent (IND=NO).
- SCHENV
- The job's scheduling environment is not available on any member,
or is available only on systems where JES2 is inactive. Use the $DJ'jobname',LONG
command to find out what scheduling environment a job requires. Then
use the D WLM,SCHENV=schenv-name command to find out the current status
of the scheduling environment on each system in the sysplex.
The SCHENV state masks other reasons why the job might be ineligible to run, such as the $P and $P XEQ commands having been issued. Also, note that the SCHENV delay is detected only after a job goes through conversion. If a job is delayed prior to conversion due to system affinity requirements, scheduling environments are not considered in determining delay status.
- MEMBER_STATUS
- A combination of system affinity, scheduling environment and SECLABEL restrictions are
preventing the job from running, or, other member states prevent the job from running on systems
where the job is otherwise eligible. These states include:
- $P command has been issued
- $P XEQ command has been issued
- BOSS=NO (used in a poly-JES environment only)
When used as a command filter, the string MEMBER_STATUS matches on jobs delayed for SYSAFF, SCHENV, SECLABEL, or MEMBER_STATUS. To get detail on why a job is delayed, display job status with the $DJ'jobname',LONG command or display member status with the $DJMEMBER(member-name) command.
- Yes
- Specifies only jobs which are delayed for any of the above reasons.
- No
- Specifies only jobs which are not delayed for any of the above reasons.
- H|Hours=hours
- Specifies the age of affected jobs in hours. Only jobs more (with HOURS>nn) or less (with HOURS<nn) than the specified number of hours in age are affected.
- HOLD={ALL|ARM|DUP|JOB|NONE}
- Only jobs
with the specified hold attributes are modified.
- ALL
- Changes jobs held by the $H A command.
- ARM
- Changes jobs which are held awaiting a restart through ARM.
- DUP
- Change jobs held for a duplicate job name.
- JOB
- Change jobs held by the $H J command, TYPRUN=HOLD, TYPRUN=JCLHOLD, or held due to error.
- NONE
- Change jobs which are not held.
- NHOLD=-
- If job is DJC = YES, then NHOLD value is decremented by 1. If NHOLD value transitions to zero, then job enters into execution.
- NHOLD=+
- If job is DJC = YES, then NHOLD value is incremented by 1 up to 32767.
- NHOLD=0
- If job is DJC =YES and NHOLD is greater than 0, then NHOLD is set to zero and the job enters execution.
- job
- Specifies 1 to 8 alphanumeric, special ($, #, or @) or wildcard characters (or a combination of them) that can be used to select a subset of jobs whose job name matches this combination of characters (mask).
- ‘job'
- The name of the job that is to be changed. This name must appear as coded on the JOB statement and must be enclosed in apostrophes. If more than one job exists with this name, no action is taken.
- Job
- A Batch job or range of batch jobs is to be changed.
- JC|JOBCORR=job correlator
- Specifies a combination of 1-64 alphanumeric, special (colon, period or underscore) and wildcard characters that can be used to select a subset of jobs that have a matching job correlator. For a description of wildcard characters, refer to Using wildcards.
- JOBGROUP=jobgroupname
- Specifies 1 to 8 alphanumeric, special ($, #, or @) or wildcard characters (or a combination of them) that can be used to select a subset of jobs whose job group name matches this combination of characters (mask).
- JOBMASK|JM=jobmask
- Specifies 1 to 8 alphanumeric,
special ($, #, or @) or wildcard characters (or a combination of them)
that can be used to select a subset of jobs whose job name matches
this combination of characters (mask). For a description of wild cards,
see Using wildcards. Note:
- This is a positional parameter. Specify this following the job_id (JOB, STC, or TSU) or JOBQ parameter.
- The JOBMASK parameter is not valid with the ‘jobname' parameter.
- JOBQ|JQ
- Specifies all jobs, STCs, and TSUs across the MAS for processing.
- OFFS=(n[,n,n...])|(+n,[n,n...])|(-n,[n,n...])|0
- Specifies
updates to the archival status of this job. Jobs will be marked as
already offloaded for all offload device numbers that were specified
and as not offloaded for all offload device numbers not specified.
Specifying + or - before the offload device number(s) updates offload status of the job for only the specified offload device numbers. Specifying + marks the output as offloaded and specifying - marks it as not having been offloaded by the specified offload device number(s). Use this option to allow offloading of job(s) that have been already been offloaded or to prevent offloading of jobs by an offload device.
- Priority=priority
- The new priority (0-15), or the value that is added to
(+n) or subtracted from (-n) the present priority for the specified
job(s). If the job priority is adjusted to a value less than zero,
zero is assumed. If the priority is adjusted to a value greater than
15, JES2 assigns a maximum priority. This maximum priority is greater
than 15, which allows the operator to selectively run jobs at a priority
higher than any jobs submitted with a priority of 15. Note:
- Even though a job has been assigned a maximum priority, JES displays the job priority as 15.
- If these values are modified for a job in execution note that the service class is not changed. If these changes would result in a different service class this takes effect only if the job is restarted. The service class of an executing job can be modified only by explicitly changing the service class.
- Queue={CNV|INPUT|OUT|PPU|PURGE|RCV| SETUP|SPIN|XEQ|XMT}
- Only
jobs on the specified job queue are to be modified.
- CNV
- Only jobs awaiting conversion are to be modified.
- INPUT
- Only jobs on the JES2 $INPUT queue are to be modified.
- OUT
- Only jobs awaiting output processing are to be modified.
- PPU
- Only jobs awaiting print/punch processing are to be modified.
- PURGE
- Only jobs awaiting purge processing are to be modified.
- RCV
- Only jobs on the JES2 $RECEIVE queue are to be modified.
- SETUP
- Only jobs on the JES2 $SETUP queue are to be modified.
- SPIN
- Only jobs awaiting spin processing are to be modified.
- XEQ
- Only jobs awaiting execution are to be modified.
- XMT
- Only jobs queued for network transmission are to be modified.
- REBUILD={No|Yes}
- Jobs on the rebuild queue are to be changed (Yes) or not changed (No).
- SCHENV=schenv
- Specifies the scheduling environment associated with the job.
- SCHENV_AFF=member
- Specifies the JES2 MAS members on which the scheduling environment for this job is available.
- SECLABEL=seclabel
- Specifies the security label associated with the job.
- SECLABEL_AFF=member
- Specifies the JES2 MAS members on which the SECLABEL for this job is available but only if the RACF® SECLABEL_BY_SYS is also active.
- SPIN[,DDname=jxxxxxxx]
- Requests SPIN processing for the
specified job. If DDname= is not specified, all eligible data sets
(including JESMSGLG and JESYSMSG) are immediately spun off for the job. If
DDname= is specified, the specified SYSOUT DD is immediately spun off for
the job. The DDname= value specified must represent a SYSOUT data set that
was allocated with a SPIN= attribute that allows it to be spun. For more
information, see the description of the DD SPIN= keyword in the z/OS MVS JCL Reference. Note: When the JESLOG data sets are spun, the message,
$HASP138 JESLOG SPIN REQUESTED BY OPERATOR
is placed in the JESMSGLG and JESYSMSG data sets. $HASP138 is not placed in the console or SYSLOG. - SPL|SPOOL={Percent|%|Tgs|Volumes}
- Only jobs with specific
SPOOL characteristics are to be changed:
- Percent|%
- Only jobs using more (with %>nn) or less (with %<nn) than the specified percentage of the total available spool space are to be changed.
- Tgs
- Only jobs using more (with Tgs>nn) or less (with Tgs<nn) than the specified number of track groups are to be changed.
- Volumes=(v1,v2,...)
- Only jobs which have allocated spool space on the specified spool volume(s) are to be changed.
- SRVCLASS=srvclass
- Change the WLM service class for the job to the specified service class. If the service class keyword is specified without a service class, the job is reclassified. See the MVS™ RESET command RESUME keyword description for more information.
- Stc
- A started task or range of started tasks is to be changed.
- Sysaff
- Changes the system affinity of the job. Up to 33 entries
can be coded by using a combination of the following values:
- memname|*
- Specifies the identifier (one to four characters using A-Z, 0-9, $, #, and @) of a member in the JES2 multi-access spool configuration that has affinity for the job. Use an asterisk to specify the member that executes the command.
- ANY
- Specifies jobs that are eligible to run on any member in the JES2 multi-access spool configuration. If you specify ANY followed by the IND parameter, they must be separated by a comma and the list must be enclosed in parentheses, for example, (ANY,IND).
- +|-
- The subsequent memnames, ANY, and IND, are to be added to (+)
or deleted from (-) the current list of affinities that are associated
with this job. If neither + nor – qualifier is specified anywhere
in the SYSAFF parameter, the affinity of the job is set explicitly
to the affinity entries that are specified in the SYSAFF parameter.
If a + or – qualifier is specified on the first entry in a list
of entries, the current affinity list of this job is affected. A +
or – qualifier on an entry will add (+) or delete (-) that entry
from the current affinity list of this job. If the first entry in
a list of entries has no + or - qualifier, the current affinity list
of this job will be replaced with the affinities that are determined
by processing the SYSAFF parameter. A + or – qualifier on a
subsequent entry will add (+) or delete (-) that entry from the replacement
list. When a + or - qualifier is encountered in the SYSAFF parameter,
the qualifier becomes the active qualifier that is applied to each
of the following entries in the list until a different qualifier,
or the keyword ANY is encountered in the list. Note: If you specify IND without any member names (memname), you must specify + or - qualifier.
- IND
- Specifies the job that must be executed on a processor operating in independent mode. IND cannot be specified by itself.
Note: The processing of the SYSAFF parameter must result in at least one member that is eligible to execute this job. Otherwise, the command will be rejected. - Tsu
- A time-sharing user or range of time-sharing users is to be changed.
- TYPE={JOB|STC|TSU}
- Indicates whether only batch jobs (JOB), started tasks (STC), or time-sharing users (TSU) are to be changed.
- USERID=userid
- Specifies the userid associated with the job.
- XEQHours=hours
- Specifies the number of hours that a job has been executing. Only jobs that run more (with XEQH>nn) or less (with XEQH<nn) than the specified number of hours are affected, with the restriction that requires that the jobs must be executing.
- XEQNode=xeqnode
- Only jobs which are destined to execute at the specified node, or which have already executed at the specified node, are to be changed. The node name may be specified using the decimal node number (Nnnnnn) or an EBCDIC node name.
Authority Required
This command requires job authority. The description of the $T RDRnn command explains how to ensure that the authority of the appropriate MVS system command group is assigned.
This command requires update security access authority. For a description of assigning command input authority, see z/OS JES2 Initialization and Tuning Guide.
Scope
MAS-wide. This command has an effect across the entire MAS.
Messages
The $HASP890 message displays the current status of the specified job.
The $HASP003 message indicates that the command was improperly specified.
Examples
1 $t j3,s=-sysa
JOB00003 $HASP890 JOB(MYJOB)
$HASP890 JOB(MYJOB) STATUS=(AWAITING EXECUTION),CLASS=A,
$HASP890 PRIORITY=9,SYSAFF=(SYSB,SYSC,SYSD),HOLD=NONE
2 $t j27,s=(+SPL2,IND)
JOB00027 $HASP890 JOB(MYJOB)
$HASP890 JOB(MYJOB) STATUS=(AWAITING EXECUTION),CLASS=H,
$HASP890 PRIORITY=9,SYSAFF=(IND,SPL2,SPL3),HOLD=(JOB)
3 $t j3,c=b,p=+4
JOB00003 $HASP890 JOB(MYJOB)
$HASP890 JOB(MYJOB) STATUS=(AWAITING EXECUTION),CLASS=B,
$HASP890 PRIORITY=13,SYSAFF=(SYSB,SYSC,SYSD),
$HASP890 HOLD=NONE
4 $t jq,/userid=ibmuser,/q=xeq,class=d
JOB00022 $HASP890 JOB(IJOB1)
$HASP890 JOB(IJOB1) STATUS=(EXECUTING/IBM1),CLASS=D,
$HASP890 PRIORITY=9,SYSAFF=(ANY),HOLD=(NONE),
$HASP890 USERID=IBMUSER
JES2 modifies all jobs on the execution queue for user IBMUSER to class D.
5 $t jq,/q=xeq,/c=a,c=b
JOB00003 $HASP890 JOB(MYJOB)
$HASP890 JOB(MYJOB) STATUS=(AWAITING EXECUTION),CLASS=B,
$HASP890 PRIORITY=9,SYSAFF=(SYSB,SYSC,SYSD),HOLD=NONE
JOB00009 $HASP890 JOB(MYJOB2)
$HASP890 JOB(MYJOB2) STATUS=(AWAITING EXECUTION),CLASS=B,
$HASP890 PRIORITY=9,SYSAFF=(SYSB,SYSC,SYSD),HOLD=NONE
JES2 modifies all jobs on the class A execution queue to class B.
6 $tj37,/age<1,priority=7
JOB00037 $HASP890 JOB(DEST11)
$HASP890 JOB(DEST11) STATUS=(AWAITING EXECUTION),CLASS=A,
$HASP890 PRIORITY=7,SYSAFF=(ANY),HOLD=(NONE)
JES2 changes priority for job 37 if age is less than 1 day.
7 $TJ23,spin,ddname=logfile
JOB00023 $HASP890 JOB(IBMUSER1)
$HASP890 JOB(IBMUSER1) STATUS=(EXECUTING/IBM1),CLASS=A,
$HASP890 PRIORITY=9,SYSAFF=(ANY),HOLD=(NONE)
JES2 executes SPIN processing for the DDNAME logfile.
8 $tj(100-160),jc=*:rushorder_xyz*,p=+4
JOB00153 $HASP890 JOB(D15USER1) C
$HASP890 JOB(D15USER1) STATUS=(AWAITING EXECUTION),CLASS=A,
$HASP890 PRIORITY=13,SYSAFF=(ANY),HOLD=(NONE)
JOB00154 $HASP890 JOB(D15USER2) C
$HASP890 JOB(D15USER2) STATUS=(AWAITING EXECUTION),CLASS=A,
$HASP890 PRIORITY=13,SYSAFF=(ANY),HOLD=(NONE)
JOB00155 $HASP890 JOB(D15USER3) C
$HASP890 JOB(D15USER3) STATUS=(AWAITING EXECUTION),CLASS=A,
$HASP890 PRIORITY=13,SYSAFF=(ANY),HOLD=(NONE)
JOB00156 $HASP890 JOB(D15USER4) C
$HASP890 JOB(D15USER4) STATUS=(AWAITING EXECUTION),CLASS=A,
$HASP890 PRIORITY=13,SYSAFF=(ANY),HOLD=(NONE)
JES2 increases by 4 the priority of any batch job within the job number range of 100-160 with a job correlator user portion starting with RUSHORDER_XYZ.
9 $tj(Joba),NHOLD=0
JOB00019 $HASP1301 JOBA in job group STEVE queued for execution
JOB00019 $HASP890 JOB(JOBA) C
$HASP890 JOB(JOBA) STATUS=(AWAITING EXECUTION),CLASS=A,
$HASP890 PRIORITY=9,SYSAFF=(ANY),HOLD=(NONE)
JOB00019 ICH70001I IBMUSER LAST ACCESS AT 15:45:38 ON MONDAY, MARCH 20, 2017
JOB00019 $HASP373 JOBA STARTED - INIT 1 - CLASS A - SYS N1M1
JOB00019 $HASP395 JOBA ENDED - RC=0000