Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Cobol Read Command

Status
Not open for further replies.

klophockey

Programmer
May 25, 2016
41
US
MOVE 901DCM0000         TO MSGKEY.
           READ MSGFILE WITH LOCK.

           MOVE 0000000000             TO MSGKEY.
           START MSGFILE KEY NOT < MSGKEY.

Does the above START command unlock the record read referenced in the “READ MSGFILE” command ?
 
Depends on the COBOL product you are using.

Tom Morrison
Consultant
 
The START command positions the pointer within the file, nothing more. (for every version of COBOL I've used).

==================================
advanced cognitive capabilities and other marketing buzzwords explained with sarcastic simplicity


 
johnherman said:
The START command positions the pointer within the file, nothing more. (for every version of COBOL I've used).

In the (default) automatic single record locking mode in RM/COBOL, the lock established by the READ is released when any I/O statement on the file is executed. Therefore, in that mode, START would release the record.

Now, the question is, does IS COBOL behave that way? Could be, due to the facts (well, perhaps opinion informed by facts) that (1) AcuCOBOL was created to act as an RM/COBOL clone, and (2) IS COBOL was created to act as an AcuCOBOL clone. In reality, almost all COBOL products now have two or more locking modes, and the rules are complex enough that the simple question asked above cannot be answered without considerably more context.

Tom Morrison
Consultant
 
just as fyi, I have never used RM Cobol or Acu Cobol. My experience is with Concurrent Cobol, Microfocus Cobol, and a bunch of old proprietary Cobols, like Burroughs/Unisys, DEC, etc.

==================================
advanced cognitive capabilities and other marketing buzzwords explained with sarcastic simplicity


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top