Organization is sequential
ASSIGN TO “A:\PAYROLL.DAT”
ORGANIZATION IS SEQUENTIAL
This code means that the file is organized without indexes and will be read sequentially one record at a time. Note that since sequential is the default for both organization and access, these clauses do not need to be specified.
The organization of the tells how the data is organized. Organization sequential means that it is organized without indexes. Organization indexed means that it is an indexed file with a primary index and possible alternate indexes that can be used to access the records. Essentially that means that there will be a data file and an index file used to access the data. The third type of organization is relative which will be not be dealt with in this presentation.
Once a file has been set up with indexes, other programs reading or updating this file must also specify the indexes. The indexes can then be used to access the records on the file. Today indexed files are VSAM (Virtual Storage Access Method).
Access refers to how the records on the file will be accessed. The access method is directly related to the organization. For example if the organization is sequential, the records can only be accessed sequentially.