COBOL has support to 3 principle file organizations :

  1. Sequential organization
  2. Relative organization (Random organization or Direct Access)
  3. Indexed Sequential organization

All these three organizations can be used on DISK files; only the SEQUENTIAL organization can be used with TAPE files.

All files must be declared in the ENVIRONMENT division by proper SELECT statements which should contain a phrase describing to the compiler what type of organization the file should have. A second important declaration should be placed in the FILE-SECTION where the programmer desrcibes the record format associated to the file in FD blocks.

Finally, the PROCEDURE division should have proper OPEN/CLOSE and READ/WRITE etc. statements used in compliance with the logic (algorithm) of the program.

Back to first page...