Defines the attributes for the layout of an output file.
DECLARE-LAYOUT layout_name [PAPER-SIZE=({paper_width_num_lit[uom],paper_depth_num_lit[uom]}|{paper_name})] [FORMFEED=form_feed_lit] [ORIENTATION=orientation_lit] [LEFT-MARGIN=left_margin_num_lit[uom]] [TOP-MARGIN=top_margin_num_lit[uom]] [RIGHT-MARGIN=right_margin_num_lit[uom] |LINE-WIDTH=line_width_num_lit[uom] |MAX-COLUMNS=columns_int_lit] [BOTTOM-MARGIN=bottom_margin_num_lit[uom] |PAGE-DEPTH=page_depth_num_lit[uom] |MAX-LINES=lines_int_lit] [CHAR-WIDTH=char_width_num_lit[uom]] [LINE-HEIGHT=line_height_num_lit[uom]] END-DECLARE
Unique layout name used to reference the layout and its attributes.
Optional suffix which denotes the unit of measure applied to the preceding value.
An option of PAPER-SIZE. This name is associated with predefined dimensions.
Table 31. DECLARE-LAYOUT Command Arguments
Physical size of the page. The first parameter is the width of the page. The second parameter is the depth or length. It may also be a predefined name. (See Table 30.) Note: When ORIENTATION= LANDSCAPE the default values are 11 in, 8.5 in. | |||
Portrait = vertical. Landscape = horizontal. Printing in landscape for the printer type HPLASERJET requires landscape fonts. | |||
Amount of blank space to leave at the left side of the page. | |||
Amount of blank space to leave at the right side of the page. If you specify LINE‑WIDTH or MAX‑COLUMNS, you cannot use this parameter. | |||
Length of the line. If you specify RIGHT‑MARGIN or MAX-COLUMNS, you cannot use this parameter. | |||
Maximum number of columns in a line. If you specify RIGHT‑MARGIN or LINE-WIDTH, you cannot use this parameter. | |||
Amount of blank space to leave at the bottom of the page. If you specify PAGE‑DEPTH or MAX-LINES, you cannot use this parameter. | |||
Depth of the page. If you specify BOTTOM-MARGIN or MAX-LINES, you cannot use this parameter. | |||
Maximum number of lines printed on the page. If you specify PAGE‑DEPTH or BOTTOM-MARGIN, you cannot use this parameter. | |||
Size of each line on the page. There are 72 points per inch. If LINE-HEIGHT is not specified, it follows the value for POINT-SIZE, if specified. The default value of 12 points yields 6 lines per inch. For the printer type LINEPRINTER, this value is used only to calculate the TOP‑MARGIN and BOTTOM‑MARGIN (for example, not in computing the position on the page). | |||
Size of each horizontal character column on the page (for example, the distance between the locations (1, 12) and (1, 13)). For the printer type LINEPRINTER, this value is used only to calculate the TOP‑MARGIN and BOTTOM‑MARGIN (not in computing the position on the page). |
DECLARE-LAYOUT describes the characteristics of a layout to use for an output file. A layout can be shared by more than one report. You can define as many layouts as are necessary for the requirements of the application. You can override the default layout attributes by defining a layout called DEFAULT in your program. Each layout name must be unique.
Production Reporting maps its line and column positions on the page by using a grid determined by the LINE‑HEIGHT and CHAR‑WIDTH arguments. That is, Production Reporting calculates the number of columns per row by dividing the LINE-WIDTH by the CHAR‑WIDTH and calculates the number of lines by dividing the PAGE-DEPTH by the LINE‑HEIGHT. Each printed segment of text is placed on the page using this grid. Because the characters in proportional fonts vary in width, it is possible that a word or string is wider than the horizontal space you have allotted, especially in words containing uppercase letters or bold characters. To account for this behavior, you can either move the column position in the PRINT or POSITION statements or indicate a larger CHAR-WIDTH in DECLARE‑LAYOUT.
The ORIENTATION parameter selects the proper fonts. In addition, the parameter interacts with PAPER-SIZE as follows:
When you do not specify ORIENTATION=LANDSCAPE or the PAPER-SIZE dimensions, Production Reporting creates a page with the dimensions set to 11 inch by 8.5 inch. This results in a page of 100 columns by 45 lines with 0.5 inch margins.
When you specify PAPER-SIZE=(paper_name), the page orientation is set according to the paper_name specified. If you also specify ORIENTATION and the value differs from the PAPER-SIZE value, the ORIENTATION value overrides the PAPER-SIZE value.
When you specify PAPER-SIZE=(page_width, page_depth), Production Reporting does not swap the page width and page depth if ORIENTATION=LANDSCAPE.
If none of the following commands are present in an Production Reporting report, none of the default values in Table 31 take effect, and the report is created with 62 lines by 132 characters.
BEGIN-HEADING For-Tocs=( ) (Construct)
BEGIN-FOOTING For-Tocs=( ) (Construct)
BEGIN-HEADING For-Reports=( ) (Construct)
BEGIN-FOOTING For-Reports=( ) (Construct)
The following example illustrates the ability to specify parameters using a metrics measurement system. (The syntax results in a paper size of 210mm by 297mm, a top margin of 12.7mm, a left margin of 12.7mm, a right margin of 25.4mma bottom margin of 12.7mm, a portrait orientation, 67 columns, and 63 lines.
The following example changes the page dimensions. It also changes the left and right margins to one inch. (The syntax results in a paper size of 14 inches by 11 inches, a top margin of 0.5 inches, a left margin of one inch, a right margin of one inch, a bottom margin of 0.5 inches, a portrait orientation, 120 columns, and 60 lines.)
The following example retains the default page dimensions and changes the left and right margins to one inch. (The syntax results in a paper size of 8.5 inches by 11 inches, a top margin of 0.5 inches, a left margin of one inch, a right margin of one inch, a bottom margin of 0.5 inches, a portrait orientation, 65 columns, and 60 lines.)
The following example changes the orientation to landscape. The columns and rows are recalculated. All other values remain the same. (The syntax results in a paper size of 11 inches by 8.5 inches, a top margin of 0.5 inches, a left margin of 0.5 inches, a right margin of 0.5 inches, a bottom margin of 0.5 inches, 100 columns and 45 lines.)
The following example changes the orientation to landscape. In addition the top margin is set to one inch. (The syntax results in a paper size of 11 inches by 8.5 inches, a top margin of 0.5 inches, a left margin of 0.5 inches, a right margin of 0.5 inches, a bottom margin of 0.5 inches, a landscape orientation, 100 columns and 43 lines.)
The following example specifies the page dimensions using a predefined name. Note that the orientation changes since this example is an envelope.(The syntax results in a paper size of 4.125 inches by 9.5 inches,. a top margin of 0.5 inches, a left margin of 0.5 inches, a right margin of 0.5 inches, a bottom margin of 0.5 inches, a landscape orientation, 85 columns and 18 lines.)