Previous Topic: #PRINT SyntaxNext Topic: #PRINT Status Codes


#PRINT Parameters

RECORD=

Specifies the storage area that contains data to be output.

message-location-pointer

Either a register that points to the area or the symbolic name of the area.

RECLEN=

Specifies the length, in bytes, of the data stream to be output.

message-length-register

A register that contains the length, the symbolic name of a user-defined halfword or fullword field that contains the length, or an absolute expression.

RPTID=1/

Specifies the identifier of the report to be printed. The report identifier must be an integer in the range 1 through 255; the default is 1.

report-id-register

A register that contains the ID, the symbolic name of a user-defined field that contains the ID, or an absolute expression.

CLASS=1/

Specifies the class of the printer to which the report is assigned. Valid print classes are 1 through 64; the default is 1.

printer-class-register

A register that contains the class, the symbolic name of a user-defined field that contains the class, or an absolute expression. This parameter should be specified only for the first line (record) of each report. If no printer class is specified, the default print class assigned to the issuing task's physical terminal during system generation is used.

OPTNS=options

Specifies several options available to print I/O. This parameter is never required and should be specified only when appropriate. The OPTNS parameter values must be enclosed in parentheses. Separate multiple values with commas.

NATIVE

Indicates that the data stream contains device control characters. If NATIVE is not specified, the system automatically inserts the necessary characters.

NEWPAGE

Requests that the system print the data stream beginning on a new page.

ENDRPT

Indicates that the data stream constitutes the last record in the specified report. When ENDRPT is specified, the report can be printed before the issuing task has terminated. To print the report immediately, the program must issue a #COMMIT TASK request. Reports not explicitly ended with an ENDRPT are automatically ended at task termination.

SCREEN

(3270-type devices only) transmits the contents of the currently displayed screen to the print queue. When SCREEN is specified, the system implicitly assigns the NATIVE option and ignores the RECORD= and RECLEN= clauses. The terminal operator can print screen contents by pressing the print key established during system generation. If the SCREEN option is specified for a non-3270 terminal or a remote 3270 terminal running under TCAM, an error results.

ALL

Causes the report to be printed on all printers associated with the destination specified in the DEST parameter. The report is printed on one printer at a time and saved until it has been printed on all of the printers. You can use a DCMT DISPLAY REPORT DESTINATION command to display the report name followed by a list of the printer names on which the report has yet to be printed.

HOLD

Requests that the system hold a report in the print queue before it is printed. The report is not printed until a DCMT VARY REPORT RELEASE command is issued.

KEEP

Keeps a report in the print queue after the report has printed. A report marked with the KEEP option can be manually released for printing with the DCMT VARY REPORT RELEASE command. The report can be deleted either manually by issuing a DCMT VARY REPORT DELETE command or automatically through the queue expiration date.

DIRECT

Indicates a print-direct request that will be routed directly to the destination specified. Specify the destination by using the CLASS parameter, as described above, or the DEST, LTEID, or LTEADDR parameters, described below. If LTEID or LTEADDR is specified, the system will acquire the specific printer. If CLASS or DEST is specified, the system will acquire the first available printer that satisfies the requested class or destination.

NOWAIT

(default) Requests that the DC/UCF system not wait for a printer to become available if the request cannot be immediately serviced; control is returned to the issuing program with a status code indicating that the printer device is unavailable.

WAIT

Requests that the system wait for a printer to become available if the request cannot be immediately serviced. If COND=OUTS or COND=ALL has been specified, the total wait time will be the product of the task's stall interval to a maximum of 60 seconds and the MAXIMUM ERRORS parameter of the PTE. Otherwise, the maximum wait time equals the stall interval.

MF=

Specifies the type of #PRINT request.

R

Identifies a regular #PRINT request. The DC/UCF system builds a new print request block (PRB) for each request and performs the requested operation.

L

Identifies a list #PRINT request. The DC/UCF system adds a predefined PRB in the data definition section of program storage. The PRB contains parameters whose values remain constant throughout the program. The #PRINT label used to identify the PRB is referenced by the PRB parameter in subsequent execute-type requests. Only the label and the MF parameter are required for list-type #PRINT requests; other parameters should be specified only when required to predefine PRB parameter values.

E

Identifies an execute #PRINT request. The DC/UCF system adds to or overrides the predefined PRB with the parameters defined in the request and performs the requested operation.

DEST/LTEID/LTEADDR

Identifies the printers to which a report is routed. These parameters can only be specified with OPTNS=DIRECT; you specify the destination.

DEST=

Specifies a destination defined during system generation. The destination can be one of the following:

printer-destination-pointer

A register that points to the destination ID, the symbolic name of a user-defined field that contains the destination ID, or the ID itself enclosed in quotation marks.

LTEID=

Specifies the logical terminal ID of a specific printer-terminal device.

direct-printer-ltermid-pointer

A register that points to the logical terminal ID, the symbolic name of a user-defined field that contains the logical terminal ID, or the ID itself enclosed in quotation marks.

LTEADDR=

Specifies the logical terminal element (LTE) address of a specific printer-terminal device.

direct-printer-lterm-address

A register that points to the address of the LTE, the symbolic name of a user-defined field that contains the address of the LTE, or the address itself enclosed in quotation marks.

ECBADDR=

Specifies the location to which the system returns the address of a list of event control blocks (ECBs) if the print-direct request cannot be serviced immediately. If OPTNS=(DIRECT,NOWAIT) has been specified and the system cannot immediately acquire the requested printer device, the system returns the address of a list of ECBs to the requesting task. One ECB from the list is posted when the requested printer becomes available. At that time, the print-direct request can be reissued.

Note: If you use the ECBADDR= parameter and specify OPTNS=(DIRECT,NOWAIT), the system will allocate storage for the ECBLIST. The program is responsible for freeing the storage space.

direct-print-return-ecb-address

Either a register that points to the ECB area or the symbolic name of a user-defined field that contains the address of the area.

JOBNAME=

Specifies the name of the system report to be associated with a print request from a batch program. The JOBNAME parameter is for informational use

only.

batch-request-jobname-pointer

A 1- to 8-character job name that is displayed as the original logical terminal ID when a DCMT DISPLAY REPORTS command is issued. Batch-request-jobname is a register that points to the job name, the symbolic name of a user-defined field that contains the job name, or the name itself enclosed in quotation marks.

COND=

Specifies the conditions under which control is to be returned to the issuing program.

NO

(Default); specifies that the request is not conditional. Control is not returned to your program under any circumstances.

ALL

Specifies that the request is conditional. Control is returned to your program if the #PRINT request cannot be serviced for one or more of the reasons listed below.

condition

Specifies under which conditions control is returned to your program. Multiple conditions must be enclosed in parentheses and separated by commas. Conditions can specify one or more of the following conditions:

PRB=

Specifies the location of the storage area in which the system will build the PRB (MF=R) or has built the PRB (MF=E).

SYSPLIST

(Default for regular-type requests only); is the symbolic name of the storage area in which the system builds the PRB.

print-request-block-pointer

A register that points to the area or the symbolic name of the area in which the system will build the PRB. For execute-type requests (MF=E), this entry explicitly defines the area by identifying label, provided in a previously-issued list-type #PRINT that established the PRB.

NOPRXIT=no-printer-label

Specifies the symbolic name of the routine to which control should be returned if the #PRINT request cannot be serviced because no printer terminal was defined during system generation.

INVPXIT=invalid-parameter-list-label

Specifies the symbolic name of a routine to which control should be returned if the #PRINT request cannot be serviced because of an invalid parameter in the PRB.

IOERXIT=i/o-error-label

Specifies the symbolic name of a routine to which control should be returned if the #PRINT request cannot be serviced because of an I/O error during processing.

UNDFXIT=invalid-dest-id-label

Specifies the symbolic name of a routine to which control should be returned if the #PRINT request cannot be serviced because an invalid destination was specified or, for OPTNS=(DIRECT) type requests, an invalid LTEID or LTEADDR was specified.

SCRNXIT=screen-term-i/o-error-label

Specifies the symbolic name of a routine to which control should be returned if the #PRINT request cannot be serviced because a terminal I/O error occurred in response to a #PRINT request to print the screen contents.

INVTXIT=invalid-terminal-label

Specifies the symbolic name of a routine to which control should be returned if the screen #PRINT request cannot be serviced because an invalid terminal was specified.

WAITXIT=wait-for-direct-printer-label

Specifies the symbolic name of a routine to which control should be returned if the #PRINT request cannot be serviced because OPTNS=(DIRECT,NOWAIT) was requested and no printer is available to service the request immediately.

OUTSXIT=direct-printer-out-of-service-label

Specifies the symbolic name of a routine to which control should be returned if the #PRINT request cannot be serviced because the printer identified by LTEID or LTEADDR in a print-direct request is out of service.

DEADXIT=deadlock-on-direct-print-label

Specifies the symbolic name of a routine to which control should be returned if the #PRINT request cannot be serviced because OPTNS=(DIRECT,WAIT) was specified and would otherwise cause a deadlock condition to occur.

CANCXIT=cancel-direct-report-label

Specifies the symbolic name of a routine to which control should be returned if the #PRINT request cannot be serviced because a DCMT VARY PRINTER CANCEL has been issued for the specified printer while the print request is being serviced.

REQUXIT=requeue-direct-report-label

Specifies the symbolic name of a routine to which control should be returned if the #PRINT request cannot be serviced because a DCMT VARY PRINTER REQUEUE has been issued for the specified printer while the print request is being serviced.

ERROR=error-label

Specifies the symbolic name of a routine to which control should be returned if a condition in the COND parameter occurs for which no other exit routine was coded.