Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

ENQMODEL - ENQ SYSPLEX WIDE

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

New User


Joined: 21 Nov 2016
Posts: 4
Location: UK

PostPosted: Tue Nov 29, 2016 4:12 am    Post subject: ENQMODEL - ENQ SYSPLEX WIDE
Reply with quote

Hi All,

I have used ENQ and DEQ commands in an CICS environment and I can understand the concept from the below definitions, how the ENQ/DEQ command works

"The resource to be enqueued on must be identified by one of the following methods:

Specifying a data area that is the resource. It is the location (address) of the data area in storage that matters, not its contents.

Specifying a data area that contains a unique argument (for example, an employee name) that represents the resource. It is the contents of the data value that matters, not its location. LENGTH is required; the presence of the LENGTH option tells CICS to enqueue on the contents of the data value."


but I am trying to achieve an ENQ/DEQ sysplex-wide or we can say I am trying to achieve serialized access on the same resource from different CICS environments. From below information I can understand that there is a concept of ENQMODEL for the same icon_smile.gif

However I am not able to find any example for the same.


Below information I gathered while searching:-

When an EXEC CICS ENQ (or DEQ) command is issued for a resource whose name matches that of an installed ENQMODEL resource definition, CICS checks the value of the ENQSCOPE attribute to determine whether the scope is local or sysplex-wide. If the ENQSCOPE attribute is left blank (the default value), CICS treats the ENQ as local to the issuing CICS region. If no ENQMODEL matches the resource name, the scope of the ENQ command is local. See the CICS Resource Definition Guide for more information about the ENQMODEL resource definition.

Also can you please help me understand the above concept.

1 "When an EXEC CICS ENQ (or DEQ) command is issued for a resource whose name matches that of an installed ENQMODEL resource definition"

Does this mean that the resource name was pre-supplied while installing the ENQMODEL ? and before that I am confused on what installed ENQMODEL stands here for ?


2. ENQSCOPE is by default left black and provided some value (which I am assuming as of any name for example A) which can be provided while issuing an enque command. Please correct me as I am not sure on this.

3. I also read on the concept of GRS but I am not clear on the same as well.

Thankyou all!!
Back to top
View user's profile Send private message

Rohit Umarjikar

Senior Member


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

PostPosted: Tue Nov 29, 2016 4:40 am    Post subject:
Reply with quote

"Enqmodel" on Google search gave me enough links to do a research, did you do that?
Back to top
View user's profile Send private message
Nikhilesh Tomar

New User


Joined: 21 Nov 2016
Posts: 4
Location: UK

PostPosted: Tue Nov 29, 2016 4:49 am    Post subject: Reply to: ENQMODEL - ENQ SYSPLEX WIDE
Reply with quote

Hi Rohit,

I did the search and that's how have gathered all the above information icon_smile.gif

Please can you share some useful links with example of enqmodel apart from the above information.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 7913
Location: Bellevue, IA

PostPosted: Tue Nov 29, 2016 6:11 am    Post subject:
Reply with quote

ENQMODEL is defined and installed through RDO (the CEDA transaction). If you want to use a SYSPLEX ENQMODEL, you MUST define the ENQMODEL with a non-blank ENQSCOPE. You do not have an option to do this at run time. And this definition must exist in EACH region you want to control the ENQ for. If you do not have access to the CEDA transaction, you must work with your site support group CICS system programmer to do the definition and installation. The manual does not list any restrictions on the ENQSCOPE name (other than length).

When you use EXEC CICS ENQ, you provide the ENQMODEL name (that was defined by the CEDA transaction) in the RESOURCE name if you want the scope to be SYSPLEX instead of LOCAL. From the RDO manual:
Quote:
Combined with an ENQMODEL resource, CICS® uses MVS™ global resource serialization to provide sysplex-wide protection of application resources.

Local enqueues within a single CICS region are managed within the CICS address space. Sysplex-wide enqueues that affect more than one CICS region are managed by GRS.

The ENQSCOPE attribute of an ENQMODEL resource, defines the set of regions that share the same enqueue scope. If the ENQSCOPE attribute is left blank (the default value), CICS treats any matching ENQ or DEQ as local to the issuing CICS region. If the ENQSCOPE is non-blank, CICS treats the ENQ or DEQ as sysplex-wide and passes a queue name and the resource name to GRS to manage the enqueue.

The CICS regions that need to use sysplex-wide enqueue or dequeue function must all have the required ENQMODELs defined and installed. The recommended way to ensure this is for the CICS regions to share a CSD, and for the initialization group lists to include the same ENQMODEL groups.

GRS (global resource serialization) is the z/OS mechanism for providing controlled access to resources that cannot be shared (serialization). It can be very complex and there are manuals and Redbooks that you can consult for more information. If you are doing ENQ / DEQ in CICS, you need to spend some time reading up on GRS to understand at least at a high level what GRS does.
Back to top
View user's profile Send private message
Nikhilesh Tomar

New User


Joined: 21 Nov 2016
Posts: 4
Location: UK

PostPosted: Tue Nov 29, 2016 10:24 pm    Post subject: Reply to: ENQMODEL - ENQ SYSPLEX WIDE
Reply with quote

Thankyou Robert for explaining icon_smile.gif

I have queries on below lines:-

1 "When you use EXEC CICS ENQ, you provide the ENQMODEL name (that was defined by the CEDA transaction) in the RESOURCE name if you want the scope to be SYSPLEX instead of LOCAL."

If I am trying serialize access to a particular record from a VSAM file, does this mean I have to define a ENQMODEL with the key of that particular record ?
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 7913
Location: Bellevue, IA

PostPosted: Tue Nov 29, 2016 11:35 pm    Post subject:
Reply with quote

You REALLY need to spend a LOT of time reading manuals. From the CICS TS 5.1 RDO manual:
Quote:
ENQMODEL(name)specifies the name of this ENQMODEL definition. The name can be up to eight characters in length.
So unless your record key is 8 bytes or less, you CANNOT use it as the ENQMODEL name. The ENQMODEL name is arbitrary but must be the same in each CICS region that shares the enqueue. The resource name is allowed to be up to 255 bytes but GRS limits it to 44 bytes so don't use more than 44 bytes in your ENQMODEL definition. ENQSCOPE is again any arbitrary 4-byte value; if it is not spaces then CICS passes GRS the name DFHE???? (where ???? is your 4-byte ENQSCOPE) and the resource name defined by ENQNAME in the ENQMODEL definition.
Quote:
If I am trying serialize access to a particular record from a VSAM file
The ONLY way to achieve this is through RLS (record level sharing); in general an ENQ will be serialized at the cluster level.

Why are you not talking to your site support group? Very few, if any, sites allow an application programmer to use the CEDA transaction to define resources. CEDA is generally done by the site support group, so your asking all sorts of questions about it on a forum won't really help you that much.
Back to top
View user's profile Send private message
Nikhilesh Tomar

New User


Joined: 21 Nov 2016
Posts: 4
Location: UK

PostPosted: Tue Nov 29, 2016 11:55 pm    Post subject: Reply to: ENQMODEL - ENQ SYSPLEX WIDE
Reply with quote

Thanks Robert icon_smile.gif

Your answers really helped me understand.

"The ENQMODEL name is arbitrarybut must be the same in each CICS region that shares the enqueue. The resource name is allowed to be up to 255 bytes but GRS limits it to 44 bytes so don't use more than 44 bytes in your ENQMODEL definition. ENQSCOPE is again any arbitrary 4-byte value"

Yes we do have site support group which performs this activity. But I wanted to understand the concept, which I am able to now.

As we have same name defined using RDO entries and issuing an ENQ for the same name this will eventually help in serialization.

Correct me if I am wrong.
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 SYSPLEX Named counter and TSQ model rsshanmugam All Other Mainframe Topics 1 Tue Mar 06, 2012 12:01 pm
No new posts Difference between SYSplex, MIMplex a... Lendle Pascal Zacharias All Other Mainframe Topics 1 Thu Feb 09, 2012 6:55 pm
No new posts can Read-Only files be shared across ... Jose Mateo CICS 4 Mon Aug 22, 2011 9:14 pm
No new posts Parallel sysplex connectivity anka All Other Mainframe Topics 10 Wed Aug 10, 2011 1:08 pm
No new posts Email as an enterprise-wide messaging... superk All Other Mainframe Topics 5 Fri Mar 12, 2010 1:59 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us