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
 

 

How to determine CICS transaction that started program

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
rss0213

New User


Joined: 20 Jan 2010
Posts: 26
Location: Alabama

PostPosted: Wed Jan 23, 2013 2:22 am    Post subject: How to determine CICS transaction that started program
Reply with quote

Hi. I want to build an MQ application that can be triggered from data written to multiple queues. I.e. each initiation queue that data has written to it will start the same program. In order for my application to know which queue to get the message from, it needs to know which queue's data triggered its execution. So it needs to know the transaction ID that started it (I think, unless there's a better approach). I've tried searching for an easy way to do this, but I can't find one. Is this even possible?
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 Jan 23, 2013 2:58 am    Post subject: Reply to: How to determine CICS transaction that started pro
Reply with quote

Check the value in EIBTRNID. Note that this is the transaction-id defined to the initial (root) program, also known as the PCT entry.

If you need to know how the transaction had been invoked, review the ASSIGN STARTCODE API.

EIBTRMID (not to be confused with EIBTRNID) will be non LOW-VALUES if the transaction was attached to a terminal.
Back to top
View user's profile Send private message
Binop B

Active User


Joined: 18 Jun 2009
Posts: 407
Location: Nashville, TN

PostPosted: Wed Jan 23, 2013 3:29 am    Post subject:
Reply with quote

Hi Scott,

Am not very sure about whether this is the best approach ...

But I would suggest you have a new transaction for every new MQ. For all the new transactions it could all point to the same program. In the program, based on the EIBTRNID as Bill suggested, you should be able to tell which MQ to read.
Back to top
View user's profile Send private message
Pandora-Box

Moderator


Joined: 07 Sep 2006
Posts: 1534
Location: Andromeda Galaxy

PostPosted: Wed Jan 23, 2013 11:10 am    Post subject: 1
Reply with quote

What you could simply do is have an indicator written to each message like Q1 , Q2,Q3

so be it same or different Trid invoking the program you will be able to figure out from which queue it came from

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 -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Date and time format in CICS Chandru3183 CICS 2 Sat Mar 18, 2017 12:46 pm
No new posts Asynchronous CICS Processing Question moezbud CICS 0 Mon Mar 06, 2017 6:13 pm
No new posts CICS Question RE: Browse, Readnext an... moezbud CICS 7 Sun Mar 05, 2017 5:45 am
No new posts Determine Region with max bandwidth f... seahawk789 COBOL Programming 3 Mon Feb 27, 2017 8:26 pm
No new posts how to send just 10 rows in a CICS sc... Megha Gupta CICS 5 Thu Feb 23, 2017 6:57 pm


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