You are certainly right; the Programmer's Guide does indeed provide correct documentation regarding the CANCEL statement in this context. To be honest, I wasn't very confident that it would work. That’s partly also because I had tried using the "IS INITIAL" clause on the PROGRAM-ID—setting it as PROGRAM-ID. GC99FED2 IS INITIAL. As I understand it, this "IS INITIAL" clause has the same effect as a "logical" CANCEL regarding the state of the fields for each CALL. Similarly, I believe I could have used...
Indeed, what we don't know are the reasons why, after 60+ years, they decided to add this new 'LOCK FILE file-name'statement to the ISO COBOL standard. Can these reasons be found anywhere ?
Indeed, what we don't know are the reasons why they decided to add this new 'LOCK FILE file-name'statement to the ISO COBOL standard. Can these reasons be found anywhere ?
I used set environment "COB_PHYSICAL_CANCEL" TO "Y" and it seems to be working perfectly and my problem is resolved.
Both UNLOCK and LOCK operate at the file level. I believe LOCK is a new feature introduced in the latest version of the ISO standard, whereas UNLOCK has been around for many years. See the attached screenshot. Therefore, it will be an optional implementation for existing compilers for those wishing to adopt this new feature.
Both UNLOCK and LOCK operate at the file level. I believe this is a new feature introduced in the latest version of the ISO standard. See the attached screenshot. Therefore, it will be an optional implementation for existing compilers for those wishing to adopt this new feature.
I would like to thank Ralph for his reply. I am attaching a screenshot of the COBOL ISO standard documentation describing the LOCK statement. This is not a LOCK clause within an I-O statement, but a standalone statement. I believe that transaction management and Logical Units of Work are topics distinct from LOCK management.
I would like to thank Ralph for his reply. I am attaching a screenshot of the COBOL ISO standard documentation describing the LOCK statement. This is not a LOCK clause within an I-O statement, but a standalone statement. I believe that transaction management and Logical Units of Work are topics distinct from LOCK management.