PRT_OUT

Figure 1. Syntax

1 PRT_OUT(format,count)

Can be used in FASTREXX condition expressions.

Prints the output record in the format specified.

format
Format in which the output record is to be printed. Valid values are: CHAR, HEX, SNGL, or TABL.
If you specify TABL or SNGL format:
  • On the function or panel that you are enhancing, you must specify a copybook or template that describes the record type to be printed.
  • File Manager determines the type of the record to be printed by using the record identification criteria if present, or by comparing its length with the record types in the template.
  • When using PRT_OUT with DSC or the Copy Utility (option 3.3) and you have specified both an input and an output copybook or template, the copybook or template used to format the printed record is the output template.
  • Only those fields that have been selected in the template are printed.
count
FASTREXX only. The maximum number of times this function will be performed. The default is no limit.
Note: Avoid using PRT_OUT in a REXX procedure for:
  • DSP function
  • FCH function
  • Print Utility (option 3.2)

Output from PRT_OUT is interspersed with the normal output (from DSP, FCH, or Print) which can be confusing.

Using PRT_OUT in a REXX procedure that runs from the Find/Change Utility panel (option 3.6) does not result in this problem because the report produced by the panel is sent to a data set, separate from print output.

Example

Print the first 5 records in hex format and print the remainder in tabular format.
PRT_OUT('HEX',5)
If recsin() > 5 then PRT_OUT('TABL')