Processing files with multithreading

In threaded applications, you can code COBOL statements for input and output in QSAM, VSAM, and line-sequential files.

Each file definition (FD) has an implicit serialization lock. This lock is used with automatic serialization logic during the input or output operation that is associated with the execution of the following statements:

  • OPEN
  • CLOSE
  • READ
  • WRITE
  • REWRITE
  • START
  • DELETE

Automatic serialization also occurs for the implicit MOVE that is associated with the following statements:


WRITE record-name FROM identifier
READ  file-name   INTO identifier

Automatic serialization is not applied to any statements specified within the following conditional phrases:

  • AT END
  • NOT AT END
  • INVALID KEY
  • NOT INVALID KEY
  • AT END-OF-PAGE
  • NOT AT END-OF-PAGE

related concepts  
File-definition (FD) storage