ORGANIZATION Clause

The ORGANIZATION clause specifies the logical structure of the file. The file organization is established at the time the file is created and cannot subsequently be changed.

COBOL allows for four distinct kinds of file organization:
  • ORGANIZATION IS SEQUENTIAL (Format 1)
  • ORGANIZATION IS RELATIVE(Format 2)
  • ORGANIZATION IS INDEXED (Format 3)
  • IBM Extension
    IBM Extension ORGANIZATION IS TRANSACTION (Format 5). End of IBM Extension
    End of IBM Extension
IBM Extension

For database files, the ORGANIZATION clause indicates the current program usage of the file in the program. Therefore, the same database file can use SEQUENTIAL, RELATIVE, or INDEXED (assuming a keyed sequence access path exists) in the ORGANIZATION clause. This is true regardless of what is specified in other programs that use this file.

A keyed sequence access path is always created when a key is specified in the DDS that was used as input to the Create Physical File (CRTPF) or the Create Logical File (CRTLF) CL command.

End of IBM Extension