Change Class (CHGCLS)

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

The Change Class (CHGCLS) command changes the attributes of a class object that was created using the Create Class (CRTCLS) command. The class defines the processing attributes for jobs that use the class. The class used by a job is specified in the subsystem description routing entry used to start the job. If a job consists of multiple routing steps, the class used by each subsequent routing step is specified in the routing entry used to start the routing step.

Any attribute can be changed, except for the public authority attribute. Refer to the Revoke Object Authority (RVKOBJAUT) command and the Grant Object Authority (GRTOBJAUT) command for more information on changing object authorizations.

Restrictions

  1. To use this command, you must have:
    • object management (*OBJMGT) and object operational (*OBJOPR) authorities for the class.
    • execute (*EXECUTE) authority for the library in which the class resides.
Top

Parameters

Keyword Description Choices Notes
CLS Class Qualified object name Required, Key, Positional 1
Qualifier 1: Class Name
Qualifier 2: Library Name, *LIBL, *CURLIB
RUNPTY Run priority 1-99, *SAME Optional
TIMESLICE Time slice 0-9999999, *SAME Optional
PURGE Eligible for purge *SAME, *YES, *NO Optional
DFTWAIT Default wait time 0-9999999, *SAME, *NOMAX Optional
CPUTIME Maximum CPU time 1-9999999, *SAME, *NOMAX Optional
MAXTMPSTG Maximum temporary storage 1-2147483647, *SAME, *NOMAX Optional
MAXTHD Maximum threads 1-32767, *SAME, *NOMAX Optional
TEXT Text 'description' Character value, *SAME, *BLANK Optional
Top

Class (CLS)

Specifies the qualified name of the class.

Note: The following IBM-supplied classes are not valid for this parameter:

This is a required parameter.

Qualifier 1: Class

name
Specify the name of the class.

Qualifier 2: Library

*LIBL
All libraries in the thread's library list are searched until a match is found.
*CURLIB
The current library for the thread is used to locate the object. If no library is specified as the current library for the thread, the QGPL library is used.
name
Specify the library where the class is located.
Top

Run priority (RUNPTY)

Specifies the run priority of jobs that use the class. 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. For multi-threaded jobs, the run priority is also the highest run priority allowed for any thread within the job. Individual threads within the job may have a lower priority.

This value represents the relative, not 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.

*SAME
The run priority does not change.
1-99
Specify the run priority of the job that uses this specified class.
Top

Time slice (TIMESLICE)

Specifies the maximum amount of processor time (in milliseconds) given to each thread in a job using this class before other threads in a job or other jobs are given the opportunity to run. The time slice establishes the amount of time needed by a thread in a 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.

*SAME
The time slice does not change.
0-9999999
Specify the maximum amount of time (in milliseconds) that each thread in a job that uses this class can have to run.

Note: 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 there is a long wait (such as waiting for a work station user's response). The operating system no longer uses this parameter.

*SAME
The value does not change.
*YES
The job is eligible to be moved out of main storage and 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 specified for a given situation. Normally, this would be the amount of time the system user is willing to wait for the system before the request is ended.

If the wait time for an instruction is exceeded, an error message can be displayed or it can be automatically handled by a Monitor Message (MONMSG) command.

*SAME
The default wait time does not change.
*NOMAX
There is no maximum wait time.
0-9999999
Specify the maximum time (in seconds) that the system waits for the system instruction to acquire a resource.

Note: Although a 0 default wait time is allowed, it is not recommended. Some system instructions require the use of system resources that may be in use and with a 0 default time, will cause the instruction to fail. When a system instruction fails (exceeds the default wait time) unexpected results may occur for the thread. Most system resources will only be in use for a short time, so having a small default wait time will not noticeably degrade the performance of the thread.

Top

Maximum CPU time (CPUTIME)

Specifies the maximum processing unit time (in milliseconds) that the job can use. If the job consists of multiple routing steps, each routing step is allowed to use this amount of processing unit time. If the maximum time is exceeded, the job is ended.

*SAME
The maximum processing unit time does not change.
*NOMAX
There is no limit on the processing unit time used.
1-9999999
Specify the maximum amount of processing unit time (in milliseconds) that can be used.
Top

Maximum temporary storage (MAXTMPSTG)

Specifies the maximum amount of temporary (auxiliary) storage (in kilobytes) that the job can use. If the job consists of multiple routing steps, this is the maximum temporary storage that the routing step can use. This temporary storage is used for storage required by the program itself and by implicitly created internal system objects used to support the job. (It does not include storage in the QTEMP library.) If the maximum temporary storage is exceeded, the job is ended. This parameter does not apply to the use of permanent storage, which is controlled through the user profile.

*SAME
The maximum amount of temporary storage for jobs using this class does not change.
*NOMAX
The system maximum is used.
1-2147483647
Specify the maximum amount of temporary storage (in kilobytes) that can be used.

Note: Although the value is specified in kilobytes, the specified value is stored in the class rounded up to the nearest megabyte.

Top

Maximum threads (MAXTHD)

Specifies the maximum number of threads that a job using this class can run with at any time. If multiple threads are initiated simultaneously, this value may be exceeded. If this maximum value is exceeded, the excess threads will be allowed to run to their normal completion. Initiation of additional threads will be inhibited until the maximum number of threads in the job drops below this maximum value.

*SAME
The value does not change.
*NOMAX
There is no maximum number of threads.
1-32767
Specify the maximum number of threads for a job.

Note: Depending upon the resources used by the threads and the resources available on the system, the initiation of additional threads may be inhibited before this maximum value is reached.

Top

Text 'description' (TEXT)

Specifies the text that briefly describes the object.

*BLANK
No text is specified.
'description'
Specify no more than 50 characters of text, enclosed in apostrophes.
Top

Examples

CHGCLS   CLS(CLASS1)  RUNPTY(60)  TIMESLICE(900)

This command changes a class called CLASS1 in the library on the job's library list. The run priority for the class is changed to 60 and a time slice of 900 milliseconds.

Top

Error messages

*ESCAPE Messages

CPF1169
Class &1 in library &2 not changed.
Top