Format Control

Format control objects describe the layout of reports and printable files. Application programs activate report layouts by loading the corresponding format control object. Printing is done to fields and elements which are defined in the page layout. Printable files that are generated in this way are then spooled to a printer after the execution of the program.

Format control objects consist of text data that contains page, field, record, and element definitions. Each definition is on a separate line. The type of the definition is indicated by a one-character code at the beginning of the line. Output variables are associated with fields and elements by names. The documentation of each application program defines the names and types of output variables that can be printed.

Output variables can be one of the following types:

  • integer (whole) number

  • floating point (decimal fraction) number

  • string of characters

  • quantity (floating point number with an attached unit)

The type of a variable determines what kind of output format can be used. For the first three types the output format is a standard C-language "printf" format.

For quantities the output format must be such that the formats described in Configuration Tables are preceded by the characters %Q.

Pages

A page definition has the following format: p name p1 p2 p3 p4 p5

Fields p1 ... p5 are integers and define the following:

  • p1 number of lines on a page

  • p2 width of page in characters

  • p3 number of empty lines to be left at the top of the page

  • p4 number of empty lines at the bottom of the page

  • p5 number of empty characters in the right margin

Normally programs activate a page named PAGE.

Fields

A field definition has the following format: f name f1 f2 f3 f4 f5 f6 f7

Fields f1 ... f6 are integers. Field f7 is a character string.

They define the following:

  • f1 output mode of the field as follows:

    • 0 ;output field on each page

    • 1 ;output field on even pages - currently not supported

    • 2 ;output field on odd pages - currently not supported

    • 3 ;output field at the end of the report

    • 4 ;output field at the end of the page

  • f2 1 to print in bold, 0 for normal printing

  • f3 1 to underline, 0 for normal

  • f4 1 to ignore field, 0 to print field

  • f5 line relative to the beginning of the page (or record) on which the field is to appear

  • f6 column where printing of the field is to start

  • f7 output format for this variable.

Field definitions following the page definition are page-relative. Fields that appear after some record definitions are record-relative.

Records

A record is a set of header fields and output elements. Header fields for a record are always printed when the record is activated. Output elements of a record can be printed on several lines (3 maxi-mum).

A record definition has the following format: r name r1 r2 r3 r4 r5 r6 r7

Fields r1 ... r7 are integers and define the following:

  • r1, specifies the number of empty lines that are to be skipped before printing of the record starts

  • r2, specifies the number of records printed before an empty line is generated (this can be used to group lines on the print)

  • r3, set to 1 to underline all records

  • r4, set to 1 to start the printing of the record on a new page

  • r5, set to 1 for record-relative header fields

  • r6, reserved for future use, should be set to 0

  • r7, reserved for future use, should be set to 0

Elements

Element definition: e tag e1 e2 e3 e4 e5 e6

Fields e1 ... e5 are integers and field e6 is a character string.

They define the following:

  • e1, specifies the location of the element in the output record. The value defines the amount of white spaces for the element.

  • e2, maximum number of columns in the output line

  • e3, set to 1 to print in boldface

  • e4, reserved for future use, should be set to 0

  • e5, set to 1 to ignore the element (not printed)

  • e6, output format for this variable

Note: Bolding and underlining are achieved by overstriking, i.e., a carriage return character is sent to the printer and then bold characters are re-printed along with any needed underline characters. If the target printer does not support this feature then bold and underline cannot be used without some sort of post-processing. If the printer can bold and underline in some other way then an additional filter program is required to post-process the printable files before they are spooled. This post-processing requires that overstrikes are changed to bold and underline commands.

See an example of Format control file for pipeline material list.

See an example of Format control file for piping material sum list.