Set Writer Status (QSPSETWI) API


  Required Parameter Group:


  Default Public Authority: *USE

  Threadsafe: No

The Set Writer Status (QSPSETWI) API is used by a driver exit program to update information about a spooled file that a writer is processing. This information is used on certain spooled file displays. For example, the Work with Spooled File (WRKSPLF) command displays the correct status, current page, and total copies information.


Authorities and Locks

Output queue lock
*EXCLRD

The lock is on the output queue on which the spooled file resides.


Required Parameter Group

Status changes
INPUT; CHAR(*)

The variable that contains the status information to be updated.

Length of status changes
INPUT; BINARY(4)

The length of the status information provided by the status changes parameter. The amount of data specified can be smaller than the information in the format. However, all the status information may not be set appropriately.

Format name
INPUT; CHAR(8)

The format of the file status changes.


Writer handle
INPUT; CHAR(16)

The handle to the writer job. This handle is provided to the driver program on a writer call to the driver exit program during initialization.

Spooled file handle
INPUT; CHAR(10)

The spooled file handle of the current file for which the information is being set. This handle is provided to the driver program on a writer call to the driver exit program (using the process file option).

Error code
I/O; CHAR(*)

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


SETW0100 Format

The following table shows the information specified in the SETW0100 format. For more details about the fields in the following table, see Field Descriptions.


Field Descriptions

Change accounting bytes. Change the number of bytes that have been processed for accounting purposes.

Possible values are:


Change accounting lines. Change the number of lines that have been processed for accounting purposes.

Possible values are:


Change accounting pages. Change the number of pages that have been processed for accounting purposes.

Possible values are:


Change convert page. Change the number of pages that have been converted.

Possible values are:


Change copies. Change the number of copies currently printing.

Possible values are:


Change current page. Change the current page that has just printed.

Possible values are:


Change status. Change the status of the spooled file being processed by the writer.

Possible values are:


Copies. The current number of copies of the spooled file that have been processed by the driver program. The driver program should call this API with the current number of copies processed after the processing of each copy of the spooled file.

Convert page. The number of the pages that have been converted.

Current page. The number of the page that is being printed.

Number of bytes for accounting. The cumulative number of bytes to be logged for accounting.

Number of lines for accounting. The cumulative number of lines to be logged for accounting.

Number of pages for accounting. The cumulative number of pages to be logged for accounting.

Reserved. Field must be set to blank.

Status. The new status of the spooled file.

Possible values are:

Notes:

An example scenario using the suspend status:


An example scenario using the interrupt status follows:


Error Messages


API introduced: V3R7

[ Back to top | Print APIs | APIs by category ]