Retrieve Class Information (QWCRCLSI) API


  Required Parameter Group:

1 Receiver variable Output Char(*)
2 Length of receiver variable Input Binary(4)
3 Format of class information Input Char(8)
4 Qualified class name Input Char(20)
5 Error Code I/O Char(*)

  Default Public Authority: *USE

  Threadsafe: No

The Retrieve Class Information (QWCRCLSI) API returns the attributes of a class object. A class contains the job run attributes for jobs that use this class. This API provides support similar to the Display Class (DSPCLS) command.


Authorities and Locks

Class
*USE
Class Library
*EXECUTE

Required Parameter Group

Receiver variable
OUTPUT; CHAR(*)

The receiver variable that receives the information requested. You can specify the size of the area to be smaller than the format requested as long as you specify the length parameter correctly. As a result, the API returns only the data that the area can hold.

Length of receiver variable
INPUT; BINARY(4)

The length of the receiver variable provided. The length of receiver variable parameter may be specified up to the size of the receiver variable specified in the user program. If the length of receiver variable parameter specified is larger than the allocated size of the receiver variable specified in the user program, the results are not predictable. The minimum length is 8 bytes.

Format of class information
INPUT; CHAR(8)

The format of the class information being returned. The format names that can be used are as follows:

CLSI0100 This format returns all of the class information. See Format CLSI0100 for details.

Qualified class name
INPUT; CHAR(20)

The class name whose attributes are to be retrieved. The first 10 characters contain the class name, and the second 10 characters contain the library name. You can use these special values for the library name:

*CURLIB The job's current library
*LIBL The job's library list

Error code
I/O; CHAR(*)

The structure in which to return error information. For the format of the structure, see Error code parameter.


Format CLSI0100

The following information is returned by this API when format CLSI0100 is used:

Offset Type Field
Dec Hex
0 0 BINARY(4) Bytes returned
4 4 BINARY(4) Bytes available
8 8 CHAR(10) Class name
18 12 CHAR(10) Class library name
28 1C BINARY(4) Run priority
32 20 BINARY(4) Time slice
36 24 BINARY(4) Eligible for purge
40 28 BINARY(4) Default wait time
44 2C BINARY(4) Maximum CPU time
48 30 BINARY(4) Maximum temporary storage in kilobytes
52 34 BINARY(4) Maximum number of threads
56 38 CHAR(50) Text
106 6A CHAR(2) Reserved
108 6C BINARY(4) Maximum temporary storage in megabytes


Field Description

Bytes available. The number of bytes of data available to be returned. All available data is returned if enough space is provided.

Bytes returned. The number of bytes of data returned.

Class library name. The name of the library in which the class resides.

Class name. The name of the class about which information is returned.

Default wait time. The default maximum time (in seconds) that a thread in a 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 user would be willing to wait for the system before the request is ended. A value of -1 is returned for *NOMAX, which indicates there is no maximum wait time.

Eligible for purge. Whether or not 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 beginning 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. The possible values are:

0 The job is not eligible to be moved out of main storage and put into auxiliary storage. When main storage is needed, however, pages belonging to a thread in this job may be moved to auxiliary storage. Then, when a thread in the job runs again, its pages are returned to main storage as they are needed.
1 The job is eligible to be moved out of main storage and put into auxiliary storage. A job with multiple threads, however, is never purged from main storage.

Maximum CPU time. The maximum processing unit time (in milliseconds) that the job can use. If the job consists of multiple routing steps, this is the maximum processing unit time that the routing step can use. If the maximum time is exceeded, the job is ended. A value of -1 is returned for *NOMAX, which indicates there is no limit on the processing unit time.

Maximum number of threads. 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. A value of -1 is returned for *NOMAX, which indicates there is no maximum number of threads. Depending on the resources used by the threads and the resources available on the system, the initiation of additional threads may be inhibited before the maximum is reached.

Maximum temporary storage in kilobytes. The maximum amount of 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 that is required by the programs running in the job and by internal system objects created while the programs are running. (It does not include storage in the QTEMP library.) If the maximum temporary storage is exceeded, the job is ended. This does not apply to the use of permanent storage, which is controlled through the user profile. A value of -1 is returned for *NOMAX, which indicates the system maximum is used.

Maximum temporary storage in megabytes. The maximum amount of auxiliary storage (in megabytes) 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 that is required by the programs running in the job and by internal system objects created while the programs are running. (It does not include storage in the QTEMP library.) If the maximum temporary storage is exceeded, the job is ended. This does not apply to the use of permanent storage, which is controlled through the user profile. A value of -1 is returned for *NOMAX, which indicates the system maximum is used.

Reserved. This field is ignored.

Run priority. A value that represents the priority at which the job competes for the processing unit relative to other jobs that are active at the same time. The run priority ranges from 0 (highest priority) to 99 (lowest priority). This value is the highest run priority allowed for any thread within the job. Individual threads may have a lower priority.

Text. The text description of the class.

Time slice. The maximum amount of processor time, in milliseconds, given to each thread in a job 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.


Error Messages

Message ID Error Message Text
CPF1029 E No authority to library &1.
CPF1039 E Class library &1 not found.
CPF1065 E Class &1 in library &2 not found.
CPF1067 E Cannot allocate library &1.
CPF1068 E Cannot allocate class &1 in library &2.
CPF1098 E No authority to class &1 in library &2.
CPF24B4 E Severe error while addressing parameter list.
CPF3CF1 E Error code parameter not valid.
CPF3CF2 E Error(s) occurred during running of &1 API.
CPF3C19 E Error occurred with receiver variable specified.
CPF3C21 E Format name &1 is not valid.
CPF3C24 E Length of the receiver variable is not valid.
CPF3C90 E Literal value cannot be changed.
CPF9872 E Program or service program &1 in library &2 ended. Reason code &3.


API introduced: V4R3
Top | Work Management APIs | APIs by category