The PRINT statement prints the fields specified in the statement. You can specify up to 40 fields and literals in a PRINT statement. However, the output print line cannot exceed 132 characters.
Column headings are derived from the default headings in the data definition tables. Use the DEFINE statement to revise headers. For more information, see DEFINE Statement.
You can use multiple PRINT statements to produce multiple print lines from single records in the input file. Each PRINT statement you use adds a print line for the specified data. However, the fields you choose in the first PRINT statement set the column headings on the report.
PRINT "Parms".
Parms:
[WIDE n]
{fldname | literal | BLANK n}
[fldname | literal | BLANK n] ...
[SPACED n]
[SKIP]
Specifies the number of spaces between each field. The default is 1.
Indicates the name of a printed field. You may specify up to 40 fields.
Indicates the line spacing: 1 (single), 2 (double), or 3 (triple). The default is 1.
Specifies that a skip to a new page is made before printing the line represented by the PRINT statement.
Indicates that literal values are printed in place of a field. Literals must be enclosed in single quotes.
Puts n blank spaces before the next field or literal on the report. The BLANK value is used for only one field. Spacing reverts to the WIDE value unless you specify another BLANK value for the next field.
Examples
PRINT WIDE 2 VOLSER CRTDT CTIME EXPDT LJOB. Print line:
VOLSER CRTDT CTIME EXPDT LJOB VMPK02 96290 10:04 99360 FRED
PRINT VOLSER '*** IS A SCRATCH TAPE ***'. Print line:
VMPK02 *** IS A SCRATCH TAPE ***
PRINT WIDE 2 BLANK 3 'ABC' 'DEF' BLANK 5 'GHI'. Print line: ABC DEF GHI
| Copyright © 2011 CA. All rights reserved. | Tell Technical Publications how we can improve this information |