ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » General Discussion » Regarding MQPMO_NEW_MSG_ID and MQPMO_NEW_CORREL_ID

Post new topic  Reply to topic
 Regarding MQPMO_NEW_MSG_ID and MQPMO_NEW_CORREL_ID « View previous topic :: View next topic » 
Author Message
rajesh_manas
PostPosted: Thu Jun 08, 2006 1:46 pm    Post subject: Regarding MQPMO_NEW_MSG_ID and MQPMO_NEW_CORREL_ID Reply with quote

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
View user's profile Send private message
jefflowrey
PostPosted: Thu Jun 08, 2006 2:07 pm    Post subject: Reply with quote

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
View user's profile Send private message
rajesh_manas
PostPosted: Thu Jun 08, 2006 2:15 pm    Post subject: Reply with quote

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
View user's profile Send private message
jefflowrey
PostPosted: Thu Jun 08, 2006 2:17 pm    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

MQPMO_NEW_MSG_ID and MQPMO_NEW_CORREL_ID are constants

http://publib.boulder.ibm.com/infocenter/wmqv6/v6r0/index.jsp?topic=/com.ibm.mq.csqzaq.doc/csqzaq00.htm

That means that they are not variables, but placeholders for actual values.

So when you use the '+' sign, you are adding the values together.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
rajesh_manas
PostPosted: Thu Jun 08, 2006 2:25 pm    Post subject: Reply with quote

Novice

Joined: 25 Apr 2006
Posts: 15

jefflowrey wrote:
MQPMO_NEW_MSG_ID and MQPMO_NEW_CORREL_ID are constants

http://publib.boulder.ibm.com/infocenter/wmqv6/v6r0/index.jsp?topic=/com.ibm.mq.csqzaq.doc/csqzaq00.htm

That means that they are not variables, but placeholders for actual values.

So when you use the '+' sign, you are adding the values together.


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
View user's profile Send private message
jefflowrey
PostPosted: Thu Jun 08, 2006 2:31 pm    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

What language is this?

Maybe you need to use a Bit Or operation instead of an add operation.

http://publib.boulder.ibm.com/infocenter/wmqv6/v6r0/index.jsp?topic=/com.ibm.mq.csqzak.doc/js01791.htm
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
rajesh_manas
PostPosted: Thu Jun 08, 2006 2:37 pm    Post subject: Reply with quote

Novice

Joined: 25 Apr 2006
Posts: 15

jefflowrey wrote:
What language is this?

Maybe you need to use a Bit Or operation instead of an add operation.

http://publib.boulder.ibm.com/infocenter/wmqv6/v6r0/index.jsp?topic=/com.ibm.mq.csqzak.doc/js01791.htm


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
View user's profile Send private message
fjb_saper
PostPosted: Thu Jun 08, 2006 2:45 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
jefflowrey
PostPosted: Thu Jun 08, 2006 2:46 pm    Post subject: Reply with quote

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
View user's profile Send private message
elvis_gn
PostPosted: Thu Jun 08, 2006 7:54 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » General Discussion » Regarding MQPMO_NEW_MSG_ID and MQPMO_NEW_CORREL_ID
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.