Task 1: Read and Writes TSQ with ENQ option
Task 2: Only reads TSQ without ENQ option.
I am writing program for task one which will check if TSQ is present if present then it will re-write the TSQ data if not write the data.
Task 2 program will just read the TSQ data. I don’t want to give exclusive control to task 2 as many other similar high priority task might need to use the TSQ.
My question is if task 1 is holding the TSQ (by ENQ) for update purpose can task 2 still be able to access it. If not what condition will arise. Will it fail with any specific condition (RESP code) or will it wait till task 1 releases the control?
Any help would be highly appreciated.
I have a more complex problem:
I have 8 CICS that share a TS MAIN in Couple Facility.
Four of these CICS can write an entry in TS giving an unic TSQNAME using APPLID and TASKN.
The other four CICS use INQUIRE TS to get TSQNAME, and read them, and process, and delete.
I think that ENQ/DEQ work only in the same CICS region.
How can I prevent that two or more CICS read and process the same TSQNAME?
Can I use WAIT EXTERNAL ECBLIST in my application program?