Author |
Message
|
chandana06 |
Posted: Thu Jan 26, 2006 9:16 am Post subject: Exec Cics Retrieve MQ details |
|
|
Apprentice
Joined: 26 Jan 2006 Posts: 32
|
Hi,
I have a program 'A' which is executing
EXEC CICS RETRIEVE
INTO (WS-MQ-INFO)
RESP (WS-CICS-RESP)
END-EXEC
to get the base mq name.
There are two ways this program can start:
1. from the trigger set on the MQ (if the MQ depth is > 1 the program is triggred) here the tirgger trans is 'aaaa'
2. there is another program 'b' which executes
EXEC CICS START
TRANSID('aaaa')
RESP(WS-CICS-RESP)
END-EXEC
the program 'A' is able to retrieve the base mq name when triggered by the internal trigger
but it is not able to retrieve when prog 'b' is starting the trans.
My requirement is such that i need to start threads of program 'a' in program 'b' program 'a' is the program which processes the records in a queue.
this queue is a clustered queue and the thread started can run in any region. so i need to get the base mq name in program 'a' only. i cant pass it from program 'b'. As long as it was being triggered automatically there was no problem as what ever was required was being passed on.
how do we get the base mq name required by the program 'a'? _________________ Regards,
Chandana |
|
Back to top |
|
 |
wschutz |
Posted: Thu Jan 26, 2006 9:34 am Post subject: |
|
|
 Jedi Knight
Joined: 02 Jun 2005 Posts: 3316 Location: IBM (retired)
|
Are you asking how program A knows whether is was started by CKTI or program B, or is it a question of how program B passes the queue name to program A? (assuming program B knows which queue program A should read). _________________ -wayne |
|
Back to top |
|
 |
rtsujimoto |
Posted: Thu Jan 26, 2006 11:08 am Post subject: |
|
|
Centurion
Joined: 16 Jun 2004 Posts: 119 Location: Lake Success, NY
|
The queue name is provided by CKTI to program A via the MQTM structure, so if you want the same functionality, you have to mimic that functionality in your middle-man program. I would assume program B would know what queue name to pass program A. |
|
Back to top |
|
 |
chandana06 |
Posted: Thu Jan 26, 2006 10:17 pm Post subject: |
|
|
Apprentice
Joined: 26 Jan 2006 Posts: 32
|
hi,
Thankq for the responses.
Program 'b' will not know the queue name that should be passed to program 'a'.
program 'a' can run in any region after it gets triggered.
how about getting the base queue name in program 'a' when the start code is 'S'
is there any way to get the base queue name in program 'a'? _________________ Regards,
Chandana |
|
Back to top |
|
 |
bob_buxton |
Posted: Fri Jan 27, 2006 1:37 am Post subject: |
|
|
 Master
Joined: 23 Aug 2001 Posts: 266 Location: England
|
If program B doesn't know the q name how is A supposed to find out?
Consult an astrologer? If you are starting A you are responsible for telling it what queue it is to process - nobody else can.
The way you tell A is to build a MQTM structure and pass it into A by coding FROM(MQTM) on your EXEC CICS START.
You could use a similar technique to pass the Q name into B from whatever process starts B _________________ Bob Buxton
Ex-Websphere MQ Development |
|
Back to top |
|
 |
chandana06 |
Posted: Fri Jan 27, 2006 1:48 am Post subject: |
|
|
Apprentice
Joined: 26 Jan 2006 Posts: 32
|
hi,
ThankQ for the reply.
My problem is like this:
i have a queue 'qqqq'
this queue is defined in region R1 as 'qqq1' in region R2 as 'qqq2'
when prog 'a' runs it needs the queue name as 'qqq1' / 'qqq2' etc..
all i can pass from 'b' to 'a' is 'qqqq'.
is there any way to get the local queue name that is 'qqq1' from 'qqqq'? _________________ Regards,
Chandana |
|
Back to top |
|
 |
wschutz |
Posted: Fri Jan 27, 2006 3:01 am Post subject: |
|
|
 Jedi Knight
Joined: 02 Jun 2005 Posts: 3316 Location: IBM (retired)
|
Quote: |
I have a queue 'qqqq'
this queue is defined in region R1 as 'qqq1' in region R2 as 'qqq2' |
What EXACTLY, in MQ object terms (local queues, alias queues etc) does that statement mean? _________________ -wayne |
|
Back to top |
|
 |
chandana06 |
Posted: Fri Jan 27, 2006 8:21 am Post subject: |
|
|
Apprentice
Joined: 26 Jan 2006 Posts: 32
|
Hi,
Thankq for the response.
'qqqq' i ment is the alias name
'qqq1' i ment local name by this
is there a way to get the local name by giving the alias name
the local name is different in different regions in my shop. _________________ Regards,
Chandana |
|
Back to top |
|
 |
bob_buxton |
Posted: Fri Jan 27, 2006 8:39 am Post subject: |
|
|
 Master
Joined: 23 Aug 2001 Posts: 266 Location: England
|
Yes, provided the alias queue refers to a local queue and the get-inhibit flag is not set you should be able to pass the alias queue name to your message processing application.
It can then just do a normal MQOPEN of the alias and if it needs to know the actual queue name it will be returned in MQOD.ResolvedQName.
I dont know what you benefits you expect to see by having different queue names in each region. _________________ Bob Buxton
Ex-Websphere MQ Development |
|
Back to top |
|
 |
chandana06 |
Posted: Fri Jan 27, 2006 9:14 am Post subject: |
|
|
Apprentice
Joined: 26 Jan 2006 Posts: 32
|
thankq so much for the pointer. will try this out
i wanted this because i will have to do an MQINQ call on the queue after getting the local name.
MQINQ is not working with the alias name and local names are somehow different in different regions in my shop. _________________ Regards,
Chandana |
|
Back to top |
|
 |
jefflowrey |
Posted: Fri Jan 27, 2006 9:16 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
chandana06 wrote: |
i wanted this because i will have to do an MQINQ call on the queue after getting the local name. |
Why? _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
chandana06 |
Posted: Fri Jan 27, 2006 9:18 am Post subject: |
|
|
Apprentice
Joined: 26 Jan 2006 Posts: 32
|
to c how many threads are running on the queue and the depth of the queue. MQINQ is not working with an aliasQ name its working only with the localQ name _________________ Regards,
Chandana |
|
Back to top |
|
 |
fjb_saper |
Posted: Fri Jan 27, 2006 12:55 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
chandana06 wrote: |
to c how many threads are running on the queue and the depth of the queue. MQINQ is not working with an aliasQ name its working only with the localQ name |
I doubt that this is what jeff meant with his Why question.
The real question is why do you need to enquire the number of threads and the queue depth? Is this for some kind of a monitoring tool?
Application processes should not enquire about the queue depth but service the queue until it is empty (RC=2033)
Enjoy  _________________ MQ & Broker admin |
|
Back to top |
|
 |
chandana06 |
Posted: Sat Jan 28, 2006 6:27 am Post subject: |
|
|
Apprentice
Joined: 26 Jan 2006 Posts: 32
|
Hi
it is for a monitoring tool
fjb_saper wrote:
Application processes should not enquire about the queue depth but service the queue until it is empty (RC=2033)
i did not understand this.
i have a program which processes the queue. I am enabling multithreading for this processing. i have another program which shows me the number of threads running on this queue.
will this gime problems you are speaking about. _________________ Regards,
Chandana |
|
Back to top |
|
 |
jefflowrey |
Posted: Sat Jan 28, 2006 10:10 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Instead of asking MQ how many threads your program has opened on a particular queue, why not have your program write this information out yourself?
In general, no, using MQINQ is not going to cause problems. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
|