Open Print Application (QUIOPNPA) API


  Required Parameter Group:

1 Application handle Output Char(8)
2 Qualified panel group name Input Char(20)
3 Application scope Input Binary(4)
4 Exit parameter interface Input Binary(4)
5 Qualified name of printer device file Input Char(20)
6 Alternative file name Input Char(10)
7 Share open data path Input Char(1)
8 User data Input Char(10)
9 Error code I/O Char(*)

  Optional Parameter Group:

10 Open data receiver Output Char(*)
11 Length of open data receiver Input Binary(4)
12 Length of available open data Output Binary(4)

  Default Public Authority: *USE

  Threadsafe: No

The Open Print Application (QUIOPNPA) API initiates a UIM print application by opening the panel group that the application program specifies. The QUIOPNPA API and the Close Application (QUICLOA) API must be used in pairs to open and close each UIM print application.

Multiple applications can be opened at the same time. Each open application contains a complete set of dialog variables and active lists, and is independent of other open applications. The same panel group can be opened more than once per job, but each call of the QUIOPNPA API initiates a new UIM print application and returns a unique application handle.

Authorities and Locks

Library Authority
*READ
Panel Group Authority
*USE
Panel Group Lock
*SHRRD
Printer Device File Authority
*USE
Printer Device File Lock
*SHRNUP

Required Parameter Group

Application handle
OUTPUT; CHAR(8)

The application handle for the open application. The Open Display Application (QUIOPNDA) API returns a unique handle for each application opened. This handle must be provided as a parameter to every other UIM API that operates on the application, including the QUICLOA API, which must be used to close the application.

Qualified panel group name
INPUT; CHAR(20)

The name of the *PNLGRP object opened for this UIM application. The first 10 characters contain the name of the *PNLGRP object, and the second 10 characters contain the name of the library in which the panel group resides. These special values can be used for the library name:

*CURLIB The job's current library
*LIBL The library list

Application scope
INPUT; BINARY(4)

The scope of the resources for the application. The UIM uses the scope to determine whether or not to automatically close the application when reclaim resource processing is performed through the Reclaim Resource (RCLRSC) command, the Reclaim Activation Group (RCLACTGRP) command, or the End Request (ENDRQS) command. During reclaim resource processing, the UIM closes all applications whose scope is no longer active.

One of the following values must be used:

-1 The calling program is the scope for the application. If the calling program is an original program model (OPM) program and the application program is no longer active, the UIM will automatically close the application during reclaim resource processing. If the calling program is an Integrated Language Environment® (ILE) program and the activation group mark is no longer active, the UIM will automatically close the application during reclaim resource processing.
0 The job is the scope for the application. The application is not automatically closed by the UIM until the job is ended.

Exit parameter interface
INPUT; BINARY(4)

The type of parameter interface used with exit programs and programs called as a result of the CALL dialog command for the UIM application being opened.

All exit and CALL programs receive a single parameter or multiple parameters, which are space pointers to information describing the state of the UIM application.

One of the following values must be used:

0 Used by programs written in languages that can efficiently process structures.
1 Used by programs written in languages that cannot efficiently process structures. This value indicates that all application programs called as exits or as a result of the CALL dialog command accept the parameter lists described for interface level 1.
2 Used by programs written in languages that cannot efficiently process structures. This value indicates that all application programs called as exits or as a result of the CALL dialog command accept the parameter lists described for interface level 2.

For a detailed description of the exit parameter lists, and for a description of the type of structure passed for each type of exit and CALL program, see User Interface Manager Exit Programs.

Qualified name of printer device file
INPUT; CHAR(20)

The name of the printer device file used in print operations. The first 10 characters contain the *FILE object name, and the second 10 characters contain the name of the library in which the printer device file resides. These special values can be used for the library name:

*CURLIB The job's current library
*LIBL The library list

Alternative file name
INPUT; CHAR(10)

An alternative name for the spooled file. The following special value can be used:

*NONE There is no alternative name for the spooled file. The name of the spooled file is the name of the printer device file.

Share open data path
INPUT; CHAR(1)

Determines whether or not the printer device file's open data path (ODP) is shared. Sharing the ODP allows multiple UIM applications to print to the same spooled file. One of the following values must be used:

Y The ODP is shared.
N The ODP is not shared.
F Use the share value of the print file.

User data
INPUT; CHAR(10)

User data associated with the spooled file. This data becomes an attribute of the spooled file. The following special values can be used:

*FILE The user data of the spooled file will be set to the user data value of the printer file being opened.
*NONE There is no user data associated with the spooled file. The user data value of the printer file being opened will be set to blanks.

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

Open data receiver
OUTPUT; CHAR(*)

The receiver variable that is to receive the open data information requested. For the format of the open data receiver variable, see Format of Data Returned.

Length of open data receiver
INPUT; BINARY(4)

The amount of data the application program is prepared to receive. If the length specified is larger than the amount of data available, the receiver is not changed beyond the amount of data available. If the length specified is greater than the actual length of the open data receiver parameter, unpredictable results may occur.

Length of available open data
OUTPUT; BINARY(4)

The length of all open data available. All available open data is returned if enough space is provided.


Format of Data Returned

The format of the data available, returned in the open data receiver parameter, is as follows:

One of the following values is returned:

CHAR(1) Whether or not an error occurred while attempting to obtain the conversion tables needed to process the panel group. The conversion tables are needed when the CHRID attribute of the panel group is not equal to the CHRID attribute of the device, or when the CHRID attribute of the panel group is *JOBCCSID and the job CCSID is not equal to the device CHRID. A CPD6A2A diagnostic message will be logged in the job log for each conversion table that is not found.
N No error occurred while obtaining the conversion tables or the conversion tables were not necessary.
Y An error occurred while obtaining the conversion tables.
CHAR(1) Whether or not the conversion of data from the job to the device and from the device to the job will result in loss of fidelity of the data. Conversion will be done when the CHRID attribute of the panel group is not equal to the CHRID attribute of the device, or when the CHRID attribute of the panel group is *JOBCCSID and the job CCSID is not equal to the device CHRID.

One of the following values is returned:

N No loss of fidelity will occur.
Y Loss of fidelity may occur on the conversions.

Error Messages

Message ID Error Message Text
CPF3C90 E Literal value cannot be changed.
CPF6A1C E Unable to add print function.
CPF6A1E E Object cannot be used with this device or print file.
CPF6A11 E Value is not correct. Reason code is &3.
CPF6A12 E Unable to open panel group.
CPF6A17 E Panel group &1 in library &2 is not at the current release level.
CPF6A2A E Value for Application Scope parameter not valid.
CPF6A2E E Value for Exit Parameter Interface parameter not valid.
CPF6A24 E Parameter &1 not passed correctly.
CPF6A25 E Return code length of &1 not valid.
CPF6A26 E Resources not available to open application.
CPF6A3A E Value for Open Data Receiver is not valid. Reason code &1.
CPF9850 E Override of printer file &1 not allowed.
CPF9872 E Program or service program &1 in library &2 ended. Reason code &3.


API introduced: V2R2

[ Back to top | User Interface Manager APIs | APIs by category ]