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 IndexUser ExitsMQChlCli msg exit compiling issues

Post new topicReply to topic
MQChlCli msg exit compiling issues View previous topic :: View next topic
Author Message
WBIMaestro
PostPosted: Thu Jul 27, 2017 1:12 pm Post subject: MQChlCli msg exit compiling issues Reply with quote

Acolyte

Joined: 18 Feb 2005
Posts: 53

Hi,

I am trying to compile the MQChlCli message exit from the capitalware website http://capitalware.com/pc_win_code_c.html on RHEL 6 and MQ 8.0.4. I used the compile options from the IBM Knowledge center for 64 bit linux:


Code:
gcc -m64 -shared -fPIC -o mqchlcli mqchlcli.c -I/opt/mqm/inc


but I get an error indicating architecture of the exit library does not match the process's architecture which is '64'. what am i doing wrong?

Also, can the same exit be used as a RCVEXIT instead of a MSGEXIT (since RCVEXIT) is valid for a wider range of channel types), If not, what needs to change in a RCVEXIT?

can a RCVEXIT/MSGEXIT update fields in the mqmd? any other msgexit or rcvexit I can look at as a sample?


thanks
Back to top
View user's profile Send private message
PaulClarke
PostPosted: Thu Jul 27, 2017 3:30 pm Post subject: Reply with quote

Sentinel

Joined: 17 Nov 2005
Posts: 835
Location: New Zealand

Can't help you with the building problem, I suspect Roger will reply sooner or later. However, your question about Receive exits. No, you can not use a Message Exit as a Receive Exit. They are two different types of exit. The concept is similar but the values passed to the exit is different. Where as the Message Exit is passed the whole message and MQMD a Receive Exit isn't. A Receive Exit is just passed the bytes that come down the socket 'asis'. So, for example, if you are using something like SSL/TLS then the data would be encrypted anyway.

Cheers,
Paul.
_________________
Paul Clarke
MQGem Software
www.mqgem.com
Back to top
View user's profile Send private message Visit poster's website
WBIMaestro
PostPosted: Thu Jul 27, 2017 4:06 pm Post subject: Reply with quote

Acolyte

Joined: 18 Feb 2005
Posts: 53

What would be the equivalent of a message exit in the case of client connection channel? Scyexit seems to be the only other choice...
Back to top
View user's profile Send private message
PaulClarke
PostPosted: Thu Jul 27, 2017 4:12 pm Post subject: Reply with quote

Sentinel

Joined: 17 Nov 2005
Posts: 835
Location: New Zealand

There isn't an equivalent. Your best bet is to use an API Crossing exit.

Cheers,
Paul.
_________________
Paul Clarke
MQGem Software
www.mqgem.com
Back to top
View user's profile Send private message Visit poster's website
fjb_saper
PostPosted: Thu Jul 27, 2017 9:27 pm Post subject: Reply with quote

Grand Poobah

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

And please remember to look up the right compilation commands.
Exits cannot be compiled with the same commands as regular programs.
You need the REENTRANT key word and potential thread safety parameters and and and ....

Have fun
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
hughson
PostPosted: Sat Jul 29, 2017 6:05 pm Post subject: Re: MQChlCli msg exit compiling issues Reply with quote

Shaman

Joined: 09 May 2013
Posts: 703
Location: Bay of Plenty, New Zealand

WBIMaestro wrote:
I am trying to compile the MQChlCli message exit from the capitalware website http://capitalware.com/pc_win_code_c.html on RHEL 6 and MQ 8.0.4. I used the compile options from the IBM Knowledge center for 64 bit linux:


Code:
gcc -m64 -shared -fPIC -o mqchlcli mqchlcli.c -I/opt/mqm/inc


but I get an error indicating architecture of the exit library does not match the process's architecture which is '64'. what am i doing wrong?

Can you post the actual error you get?

Cheers,
Morag
_________________
Morag Hughson @MoragHughson
IBM MQ Technical Education Specialist
MQGem Software
Back to top
View user's profile Send private message Visit poster's website
RogerLacroix
PostPosted: Mon Jul 31, 2017 10:18 am Post subject: Re: MQChlCli msg exit compiling issues Reply with quote

Jedi Knight

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

Please read my warning comments here (another post on mqseries.net).

WBIMaestro wrote:
Code:
gcc -m64 -shared -fPIC -o mqchlcli mqchlcli.c -I/opt/mqm/inc

That command looks correct - what was the exact error message?

WBIMaestro wrote:
can the same exit be used as a RCVEXIT instead of a MSGEXIT (since RCVEXIT) is valid for a wider range of channel types), If not, what needs to change in a RCVEXIT?

Yes and no. The 'mqchlcli.c' program is a template that can be used to create either send/receive exits or message exit.

- The ExitId of MQCXP will tell the exit what type (send/receive/message) of exit is being invoke.

- ChannelType of MQCD will tell the exit the type of channel (SVRCONN).

- When the exit is invoke with an ExitReason (MQCXP) of MQXR_XMIT then the exit is receiving a message segment (TSH) of up to 32KB of data (the 1st segment will have the MQMD). Note: TSH segments are NOT documented.

- When the exit is invoke with an ExitReason (MQCXP) of MQXR_MSG then the exit is receiving the entire message payload which includes the MQMD.

WBIMaestro wrote:
can a RCVEXIT/MSGEXIT update fields in the mqmd? any other msgexit or rcvexit I can look at as a sample?

Yes, but it is extremely difficult for a send/receive. Not as difficult for a message exit. What field are you trying to modify? Wouldn't it be easier for the application to do this?

Regards,
Roger Lacroix
Capitalware Inc.
_________________
Capitalware: Transforming tomorrow into today.
Connected to MQ!
Twitter
Back to top
View user's profile Send private message Visit poster's website
Vitor
PostPosted: Mon Jul 31, 2017 11:35 am Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 24391
Location: Ohio, USA

I've said it before and I'll say it again - if the answer's a user exit, there's a good chance you're asking the wrong question.

Much better to have this done in the application, or anywhere other than an exit.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
Display posts from previous:
Post new topicReply to topic Page 1 of 1

MQSeries.net Forum IndexUser ExitsMQChlCli msg exit compiling issues
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.