Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
How to find a CICS resource used in CICS ENQ command?

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CICS
View previous topic :: :: View next topic  
Author Message
Arunkumar Chandrasekaran

New User


Joined: 01 Jun 2010
Posts: 63
Location: India

PostPosted: Thu Sep 29, 2016 1:45 pm    Post subject: How to find a CICS resource used in CICS ENQ command?
Reply with quote

Hi,

In my shop, one of the program i found the below.

EXEC CICS ENQ
RESOURCE(RESOURCE-NAME)
LENGTH(RESOURCE-LENGTH)
END-EXEC.

RESOURCE-NAME is having the value 'F5750I20-ENQ-LOADPRC'.
I couldn't understand what is the resource is? Is there any way to find the definition of a CICS resource?


Note: Earlier i have used ENQ only for programs.

Thanks,
Arun
Back to top
View user's profile Send private message

enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10358
Location: italy

PostPosted: Thu Sep 29, 2016 1:56 pm    Post subject: Reply to: How to find a CICS resource used in CICS ENQ command?
Reply with quote

enq/deq logic is just a gentlemen's agreement between partners in crime icon_cool.gif

the resource name is only an arbitrary string, agreed upon by all the actors sharing <something>
Back to top
View user's profile Send private message
Arunkumar Chandrasekaran

New User


Joined: 01 Jun 2010
Posts: 63
Location: India

PostPosted: Fri Sep 30, 2016 9:39 am    Post subject:
Reply with quote

Sorry I am not still clear.For example if I ENQ a program means I am holding the program from executing another copy.like that What I am achieving by holding the above resource.How do I find that What I am holding?
Back to top
View user's profile Send private message
Garry Carroll

Senior Member


Joined: 08 May 2006
Posts: 1002
Location: Dublin, Ireland / Edinburgh, Scotland

PostPosted: Fri Sep 30, 2016 2:30 pm    Post subject:
Reply with quote

Quote:
Sorry I am not still clear.For example if I ENQ a program means I am holding the program from executing another copy.


No, you are not preventing the program from executing another copy. All you are doing is signalling that you want to reserve 'something' that you;ve named. If others ignore the reserve you've placed, there's no effect. If others also issue an ENQ for the same 'something', they get suspended until you issue a DEQ.

Garry.
Back to top
View user's profile Send private message
Arunkumar Chandrasekaran

New User


Joined: 01 Jun 2010
Posts: 63
Location: India

PostPosted: Fri Sep 30, 2016 6:19 pm    Post subject:
Reply with quote

I am getting it now. icon_smile.gif.

but for a confirmation Say I ENQ a program name (PGMA) from a program B.But When Program C tried to execute PGMA with out any ENQ it will still run.If PGMC tried to ENQ PGMA then it will fail.


So, physically ENQ is holding nothing. it is a just logical concept so that we can eliminate some concurrent processing.
Back to top
View user's profile Send private message
Bill O'Boyle

CICS Moderator


Joined: 14 Jan 2008
Posts: 2504
Location: Atlanta, Georgia, USA

PostPosted: Fri Sep 30, 2016 6:43 pm    Post subject: Reply to: How to find a CICS resource used in CICS ENQ command?
Reply with quote

When using an ENQ "RESOURCE" API, the named defined to this RESOURCE must be known by all programs that attempt access. For example, if you have a TSQ which is accessed/updated by several programs, to ensure data integrity, a given program MUST serialize TSQ access. This would be the purpose of the ENQ API. It is highly suggested when serialized access has completed and you're ready to allow access by the "next" waiting-task, rather than wait for task-termination, issue an explicit DEQ API.

I still prefer using the HANDLE CONDITION ENQBUSY (LABEL), but that's just my preference.

If a program has issued an ENQ on a shared RESOURCE and it's busy, the program logic will automatically wait at the LABEL defined in the HANDLE until it becomes available.

HTH....
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8188
Location: East Dubuque, Illinois, USA

PostPosted: Fri Sep 30, 2016 6:50 pm    Post subject:
Reply with quote

From the manual:
Quote:
ENQ causes further execution of the task issuing the ENQ command to be synchronized with the availability of the specified resource; control is returned to the task when the resource is available.

A resource in the context of this command is any string of 1–255 bytes, established by in-house standards, to protect against conflicting actions between tasks, or to cause single threading within a program.
So your statement
Quote:
Say I ENQ a program name (PGMA)
is inaccurate. You do the ENQ on a resource (string) you called PGMA. That resource has NOTHING to do with any program in the CICS region named PGMA.
Back to top
View user's profile Send private message
Rohit Umarjikar

Senior Member


Joined: 21 Sep 2010
Posts: 1818
Location: NY,USA

PostPosted: Fri Sep 30, 2016 8:25 pm    Post subject:
Reply with quote

ENQ / DEQ is used for serialized access in a real-time world. Resource Name can be any string which is unique for that unit of work and remains alive with the token till transaction ends. So use of that is if any other transaction hits at the same time as first one then it is said to be Enq'ed till the very first issues DEQ or ends whichever is first.
I recall of http://ibmmainframes.com/viewtopic.php?t=64589&highlight= post.
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10358
Location: italy

PostPosted: Fri Sep 30, 2016 10:20 pm    Post subject:
Reply with quote

Quote:
So, physically ENQ is holding nothing. it is a just logical concept so that we can eliminate some concurrent processing.


that' s what we have been trying to tell for a while icon_cool.gif
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CICS All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts OUTREC with ALter Command scorp_rahul23 DFSORT/ICETOOL 0 Wed Nov 22, 2017 3:10 pm
No new posts How to get complete URL from CICS Con... mbattu CICS 1 Tue Nov 14, 2017 11:59 pm
No new posts Integrating CICS applications craig2020 CICS 1 Sun Oct 29, 2017 6:49 pm
No new posts ASP3 ABEND IN CICS Vedant CICS 0 Fri Oct 20, 2017 3:18 pm
No new posts Identifying Interfaces in CICS/mainframe Ashishpanpaliya CICS 5 Fri Oct 13, 2017 3:21 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us