Posted: Thu Oct 19, 2006 6:33 am Post subject: Maintain binary value on message
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.
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.
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