Skip to content
COBOL

File description

The FD entry in a COBOL program that describes a file's records, connecting the program to data supplied by the JCL.

Also written FD, FILE SECTION, SELECT

An FD, or file description, appears in the FILE SECTION of the DATA DIVISION and describes one file the program uses. Underneath it sits the record layout, field by field.

The chain from program to data has three links, and understanding it explains a lot about how mainframe programs work. The program declares an internal file name and selects it against an external name in the ENVIRONMENT DIVISION. The JCL supplies a DD statement with that external name, pointing at a real dataset. The program then opens, reads, writes and closes purely in terms of its own internal name.

Nothing in the source names a dataset. That is why the same compiled program processes test data one day and production data the next with no change. Only the JCL differs.

Files are declared as sequential, indexed for VSAM datasets accessed by key, or relative. The declaration determines which statements are available: sequential files are read in order, indexed files can be read directly by key and updated in place.

Browse all 115 terms

Learn this properly.

Use File description for real in Mainframe101, in your browser, with Zed beside you. Join the waitlist.

Early access and updates. No spam, unsubscribe any time.