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 » WebSphere Message Broker (ACE) Support » Maintain binary value on message

Post new topic  Reply to topic
 Maintain binary value on message « View previous topic :: View next topic » 
Author Message
srailkar
PostPosted: Thu Oct 19, 2006 6:33 am    Post subject: Maintain binary value on message Reply with quote

Apprentice

Joined: 01 Jun 2005
Posts: 37

I have a situation where I need to use Broker ability to map data which is sent to Mainframe system as flat file. The few fields in this file needs to maintain binary attributes that is set in message CCSid (37).
In Short:
1. File sent to queue as message.
2. Message flow formates it, maps, use business rules and sent to OutQ.
3 Q program pulls data into file from the OutQ
4 FTP sends it out to Mainframe
Has anyone dealt with similar issue?

I have set the last compute node in the message flow to
SET OutputRoot.MQMD.CodedCharSetId = 37;
SET OutputRoot.MQMD.Encoding = 785;
DECLARE RECLEN1 CHAR CAST(CAST(X'01CA' AS BLOB) AS CHAR CCSID 37);
DECLARE RECLEN2 CHAR CAST(CAST(X'00' AS BLOB) AS CHAR CCSID 37);
DECLARE RECLEN3 CHAR CAST(CAST(X'0054' AS BLOB) AS CHAR CCSID 37);
SET OutputLocalEnvironment.Variables.XML.HOLD.RECL454 VALUE = RECLEN1;


When the file is recreated it is not maintaining X'01CA' in the field specified.

Thanks for your help.

SRailkar
Back to top
View user's profile Send private message Send e-mail
fjb_saper
PostPosted: Thu Oct 19, 2006 12:52 pm    Post subject: Reply with quote

Grand High Poobah

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

Looks like you have 1 cast too many.
When you CAST to BLOB you do not specify that you are only casting text.
You might as well be casting numbers... these cannot be cast again to char...

Cast the full message to BLOB.
Extract as a byte[] from the message and write to the file. Then do a binary type ftp to the MF.

Enjoy
_________________
MQ & Broker admin
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 » WebSphere Message Broker (ACE) Support » Maintain binary value on message
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.