1 | Status changes | Input | Char(*) |
2 | Length of status changes | Input | Binary(4) |
3 | Format name | Input | Char(8) |
4 | Writer handle | Input | Char(16) |
5 | Spooled file handle | Input | Char(10) |
6 | Error code | I/O | Char(*) |
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.
The lock is on the output queue on which the spooled file resides.
The variable that contains the status information to be updated.
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.
The format of the file status changes.
SETW0100 | Contains the information about the writer and the spooled file status information to be changed. |
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.
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).
The structure in which to return error information. For the format of the structure, see Error Code Parameter.
The following table shows the information specified in the SETW0100 format. For more details about the fields in the following table see, Field Descriptions.
Offset | Type | Field | |
---|---|---|---|
Dec | Hex | ||
0 | 0 | CHAR(1) | Change status |
1 | 1 | CHAR(1) | Change current page |
2 | 2 | CHAR(1) | Change convert page |
3 | 3 | CHAR(1) | Change copies |
4 | 4 | CHAR(1) | Change accounting pages |
5 | 5 | CHAR(1) | Change accounting lines |
6 | 6 | CHAR(1) | Change accounting bytes |
7 | 7 | CHAR(5) | Reserved |
12 | C | BINARY(4) | Status |
16 | 10 | BINARY(4) | Current page |
20 | 14 | BINARY(4) | Convert page |
24 | 18 | BINARY(4) | Copies |
28 | 1C | BINARY(4) | Number of pages for accounting |
32 | 20 | BINARY(4) | Number of lines for accounting |
26 | 24 | PACKED (15,0) | Number of bytes for accounting |
Change accounting bytes. Change the number of bytes that have been processed for accounting purposes.
Possible values are:
0 | Do not change the accounting bytes. |
1 | Change the number of bytes that have been processed for accounting to the value specified in the number of bytes for accounting field. |
Change accounting lines. Change the number of lines that have been processed for accounting purposes.
Possible values are:
0 | Do not change the accounting lines. |
1 | Change the number of lines that have been processed for accounting to the value specified in the number of lines for accounting field. |
Change accounting pages. Change the number of pages that have been processed for accounting purposes.
Possible values are:
0 | Do not change the accounting pages. |
1 | Change the number of pages that have been processed for accounting to the value specified in the number of pages for accounting field. |
Change convert page. Change the number of pages that have been converted.
Possible values are:
0 | Do not change the number of pages that have been converted. |
1 | Change the number of pages that have been converted to the value specified in the convert page field. |
Change copies. Change the number of copies currently printing.
Possible values are:
0 | Do not change the number of the copies being printed. |
1 | Change the number of the copies being printed to the value specified in the copies field. |
Change current page. Change the current page that has just printed.
Possible values are:
0 | Do not change the current page that has just printed. |
1 | Change the current page that has just printed to the value specified in the current page field. |
Change status. Change the status of the spooled file being processed by the writer.
Possible values are:
0 | Do not change the status of the spooled file. |
1 | Change the status of the spooled file to the value specified in the status field. |
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:
1 (pending) | The spooled file is being converted. |
2 (writing) | The spooled file is being selected by the writer. |
3 (sending) | The spooled file is being sent to a remote system. |
4 (printing) | The spooled file is being printed. |
5 (separator) | The writer is printing separator pages. |
6 (suspend) | The driver is still processing the file. |
7 (interrupt) | The driver is done processing the file. |
8 (ready) | The spooled file is ready for processing. |
9 (held) | The spooled file has been held by the driver. |
10 (sent) | The spooled file has been sent to a remote system. |
11 (finished) | The driver is finished with the spooled file. |
Notes:
An example scenario using the suspend status:
An example scenario using the interrupt status follows:
Message ID | Error Message Text |
---|---|
CPF24B4 E | Severe error while addressing parameter list. |
CPF3CF1 E | Error code parameter not valid. |
CPF3C1D E | Length specified in parameter &1 not valid. |
CPF3C19 E | Error occurred with receiver variable specified. |
CPF3C21 E | Format name &1 is not valid. |
CPF3C90 E | Literal value cannot be changed. |
CPF33CC E | No writer found for specified handle &1. |
CPF33CD E | No file found for specified handle &1. |
CPF34CB E | Value not valid for field &1. |
CPF9872 E | Program or service program &1 in library &2 ended. Reason code &3. |
Top | Print APIs | APIs by category |