CRTCLS (Create Class)

CRTCLS Command syntax diagram

 

Purpose

The Create Class (CRTCLS) command creates a class object and specifies the attributes to be contained in the class. 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 that is 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.

 

Required Parameters

CLS
Specifies the qualified name of the class. More information on this parameter is in Commonly used parameters.

The name of the class can be qualified by one of the following library values:

*CURLIB: The class is created in the current library for the job. If no library is specified as the current library for the job, the QGPL library is used.

library-name: Specify the name of the library where the class is created.

class-name: Specify the name of the class.

 

Optional Parameters

RUNPTY
Specifies the run priority of jobs that use the class being created. 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 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.

50: Jobs that use this class have a run priority of 50.

run-priority: Specify the run priority of jobs using this class.

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

2000: A maximum running time of 2000 milliseconds is allocated to each thread each time it is allowed to process.

time-slice: Specify the maximum amount of time (in milliseconds) that each thread in a job in this class can have to run when it is given processing time. Valid entries range from 1 through 9999999 (that is, 9 999 999 milliseconds or 9999.999 seconds).

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.

PURGE
Specifies whether the job is marked 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). This attribute is ignored when more than one thread is active within the job.

*YES: The job is eligible to move 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.

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 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 any one instruction is exceeded, an error message can be displayed or it can be automatically handled by a Monitor Message (MONMSG) command.

30: An instruction wait has up to 30 seconds in which to complete.

*NOMAX: There is no maximum wait time.

seconds-to-wait: Specify a value, ranging from 1 through 9999999 seconds, that specifies the maximum time that the system waits for the system instruction to acquire a resource.

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.

*NOMAX: There is no limit on the processing unit time used.

maximum-CPU-time: Specify the maximum amount of processing unit time (in milliseconds) that can be used. Valid values range from 1 through 9999999 (that is, 9 999 999 milliseconds or 9999.999 seconds).

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.

*NOMAX: The system maximum is used.

maximum-temporary-storage: Specify a value in kilobytes (ranging from 1 through 2147483647) that specifies the maximum amount of temporary storage 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.

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.

*NOMAX: There is no maximum number of threads.

maximum-threads: Specify a value (ranging from 1 through 32767) that specifies 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.

AUT
Specifies the authority given to users who do not have specific authority to the class, who are not on an authorization list, and whose user group has no specific authority to the class.

*LIBCRTAUT: The public authority for the class is taken from the value on the CRTAUT parameter of the target library (the library that is to contain the class). The public authority is determined when the class is created. If the CRTAUT value for the library changes after the class is created, the new value does not affect any existing objects.

*CHANGE: The user can perform all operations on the object except those limited to the owner or controlled by object existence authority and object management authority. The user can change and perform basic functions on the object. Change authority provides object operational authority and all data authority. If the object is an authorization list, the user cannot add, change, or remove users.

*ALL: The user can perform all operations except those limited to the owner or controlled by authorization list management authority. The user can control the object's existence, specify the security for the object, change the object, and perform basic functions on the object. The user also can change ownership of the class.

*USE: The user can perform basic operations on the class, such as running a program or reading a file. The user cannot change the class. *USE authority provides object operational authority, read authority, and execute authority.

*EXCLUDE: The user cannot access the class.

authorization-list-name: Specify the name of the authorization list used.

TEXT
Specifies the text that briefly describes the class being created. More information on this parameter is in Commonly used parameters.

*BLANK: Text is not specified.

'description': Specify no more than 50 characters of text, enclosed in apostrophes.

Example for CRTCLS

CRTCLS   CLS(CLASS1)  RUNPTY(60)  TIMESLICE(900)
  TEXT('This class for all batch jobs
  from Dept 4836')

This command creates a class called CLASS1. The class is stored in the current library specified for the job. The user text 'This class for all batch jobs from Dept 4836' describes the class. The attributes of this class provide a run priority of 60 and a time slice of 900 milliseconds. If the job has not finished running at the end of a time slice, it is eligible to be moved out of main storage until it is allocated another time slice. The defaults for the other parameters are assumed.

Error messages for CRTCLS

*ESCAPE Messages

CPF1027
No authority to library &1.
CPF1039
Class library &1 not found.
CPF1064
Class &1 exists in library &2.
CPF1067
Cannot allocate library &1.
CPF9802
Not authorized to object &2 in &3.
CPF9899
Error occurred during processing of command.>