John, At first glance, your code appears to be plausible, provided:
1) All transactions run in one and only one region (e.g. AOR). 2) You have some code following the EXEC CICS ENQ to detect ENQBUSY If the transaction may run in multiple regions, I believe that you may need to: 1) Point to an area that specifies a length and a name 2) Define the specified name as an ENQMODEL and specify ENQSCOPE as sysplex-wide Also, the recommendation to try using the TASK keyword is a good one. Try that first. Cheers, Alan -----Original Message----- From: IBM Mainframe Discussion List [mailto:[email protected]] On Behalf Of John Weber Sent: Friday, July 08, 2011 12:08 PM To: [email protected] Subject: ENQ/DEQ for CICS Transaction ID We are looking to restrict a transaction from being run concurrently. We have launched two other transactions (the code below) that ENQ/DEQ this one transaction. Using displays we were expecting to see all of the displays of these two other transactions to follow one after the other; instead they are mingled. This suggests that they didn't run one after the other. Is the following code sufficient or even unworkable? I have read that ENQ/DEQ can be used for transactions and not only with shared memory resources. Also, does some other ENQ information need to be set up? Thank you so much... XXXX refers to the transaction id and XXXXXXXX refers to the program associated with this id. 000024 EXEC CICS 000025 ENQ RESOURCE(XXXX) 000027 RESP (WS-CICS-RESPONSE) 000028 END-EXEC 000038 EXEC CICS 000039 LINK PROGRAM('XXXXXXXX') 000040 RESP (WS-CICS-RESPONSE) 000041 COMMAREA (WS-PARAMETER) 000042 END-EXEC 000044 EXEC CICS 000045 DEQ RESOURCE(XXXX) 000046 RESP (WS-CICS-RESPONSE) 000047 END-EXEC ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html

