Publish Print Information (QSPPUBPI) API
Required Parameter Group:
1 | Publishing action | Input | Binary(4) |
2 | Print information | Input | Char(*) |
3 | Length of Print Information | Input | Binary(4) |
4 | Information format | Input | Char(8) |
5 | Error Code | I/O | Char(*) |
Default Public Authority: *USE
Threadsafe: No
The Publish Print Information (QSPPUBPI) API collects print object information and queues it for publishing in an LDAP directory whenever a print object is published. It also can be used to stop publishing for a print object.
Print publishing is included as part of the configuration for directory services from the System i™ Navigator interface. Before configuring print publishing, the directory to use should be considered carefully to avoid migration problems. Changing the directory can be done from System i Navigator or by using the Change Directory Server Attributes (QgldChgDirSrvA) API.
Authorities and Locks
- Printer device description authority
- The caller needs both of the following:
- *IOSYSCFG special authority
- *CHANGE, *OBJMGT to the printer device
Required Parameter Group
- Publishing action
- INPUT; BINARY(4)
The action to be performed for the print object. The following values may be specified:
1 Publish a print object 2 Stop publishing for a print object 3 Stop publishing for a print object and delete the object's information from the directory
- Print information
- INPUT; CHAR(*)
The formatted print information. For more information, see Printer Information Formats.
- Length of print information
- INPUT; BIN(4)
The total length of the print information provided for the information format specified.
- Information format
- INPUT; CHAR(8)
The type of print information on which the publishing action will be performed. The possible format names are:
SPPA0100 Printer devices
- Error code
- I/O; CHAR(*)
The structure in which to return error information. For the format of the structure, see Error code parameter.
Printer Information Formats
The structure of the printer information format is listed below. For a description of each field, see Field Descriptions.
SPPA0100 Format
Offset | Type | Field | |
---|---|---|---|
Dec | Hex | ||
0 | 0 | Array of CHAR(10) | Printer device name |
This format is used with a printer device name or list of names.
- Action 1 is used to publish a new printer or list of printers, such as may
be selected in System i Navigator. This action causes information about each
printer to be stored in the directory.
- Action 2 is used to stop publishing a published printer or list of
printers. No action is taken if the printer device information was not
published previously. This action removes the IBM® i specific information from
the printer's directory entry, but does not remove the entry from the
directory. Future changes to the printer device will not be reflected in the
directory.
- Action 3 is used to stop publishing a published printer or list of printers and to remove the directory entry for each printer if one exists. No action is taken if the printer device information was not published previously.
Field Descriptions
Printer device name. The name of a printer device to publish or stop publishing.
Error Messages
Message ID | Error Message Text |
---|---|
CPF2207 E | Not authorized to use object &1 in library &3 type *&2. |
CPF24B4 E | Severe error occurred while addressing parameter list. |
CPF2625 E | Not able to allocate object &1. |
CPF2702 E | Device Description &2 not found. |
CPF34AD E | Value specified in input data is not valid. |
CPF34AE E | Printer publishing is not configured or is disabled. |
CPF34BA E | Action &1 not valid. |
CPF34BB E | Error occurred while publishing printer &1. |
CPF3C1D E | Length specified in parameter &1 is not valid. |
CPF3C1E E | Required parameter &1 omitted. |
CPF3C21 E | Format name &1 is not valid. |
CPF3CF1 E | Error code parameter not valid. |
CPF3CF2 E | Error(s) occurred during running of &1 API. |
CPF8105 E | Device Description &4 damaged. |
CPF9872 E | Program or service program &1 in library &2 ended. |
CPFA314 E | Memory allocation error. |
API introduced: V5R1
[ Back to top | Print APIs | APIs by category ]