When You Need READ NEXT During Reading of INDEXED Files in COBOL

INDEXED files cam be accessed in 3 ways (Refer previous post). There are key differences on the options especially how they support different file options. Below is the complete list of file options.

SEQUENTIAL Access supports the following options

  • DELETE
    READ
    REWRITE
    START
    WRITE
    UNLOCK

RANDOM Access supports the following options

  • DELETE
    READ
    REWRITE
    WRITE
    UNLOCK

DYNAMIC Access supports the following options

  • DELETE
    READ
    READ NEXT
    REWRITE
    START
    WRITE
    UNLOCK

Among the above options “READ NEXT” differentiates of all. Since for random reading “READ” alone is enough. If you need sequential reading of INDEXED file, you need “READ NEXT”.

Advertisements

Author: Srini

Experienced software developer. Skills in Development, Coding, Testing and Debugging. Good Data analytic skills (Data Warehousing and BI). Also skills in Mainframe.