File Description Entry

A file description entry describes the physical structure, identification, and record names for a program's data files.

General Format

FD file-name [IS EXTERNAL] [IS GLOBAL]

   [BLOCK CONTAINS [min TO] max  {RECORDS   } ] 
                                 {CHARACTERS} 

   [RECORD { CONTAINS [min TO] max CHARACTERS  } ]
           { IS VARYING IN SIZE [ FROM min ]   }
           {   [ TO max ] CHARACTERS           }
           {   [ DEPENDING ON depend ]         }

   [ LABEL  { RECORD IS   }  {STANDARD} ]
            { RECORDS ARE }  {OMITTED }

   [ VALUE OF LABEL IS label-lit ]

   [ VALUE OF { FILE-ID } IS id-name ]
              { ID      } 

   [ CODE-SET IS alphabet ]

   [ DATA  { RECORD IS   }  {record-name} ... ]
           { RECORDS ARE }

   [ LINAGE IS page-size LINES 

     [ WITH FOOTING AT footing-line ]

     [ LINES AT TOP top-lines ]

     [ LINES AT BOTTOM bottom-lines ] ] .

Syntax Rules

  1. file-name must refer to a file name contained in a SELECT clause in the Environment Division.
  2. The clause IS EXTERNAL must immediately follow the file-name in each program that declares the file.
  3. An external file must have the same file-name in each COBOL program that declares it, and must be described the same way in each program.
  4. The other clauses following file-name can appear in any order.
  5. One or more record description entries must follow a file description entry.
  6. The LINAGE phrase may be specified only for an FD associated with a sequential file.

General Rule

The file description entry clauses are described separately in the online help.