Retrieve Active Prestart Jobs Status (QWTRAPJS) API


  Required Parameter Group:


  Optional Parameter Group:


  Default Public Authority: *USE
  Threadsafe: No

The Retrieve Active Prestart Jobs Status (QWTRAPJS) API retrieves the statistics and performance information for active prestart jobs for a prestart job entry in an active subsystem. The information is collected from the time the reset key is pressed on the Display Active Prestart Jobs (DSPACTPJ) command or from the time the prestart job entry is started. The prestart job entry is either started when the subsystem starts or when the Start Prestart Jobs (STRPJ) command is used. The information returned is similar to the information returned by the Display Active Prestart Jobs (DSPACTPJ) command.

The QSYS2.PRESTART_JOB_STATISTICS table function can be used as an alternative to this API. See PRESTART_JOB_STATISTICS table function for more information.


Authorities and Locks

Program Library Authority
*EXECUTE
Auxiliary Storage Pool (ASP) Device Description Authority (if the subsystem description specifies an ASP group name)
*USE

Required Parameter Group

Receiver variable
OUTPUT; CHAR(*)

The variable that is to receive the information requested. You can specify the size of this area to be smaller than the format requested if you specify the length of receiver variable 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. If this value is larger than the actual size of the receiver variable, the result may not be predictable. The minimum length is 8 bytes.

Format name
INPUT; CHAR(8)

The format of the information to be returned. You can use this format:


Subsystem name
INPUT; CHAR(10)

The name of the active subsystem that contains the prestart job entry.

Qualified program name
INPUT; CHAR(20)

The name of program that identifies the active prestart job entry. The first 10 characters contain the name of the program, and the second 10 characters contain the name of the library where the program is located. You can use these special values for the library name:


Error code
I/O; CHAR(*)

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


Optional Parameter Group

Reset statistic
INPUT; CHAR(3)

Whether the Elapsed time statistic is reset to zero. The statistics will be reset after the information is gathered. This parameter will also reset the status statistics on the Display Active Prestart Jobs (DSPACTPJ) command. Valid value is:



RAPJS100 Format

The following table describes the information that is returned in the receiver variable for the RAPJS100 format. For detailed descriptions of the fields, see Field Descriptions.



Field Descriptions

Average number of all prestart jobs. The average number of jobs (in tenths) that are active during the Elapsed time. This value is based on calculations involving time intervals and is inaccurate if the system clock was changed while information is being collected. For example, a value of 29 in binary would be 2.9.

Average number of in-use prestart jobs. The average number of jobs in use (in tenths) during the elapsed time. This value is based on calculations involving time intervals and is inaccurate if the system clock was changed while information is being collected. For example, a value of 29 in binary would be 2.9.

Average number of requests. The average number of requests (in tenths, a value of 29 in binary would be 2.9) that have waited for a prestart job since the reset date/time. This value is based on calculations involving time intervals and is inaccurate if the system clock was changed while information is being collected.

Average wait time for requests. The average time (in tenth of a second) that requests have waited to be attached to a prestart job.

Bytes available. The length of all data available to return. All available data is returned if enough space is provided.

Bytes returned. The length of all data actually returned. If the data is truncated because the receiver variable was not sufficiently large to hold all of the data available, this value will be less than the bytes available.

Current date and time. The date and time the active prestart jobs status information was collected. Current date and time is returned as system time in system timestamp format.

Current number of all prestart jobs. The total number of currently active jobs associated with an entry.

Current number of in-use prestart jobs. The current number of jobs in use.

Current number of requests. The number of requests that are waiting for a prestart job.

Elapsed time. The time, in the format hhhhmmss (where hhhh=hours, mm=minutes, and ss=seconds), that has passed since the reset date/time. If the value 99995959 appears, the elapsed time might have exceeded this value. If the value 00000000 appears, it's possible that the elapsed time could not be calculated.

Number of accepted requests. The total number of accepted requests since the reset date/time. An accepted request is one that is either attached immediately to a prestart job, or is queued because a prestart job is not available

Number of rejected requests. The total number of rejected requests since the reset date/time. A request is rejected if *NO is specified for the WAIT parameter on the prestart job entry and there are no jobs currently available to handle the request. A request is rejected if *YES is specified for the WAIT parameter and there are more program start requests than the maximum jobs allowed.

Program library. The library where the program is located.

Program name. The program that identifies the active prestart job entry.

Peak number of all prestart jobs. The maximum number of jobs that can be active during the elapsed time.

Peak number of in-use prestart jobs. The maximum number of jobs in use during the elapsed time.

Peak number of requests. The maximum number of requests that have waited at one time for an available prestart job.

Subsystem name. The name of the active subsystem that contains the prestart job entry.


Error Messages



API introduced: 7.4

[ Back to top | Work Management APIs | APIs by category ]