IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

How to determine CICS transaction that started program


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
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
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: 2501
Location: Atlanta, Georgia, USA

PostPosted: Wed Jan 23, 2013 2:58 am
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
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

Global Moderator


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

PostPosted: Wed Jan 23, 2013 11:10 am
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts Using API Gateway from CICS program CICS 0
No new posts Calling an Open C library function in... CICS 1
No new posts How to 'Ping' a CICS region in JCL CICS 2
No new posts Parallelization in CICS to reduce res... CICS 4
No new posts DB2 Event passed to the Application P... DB2 1
Search our Forums:

Back to Top