COBOL FORMAT

COBOL FORMAT causes GenFormat to generate a COBOL85 library program to handle record formatting. The declaration specifies the name of a particular filter and the accessory must use that filter when using the COBOL format. The filter cannot be DBFILTER. (Use the filter EVERYTHING if you want all records.)

Compiled COBOL formats improve throughput by about 10%.

Example:

COBOL FORMAT COMMAQUOTEALPHA USING FILTER EXAMPLEFILTER

...

PREFIX STRNUM CHANGECODE

...

Note the following:

  • The following options are illegal for a COBOL format:

    TRANSLATE

    OVERFLOW

    DATANAME (See DATANAME.)

  • TIME_n (e.g,. TIME_6) data types are not supported. They are formatted as REAL.
  • If specified, the DECIMALPT option must be either a period or comma.

Following is the name of the generated COBOL program. If you declare more than one COBOL format, their names must be unique for the first 17 characters because the format name is part of the file name of the generated layout file.

SOURCE/DATABRIDGE/FORMAT/formatname/databasename

Following are the COBOL COPY files for the layouts:

  • Unformatted

    INCLUDE/DATABRIDGE/COBOLLAYOUT/databasename

  • Formatted

    INCLUDE/DATABRIDGE/COBOLLAYOUT/databasename/formatname

    Dataset names in the formatted file have a prefix consisting of the first 8 letters of the format name and a hyphen.