The PRINT control statement writes data to the print file.
PRINT [expression-1 [expression-2]] [COL(expression)] [SKIP(expression)][PAGE]
where:
Specifies an expression that determines the data to place in the print record.
Specifies an expression that determines the data to use as subheadings for expression-1.
If expression-2 contains a comma (for example, 'REPORT,IDENTIFIER'), the data is split at that point and written on separate heading lines. The heading data is aligned to the same position as expression-1.
Specifies an expression that determines the position on the output record that expression-1 is written.
A value of 1 represents the first print position (character after the carriage control character). If this value is less than the current column position, the current print record is written to the print file, and expression-1 is placed in the new print record.
If COL is specified without an expression, the data is positioned directly after the previous print data.
If COL(expression) is omitted, expression-1 is positioned one character from the previous print data.
Specifies an expression that determines the number of lines to skip before printing the next print record.
This specification causes the current print record to be written to the print file and the column position to reset to the first column. If SKIP is specified without an expression, one line is skipped.
Specifies that the next print record is printed at the top of a new page.
This specification also causes the current print record to be written to the print file and the column position to reset to the first column.
Note: If both PAGE and SKIP(expression) are specified, SKIP(expression) is ignored.
The data from each PRINT control statement is queued up contiguously in the print record. The print record is written under the following conditions:
To cause a control break (skip to the top of a new page) when job name changes, enter the following:
/IF JOBNAME ¬= PREV(JOBNAME) / PRINT PAGE /END
To print the tape data set name in column 3 after skipping two lines, enter the following:
/PRINT TAPEDSN COL(3) SKIP(2)
To print SYSOUT ID, generation number, sequence number, archival date, archival time, lines, and pages, enter the following statements:
/PRINT ID 'ID' /PRINT EDIT(GEN,'ZZZZ9') ' Gen' /PRINT EDIT(SEQ,'ZZZZ9') ' Seq' /PRINT ARCHDATE 'Arc Date' /PRINT ARCHTIME 'Arc Time' /PRINT EDIT(LINES,'ZZZZZZZZ9') ' Lines' /PRINT EDIT(PAGES,’ZZZZZZZ9’) ' Pages'
To print a descriptive title preceding the field being printed, specify:
/PRINT 'CLASS='||CLASS
The same data can be printed using separate statements as follows:
/PRINT 'CLASS=' /PRINT CLASS COL
|
Copyright © 2015 CA Technologies.
All rights reserved.
|
|