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 » IBM MQ API Support » Message Exit looking for some help, warning: C layman...

Post new topic  Reply to topic
 Message Exit looking for some help, warning: C layman... « View previous topic :: View next topic » 
Author Message
Michael Dag
PostPosted: Wed Dec 22, 2004 5:22 am    Post subject: Message Exit looking for some help, warning: C layman... Reply with quote

Jedi Knight

Joined: 13 Jun 2002
Posts: 2607
Location: The Netherlands (Amsterdam)

posting as a seperate question and not as a response to another similar post this time...

I have been able to get some samples working and am able to substitute character data in the MQMD using a C Message Exit:

Code:
memcpy((PMQMD)((PMQXQH)(AgentBuffer))->MsgDesc.Format , MQFMT_STRING , MQ_FORMAT_LENGTH);


knowing very little of C, to replace an MQLONG or MQBYTE value properly like resetting the MsgType or Persistance for that matter

what would I need to do to set the MsgType from DATAGRAM to REQUEST:

Code:
memcpy((PMQMD)((PMQXQH)(AgentBuffer))->MsgDesc.MsgType , MQMT_REQUEST , sizeof(MQLONG));


does not work as everytime the exit blows up, removing this line everything works... but then the MsgType is not set to REQUEST...

I know I am doing something wrong, so looking for some help...
_________________
Michael



MQSystems Facebook page
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
clindsey
PostPosted: Wed Dec 22, 2004 5:38 am    Post subject: Reply with quote

Knight

Joined: 12 Jul 2002
Posts: 586
Location: Dallas, Tx

Michael,

For MQLONG and MQBYTE, just do an assignment.

(PMQMD)((PMQXQH)(AgentBuffer))->MsgDesc.MsgType = MQMT_REQUEST ;

Charlie
Back to top
View user's profile Send private message
Michael Dag
PostPosted: Wed Dec 22, 2004 6:05 am    Post subject: Reply with quote

Jedi Knight

Joined: 13 Jun 2002
Posts: 2607
Location: The Netherlands (Amsterdam)

that worked. Thank you!!!
_________________
Michael



MQSystems Facebook page
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ API Support » Message Exit looking for some help, warning: C layman...
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.