SETPRT (Set the Printer) Macro

The SETPRT (printer setup) function serves as the interface for servicing printer setup requests between the following:

  • Job control and printer
  • Job control and operator
  • VSE/POWER and printer
  • User and printer
  • User and operator
  • User and VSE/POWER

Any request to alter the printer setup should be routed to SETPRT. SETPRT maintains a control block for each 3800 to reflect correct current printer status. Except for offset stacking and marking forms, application programs should not bypass the SETPRT routines and directly perform any of its services. This is because a subsequent SETPRT call, possibly in the next job, will not be able to correctly determine the machine 's status.

The SETPRT routine is in the System Virtual Area (SVA) and is called by a macro that is issued by Job Control, VSE/POWER, or a problem program. When the device for which SETPRT was issued is a PRT1 printer and the FCB parameter was specified, the SETPRT routine issues an LFCB macro to use the appropriate FCB, and optionally, forms. When the device is a PRT1 but the FCB parameter was not specified, SETPRT performs no operation and gives a return code of zero. When the device type is not a 3800 or PRT1 printer, it is an invalid device type.

If the caller is running in the B-transient area and calls the SETPRT routine for a PRT1 printer, SETPRT performs no operation.

SETPRT issues one message to the operator defining necessary operator action (paper threading, forms change, or forms overlay frame change). SETPRT optimizes all requests for printer setup such that a setup request for a characteristic that is already established in the printer is not performed again.

When a parameter is omitted from a call to SETPRT, the general principle is that SETPRT makes no changes to the corresponding characteristics for the printer. Exceptions are INIT and DFLT, and this concept does not apply to DCHK or SEP.

Before the SETPRT routine processes any parameter, except for WORKA, it determines whether the current SETPRT request causes the device status to change. If a change is needed, a Clear Printer command is issued, which fills the current page with blank lines if a partial page is transmitted.

Any printer I/O errors that are encountered by SETPRT result in resetting the printer to IMPL status, writing an informational message to the printer, and setting a unique return code.

Although the caller of SETPRT identifies the printer with its logical unit identifier, the setup information is retained by the system according to the physical device address. This means that reassigning the printer does not cause a change to the setup status.

The SETPRT or QSETPRT macro calls the SETPRT routine. The macro generates a SETPRT parameter list and instructions to call the SETPRT routine. The macro exists in three forms that are controlled by the MF keyword:
  • Standard form. Build a parameter list and then call the SETPRT routine (MF keyword omitted).
  • Execute form. Point to an existing parameter list and then call the SETPRT routine (MF=(E,(address|(register)))).
  • List form. Create a parameter list without any executable instructions and without linkage to SETPRT routine (MF=L).

Any parameter coded on an execute form macro overrides the same parameter that is coded on the corresponding list form of the macro.

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.

Any number of register values for the SETPRT and QSETPRT macros can be specified as an absolute (non-relocatable) expression. These are examples of valid absolute expressions:
  • 12
  • X'C'
  • NUM (where NUM has been set by an EQU instruction to an absolute expression).
  • NUM+1

The advantage of using symbolic references is that the assembler cross-reference shows other dependencies on the values. The disadvantage is that the macro cannot do as much checking of the validity.

The special values that are required for certain keywords, such as N, Y, V, B, or L, must be specified as described.

Format

Read syntax diagramSkip visual syntax diagramlabel SETPRT SYSxxx( register),BURST=NY*,CHARS=table_name(, table_name)*,CINDX=i( register),COPYG=n(, n1),DCHK=BU,DEBUG=NORMTERMDUMPTRAC,DFLT=NY,EP=label( register),FCB=fcb_name( fcb_name,V)(*,V)*,FLASH=overlay_name( overlay_name, count)(, count)(*, count)*,FORMS=forms_name*,INIT=NY,MF=L(E, label)(E,( register)),MODIFY=copymod_name( copymod_name, table_name)*(*, tablename),SEP=MOMONONE,TRC=NY,WORKA=label( register)
Notes:
  • 1 You can specify up to eight groups of copies.

Requirements for the caller

AMODE:
24
RMODE:
24
ASC Mode:
Primary

Parameters

label
Optional label. If MF is omitted or coded as E, the name applies to the first executable instruction of the macro expansion. If MF=L is coded, the name applies to the beginning of the parameter list.
SYSxxx
Logical unit identifier for the printer to be set up. Only SYSLST and SYSnnn are supported. Instead of specifying the six-character name of the logical unit, the address of its LUB can be supplied in a register numbered in the range of 2 to 13. This parameter is always required by the SETPRT routine. It is required by the macro when MF is omitted. When MF is coded, the logical unit must be supplied in the execute form or list form of the macro.
BURST
Forms bursting request.
Y
Specifies that the operator should thread the forms through the Burster-Trimmer-Stacker.
N
Specifies that the operator should thread the forms to the continuous forms stacker.
*
The system default BURST setting is requested.

If the forms are not already threaded correctly, then message P300D is issued to ask the operator to change the threading.

If BURST is omitted, no change to the threading is requested.

CHARS
Character arrangement table names.
table name
Specifies the 1- to 4-character name of the character arrangement table (not including the system-assigned prefix, XTB1). Up to four names that are separated by commas and enclosed in parentheses, can be specified. No null value, such as CHARS=(AA,,BB) or CHARS=(,AA), can be specified. See Note in this topic.
*
The system default character arrangement table is requested. If this is specified, multiple table names are not allowed. If the operator has not specified a default for CHARS, the hardware default Gothic 10-pitch table is used.
CINDX
Transmission or copy group number.
i
Is an absolute arithmetic expression. If it is not enclosed in parentheses, the value must be in the range of 0 to 255. If it is enclosed in parentheses, it identifies a register in the range of 2 to 13 containing a value from 0 to 255. Only the low-order byte of the register is used, but for compatibility with possible future support, it is recommended that the high-order three bytes be clear. How CINDX is interpreted depends on whether copy grouping (COPYG) is requested in the same call to SETPRT.

If copy grouping is not specified, CINDX specifies the transmission number. If CINDX is a number 1 through 255, it tells which copy (transmission) is about to begin. If zero is specified or no value is supplied to the SETPRT routine, then the copy number and grouping is not changed from the previous setting unless INIT=Y is specified. At the beginning of each job, there is no copy grouping.

If copy grouping is specified, the CINDX value identifies which copy group value to use. If CINDX is zero or not supplied to the SETPRT routine, then 1 is assumed. If the CINDX value is greater than the number of groups, COPYG is treated as if it were extended with group values of 1 each. The sum of the COPYG values and the values with which they are extended cannot exceed 255.

If both CINDX and COPYG are omitted, no change is made to the copy grouping or transmission count unless INIT is coded.

COPYG
Data set copy grouping information.
n
Each n is an arithmetic expression specifying the number of copies of each page to be reproduced by the printer before printing the next page. If more than one n is specified, they are separated by commas and surrounded by parentheses. Each value can be from 1 to 255, except that if only one value is specified, it can be 0. Specifying 0 is mainly useful to clear a grouping when using the execute form. Up to 8 groups of copies can be specified. The sum of the group values cannot exceed 255. Which of the values is to be used for the current transmission is determined by the value specified or defaulted for the CINDX keyword. If both CINDX and COPYG are omitted, then the transmission number and copy grouping are not changed from their previous settings unless the INIT keyword parameter is also coded. When COPYG is coded and CINDX is not coded, a value of 1 is assumed for CINDX. See the CINDX description for the action taken when COPYG is omitted and CINDX is coded.
DCHK
Block or unblock data check indicator.
B
Specifies that data checks are to be blocked (prevented). This means that unprintable characters in the data printed after completion of SETPRT are to be treated as blanks.
U
Specifies that data checks are to be unblocked (allowed). A data check is an I/O error.

If DCHK is omitted, data checks are blocked.

DEBUG
Select debugging options for SETPRT and QSETPRT errors. This can be useful for debugging errors by the caller or by the system. This option remains in effect until changed in a later SETPRT call or the end of the job.
NORM
When an error is detected by SETPRT or QSETPRT, return to the caller with a return code in register 15, no matter what the return code is.
TERM
Terminate the task with a CANCEL macro if a condition causing a return code greater than 4 in the low-order byte is detected. If it is the main (or only) task in the partition and OPTION DUMP was specified or defaulted in the JCL, a dump is taken to SYSLST. In the dump, register 15 contains the SETPRT or QSETPRT return code. Unless the return code is X'0028', X'2C', X'30', or X'38', a message is written to the printer.
DUMP
Terminate program with dump if a condition causing a return code greater than 4 in the low-order byte is detected. In the dump, register 15 contains the SETPRT or QSETPRT return code. Unless the return code is X'0028', X'2C', X'30', or X'38', a message is written to the printer.
TRAC
Initiate tracing of all significant SETPRT and QSETPRT events and if the return code is greater than 4, terminate partition with dump. If SYSLST is assigned, a dump of the SETPRT/QSETPRT work area is written to SYSLST at several points during execution. If SYSLST is not assigned, then DEBUG=TRAC has the same effect as DEBUG=DUMP. If SYSLST is assigned to a printer, each dump is preceded by a description of the dump.

If the DEBUG keyword is omitted, then the most recently specified value for DEBUG in a previous SETPRT (but not QSETPRT) in the job is taken. If DEBUG has not been specified during the job, DEBUG=NORM is assumed.

DFLT
Establish printer defaults.
Y
Specifies that the printer is to be set with the defaults that were specified by the operator in the SETDF command. Refer to Using Commands for command details. It is equivalent to coding * for each of the parameters BURST, CHARS, FCB, FLASH, FORMS, and MODIFY that are not specified.
N
Is the default specification for this keyword and does not establish 3800 default setup.
EP
Entry point address of the SETPRT routine. The EP keyword value can be a relocatable expression valid in an RX-type instruction or it can identify a register if it is in parentheses. If it is a relocatable expression, it must identify a word containing the address of the SETPRT routine. If a register is specified, the register must contain the entry point address of the SETPRT routine. The register can be 15 or in the range 2 to 13. EP cannot be coded when MF=L is coded. When EP can be coded but is not, the SETPRT macro generates code to obtain the address of the SETPRT routine.
FCB
Forms control buffer information.
fcb name
Is the 1- to 4-character name of the FCB (not including the system-assigned prefix, FCB1). The length of the form defined by FCB must match the length of the actual forms loaded.
V
Indicates FCB verification. The FCB contents are formatted and printed on the 3800. Data checks are blocked and translate table zero is used for printing the FCB verification page.
*
The system default FCB is requested. If the operator has not specified a default FCB, the FCB loaded indicates 6 lines per inch with a channel-1 code defined on the first printable line, and the length set equal to that of the form currently loaded.
FLASH
Forms overlay or flashing request.
overlay name
Is the 1- to 4-character name of the forms overlay frame. If the specified frame is not already loaded, the operator is requested via message P300D to insert it in the 3800.
count
Is the number (from 0 to 255) of copies to be flashed, beginning with the first copy of the first transmission. If 0 is specified, the specified forms overlay frame is mounted but is not flashed. A specification of FLASH=(,count) means to flash the current forms overlay frame for the specified number of copies. If an overlay name but no count is specified, all copies are flashed.
*
The system default forms overlay is requested. If the operator has not specified a default, no flashing occurs.
FORMS
Paper forms request.
If the specified forms are not already loaded, then message P300D is issued to the operator requesting that the forms be changed. If the new form has a length different from the previous form and a new FCB is not specified, the 3800 loads the hardware default FCB. This can cause erroneous results later. To avoid this problem, either specify INIT or a new FCB when loading forms of a new length.
forms name
Is a 1- to 4-alphanumeric character forms identifier.
*
The system default form is requested. If the operator has not specified a FORMS default, form STANDARD is requested.

If the FORMS parameter is omitted, the operator is not asked to change the forms.

INIT
Initializing the printer request.
Y
Specifies that the printer be reset to hardware defaults of 6 lines per inch FCB, channel-1 code in the first printable line, a Gothic-10 folded character arrangement table, one copy, and no flashing. Copy modification and copy grouping are cleared. The burster threading is not affected. If TRC=Y is not also coded, then lines written to DTFs opened after this SETPRT will not contain TRCs (table reference characters). The TRC indicators in any open DTFs are not changed. The effect of INIT=Y is similar to the effect of the Initialize Printer channel command.
N
Is the default and does not reset the printer to hardware defaults.
MF
Identifies the form of the macro generation. Omission of this keyword generates the standard form with a parameter list and instructions to call the SETPRT routine.
(E,label)|(E,(register))

Identifies this as an execute form macro. The SETPRT parameter list to be used for this SETPRT request is addressed either by a 'label' or by a register. The parameter list is created from an L-form SETPRT macro or by execution of a QSETPRT macro. The parameter list must be on a word boundary and in the same protection key as the issue of SETPRT. The parameter list is updated with any parameters specified with this SETPRT macro except EP or WORKA. The 'label' can be a relocatable expression of the form acceptable in an RX-type instruction, or a register in parentheses can be specified. The register must be in the range of 2 to 13, except that if EP is coded, then the register can be 1.

L
Specifies that the list form of the macro instruction is used to create a parameter list that can be referenced by an execute form of the SETPRT macro instruction. The list is automatically aligned on a word boundary. No machine instructions are generated.
MODIFY
Copy modification information.
copymod name
Is the 1- to 4-character name of the copy modification phase (not including the system-assigned prefix, MOD1) to be loaded from the library into the 3800.
table name
Is the 1- to 4-character name of the character arrangement table to be used when printing the copy modification text. This character arrangement table need not be one of those specified or defaulted for CHARS if the 3800 has enough WCGMs installed. See Note in this topic. If table name is omitted, the first character arrangement table that is specified or defaulted with the CHARS keyword is used.
*
The system default copy modification is requested. If the operator has not specified a MODIFY default, any existing copy modification is eliminated.

If the MODIFY parameter is omitted, then the currently loaded phase is used unless INIT=Y is also coded. In some cases SETPRT must reload the currently loaded copy modification into the printer even when you did not specify it. If it was obtained from a private library that is no longer assigned, SETPRT might give a return code that indicates that the copy modification phase could not be found even though it was not explicitly re-requested.

SEP
Data set separation information. Omission indicates that no data set separation is required.
O
Indicates that if the Burster-Trimmer-Stacker is being used, the 3800 should offset-stack the pages that follow from the pages that were previously transmitted. If the continuous forms stacker is being used, the 3800 changes the marking on the perforation edge from one line to two lines or vice versa.
M
Indicates that, irrespective of whether offset stacking was requested, the current page is to be replicated three or five times and the perforations marked. The user can transmit a data set separator page prior to issuing SETPRT and the printer prints the page three or five times depending on the form length. The separator data must be contained within a single page and the 3800 must be positioned (relative to the FCB) within that page.
NONE
Specifies that the separator options are to be reset (not used). This has the same effect as omitting the SEP parameter except that SEP=NONE can be used with MF=(E,label) to clear the SEP options in the parameter list.
TRC
Table reference characters indicator.
N
Indicates that for any DTFPR or DTFDI opened after this SETPRT, data lines do not contain table reference characters unless specified in the DTF macro. The table reference character will not be prefixed to each data line when presented to the access method.
Y
Indicates that the first character of each data line given to the access method is a table reference character. This applies only to the issuance of PUT macros with DTFPR, DTFDI or DTFCP. The DTF must be opened after SETPRT is successfully issued.
WORKA
Work area address. This work area must be on a doubleword boundary and at least 512 bytes or 12288 bytes long. When the caller provides a work area, the first word must contain the length of the area, including the first word. The caller either identifies the work area or identifies a register name or number in parentheses. The register contains the address of the work area. The register must range from 2 to 13, unless EP is coded, in which case register 0 can be specified. The WORKA parameter cannot be specified at the same time as MF=L. When it is omitted, the SETPRT routine obtains storage space from the user GETVIS area and frees it before completing. If the partition does not have enough virtual storage space or is running in real mode, the caller must code the WORKA parameter.

If no valid work area is supplied (with the WORKA parameter), SETPRT obtains 512 bytes from the user GETVIS area. If the caller does not supply at least 12288 bytes and a character arrangement table, copy modification, or FCB is being processed, then an additional 11776 bytes are obtained from the user GETVIS area. The exception to this is that a SETPRT to a printer whose I/O is being trapped by VSE/POWER only requires 512 bytes for a work area. If an invalid work area is supplied, it is ignored and an area is gotten. All SETPRT-requested functions are performed using this area.

Note: The total number of character sets referenced by character arrangement tables in both the CHARS and MODIFY parameters cannot exceed the number of WCGMs available on the 3800 (either two or four). If the same character set is referenced by multiple character arrangement tables and graphic character modification is not used, then SETPRT loads only one copy of the character set. If a character set is referenced by two character arrangement tables and one is modified by graphic character modification and the other is not, then two character sets are loaded.

The SETPRT routine processes the parameters in the following order:
  • WORKA
  • SEP
  • INIT
  • TRC
  • BURST/FORMS/FLASH name
  • CHARS/MODIFY
  • FCB
  • COPYG/CINDX/FLASH count
  • DCHK

MF and EP are not relative to the SETPRT routine execution.

Certain SETPRT parameters have system-defined defaults available. These keywords are BURST, CHARS (first table name only), FCB, FLASH name, FORMS, and MODIFY (copymod name only). To request a system default, either code an "*" (asterisk) or omit the keyword and code DFLT=Y.