The delimiters listed in Table 97 can be used to separate multiple values for a keyword:
Delimiter |
Shown as |
---|---|
comma |
, |
blank |
|
left parenthesis |
( |
right parenthesis |
) |
equal sign |
= |
double quotes |
“ |
Using equal signs to separate the keyword and values, and commas to separate values, lead to a readable code style—used in the examples that follow.
KEYWORD value[,value]… ;
LIB
Specify the libraries to be searched for a table. Between 1-10 library names consisting of up to 8 characters each are allowed. If the keyword is omitted, searching is restricted to MAINLIB.
Example: LIB=TESTLIB1,TESTLIB2
TABLE
Indicate which tables are to be printed. Table name(s) from 1-8 characters are allowed.
Example: TABLE=CODE1,CODE2,CODE3
PASSWORD
Supply a 1-8 character read password, if the table has one. If the keyword is omitted, the table(s) are assumed to have no password protection.
Example: PASSWORD=SECRET
GEN
Supply a number ranging between -8 and 255 representing the relative or absolute generation number of the table(s) being printed. The default is zero, referring to the current generation.
Example: GEN=-1
Separate PRINT statements must be used if more than one generation number is to be printed.
Examples:
PRINT TABLE=CODE1 GEN=-2;
PRINT TABLE=CODE1 GEN=-1;
PRINT TABLE=CODE1;
USING
Specify a 1-8 character View name to be used. The default is the same name as the table being printed.
Example: PRINT TABLE=CODE1,CODE2,CODE3 USING=CODE;
TITLE
Supply a 1-50 character title, enclosed in double quotes, or, supply a 1-50 character title with spaces filled with hyphen characters (-) or underscore characters (_), which are then replaced by blanks in TBPRINT. The title will be centered on the report page.
Example:
PRINT
TABLE=CODE1
TITLE=CODE_TABLE;
PRINT
TABLE=CODE2
TITLE=”PAY CODE TABLE”;
ROWIDCOUNT
To identify the fields that overflow onto a second or subsequent page, the ROWIDCOUNT value is used to specify the number of fields to be reprinted on the left side of the second page containing the overflow field columns that do not fit on page one.
ROWIDCOUNT is normally used to re-display the row keys on the overflow pages. See the formatting example in the next section.
The default is zero, indicating that no fields are to be repeated.
Example: PRINT TABLE=CODE1 ROWIDCOUNT=2;
LINESPERPAGE
Specify the maximum number of lines to be printed on a page before a page break. The default is 60.
Example: PRINT TABLE=CODE1 LINESPERPAGE=9999;
PAGEWIDTH
Specify the maximum number of characters to be printed per line.
Do not include the carriage control character in the PAGEWIDTH. The default and the maximum are both 132.
Example: PRINT TABLE=CODE1 PAGEWIDTH=131;
FIELDS
Supply the field name(s) to be selected from the View for printing. The default is to print all fields. Use double quotes to enclose field names that contain embedded blanks.
Examples:
FIELDS=FIRST,
SECOND,
“NEW CODE”,
“OLD CODE”
Field names can be selected using wildcards by placing an asterisk (*) after the significant characters of the field name. All fields beginning with the significant characters will be printed. Placing an asterisk only results in the selection all fields.
To print all fields beginning with D, for example:
FIELDS=D*
To print all fields and two again:
FIELDS=*,KEY1,KEY2
The first occurrence of a generic field name can be printed by using an exclamation mark (!) after the significant character(s). To select a number of occurrences, repeat the significant character(s) and the exclamation character a number of times.
To print the first two fields beginning with D, for example:
FIELDS=D!,D!
STARTREC
Specify the row in a Data Table from which reporting is to begin.
STARTKEY
Specify the key in a Data Table from which reporting is to begin. If the key is not found in an ordered table (either ascending or descending order), reporting will begin with the row with the next higher (ascending) or lower (descending) key.
RECCOUNT
Specify the number of rows to print. If neither STARTREC nor STARTKEY is specified, reporting will begin at the first row of the table.