Author |
Message
|
rajesh_manas |
Posted: Thu Jun 08, 2006 1:46 pm Post subject: Regarding MQPMO_NEW_MSG_ID and MQPMO_NEW_CORREL_ID |
|
|
Novice
Joined: 25 Apr 2006 Posts: 15
|
Hi All,
I am assuming as below
MQMD.MSGID = MQPMO_NEW_MSG_ID
MQMD.CORRELID = MQPMO_NEW_CORREL_ID
Say MQPMO_NEW_MSG_ID = 64 and MQPMO_NEW_CORREL_ID = 128 as initial values
Now i am issuing a MQPUT call, As per the MQ , The Queue manager has to created new MSGID and new CORRELID.
But when i seen the values of MQPMO_NEW_MSG_ID and MQPMO_NEW_CORREL_ID the values are same (64 and 128) for all the records.
I thought for each record an unique MSGID and unique CORRELID will be created, But the result is not as expected.
Could anyone please help me.
Regards,
Rajesh |
|
Back to top |
|
 |
jefflowrey |
Posted: Thu Jun 08, 2006 2:07 pm Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
contact admin wrote: |
I am assuming as below
MQMD.MSGID = MQPMO_NEW_MSG_ID
MQMD.CORRELID = MQPMO_NEW_CORREL_ID |
But that's wrong.
Code: |
MQMD.MsgId = MQMI_NONE
MQMD.CorrelId = MQMI_NONE
MQPMO.Options=MQPMO_NEW_MSG_ID + MQPMO_NEW_CORREL_ID
MQPUT(HCONN, HOBJ, MQMD, MQPMO, .... |
_________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
rajesh_manas |
Posted: Thu Jun 08, 2006 2:15 pm Post subject: |
|
|
Novice
Joined: 25 Apr 2006 Posts: 15
|
jefflowrey wrote: |
contact admin wrote: |
I am assuming as below
MQMD.MSGID = MQPMO_NEW_MSG_ID
MQMD.CORRELID = MQPMO_NEW_CORREL_ID |
But that's wrong.
Code: |
MQMD.MsgId = MQMI_NONE
MQMD.CorrelId = MQMI_NONE
MQPMO.Options=MQPMO_NEW_MSG_ID + MQPMO_NEW_CORREL_ID
MQPUT(HCONN, HOBJ, MQMD, MQPMO, .... |
|
Hi,
Thanks for the reply
you mentioned
MQPMO.Options=MQPMO_NEW_MSG_ID + MQPMO_NEW_CORREL_ID
But MQPMO.Options is BIN FIXED(31,0) variable....How can we pass
three variable values ?
The structure fir MQPMO is as below
/* MQPMO Structure -- Put Message Options
DCL
1 MQPMO BASED,
3 STRUCID CHAR(4)
INIT('PMO '), /* Structure identifier */
3 VERSION FIXED BIN(31)
INIT(1), /* Structure version number */
3 OPTIONS FIXED BIN(31)
L/I OPTIMIZING COMPILER MQLOAD: PROC OPTIONS(MAIN) REORDER;
INIT(0), /* Options that control the action of
MQPUT and MQPUT1 */
Please let me know is there any chance of giving all the three options in a single statement
Regards,
Rajesh |
|
Back to top |
|
 |
jefflowrey |
Posted: Thu Jun 08, 2006 2:17 pm Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
|
Back to top |
|
 |
rajesh_manas |
Posted: Thu Jun 08, 2006 2:25 pm Post subject: |
|
|
Novice
Joined: 25 Apr 2006 Posts: 15
|
Hi ,
I did the way you suggested as below
LOCAL_MQPMO.OPTIONS = PARAM_IN.PUT_OPTIONS +
MQPMO_NEW_MSG_ID +
MQPMO_NEW_CORREL_ID;
PARAM_IN.PUT_OPTIONS is the value contains 000002 whcih defines MQPMO_SYNCPOINT
But i got an error code as below
2046 (X'07FE') MQRC_OPTIONS_ERROR
Explanation: The Options parameter or field contains
options that are not valid, or a combination of options
that is not valid.
Could you please help me.
Regards,
Rajesh |
|
Back to top |
|
 |
jefflowrey |
Posted: Thu Jun 08, 2006 2:31 pm Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
|
Back to top |
|
 |
rajesh_manas |
Posted: Thu Jun 08, 2006 2:37 pm Post subject: |
|
|
Novice
Joined: 25 Apr 2006 Posts: 15
|
Hi,
The language is PL1
I have one doubt here,
the constant values defined are as
MQPMO_SYNCPOINT = 000002
MQPMO_NEW_MSG_ID = 000064
MQPMO_NEW_CORREL_ID = 000128
Now i need all the above three options for my MQPUT
The MQPMO.OPTIONS will be given as 000002 + 000064 + 0000128
So the MQPMO.OPTIONS will have 194
How MQ will get the info to perform the above three options by looking at 194?
Please help me
Regards,
Rajesh |
|
Back to top |
|
 |
fjb_saper |
Posted: Thu Jun 08, 2006 2:45 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
You have to look at the options as a bit array. The value of each bit sets a flag on or off. This is why you use a bit OR operation.
Enjoy  _________________ MQ & Broker admin |
|
Back to top |
|
 |
jefflowrey |
Posted: Thu Jun 08, 2006 2:46 pm Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
I don't know PL1, so I can't help you with that.
The MQPMO options are stored and retrieved using normal binary mathematics. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
elvis_gn |
Posted: Thu Jun 08, 2006 7:54 pm Post subject: |
|
|
 Padawan
Joined: 08 Oct 2004 Posts: 1905 Location: Dubai
|
Hi contact admin,
contact admin wrote: |
Hi ,
I did the way you suggested as below
LOCAL_MQPMO.OPTIONS = PARAM_IN.PUT_OPTIONS +
MQPMO_NEW_MSG_ID +
MQPMO_NEW_CORREL_ID;
PARAM_IN.PUT_OPTIONS is the value contains 000002 whcih defines MQPMO_SYNCPOINT
But i got an error code as below
2046 (X'07FE') MQRC_OPTIONS_ERROR |
These are the put message options...what have u given for the queue open options....u need to specify that the queue is open for put...
And Jeff, I have a doubt, what would be the difference if I used
Code: |
LOCAL_MQPMO.OPTIONS = PARAM_IN.PUT_OPTIONS || MQPMO_NEW_MSG_ID || MQPMO_NEW_CORREL_ID; |
Regards. |
|
Back to top |
|
 |
|