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
 

 

Need to find the region name
Goto page 1, 2  Next
 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CICS
View previous topic :: :: View next topic  
Author Message
Rohit Umarjikar

Senior Member


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

PostPosted: Wed Apr 17, 2013 10:21 pm    Post subject: Need to find the region name
Reply with quote

Team,

I have a program ABCP0001 , How may I get the region names (DEV,QA,PROD) where this program is executing?

Do we make any entry of the region names during the PPT/PCT entry?
Back to top
View user's profile Send private message

Robert Sample

Global Moderator


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

PostPosted: Wed Apr 17, 2013 10:28 pm    Post subject:
Reply with quote

There is a CICS system programming feature that can return the job name of the CICS region:
Code:
EXEC CICS INQUIRE SYSTEM JOBNAME(<8-char variable>) END-EXEC
However, your program must be compiled with the SP option of CICS to be able to use this API call -- whether or not your site permits you to do so will depend upon the site.

Unless your site has something specifically set up to denote the region type, there is nothing else within CICS to distinguish a production from QA from test region.
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10202
Location: italy

PostPosted: Wed Apr 17, 2013 10:31 pm    Post subject: Reply to: Need to find the region name
Reply with quote

see here on the ways to identify a LOCAL CICS <region>
http://pic.dhe.ibm.com/infocenter/cicsts/v4r1/index.jsp?topic=%2Fcom.ibm.cics.ts.intercommunication.doc%2Ftopics%2Fdfht15f.html

anyway the need for a <transaction> to determine the CICS <region> name/identifier/....
and depend on it
is by general consensus a symptom of a bad design

furthermore the CICS <region> is is a technical system installation definition detail
for example
multiple APPLICATION OWNING REGIONS are seldom implemented in testing and friends
but are commonly implemented in PRODUCTION according generally to performance reasons and concerns

and the application developers HAVE NO SAY on it
seen quite often pseudo smart developers getting burned icon_cool.gif
Back to top
View user's profile Send private message
Rohit Umarjikar

Senior Member


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

PostPosted: Wed Apr 17, 2013 11:26 pm    Post subject:
Reply with quote

Quote:
seen quite often pseudo smart developers getting burned


icon_smile.gif icon_smile.gif


Let me be more specific, if I have 3-DEV, 3-QA, 1-PROD then how can I tell CICS to execute in the specific region in QA/DEV?
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10202
Location: italy

PostPosted: Wed Apr 17, 2013 11:30 pm    Post subject: Reply to: Need to find the region name
Reply with quote

Quote:
But if I have 3-DEV, 3-QA, 1-PROD then how can I tell CICS to execute in the specific region in QA/DEV?

icon_eek.gif
reread the manuals please!
Back to top
View user's profile Send private message
Rohit Umarjikar

Senior Member


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

PostPosted: Wed Apr 17, 2013 11:32 pm    Post subject:
Reply with quote

OKay Sir...icon_smile.gif
Back to top
View user's profile Send private message
Bill O'Boyle

CICS Moderator


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

PostPosted: Wed Apr 17, 2013 11:55 pm    Post subject: Reply to: Need to find the region name
Reply with quote

The APPLID is a parameter defined to the SIT (System Initialization Table) and is normally maintained by your CICS System Programmer and/or Tech Support group and can be programmatically extracted via the EXEC CICS ASSIGN APPLID () API, an 8-Byte value.

It must also be defined as a VTAM Major Node. Otherwise, no connectivity....
Back to top
View user's profile Send private message
Marso

REXX Moderator


Joined: 13 Mar 2006
Posts: 1219
Location: Israel

PostPosted: Thu Apr 18, 2013 7:08 pm    Post subject: Reply to: Need to find the region name
Reply with quote

These are two different questions:
Rohit Umarjikar wrote:
How may I get the region names (DEV,QA,PROD) where this program is executing?

Rohit Umarjikar wrote:
how can I tell CICS to execute in the specific region in QA/DEV?


Question 1: collect by yourself all the SYSIDs and APPLIDs of all your CICSs. You won't get the region name but you can try to find a pattern (for example, all DEV CICS start with T, all prod start with P) to identify the use of the region.
or use the INQUIRE command as shown by Robert.
or talk to your CICS admin.

Question 2: it depends on how your system is configured (program autoinstall ?), and it depends on how the program is executed (CALLed, XCTLed or through EXCI or ...).
Back to top
View user's profile Send private message
Rohit Umarjikar

Senior Member


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

PostPosted: Thu Apr 18, 2013 8:32 pm    Post subject:
Reply with quote

Thanks everyone....

Just a bit of confusion...
Let's say we have 3 QA regions viz,
CICSQA1
CICSQA2
CICSQA3

So how would CICS decides which one to pick it up during the execution, how program vs these regions are mapped...
Back to top
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 1715
Location: UK

PostPosted: Thu Apr 18, 2013 9:32 pm    Post subject:
Reply with quote

I guess it is the one you log in to. For a batch job I guess it would be the dataset names etc.
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Thu Apr 18, 2013 10:08 pm    Post subject:
Reply with quote

Hello,

Quote:
So how would CICS decides which one to pick it up during the execution
CICS does not "pick it up". Whichever CICS is active (i.e. where the user logged on) is where the transaction will run.

Maybe i am missing something here . . .
Back to top
View user's profile Send private message
Rohit Umarjikar

Senior Member


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

PostPosted: Thu Apr 18, 2013 10:15 pm    Post subject:
Reply with quote

But from the application programming view, if I want to validate against the valid regions then

I might code like

Code:
IF CICSQA1  OR
    CICSQA2  OR
    CICSQA3 

    CONTINUE

ELSE
   ERROR AND RETURN
END-IF


Now this is a bit of hardcoding stuff, where is if tomorrow a new region comes in and they want my program to also run there then this will fail, so how generally we implement this idea...?
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10202
Location: italy

PostPosted: Thu Apr 18, 2013 11:03 pm    Post subject: Reply to: Need to find the region name
Reply with quote

Quote:
Now this is a bit of hardcoding stuff, where is if tomorrow a new region comes in and they want my program to also run there then this will fail, so how generally we implement this idea...?

YOU DO NOT... RIP

what is that Your idiot application designers
do not understand when we tell that having a dependency on the configuration names is a poor/inconsiderate/stupid/incompetent application design ???

and that any decent quality assurance will comment very unpleasantly about it ???
Back to top
View user's profile Send private message
Rohit Umarjikar

Senior Member


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

PostPosted: Thu Apr 18, 2013 11:12 pm    Post subject:
Reply with quote

Enrico,
I follow you on this when we have a new development.

But my question comes up when we talked about the old CICS programs which have been coded 12 to 15 years back...( and they might not have thought of this that time).
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10202
Location: italy

PostPosted: Thu Apr 18, 2013 11:29 pm    Post subject: Reply to: Need to find the region name
Reply with quote

Quote:
But my question comes up when we talked about the old CICS programs which have been coded 12 to 15 years back..


then somebody will have to plan the resource availability for a logic upgrade

CICS was quite different TEN years ago,
and Your colleagues cannot pretend to put any constraint on the layout and naming conventions of the subsystems .

simple example
once upon a time You could identify the AOR <region> using PROD
one application owning region was all that was needed

now the SLA and performance considerations force to split the load across more AORs ... PROD1, PROD2, ..., PRODn

You still will have to change all the application programs to check
instead the FULL <name> a substring of it

and somebody inside Your organization will be really pissed that they cannot make the adjustement needed to satisfy the SLA ( service level agreement ) because of a dumb application design
( and the SLA means MONEY )

nuff said.

time to lock the topic
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Thu Apr 18, 2013 11:44 pm    Post subject:
Reply with quote

Hello,

Quote:
Now this is a bit of hardcoding stuff, where is if tomorrow a new region comes in and they want my program to also run there then this will fail, so how generally we implement this idea...?
As has been mentioned multi[ple times, you don't.

Consider, if the code is running it is in a proper CICS. . . If the transaction/program has not been set up for some region(s), it will never run there and the need to ensure a "good" region is unnecessary . . .

Why does someone believe this is needed?
Back to top
View user's profile Send private message
Rohit Umarjikar

Senior Member


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

PostPosted: Thu Apr 18, 2013 11:54 pm    Post subject:
Reply with quote

Quote:
Why does someone believe this is needed?


This is in place already in one of the existing program, and I am doing some modifications to the code...so during the testing of this program , I got into these questions....
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Fri Apr 19, 2013 1:19 am    Post subject:
Reply with quote

Hello,

If you are going to work on the code, maybe this can help:
Code:
EXEC CICS
         ASSIGN APPLID (COMM-HOLD-REGION-ID)
         RESP                 (WS-CICS-RESPONSE)
END-EXEC.
.
.
test WS-CICS-RESPONES code here for '00'
.
.
EVALUATE COMM-HOLD-REGION-ID
                WHEN 'TESTREG
 
                WHEN 'PRODREG'
 
                WHEN OTHER
 
END-EVALUATE.
Back to top
View user's profile Send private message
Rohit Umarjikar

Senior Member


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

PostPosted: Fri Apr 19, 2013 1:32 am    Post subject:
Reply with quote

Yes dick... I did a little modifications to it

Code:
EXEC CICS ASSIGN
    SYSID(WS-SYSID)
END_EXEC


So by this I do not need to worry about any multiple CICS region's under the same SYSID.

For e.g. QA has SYSID-SYSA then this can have multiple regions (CICSQA1,CICSQA2,CICSQA3.....)

So my conditons will be,

Code:
EVALUATE WS-SYSID TRUE

WHEN 'SYSA'
   SET QA-region to true
WHEN 'SYSB'
   SET PROD-region to true
WHEN OTHER
   SET REGION-ERROR to true

END-EVALUATE


I hope this would be more generic than having specific region checks...
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Fri Apr 19, 2013 2:00 am    Post subject:
Reply with quote

Hello,

I suppose i'm still lost<g>.

Why does the code care which "region" is true? If it is running at all, the "region" is valid. I suspect that the WHEN OTHER would never be processed.

If the SYSID can be shown on a screen or a report, why is any "verification" needed?
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
Goto page 1, 2  Next
Page 1 of 2

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts How to find the first monday of the w... abdulrafi COBOL Programming 10 Fri Nov 25, 2016 3:24 pm
No new posts Find out a active PGM jpsager JCL & VSAM 10 Fri Oct 07, 2016 4:32 pm
No new posts How to find a CICS resource used in C... Arunkumar Chandrasekaran CICS 8 Thu Sep 29, 2016 1:45 pm
No new posts how to find clist's or view library Andrew Hsia CLIST & REXX 4 Tue Jun 28, 2016 6:07 pm
No new posts How to find jobs that are in schedule... anilkumar922 All Other Mainframe Topics 5 Tue Jun 28, 2016 10:01 am


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