Change Job (CHGJOB)

Where allowed to run: All environments (*ALL)
Threadsafe: Conditional
Parameters
Examples
Error messages

The Change Job (CHGJOB) command changes some of the attributes of a job. With the exception of a change in job queue, the job can be in a job queue or in an output queue, or it can be active in a subsystem. The job queue can only be changed when the job is a batch job and is in a job queue. If the job is in the output queue, only the Output priority (on OUTQ) (OUTPTY), the Job log output (LOGOUTPUT), and the Spooled file action (SPLFACN) can be changed. With the exception of the class attributes, the new attributes remain in effect for the duration of the job unless they are changed by another CHGJOB command. The class attributes remain in effect until the routing step that is currently active ends. If no routing step is active when the changes are made, they apply to the next routing step that is started. If an attribute that no longer affects the job is changed, a message is sent to the user of the command. For example, if the job has already completed running, it is too late to change the Output queue (OUTQ) and Job priority (on JOBQ) (JOBPTY) parameters. If any output files are still on the output queue, however, changing the OUTPTY parameter changes their output priority.

Restrictions:

  1. The command must be issued from within the job being changed, or the issuer of the command must be running under a user profile which is the same as the job user identity of the job being changed, or the issuer of the command must be running under a user profile which has job control (*JOBCTL) special authority.

    The job user identity is the name of the user profile by which a job is known to other jobs. It is described in more detail in the Work Management Guide.

  2. To use this command, the following authorities are required:

    • To change the job queue (JOBQ), have use (*USE) authority to the job queue that the job is being changed to and execute (*EXECUTE) authority to the library containing that job queue.

    • To change the output queue (OUTQ), have read (*READ) authority to the output queue that is currently allocated to the job and execute (*EXECUTE) authority to the library containing this output queue. This authority can come from program adoption. When a job changes itself, no authority is required to the OUTQ currently allocated to the job. You also must have read (*READ) authority to the output queue that the job is being changed to use, and execute (*EXECUTE) authority to the library containing that output queue. This authority cannot come from program adoption.

    • To change the RUNPTY, TIMESLICE, PURGE, DFTWAIT, or TSEPOOL values, have job control (*JOBCTL) special authority.

    • To change the sort sequence table (SRTSEQ), have use (*USE) authority to the new sort sequence table and execute (*EXECUTE) authority to the library that contains that sort sequence table.

  3. This command is conditionally threadsafe. Refer to Considerations for Attribute Thread Safety for additional information.

Considerations for Attribute Thread Safety:

This command is intended to be used to change the job attributes for a job. All of the attributes are scoped to the job.

The Threadsafe column of the following table indicates whether the attributes can be changed in a manner that is threadsafe.

Yes: - Attributes marked with this value are considered to be threadsafe. These attributes can be changed safely by issuing this command from either the initial thread or from a secondary thread. The target job may also be either single threaded or multi threaded.

No: - Attributes marked with this value are not threadsafe. An attempt to change these attributes will be denied if multiple threads are active in the job issuing this command or in the target job.

Attribute and Thread Safety Table:

 Attribute                                     Threadsafe ----------------------------                  ----------
Break message handling (BRKMSG)                  Yes Character identifier control (CHRIDCTL)          Yes Coded character set ID (CCSID)                   Yes Country or region ID (CNTRYID)                   Yes Date format (DATFMT)                             Yes Date separator (DATSEP)                          Yes DDM conversation (DDMCNV)                        No Decimal format (DECFMT)                          Yes Default wait time (DFTWAIT)                      Yes Device recovery action (DEVRCYACN)               Yes Eligible for purge (PURGE)                       Yes Inquiry message reply (INQMSGRPY)                Yes Job date (DATE)                                  Yes Job Log output (LOGOUTPUT)                       Yes Job message queue full action (JOBMSGQFL)        Yes Job priority (on JOBQ) (JOBPTY)                  Yes Job queue (JOBQ)                                 Yes Job switches (SWS)                               Yes Language ID (LANGID)                             Yes Log CL program commands (LOGCLPGM)               Yes Message logging (LOG)                            Yes Output priority (on OUTQ) (OUTPTY)               Yes Output queue (OUTQ)                              Yes Print key format (PRTKEYFMT)                     Yes Print text (PRTTXT)                              Yes Print device (PRTDEV)                            Yes Run priority (RUNPTY)                            Yes Schedule date (SCDDATE)                          No Schedule time (SCDTIME)                          No Sort sequence (SRTSEQ)                           Yes Spooled file action (SPLFACN)                    Yes Status message (STSMSG)                          Yes Time separator (TIMSEP)                          Yes Time slice (TIMESLICE)                           Yes Time slice end pool (TSEPOOL)                    Yes 

Top


 

Parameters

Keyword Description Choices Notes
JOB Job name Single values: *
Other values: Qualified job name
Optional, Key, Positional 1
Qualifier 1: Job name Name
Qualifier 2: User Name
Qualifier 3: Number 000000-999999
JOBPTY Job priority (on JOBQ) 0-9, *SAME Optional
OUTPTY Output priority (on OUTQ) 1-9, *SAME Optional
PRTDEV Print device Name, *SAME, *USRPRF, *SYSVAL, *WRKSTN Optional
OUTQ Output queue Single values: *SAME, *USRPRF, *DEV, *WRKSTN
Other values: Qualified object name
Optional
Qualifier 1: Output queue Name
Qualifier 2: Library Name, *LIBL, *CURLIB
RUNPTY Run priority 1-99, *SAME Optional
JOBQ Job queue Single values: *SAME
Other values: Qualified object name
Optional
Qualifier 1: Job queue Name
Qualifier 2: Library Name, *LIBL, *CURLIB
PRTTXT Print text Character value, *SAME, *SYSVAL, *BLANK Optional
LOG Message logging Element list Optional
Element 1: Level 0-4, *SAME
Element 2: Severity 0-99, *SAME
Element 3: Text *SAME, *MSG, *SECLVL, *NOLIST
LOGCLPGM Log CL program commands *SAME, *NO, *YES Optional
LOGOUTPUT Job log output *SAME, *SYSVAL, *JOBLOGSVR, *JOBEND, *PND Optional
JOBMSGQFL Job message queue full action *SAME, *SYSVAL, *NOWRAP, *WRAP, *PRTWRAP Optional
INQMSGRPY Inquiry message reply *SAME, *RQD, *DFT, *SYSRPYL Optional
BRKMSG Break message handling *SAME, *NORMAL, *NOTIFY, *HOLD Optional
STSMSG Status message *SAME, *USRPRF, *SYSVAL, *NONE, *NORMAL Optional
DDMCNV DDM conversation *SAME, *KEEP, *DROP Optional
SCDDATE Schedule date Date, *SAME, *CURRENT, *MONTHSTR, *MONTHEND, *MON, *TUE, *WED, *THU, *FRI, *SAT, *SUN Optional
SCDTIME Schedule time Time, *SAME, *CURRENT Optional
DATE Job date Date, *SAME Optional
DATFMT Date format *SAME, *SYSVAL, *YMD, *MDY, *DMY, *JUL Optional
DATSEP Date separator *SAME, *SYSVAL, *BLANK, '/', '-', '.', '', ',' Optional
TIMSEP Time separator *SAME, *SYSVAL, *BLANK, ':', '.', '', ',' Optional
SWS Job switches Character value, *SAME Optional
TIMESLICE Time slice 1-9999999, *SAME Optional
PURGE Eligible for purge *SAME, *YES, *NO Optional
DFTWAIT Default wait time 1-9999999, *SAME, *NOMAX Optional
DEVRCYACN Device recovery action *SAME, *SYSVAL, *MSG, *DSCMSG, *DSCENDRQS, *ENDJOB, *ENDJOBNOLIST Optional
TSEPOOL Time slice end pool *SAME, *SYSVAL, *NONE, *BASE Optional
PRTKEYFMT Print key format *SAME, *SYSVAL, *NONE, *PRTBDR, *PRTHDR, *PRTALL Optional
SRTSEQ Sort sequence Single values: *SAME, *USRPRF, *SYSVAL, *HEX, *LANGIDUNQ, *LANGIDSHR
Other values: Qualified object name
Optional
Qualifier 1: Sort sequence Name
Qualifier 2: Library Name, *LIBL, *CURLIB
LANGID Language ID Character value, *SAME, *USRPRF, *SYSVAL Optional
CNTRYID Country or region ID Character value, *SAME, *USRPRF, *SYSVAL Optional
CCSID Coded character set ID 1-65535, *SAME, *USRPRF, *SYSVAL, *HEX Optional
DECFMT Decimal format *SAME, *SYSVAL, *BLANK, I, J Optional
CHRIDCTL Character identifier control *SAME, *USRPRF, *SYSVAL, *DEVD, *JOBCCSID Optional
SPLFACN Spooled file action *SAME, *SYSVAL, *KEEP, *DETACH Optional
DUPJOBOPT Duplicate job option *SELECT, *MSG Optional

Top

 

Job name (JOB)

Specifies the name of the job whose attributes are being changed.

*

This attributes of the job that issues this command are changed.

Qualifier 1: Job name

name

Specify the name of the job.

Qualifier 2: User

name

Specify the name of the user profile under which the job is run.

Qualifier 3: Number

000000-999999

Specify the job number assigned by the system.

If no job qualifier is given, all jobs currently in the system are searched for the job name. If more than one occurrence of the specified name is found, a qualified job name must be specified.

Top

 

Job priority (on JOBQ) (JOBPTY)

Specifies the scheduling priority used for the job being changed. Valid values range from 0 through 9, where 0 is the highest priority and 9 is the lowest priority.

*SAME

The scheduling priority does not change.

0-9

Specify the scheduling priority for the job. If the job is currently on the job queue, its position on the queue in relationship to other jobs may be changed. The scheduling priority specified cannot be higher than the priority specified in the user profile under which the job in which this command is entered, is running.

Top

 

Output priority (on OUTQ) (OUTPTY)

Specifies the output priority for spooled output files that are produced by this job. The highest priority is 1 and the lowest priority is 9.

*SAME

The job's priority for spooled output does not change.

1-9

Specify the priority of the job's output files. The output priority specified cannot be higher than the priority specified in the user profile under which the job in which this command entered, is running. Only those spooled output files which are on output queues in the library name space of the thread issuing this command will be changed.

Top

 

Print device (PRTDEV)

Specifies the default printer device for this job.

This assumes the defaults are specified on the OUTQ parameter for the printer file, job description, user profile and workstation.

*SAME

The default printer device does not change.

*USRPRF

The printer device specified in the user profile under which this job was initially running is used.

*SYSVAL

The value in the system value QPRTDEV is used as the printer device.

*WRKSTN

The default printer device used with this job is the printer device assigned to the work station that is associated with the job.

name

Specify the name of the printer device that is used with this job.

Top

 

Output queue (OUTQ)

Specifies the output queue used for spooled files that specify OUTQ(*JOB). This parameter applies only to printer files that have *JOB specified for the OUTQ parameter.

Single values

*SAME

The default output queue does not change.

*USRPRF

The output queue specified in the user profile under which this job was initially running is used.

*DEV

The DEV parameter is determined by one of these printer file commands: Create Printer File (CRTPRTF), Change Printer File (CHGPRTF), or Override with Printer File (OVRPRTF).

This assumes the defaults were specified on the OUTQ parameter for the printer file, job description, user profile, and workstation.

*WRKSTN

The default output queue used with this job is the output queue assigned to the work station that is associated with the job at the time the job is started.

Qualifier 1: Output queue

name

Specify the name of the default output queue used by the job.

Qualifier 2: Library

*LIBL

All libraries in the library list for the current thread are searched until the first match is found.

*CURLIB

The current library for the thread is used to locate the default output queue. If no library is specified as the current library for the thread, the QGPL library is used.

name

Specify the library where the default output queue used by the job is located.

Top

 

Run priority (RUNPTY)

Specifies the run priority for the job. Run priority is a value, ranging from 1 (highest priority) through 99 (lowest priority), that represents the priority at which the job competes for the processing unit relative to other jobs that are active at the same time. This value represents the relative (not the absolute) importance of the job. For example, a job with a run priority of 25 is not twice as important as one with a run priority of 50. This value is the highest run priority allowed for any thread within the job. Individual threads within the job may have a lower priority. Changing the run priority of the job will affect the run priorities of all threads within the job. For example, the job is running at priority 10, thread A within the job is running at priority 10 and thread B within the job is running at priority 15. The priority of the job is changed to 20. The priority of thread A would then be adjusted to 20 and the priority of thread B would be adjusted to 25.

If the job consists of multiple routing steps, a change to this attribute during a routing step does not apply to subsequent routing steps.

*SAME

The run priority does not change.

1-99

Specify the run priority of the job.

Top

 

Job queue (JOBQ)

Specifies the job queue in which this job is placed.

Single values

*SAME

The job queue does not change.

Qualifier 1: Job queue

name

Specify the name of the job queue.

Qualifier 2: Library

*LIBL

All libraries in the library list for the current thread are searched until the first match is found.

*CURLIB

The current library for the thread is used to locate the job queue. If no library is specified as the current library for the thread, the QGPL library is used.

name

Specify the library where the job queue is located.

Top

 

Print text (PRTTXT)

Specifies the text that is printed at the bottom of each page of printed output and on separator pages.

*SAME

The current value of the PRTTXT parameter does not change.

*SYSVAL

The system value, QPRTTXT, is used.

*BLANK

No text is printed on printed output.

character-value

Specify the character string that is printed at the bottom of each page. A maximum of 30 characters can be entered, enclosed in apostrophes.

Top

 

Message logging (LOG)

Specifies the message logging values used to determine the amount and type of information sent to the job log by this job. This parameter has three elements: the message (or logging) level, the message severity, and the level of message text. If no values are specified on this parameter, the values are not changed.

Element 1: Level

*SAME

The message logging level of the job does not change.

0-4

Specify the message logging level used for the job's messages. The possible logging levels are:

0

No messages are logged.

1

All messages sent to the job's external message queue with a severity greater than or equal to the message logging severity are logged. This includes the indications of job start, job end, and job completion status.

2

The following information is logged:

  • Logging level 1 information

  • Request messages which result in a high-level message with a severity code greater than or equal to the message logging severity. Both the request message and all associated messages are logged.

A high-level message is one that is sent to the program message queue of the program that receives the request message. For example, QCMD is an IBM-supplied request processing program that receives request messages.

3

The following information is logged:

  • Logging level 1 and 2 information

  • All request messages

  • Commands run by a CL program are logged if it is allowed by the logging of CL programs job attribute and the log attribute of the CL program.

4

The following information is logged:

  • All request messages and all messages with a severity greater than or equal to the message logging severity, including trace messages.

  • Commands run by a CL program are logged if it is allowed by the logging of CL programs job attribute and the log attribute of the CL program.

Element 2: Severity

*SAME

The message logging severity does not change.

0-99

Specify the message logging severity that is used in conjunction with the logging level to determine which error messages are logged in the job log.

Element 3: Text

*SAME

The level of message text does not change.

*MSG

Only the message text is written to the job log.

*SECLVL

Both the message text and the message help (cause and recovery) of the error message are written to the job log.

*NOLIST

If the job ends normally, no job log is produced. If the job ends abnormally (if the job end code is 20 or higher), a job log is produced. The messages that appear in the job log contain both the message text and the message help.

Top

 

Log CL program commands (LOGCLPGM)

Specifies whether the commands that are run in a control language program are logged to the job log by way of the CL program's message queue. This parameter sets the status of the job's logging flag. If *JOB has been specified for the Message logging (LOG) parameter in the Create CL Program (CRTCLPGM) command, the flag set in the Log CL program commands (LOGCLPGM) parameter is used. Other values for the Message logging (LOG) parameter override the Log CL program commands (LOGCLPGM) parameter. The commands are logged in the same manner as the requests.

*SAME

The current state of the job's logging flag does not change.

*NO

Commands that come later in a CL program are not written to the job log.

*YES

Commands that come later in a CL program, and are capable of being written, are logged to the job log.

Top

 

Job log output (LOGOUTPUT)

Specifies how the job log will be produced when the job completes. This does not affect job logs produced when the message queue is full and the job message queue full action specifies *PRTWRAP. Messages in the job message queue are written to a spooled file, from which the job log can be printed, unless the Control Job Log Output (QMHCTLJL) API was used in the job to specify that the messages in the job log are to be written to a database file.

The job log output value can be changed at any time until the job log has been produced or removed. To change the job log output value for a job, use the Change Job (QWTCHGJB) API or the Change Job (CHGJOB) command.

The job log can be displayed at any time until the job log has been produced or removed. To display the job log, use the Display Job Log (DSPJOBLOG) command.

The job log can be removed when the job has completed and the job log has not yet been produced or removed. To remove the job log, use the Remove Pending Job Log (QWTRMVJL) API or the End Job (ENDJOB) command.

*SAME

The value does not change.

*SYSVAL

The value specified in the system value QLOGOUTPUT is used.

*JOBLOGSVR

The job log will be produced by a job log server. For more information about job log servers, refer to the Start Job Log Server (STRLOGSVR) command.

*JOBEND

The job log will be produced by the job itself. If the job cannot produce its own job log, the job log will be produced by a job log server. For example, a job does not produce its own job log when the system is processing a Power Down System (PWRDWNSYS) command.

*PND

The job log will not be produced. The job log remains pending until removed.

Top

 

Job message queue full action (JOBMSGQFL)

Specifies the action that should be taken when the job message queue is full.

*SAME

The job message queue full option does not change.

*SYSVAL

The value specified for the QJOBMSGQFL system value is used.

*NOWRAP

The message queue does not wrap when it is full. This action ends the job.

*WRAP

The message queue wraps to the start of the message queue when full and starts filling the message queue again.

*PRTWRAP

The message queue wraps the job message queue when full and prints the messages that are being overlaid because of wrapping.

Top

 

Inquiry message reply (INQMSGRPY)

Specifies the way that predefined messages that are sent as a result of running this job are answered. You can specify that the inquiry message reply control is taken from the job description, or that all inquiry messages require a reply, or that a default reply is issued, or that the system reply list is checked for a matching reply as each predefined inquiry message is sent.

*SAME

The method to use for inquiry message replies does not change.

*RQD

A reply is required by the receiver of the inquiry message for inquiry messages that are sent during the running of this job.

*DFT

The default message reply is used to answer any inquiry messages issued during the running of this job.

*SYSRPYL

The system reply list is checked to see if there is an entry for any inquiry message issued as a result of running this job. If a match occurs, the reply value in that entry is used. If no entry exists for that inquiry message, a reply is required.

Top

 

Break message handling (BRKMSG)

Specifies how break messages are handled for the job. This is determined by the status of the message queue, the message queue severity, and the setting of this value.

*SAME

Break message handling does not change.

*NORMAL

Break message handling is determined by the message queue status.

*NOTIFY

An audible alarm sounds to indicate the presence of a message. *NOTIFY is allowed only for interactive jobs.

*HOLD

Neither break messages, or messages sent to a signed-on work station through the Send Break Message (SNDBRKMSG) command, are shown for message queues in *BREAK delivery mode. The alarm does not sound for messages sent to message queues in *NOTIFY delivery mode. The user break message handling program is not started.

Top

 

Status message (STSMSG)

Specifies how status messages are handled for the job.

*SAME

Status message handling does not change.

*USRPRF

Status messages are shown or not shown as specified in the user profile under which this job was initially running.

*SYSVAL

Status messages are shown or not shown as specified in the QSTSMSG system value.

*NONE

Status messages are not shown.

*NORMAL

Status messages are shown. Text on the bottom line of the display is lost.

Top

 

DDM conversation (DDMCNV)

Specifies whether the connections using distributed data management (DDM) protocols remain active when they are not being used. The connections include APPC conversations, active TCP/IP conversations or OptiConnect connections. The DDM protocols are used in Distributed Relational Database Architecture (DRDA) applications, DDM applications, or DB2 Multisystem applications.

*SAME

The current state of the job's DDM conversation attribute does not change.

*KEEP

The system keeps DDM conversation connections active when there are no users, except when:

  • The routing step ends on the source system, either at the job or when the job starts a reroute of the job.

  • There is an explicit request that conversations be disconnected, using the Reclaim DDM Conversations (RCLDDMCNV) command or the Reclaim Resources (RCLRSC) command.

  • There is a communications failure or internal failure.

  • A DRDA connection to an application server not running on the iSeries ends.

*DROP

The system ends a DDM-allocated conversation when there are no users. Examples include when an application closes a DDM file, or when a DRDA application runs an SQL DISCONNECT statement.

Top

 

Schedule date (SCDDATE)

Specifies the date on which the submitted job becomes eligible to run.

If your system or your job is configured to use the Julian date format, *MONTHSTR and *MONTHEND are calculated as if the system or job did not use the Julian date format.

*SAME

This value does not change.

*CURRENT

The submitted job becomes eligible to run on the current date.

*MONTHSTR

The submitted job becomes eligible to run on the first day of the month. If you specify *MONTHSTR, and if today is the first day of the month and the time you specify on the SCDTIME parameter has not passed, the job becomes eligible to run today. Otherwise, the job becomes eligible on the first day of the next month.

*MONTHEND

The submitted job becomes eligible to run on the last day of the month. If you specify *MONTHEND, and if today is the last day of the month and the time you specify on the SCDTIME parameter has not passed, the job becomes eligible to run today. Otherwise, the job becomes eligible on the last day of the next month.

*MON

The job becomes eligible to run on Monday.

*TUE

The job becomes eligible to run on Tuesday.

*WED

The job becomes eligible to run on Wednesday.

*THU

The job becomes eligible to run on Thursday.

*FRI

The job becomes eligible to run on Friday.

*SAT

The job becomes eligible to run on Saturday.

*SUN

The job becomes eligible to run on Sunday.

date

Specify a date in the job date format with or without separators.

Top

 

Schedule time (SCDTIME)

Specifies the time on the scheduled date at which the job becomes eligible to run.

Although the time can be specified to the second, the load on the system may affect the exact time at which the job becomes eligible to run.

*SAME

This value does not change.

*CURRENT

The job is submitted on the current time.

time

Specify the time you want the job to start. The time is specified in 24-hour format and can be specified with or without a time separator:

  • Without a time separator, specify a string of 4 or 6 digits (hhmm or hhmmss) where hh = hours, mm = minutes, and ss = seconds. Valid values for hh range from 00 to 23. Valid values for mm and ss range from 00 to 59.

  • With a time separator, specify a string of 5 or 8 digits where the time separator specified for your job is used to separate the hours, minutes, and seconds. If this command is entered from the command line, the string must be enclosed in apostrophes. If a time separator other than the separator specified for your job is used, this command will fail.

Top

 

Job date (DATE)

Specifies the date that is assigned to the job. The job date remains the same for the duration of the job, unless it is changed by the user.

*SAME

The job date does not change.

date

Specify the value that is used as the job date for the job. The date must be entered in the current job date format. If no job date is specified for a job, the system date is used as the default for any function requiring a job date. The date specified in this parameter overrides the system date for the running of the job only.

Top

 

Date format (DATFMT)

Specifies the format used for the date.

*SAME

The date format used does not change.

*SYSVAL

The system value, QDATFMT, is used.

*YMD

The date format used is year, month, and day.

*MDY

The date format used is month, day, and year.

*DMY

The date format used is day, month, year.

*JUL

The date format used is Julian.

Top

 

Date separator (DATSEP)

Specifies the date separator used for the date.

*SAME

The date separator does not change.

*SYSVAL

The system value for the date separator is used.

*BLANK

A blank is used for the date separator.

'/'

A slash (/) is used for the date separator.

'-'

A dash (-) is used for the date separator.

'.'

A period (.) is used for the date separator.

' '

A blank is used for the date separator.

','

A comma (,) is used for the date separator.

Top

 

Time separator (TIMSEP)

Specifies the time separator used for the job.

When specifying time on other commands, use the time separator specified on this parameter or no time separator. If a time separator different from the time separator specified here is used to specify time on another command, the command will fail.

*SAME

The time separator does not change.

*SYSVAL

The time separator specified in the system value QTIMSEP is used.

*BLANK

A blank is used for the time separator.

':'

A colon (:) is used for the time separator.

'.'

A period (.) is used for the time separator.

' '

A blank is used for the time separator.

','

A comma (,) is used for the time separator.

Top

 

Job switches (SWS)

Specifies the switch settings for a group of eight job switches that are used with the job. These switches can be set or tested in a CL program and used to control the flow of the program. The only valid values for each 1-digit switch are 0 (off), 1 (on), or X. The X indicates that a switch value does not change.

*SAME

The values in the eight job switches do not change.

character-value

Specify any combination (in quotation marks or not) of eight 0's, 1's, or X's to change the job switch settings. If a switch value is not being changed, enter an X in the position representing that switch.

Top

 

Time slice (TIMESLICE)

Specifies the maximum amount of processor time (in milliseconds) given to each thread in the job before other threads in this job and in other jobs are given an opportunity to run. The time slice establishes the amount of time needed by a thread in the job to accomplish a meaningful amount of processing. At the end of the time slice, the thread might be put in an inactive state so that other threads can become active in the storage pool.

If the job consists of multiple routing steps, a change to this attribute during a routing step does not apply to subsequent routing steps.

*SAME

The value specified for the time slice does not change.

1-9999999

Specify the amount of time (in milliseconds) that each thread in the job is allowed to run when it is given processing time.

A millisecond is one thousandth of a second. So, 9 999 999 milliseconds equals 9999.999 seconds. Although you can specify a value of less than 8, the system takes a minimum of 8 milliseconds to run a process. If you display a job's run attributes, the time slice value is never less than 8.

Top

 

Eligible for purge (PURGE)

Specifies whether the job is eligible to be moved out of main storage and put into auxiliary storage at the end of a time slice or when entering a long wait (such as waiting for a work station user's response). This attribute is ignored when more than one thread is active within the job.

If the job consists of multiple routing steps, a change to this attribute during a routing step does not apply to subsequent routing steps.

*SAME

The value specified for the purge option does not change.

*YES

The job is eligible to be moved out of main storage and put into auxiliary storage. However, a job with multiple threads is never purged from main storage.

*NO

The job is not eligible to be moved out of main storage and put into auxiliary storage. However, when main storage is needed, pages belonging to a thread in this job may be moved to auxiliary storage. Then, when a thread in this job runs again, its pages are returned to main storage as they are needed.

Top

 

Default wait time (DFTWAIT)

Specifies the default maximum time (in seconds) that a thread in the job waits for a system instruction, such as the LOCK machine interface (MI) instruction, to acquire a resource. This default wait time is used when a wait time is not otherwise specified for a given situation. Normally, this is the amount of time the system is willing to wait for the system before the request is ended. The wait time specified for this parameter is ignored for read operations to database files.

If the job consists of multiple routing steps, a change to this attribute during a routing step does not apply to subsequent routing steps.

*SAME

The default maximum wait time does not change.

*NOMAX

There is no maximum wait time.

1-9999999

Specify the number of seconds for the maximum time that the system waits for the instruction to acquire a resource.

Top

 

Device recovery action (DEVRCYACN)

Specifies the recovery action to take for the job when an I/O error is encountered on the *REQUESTER device for interactive jobs. This parameter can be specified only for interactive jobs.

*SAME

The work station recovery action does not change.

*SYSVAL

The value in the system value, QDEVRCYACN, is used as the device recovery action for this job.

*MSG

The application program requesting the I/O operation receives an error message indicating the I/O operation has failed.

*DSCMSG

The job is automatically disconnected. When the job is reconnected, it receives an error message indicating that an I/O error has occurred but the device has been recovered. Although the device has been recovered, the contents of the display prior to the error must be shown again.

*DSCENDRQS

The job is automatically disconnected. Once it is reconnected, the ENDRQS command is issued specifying the previous request processor. If there is no request processor, an error message is issued.

*ENDJOB

The job is ended with the *IMMED option. A job log is produced for the job.

*ENDJOBNOLIST

The job is ended with the *IMMED option. No job log is produced for the job.

Top

 

Time slice end pool (TSEPOOL)

Specifies whether threads in interactive jobs should be moved to another main storage pool when they reach the time slice end. When a long wait occurs, the thread is moved back to the pool in which it was originally running. This may minimize the effect on the interactive response time of other interactive jobs. This parameter can be specified only for interactive jobs.

*SAME

The value for the time slice end pool does not change.

*SYSVAL

The value in the system value, QTSEPOOL, at the time the CHGJOB command is issued is used as the time slice end pool action for this job.

*NONE

A thread in the job is not moved when it reaches the end of its time slice.

*BASE

A thread in the job is moved to the base pool when it reaches the end of its time slice.

Top

 

Print key format (PRTKEYFMT)

Specifies whether border and header information is printed when the print key is pressed.

*SAME

The value specified for this parameter does not change.

*SYSVAL

The value specified on the system value QPRTKEYFMT determines whether header or border information is printed.

*NONE

Border information and header information are not printed.

*PRTBDR

Border information is printed.

*PRTHDR

Header information is printed.

*PRTALL

Border information and header information are printed.

Top

 

Sort sequence (SRTSEQ)

Specifies the sort sequence table to be used for string comparisons for this job.

Single values

*SAME

This value does not change.

*USRPRF

The sort table specified in the user profile under which this job was initially running is used.

*SYSVAL

The system value QSRTSEQ is used.

*HEX

A sort sequence table is not used. The hexadecimal values of the characters are used to determine the sort sequence.

*LANGIDUNQ

A unique-weight sort table is used.

*LANGIDSHR

A shared-weight sort table is used.

Qualifier 1: Sort sequence

name

Specify the name of the sort sequence table to be used with this job.

Qualifier 2: Library

*LIBL

All libraries in the library list for the current thread are searched until the first match is found.

*CURLIB

The current library for the thread is searched. If no library is specified as the current library for the thread, the QGPL library is used.

name

Specify the library where the sort sequence table is located.

Top

 

Language ID (LANGID)

Specifies the language identifier to be associated with this job. The language identifier is used when *LANGIDUNQ or *LANGIDSHR is specified on the Sort sequence (SRTSEQ) parameter. If the job CCSID is 65535, this parameter is also used to determine the value of the job default CCSID (DFTCCSID).

*SAME

The value does not change.

*USRPRF

The language ID specified in the user profile under which this job was initially running is used.

*SYSVAL

The system value QLANGID is used.

character-value

Specify the language identifier to be used by the job.

Top

 

Country or region ID (CNTRYID)

Specifies the country or region identifier to be used by the job.

*SAME

The value does not change.

*USRPRF

The country or region ID specified in the user profile under which this job was initially running is used.

*SYSVAL

The system value QCNTRYID is used.

character-value

Specify the country or region identifier to be used by the job.

Top

 

Coded character set ID (CCSID)

Specifies the coded character set identifier (CCSID) used for this job.

*SAME

The CCSID value does not change.

*USRPRF

The CCSID specified in the user profile under which this job was initially running is used.

*SYSVAL

The CCSID specified in the system value QCCSID is used.

*HEX

The CCSID 65535 is used, which indicates that the character data in the fields is treated as bit data and is not converted.

1-65535

Specify the CCSID.

Top

 

Decimal format (DECFMT)

Specifies the decimal format used for the job.

*SAME

The value does not change.

*SYSVAL

The value specified for the QDECFMT system value is used.

*BLANK

A period (.) is used for the decimal format, zero suppression.

I

A comma (,) is used for the decimal format, zero suppression.

J

A comma (,) is used for the decimal format, one leading zero.

Top

 

Character identifier control (CHRIDCTL)

Specifies the character identifier control used for the job. This attribute controls the type of CCSID conversion that occurs for display files, printer files and panel groups. The *CHRIDCTL special value must be specified on the CHRID command parameter on the create, change or override commands for display files, printer files and panel groups before this attribute will be used.

*SAME

The value does not change.

*USRPRF

The character identifier control specified in the user profile under which this job was initially running is used.

*SYSVAL

The value specified for the QCHRIDCTL system value will be used.

*DEVD

The *DEVD special value performs the same function as on the CHRID command parameter for display files, printer files and panel groups.

*JOBCCSID

The *JOBCCSID special value performs the same function as on the CHRID command parameter for display files, printer files and panel groups.

Top

 

Spooled file action (SPLFACN)

Specifies whether or not spooled files are accessed through job interfaces after the job ends. Keeping spooled files with jobs allows job commands such as Work with Submitted Jobs (WRKSBMJOB) to work with the spooled files even after the job has ended. Detaching spooled files from jobs reduces the use of system resources by allowing job structures to be recycled when the jobs end.

*SAME

The value does not change.

*SYSVAL

The value specified in the system value QSPLFACN is used.

*KEEP

When the job ends, as long as spooled files for the job exist in the system auxiliary storage pool (ASP 1) or in a basic user ASP (ASPs 2-32), the spooled files are kept with the job and the status of the job is updated to indicate that the job has completed. If all remaining spooled files for the job are in independent ASPs (ASPs 33-255), the spooled files will be detached from the job and the job will be removed from the system.

*DETACH

When the job ends, the spooled files are detached from the job and the job is removed from the system. If the job has already ended, this change will immediately detach the spooled files from the job and remove the job from the system.

Top

 

Duplicate job option (DUPJOBOPT)

Specifies the action taken when duplicate jobs are found by this command.

*SELECT

The selection display is shown when duplicate jobs are found during an interactive session. Otherwise, a message is issued.

*MSG

A message is issued when duplicate jobs are found.

Top


 

Examples

Example 1: Changing Message Logging Values

 CHGJOB   JOB(123581/DEPT2/WS1)  LOG(2 40 *SECLVL)

This command changes the job WS1, which is associated with the user profile DEPT2, and has the job number 123581. It receives only commands and associated diagnostic messages (help text) if the messages have a severity level greater than or equal to 40. Help text, in addition to the message text, is logged in the job log.

Example 2: Changing Scheduling Priority and Job Switches

 CHGJOB   JOB(PAYROLL)  JOBPTY(4)  OUTPTY(3)  SWS(10XXXX00)

This command changes the scheduling priority for the job PAYROLL to 4 and the priority of the job's output to 3. Also, four of the eight job switches are changed: switches 1 and 2 are set to 1 and 0, switches 3 through 6 remain the same, and switches 7 and 8 are both set to 0. Because only the simple name of the job is specified, there can be only one job named PAYROLL in the system.

Example 3: Moving a Job to Another Queue

 CHGJOB   JOB(MYJOB)  JOBQ(MYLIB/MYJOBQ)  INQMSGRPY(*SYSRPYL)

This command moves the job from the job queue it is currently in to the job queue MYJOBQ in library MYLIB. For this change to be made, the job must not have begun running and must be a batch job. Also, the job is changed so that any inquiry message that is issued on behalf of this job that has an entry in the system automatic reply list is answered according to the reply in that system reply list entry. For any inquiry message not represented in the system reply list, a reply is required.

Example 4: Changing Run Priority and Default Wait Time

 CHGJOB   JOB(MYJOB)  RUNPTY(10)  DFTWAIT(150)

This command changes the run priority of the job MYJOB to 10 and the default wait time to 150 seconds, if the issuer of the command has job control authority. If the job is active, these changes take effect immediately. If the job is on a job queue, when the next routing step for the job is started, the run priority and default wait times become these values and not what was specified in the class associated with the routing entry used to start the step.

Top


 

Error messages

*ESCAPE Messages

CPF1317

No response from subsystem for job &3/&2/&1.

CPF1321

Job &1 user &2 job number &3 not found.

CPF1332

End of duplicate job names.

CPF1334

Must be an interactive job for requested change.

CPF1336

Errors on CHGJOB command for job &3/&2/&1.

CPF1337

&3/&2/&1 not authorized to change parameters.

CPF1340

Job control function not performed.

CPF1341

Reader or writer &3/&2/&1 not allowed as job name.

CPF1343

Job &3/&2/&1 not valid job type for function.

CPF1344

Not authorized to control job &3/&2/&1.

CPF1351

Function check occurred in subsystem for job &3/&2/&1.

CPF1352

Function not done. &3/&2/&1 in transition condition.

CPF1634

Specified date or time has passed.

CPF1635

Requested change no longer allowed.

CPF1642

Schedule date &1 not correct.

CPF1644

Scheduled date and time not changed.

CPF1650

Both scheduled date and time must be changed.

CPF1651

Sort sequence table not accessed.

CPF180E

&4 not changed.

CPF1846

Request did not complete. System value not available.

CPF1854

Value &1 for CCSID not valid.

Top