Build Open Time Commands (QSPBOPNC) API


  Required Parameter Group:


  Default Public Authority: *USE

  Threadsafe: No

The Build Open Time Commands (QSPBOPNC) API uses the attributes of the spooled file to build commands that must be sent ahead of the data to prepare the printer to print the spooled file. These commands are referred to as open time commands. The open time commands contain most of the file level commands needed to format the printed output.


Authorities and Locks

The user must have *USE authority to the printer device description.


Required Parameter Group

Receiver variable
OUTPUT; CHAR(*)

The receiver variable receives the information requested. When the size of the area is smaller than the format requested, the API returns only the data the area can hold. If the size of the area is greater than the format, the area past the format is undefined.

Length of receiver variable
INPUT;BINARY(4)

The length of the receiver variable. The amount of data is truncated if the receiver variable is too small. Anything less than 8 bytes is not valid.

Format name
INPUT; CHAR(8)

The format of the information returned in the receiver variable.

The valid format name is:


Printer device name
INPUT; CHAR(10)

The name of the printer device description of the writer that was started.

The following special value is allowed:


Print data stream type
INPUT; CHAR(10)

The type of data stream recognized by the printer writer. This is used to determine the type of data to generate for open time command.

The valid special value is:


Spooled file attributes
INPUT; CHAR(*)

The attributes of the spooled file to be printed. These attributes are obtained by using the Retrieve Spooled File Attributes (QUSRSPLA) API, specifying format SPLA0200.

Error code
I/O; CHAR(*)

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


OPNC0100 Format

The following table shows the information returned for the OPNC0100 format. For more details about the fields in the following table see, Field Descriptions.


Field Descriptions

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.

Offset to open time commands. The byte offset to the open time commands from the beginning of the format.

Open time commands. The open time commands, which contain most of the file level commands to format the output.

Size of open time commands. The size of the open time commands, in bytes.


Error Messages



API introduced: V3R7

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