QSETPRT (Query Printer Setup) Macro

The purpose of the QSETPRT macro is to determine how the printer is set up and/or to build a SETPRT parameter list that can later be passed to the SETPRT routine to re-create the current setup.

The parameter list that is passed to QSETPRT is converted to a SETPRT parameter list with INIT=Y set in it. FCB verification and SEP indicators are not set in the parameter list.

The SETPRT and QSETPRT macros can use registers 0, 1, 14, and 15 in their expansions. The caller 's addressability must be based on a different register.

After successful completion of QSETPRT, register one points to the parameter list passed to QSETPRT. This means that after issuance of the standard form of QSETPRT, the parameter list can later be used with the execute form of SETPRT. Even though successful issuance of QSETPRT converts the parameter list to SETPRT, a subsequent re-execution of the same QSETPRT macro still acts as QSETPRT.

The user can specify either the LUB ID or the LUB address when calling QSETPRT. However, on successful completion, the parameter list always contains the LUB ID (in the SPPLUNIT field).

Format

Read syntax diagramSkip visual syntax diagramnameQSEPRTSYSxxx( register),EP=label( register),MF=L(E, label)(E,( register))(E,(1)),WORKA=label( register)

Requirements for the caller

AMODE:
24
RMODE:
24
ASC Mode:
Primary

Parameters

The parameters have the same meaning as for the SETPRT macro except that MF can refer to a parameter list created by coding MF=L on either a SETPRT or QSETPRT macro. Successful execution of the QSETPRT routine effectively changes the parameter list to a SETPRT parameter list. It can then be used either for SETPRT or another QSETPRT. A QSETPRT parameter list that has not been passed to QSETPRT with a return code of zero cannot be used as a SETPRT parameter list but for another QSETPRT.

The possible QSETPRT return codes are 0, 8, C, 14, 28, 2C, 30, 34, and 38. See the SETPRT return codes.

Return Codes

When SETPRT or QSETPRT returns to its caller, register 15 contains a return code as described below. With current support, the bytes described with ".." contain zeros but to allow for possible future support, application programs should not assume those bytes to contain zeros.

All return codes except 0, 30, 38 and 0028 have associated messages that are written on the printer and on SYSLOG.
Return Code
Meaning
00000000
Successful completion due to one of the following:
  • Output device is 3800 and all functions completed successfully.
  • Output device is PRT1 printer. If the FCB parameter was specified, and it was not a request for the system default forms control buffer phase, then the LFCB macro was issued successfully.
  • Caller is executing in the B-transient area and no operation was performed.
......04
All printer setup requests were successfully completed except for the burster request. The burster request was not done because there is no Burster- Trimmer-Stacker installed on the 3800.
......08
Invalid device type. The output device must be 3800 or PRT1 printer.
......0C
Invalid parameter list. The length value in the list is not valid, the logical unit was not specified. The list is not a word boundary, or reserved field does not contain zeros.
ggcctt10
Phase not found in the library or the phase header has an invalid format. The header is the first 8 bytes. Byte 2 of register 15 indicates the type of phase that could not be found or has an invalid format:
Byte 2 ( tt)
Phase Type
04
Forms control buffer (FCB) phase.
08
Copy modification phase.
0C
Character arrangement table phase.
10
Graphic character modification phase.

If the phase type code is 0C or 10, then bytes 0 and 1 (ggcc) identify which of the possible character arrangement table (CAT) phases or graphic character modification (GCM) phases was required. If a CAT phase was required, byte 0 (gg) is zero and byte 1 (cc) identifies the character arrangement table phase (that is, 01 for the first CAT, etc.). If the CAT that was required was specified in the MODIFY keyword and not the CHARS keyword, (cc) is set to 05.

If a graphic character modification phase was required, then byte 1 (cc) identifies the CAT for which the GCM phase was being loaded from the library and byte 0 (gg) identifies which of the four possible GCM phases was required.

ggccop14
Permanent I/O error on printer. Byte 2 (op) of register 15 contains the channel command code of the failing CCW. For example, if the printer gives an error on a Load Copy Modification channel command, then byte 2 (op) contains X'35'. If byte 2 (op) is X'83' or X'25', then bytes 0 and 1 have the same meaning as for a 10 return code.
......18
The operator canceled the SETPRT request because the manual setup could not be performed.
......1C
Reserved. Should not occur.
..ccnn20
More character generation storage was requested than was available on the printer. The cc identifies the character arrangement table that caused the error (that is, 01 for the first CAT, etc.). If the table is the one specified in the MODIFY keyword and not the CHARS keyword, cc is 05. The nn is either 2 or 4 and indicates the number of WCGMs available on the device.
..cc..24
A byte in a character arrangement table references a character generation module (CGM) that was not identified in the table. This should never occur for character arrangement tables that are created by the IEBIMAGE utility. The cc identifies the character arrangement table that caused the error (that is, 01 for the first CAT, etc.). If the table is the one specified in the MODIFY keyword and not the CHARS keyword, cc is 05.
....ss28
Not enough storage was available to perform printer setup. The ss is 00 if the initial 512-byte work area could not be obtained, or 04 if the secondary 11776-byte area could not be obtained. Decrease the value of SIZE on the EXEC statement, run the program in a larger partition, or supply a valid work area to SETPRT with the WORKA parameter.
....uu2C
Symbolic unit is invalid or not assigned. The uu is 04 if the symbolic unit is invalid or 08 if the symbolic unit is not assigned.
....cc30
SETPRT or QSETPRT routine is not in the System Virtual AREA and could not be loaded from the private or system library. Byte 2 is the nonzero return code from the CDLOAD macro.
..yyzz34
Internal macro failure. This should never occur. yy is the internal macro 's return code. zz indicates failing macro where 04 is the EXTRACT macro, 08 is the MODCTB macro, and 0C is the CDLOAD macro. For information about EXTRACT or MODCTB return codes, see Using Messages
......38
User-supplied work area is not a doubleword boundary.
....rr3C
PRT1 initialization failed. SETPRT issued an LFCB macro because the output device is a PRT1 printer and the FCB parameter was specified. The LFCB routine gave nonzero return code rr. For an explanation of the LFCB return codes, see Return Codes in Register 15.