Rational Developer for System z
COBOL for Windows, Version 7.5, Programming Guide


File organization and access mode

You can organize your files as sequential, line-sequential, indexed, or relative. The access mode defines how COBOL reads and writes files, but not how files are organized.

You should decide on the file organization and access modes when you design your program.

The following table summarizes file organization and access modes for COBOL files.

Table 11. File organization and access mode
File organization Order of records Records can be deleted or replaced? Access mode
Sequential Order in which they were written A record cannot be deleted, but its space can be reused for a same-length record. Sequential only
Line-sequential Order in which they were written No Sequential only
Indexed Collating sequence by key field Yes Sequential, random, or dynamic
Relative Order of relative record numbers Yes Sequential, random, or dynamic

Your file-management system handles the input and output requests and record retrieval from the input-output devices.

related concepts
Sequential file organization
Line-sequential file organization
Indexed file organization
Relative file organization
Sequential access
Random access
Dynamic access

related tasks
Specifying a file organization and access mode

related references
File input-output limitations


Terms of use | Feedback

Copyright IBM Corporation 1996, 2008.
This information center is powered by Eclipse technology. (http://www.eclipse.org)