CLS parameter
The class (CLS) parameter identifies the attributes that define the run time environment of a job. The following attributes are defined in each class:
- Run priority: A number that specifies the priority level assigned to all jobs running that use the class. The priority level is used to determine which job, of all the jobs competing for system resources, is run next. The value can be 1 through 99, where 1 is the highest priority (all jobs having a 1 priority are run first).
- Time slice: The maximum amount of processor time that the system allows the job to run when it is allowed to begin. The time slice indicates the amount of time needed for the job to accomplish a meaningful amount of work (the time used by the system for reading auxiliary storage is not charged against the time slice). When the time slice ends, the job waits while other queued jobs of the same or higher priority are allowed to run (up to the time specified in their time slices); then the job is given another time slice.
- Purge value: Indicates whether the job step is eligible to be moved from main storage to auxiliary storage while the job is waiting for some resource before it can continue, or when its time slice is used up and equal or higher priority jobs are waiting.
- Default wait time: The default amount of time that the system waits for the completion of an instruction that performs a wait. This wait time applies to times when an instruction is waiting for a system action, not to the time an instruction is waiting for a response from a user. Normally, this would be the amount of time you are willing to wait for the system before ending the request. If the wait time is exceeded, an error message is passed to the job. This default wait time applies only when a wait time is not specified in the CL command that causes the wait.
The wait time used for allocating file resources is specified in the file description and can be overridden by an override command. It specifies that the wait time specified in the class object is used. If file resources are not available when the file is opened, the system waits for them until the wait time ends.
Note: The class attributes apply to each routing step of a job. Most jobs have only one routing step, but if the job is rerouted (because of something like the Remote Job or Transfer Job command) the class attributes will be reset.
- Maximum CPU time: The maximum amount of processor time (the sum of the time slices if they differ, or time slice period multiplied by number of time slices if they are equal) allowed for a job's routing step to complete processing. If the job's routing step is not completed in this amount of time, it is ended, and a message is written to the job log.
- Maximum temporary storage: The maximum amount of temporary storage that can be used by a job's routing step. This temporary storage is used for the programs that run in the job, for the system objects used to support the job, and for temporary objects created by the job.
The system is shipped with a set of classes that define the attributes for several job processing environments. Other classes can be created by the Create Class (CRTCLS) command; any class can be displayed or deleted by the respective Display Class (DSPCLS) and Delete Class (DLTCLS) commands.
Values allowed
qualified-class-name: Specify the name of the class, optionally qualified by the name of the library in which the class is stored. If the class name is not qualified and the CLS parameter is in the CRTCLS command, the class object is stored in *CURLIB; otherwise, the library list (*LIBL) is used to find the class name.
The following classes (by name) are supplied with the system:
- QGPL/QBATCH
- For use by batch jobs
- QSYS/QCTL
- For use by the controlling subsystem
- QGPL/QINTER
- For use by interactive jobs
- QGPL/QPGMR
- For use by the programming subsystem
- QGPL/QSPL
- For use by the spooling subsystem printer writer
- QGPL/QSPL2
- For general spooling use in the base system pool