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 » C/C++ atoi instruction re channel convert setting

Post new topic  Reply to topic
 C/C++ atoi instruction re channel convert setting « View previous topic :: View next topic » 
Author Message
carrc99
PostPosted: Thu Sep 25, 2003 4:01 pm    Post subject: C/C++ atoi instruction re channel convert setting Reply with quote

Newbie

Joined: 25 Sep 2003
Posts: 1

Environment: Unix box connected via MQ to iSeries at V5R2 with MQ at V5.3.
Scenario: Unix box sends message to iSeries where a C/C++ program invokes an MQGET. An atoi instruction is then executed to convert a field in the incoming message to an integer.

If the CONVERT parameter on the sender channel on the Unix side is set to YES, the atoi instruction works properly; if set to NO, the instruction does not work.

Whichever way the CONVERT parameter on the sender channel on the Unix side is set, the message on the iSeries queue is always displayed in EBCDIC.

Question: What does the CONVERT parameter actually do?
Back to top
View user's profile Send private message
EddieA
PostPosted: Thu Sep 25, 2003 4:40 pm    Post subject: Reply with quote

Jedi

Joined: 28 Jun 2001
Posts: 2453
Location: Los Angeles

The CONVERT option forces the sending channel MCA to convert the message from it's current CCSID and Encoding to the CCSID and Encoding of the receiving Queue Manager. How this is done depends on the Format field in the MQMD.

If it is MQSTR, then MQ assumes that the message payload is all characters, and translates accordingly. If it is some other value, then MQ looks for a Conversion Exit of the same name as the Format to do the conversion.

From the fact that your atoi works when CONVERT is specified implies that it has done the job and converted the ASCII to EBCDIC. Without convert, you will be feeding ASCII characters, when they should be EBCDIC. Assuming that the application doesn't do a GET with CONVERT.

What are you using to view the message on the iSeries. Could it be that whatever you are using is doing a GET with CONVERT, and so you would always see EBCDIC even if the channel didn't do a convert.

Just out of interest, why are you converting in the Channel, rather than a GET with CONVERT at the receiving application.

Cheers,
_________________
Eddie Atherton
IBM Certified Solution Developer - WebSphere Message Broker V6.1
IBM Certified Solution Developer - WebSphere Message Broker V7.0
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » General Discussion » C/C++ atoi instruction re channel convert setting
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.