COBOL/400 Language Help

Format 6 (Transaction Files)

Description
The File Section must contain a level indicator for each input and output file. For all files except sort/merge, the File Section must contain an FD entry. The last clause in the FD entry must be immediately followed by a separator period.
Format 6 (Transaction Files)
 
  ->->--FD file-name------------------------------------------------->
 
  ->--*---------------------------------------------------------*--->
     *RECORD**--------*-integer-3-*----------*---------------*-*
            +*CONTAINS*           *CHARACTERS*               +
            **--------*-integer-4 TO integer-5-*----------*--*
             *CONTAINS*                        *CHARACTERS*
 
  ->--*----------------------------------------*-------------------->
     *-LABEL-*RECORD-*--*-*--*-STANDARD-----*-*
             +       *IS* +  *-OMITTED------*
             *RECORDS*---**
                     *ARE*
 
  ->--*-----------------------------------*--.----------------------><-
     +                     *-----------* +
     +                     V           + +
     *DATA-*-RECORD-*---**-data-name-2-*-*
           +        *IS-*+
           *-RECORDS*---**
                    *ARE*

STANDARD

For a STANDARD file, labels conforming to system specifications exist.

OMITTED

For an OMITTED file, no labels exist.

CODE-SET

alphabet-name-1

You must define alphabet-name-1 in the SPECIAL-NAMES paragraph as:

When you specify NATIVE, the CODE-SET clause is syntax-checked, but it has no effect on the execution of the program.

BLOCK

The BLOCK CONTAINS clause specifies the size of the physical records.

If the records in ther file are not blocked, you may omit the BLOCK CONTAINS clause. Thus, you can omit this clause when each physical record contains only one complete logical record.

For diskette files, this clause is syntax-checked only.

integer-1 or integer-2

Integer-1, integer-2 must be nonzero unsigned integers. The value of integer-2 only specifies the number CHARACTERS or RECORDS.

Integer-2 specifies the exact character size of the physical record, and must include any control bytes or padding contained in the physical record. (Logical records do not include padding.)

If integer-2 is zero, the system default blocking factor applies.

CHARACTERS

The CHARACTERS phrase specifies the number of character positions required to store the physical record, independent of the USAGE the characters have within the data record.

The CHARACTERS phrase is the default. You must specify CHARACTERS when the physical record contains padding.

RECORDS

The RECORDS phrase specifies the number of logical records contained in each physical record.

integer-3

Format 1 of the RECORD CONTAINS clause specifies the number of character positions for fixed-length records. Integer-3 must be an unsigned integer that specifies the number of character positions contained in each record in the file.

integer-4 or -5

Format 2 of the RECORD CONTAINS clause specifies the number of character positions for either fixed- or variable-length records. Integer-4, integer-5 must be unsigned integers. Integer-4 specifies the size of the smallest data record, and integer-5 specifies the size of the largest data record.

LABEL or RECORD

The LABEL RECORDS clause indicates the presence or absence of labels.

VALUE OF

The VALUE OF clause describes an item in the label records associated with this file.

data-name-1

Data-name-1 should be qualified when necessary but cannot be subscripted. You must describe it in the Working-Storage Section but not with the USAGE IS INDEX clause.

literal-1

Literal-1 may be numeric or nonnumeric, or a figurative constant of category numeric or nonnumeric.

DATA or RECORD

The DATA RECORDS clause is syntax-checked, but it is only documentation for the names of data records associated with this file.

data-name-2

Data-name-2 represents the names of record description entries associated with this file.

data-name-3 or integer-6

All integers must be unsigned, and all data-names must be described as unsigned integer data items.

Data-name-3, integer-6 represent the number of lines that can be written and/or spaced on this logical page. The area of the page that these lines represent is called the page body. The value must be greater than zero.

FOOTING

Integer-7 or the value of the data item in data-name-4 specifies the first line number of the footing area within the page body. The footing line number must be greater than zero, but not greater than the last line of the page body. The footing area extends between those two lines.

All integers must be unsigned integer data items.

TOP

Integer-8 or the value of the data item in data-name-5 specifies the number of lines in the top margin of the logical page. The value can be zero.

All integers must be unsigned integer data items.

BOTTOM

Integer-9 or the value of the data item in data-name-6 specifies the number of lines in the bottom margin of the logical page. The value can be zero.

All integers must be unsigned integer data items.

LINAGE

The LINAGE clause specifies the depth of a logical page in terms of number of lines. It also may specify both the line number at which the footing area begins and the top and bottom margins of the logical page. (The logical page and the physical page may not be the same size).


[ Top of Page | Previous Page | Next Page | Table of Contents ]