Rational Developer for System z
Enterprise COBOL for z/OS, Version 4.1, Programming Guide


Specifying sequential organization for VSAM files

Identify VSAM ESDS files in a COBOL program with the ORGANIZATION IS SEQUENTIAL clause. You can access (read or write) records in sequential files only sequentially.

After you place a record in the file, you cannot shorten, lengthen, or delete it. However, you can update (REWRITE) a record if the length does not change. New records are added at the end of the file.

The following example shows typical FILE-CONTROL entries for a VSAM sequential file (ESDS):

SELECT S-FILE
    ASSIGN TO SEQUENTIAL-AS-FILE
    ORGANIZATION IS SEQUENTIAL
    ACCESS IS SEQUENTIAL
    FILE STATUS IS FSTAT-CODE VSAM-CODE.

related concepts  
VSAM files


Terms of use | Feedback

This information center is powered by Eclipse technology. (http://www.eclipse.org)