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 » MQGET trouble with assigning MSGID

Post new topic  Reply to topic
 MQGET trouble with assigning MSGID « View previous topic :: View next topic » 
Author Message
mq_fish
PostPosted: Mon Aug 16, 2004 11:43 am    Post subject: MQGET trouble with assigning MSGID Reply with quote

Newbie

Joined: 16 Aug 2004
Posts: 2

I am working on a Client (PowerBuilder)/Server (Mainframe PL/I) application. I am having some difficulty assigning the message id using a variable into MD.MSGID. Here's a quick overview of what I'm trying to accomplish:

1) Powerbuilder is putting an asynchronous message to a LAN Remote Queue -> Local Mainframe Queue. The message id (MSG_ID) is retrieved after the PUT. This message id is a 48 character string. e.g. 414D51204D5153443120202020202020CE361F4120007711

2) Powerbuilder will then send a smaller message (containing message id MSG_ID, etc.) to fire the mainframe MQ tran. I am reading the MSG_ID into a local variable declared as follows:
Code:
MESSAGE_ID CHAR(48) INIT('');


3) When the tran executes on the mainframe, it needs to go to the Mainframe local queue to pick up the large message. It needs to use the correct message id (i.e. MESSAGE_ID) to know which message to pick up from the Mainframe queue.

Setting MD.MSGID = MQMI_NONE will get back the first message it finds, which may be the wrong one.

If I assign (hardcode) the 48 character MSG_ID into MD.MSGID, with a Hex conversion character 'X', I am able to retrieve the correct message. e.g. MD.MSGID = '414D51204D5153443120202020202020CE361F4120007711'X. But, since the MSG_ID will be different every time, I need to assign a variable (i.e. MESSAGE_ID) into MD.MSGID.

Any suggestions/advice provided is greatly appreciated. Thanks in advance.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Tue Aug 17, 2004 5:05 am    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

Your problem is defining your message ID as a STRING.

Message Id is a byte array and contains hex values including those which could normally mark the end of a string.

Your system is correctly protesting that you are trying to assign values beyond the end of string marker.

Define your variable as being a hex value. Each hex value is represented by its value string (0-F)

Enjoy
Back to top
View user's profile Send private message Send e-mail
mq_fish
PostPosted: Tue Aug 17, 2004 1:00 pm    Post subject: Reply with quote

Newbie

Joined: 16 Aug 2004
Posts: 2

Thanks for the info, I appreciate it.

I've tried declaring MESSAGE_ID as a Bit variable, but with no luck. Any ideas on how to define MESSAGE_ID as a Hex value in PL/I?

Thanks.
Back to top
View user's profile Send private message
RogerLacroix
PostPosted: Tue Aug 17, 2004 8:35 pm    Post subject: Reply with quote

Jedi Knight

Joined: 15 May 2001
Posts: 3264
Location: London, ON Canada

Dude,

IBM includes PL/I samples when you install MQ Server and the toolkit.

On the mainframe, dataset naming standard is *.*.SCSQPLIC and *.*.SCSQPLIS .

If you had a peek, you would notice that MsgID & CorrelID are defined with char(24).

Regards,
Roger Lacroix
_________________
Capitalware: Transforming tomorrow into today.
Connected to MQ!
Twitter
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » General Discussion » MQGET trouble with assigning MSGID
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.