In a multi-user environment, you need to ensure that only one user can update a specific record in an ISAM file at a time. How would you implement file locking for this purpose?

  • Apply a system-level lock using operating system utilities
  • Implement record-level locking using a separate lock file
  • Use the COBOL LOCK clause for exclusive access
  • Utilize COBOL SYNC clause for synchronization
To ensure exclusive access to a record in an ISAM file, using the COBOL LOCK clause for exclusive access is a common approach. It prevents other users from updating the same record simultaneously, avoiding data inconsistency.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *