Add Print Server Share (QZLSADPS) API


  Required Parameter Group:

1 Share name Input Char(12)
2 Qualified output queue name Input Char(20)
3 Text description Input Char(50)
4 Spooled file type Input Binary(4)
5 Print driver type Input Char(50)
6 Error code I/O Char(*)

  Optional Parameter Group 1:

7 Qualified printer file Input Char(20)

  Optional Parameter Group 2:

8 Publish print share Input Char(1)

  Default Public Authority: *USE

  Threadsafe: No

The Add Print Server Share (QZLSADPS) API shares a system output queue with the network by using the IBM® i Support for Windows® Network Neighborhood (IBM i NetServer™) server.


Authorities and Locks

To use this API, you must have *IOSYSCFG special authority or own the system output queue.


Required Parameter Group

Share name
INPUT; CHAR(12)

The name of the share to be added.

Qualified output queue name
INPUT; CHAR(20)

The output queue. The first 10 characters contain the name of the output queue. The second 10 characters contain the name of the library that contains the output queue.

Text description
INPUT; CHAR(50)

The text description for this share.

Spooled file type
INPUT; BINARY(4)

The type of spooled files that are created using this share. This is based on spooled file data expected to be sent by the client; no conversion will be done.

Note: In most cases, the automatic type sense value is selected. The other options are needed for downward compatibility. Values can be:

1 User ASCII (*USERASCII)
2 Advanced Function Presentation™ (*AFP)
3 SNA character string (*SCS)
4 Automatic type sensing

Print driver type
INPUT; CHAR(50)

The text string that identifies the print driver that is appropriate for this share. When personal computers connect to this shared printer, this identifies the print driver that they should use. This text should match the name of a print driver known to the personal computer operating system. For example, IBM® AFP 3820 is an Advanced Function Print driver type.

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 1

Qualified printer file
INPUT; CHAR(20)

A template containing attributes used to create spooled files. The first 10 characters contain the name of the printer file. The second 10 characters contain the name of the library that contains the printer file.

If the printer file parameter is left out, the API assumes that no printer file will be used to create spooled files.

This parameter must be specified when optional parameter 2 is specified. Blanks can be specified for the printer file to indicate no printer file will be used to create spooled files.


Optional Parameter Group 2

Publish print share
INPUT; CHAR(1)

Whether to publish this print share. Possible values are:

0 Do not publish the print share
1 Publish the print share

If the publish print share parameter is omitted, the API assumes a default value of 0.


Error Messages

Message ID Error Message Text
CPF3C1E E Required parameter &1 omitted.
CPF3CF1 E Error code parameter not valid.
CPF3CF2 E Error(s) occurred during running of &1 API.
CPFA0D4 E File system error occurred.
CPFB682 E API &1 failed with reason code &2.
CPFB683 E Data conversion failed for API &1.
CPFB684 E User does not have the correct authority for API &1.
CPFB68A E Error occurred while working with shared resource &2.
CPFB68B E Character is not valid for value &3.
CPIB685 E Error occurred on IBM i Support for Windows Network Neighborhood (IBM i NetServer) request.


API introduced: V4R2

[ Back to top | Server Support APIs | APIs by category ]