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: 1537
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 Writing a file using online program grvtomar PL/I & Assembler 3 Fri Jun 30, 2017 1:06 pm
No new posts How to Clear all TSQs during CICS sta... Hooman24 CICS 10 Mon Jun 26, 2017 9:46 pm
No new posts pre-compiler for program in an HFS Pedro DB2 0 Fri Jun 23, 2017 11:13 pm
No new posts CICS Transaction attach count of supp... lind sh CICS 1 Wed Jun 21, 2017 1:33 pm
No new posts Compiling program in endeavor for tra... RALAKKAL Compuware & Other Tools 4 Mon Jun 05, 2017 8:27 pm


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