View previous topic :: View next topic
|
Author |
Message |
seahawk789
New User
Joined: 22 Feb 2010 Posts: 56 Location: Cochin
|
|
|
|
Hi,
I am using ENQ in one of the program as below and trying to use DEQ in another for the same Resource Value.
ENQ Value in both cases is exactly same. Is it allowed to ENQ in one program and DEQ in another both programs running in same LPAR ?
In Program 1 I am using :
Code: |
EXEC CICS
ENQ
RESOURCE (WS-ENQ-VALUE)
LENGTH (WS-ENQ-LENGTH)
RESP (WS-RESP)
TASK
NOSUSPEND
END-EXEC. |
In Program 2 I am using :
Code: |
EXEC CICS DEQ
RESOURCE (WS-ENQ-VALUE)
LENGTH (WS-ENQ-LENGTH)
RESP (WS-RESP)
END-EXEC.
|
|
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
ENQ and DEQ are supposed to work as a pair in a program. Depending upon the specific situation, what you are wanting to do may - or may not - work. |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
Also, I notice that you did NOT indicate you are having any issues, nor what the RESPONSE codes are for each command, you just asked if it is allowed. And the answer is generally, as long as the programs are in the same task / UOW (depending upon the ENQ parameter) then it should work -- but I haven't tested this so I don't know for sure. If the programs are not in the same task / UOW, then almost certainly what you are attempting to do will not work. As I posted earlier, it may -- or may not -- work depending upon the specific situation.
And your question is quite broad -- two programs running in the same LPAR could be running in different CICS regions, in which case the answer, of course, will be that this CANNOT work since the programs CANNOT be in the same task / UOW. |
|
Back to top |
|
|
seahawk789
New User
Joined: 22 Feb 2010 Posts: 56 Location: Cochin
|
|
|
|
Sorry for not being specific. Both the programs run in the same CICS region. In that case the above scenario should work right ? |
|
Back to top |
|
|
Nic Clouston
Global Moderator
Joined: 10 May 2007 Posts: 2455 Location: Hampshire, UK
|
|
|
|
Why not try it and find out? That is what test regions are for. |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
Quote: |
In that case the above scenario should work right ? |
How many times do you want the question answered? It may -- or may not -- work depending upon the specific situation. As Nic said, test it yourself so you will know the answer. |
|
Back to top |
|
|
Bill O'Boyle
CICS Moderator
Joined: 14 Jan 2008 Posts: 2501 Location: Atlanta, Georgia, USA
|
|
|
|
I agree with the previous consensus. The same ENQ resource matched with the same DEQ resource in different regions (within the same LPAR) will not work. If in the same region, I don't see a problem.
Internal Resource Tables are Region specific. Unfortunately, there isn't a SYSID keyword option in the ENQ/DEQ API's.
What are you attempting? |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
seahawk789: What you have not explained is how program 1 and program 2 are related. I think you want a simple yes / no answer, but you cannot have a yes / no answer because the answer depends upon how the programs are related. If they are totally distinct and separate (as in running in two different tasks), I believe you will find this won't work since the end of task will release the ENQ without requiring the DEQ to process -- and therefore the DEQ would not have a normal response since there's no associated ENQ. If program 1 and program 2 are both associated with a single task (via XCTL or LINK) then yes it will work as long as there's no intervening EXEC CICS RETURN to force the end of task. |
|
Back to top |
|
|
Rohit Umarjikar
Global Moderator
Joined: 21 Sep 2010 Posts: 3048 Location: NYC,USA
|
|
Back to top |
|
|
seahawk789
New User
Joined: 22 Feb 2010 Posts: 56 Location: Cochin
|
|
|
|
Thanks all for your help. |
|
Back to top |
|
|
|