cobol1.hlp (Topic list)
READ (↑ Statements)
 Key                                       Up Contents Index Back
────────────────────────────────────────────────────────────────────────────
 
  Verb:         READ
 
  Function:     Gets a record from a file. In sequential access this
                will be the next or previous record; in random access,
                it will be a specified record.
 
  Syntax:       Which format?  Sequential     NEXT/PREVIOUS
                               Relative key  Record key
 
    ──READ file-name-1─┬──────────┬─RECORD─┬───────────────────┬─
                         ├─NEXT─────┤        └─INTO identifier-1─┘
                         └─PREVIOUS─┘
 
    ─┬────────────────────────┬────────────────────
      └─┬────┬─┬────────┬─LOCK─┘
        └WITH┘ ├─KEPT───┤
               ├─NO─────┤
               ├─IGNORE─┤
               └─WAIT───┘
 
    ─┬─────────────────────────────────┬─────────
      └─┬──┬─END imperative-statement-1─┘
        └AT┘
 
    ─┬─────────────────────────────────────┬─────
      └─NOT─┬──┬─END imperative-statement-2─┘
            └AT┘
 
    ─┬──────────┬──
      └─END-READ─┘
                                    -♦-