|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Error converting ASCII to EBCDIC |
« View previous topic :: View next topic » |
Author |
Message
|
tony2nd |
Posted: Fri Jul 08, 2016 11:58 am Post subject: Error converting ASCII to EBCDIC |
|
|
Novice
Joined: 07 Apr 2014 Posts: 17
|
Hello,
I am having a problem sending a message from WMB 7.0.0.8 to CICS on the mainframe.
This is the flow:
MQInput > Compute > CICSRequest > MQOutput
Input message:
0000MT02
after MQInput:
OutputRoot.BLOB.BLOB
303030304d543032 (ascii representation of 0000MT02)
Compute:
Code: |
SET OutputRoot.BLOB.BLOB = CAST(InputRoot.BLOB.BLOB as BLOB CCSID 500);
|
After Compute:
OutputRoot.BLOB.BLOB
303030304d543032 (I was hoping to see an EBCDIC representation of 0000MT02)
after CICSRequest
using debug, inside the program:
DFHCOMMAREA.
....(e..... (garbage, I was hoping to see 0000MT02)
after end of program:
OutputRoot.BLOB.BLOB
303030304d543032
Can you please help me?
Thanks,
Tony[/list][/code] |
|
Back to top |
|
 |
fjb_saper |
Posted: Fri Jul 08, 2016 10:34 pm Post subject: Re: Error converting ASCII to EBCDIC |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
tony2nd wrote: |
Hello,
I am having a problem sending a message from WMB 7.0.0.8 to CICS on the mainframe.
This is the flow:
MQInput > Compute > CICSRequest > MQOutput
Input message:
0000MT02
after MQInput:
OutputRoot.BLOB.BLOB
303030304d543032 (ascii representation of 0000MT02)
Compute:
Code: |
SET OutputRoot.BLOB.BLOB = CAST(InputRoot.BLOB.BLOB as BLOB CCSID 500);
|
After Compute:
OutputRoot.BLOB.BLOB
303030304d543032 (I was hoping to see an EBCDIC representation of 0000MT02)
after CICSRequest
using debug, inside the program:
DFHCOMMAREA.
....(e..... (garbage, I was hoping to see 0000MT02)
after end of program:
OutputRoot.BLOB.BLOB
303030304d543032
Can you please help me?
Thanks,
Tony[/list][/code] |
Well Tony your CAST is all wrong.
You need first to CAST from BLOB to CHAR using the proper CCSID
Then you can cast from Char to BLOB using CCSID 500
If your data is not all String, Do not cast to BLOB, but leave it in the message tree and set the OutputRoot.Properties.CodedCharSetId to 500 before the CICS request node...
Hope this helps... and by the way WMB 7.0.0.8 is out of (regular) support...  _________________ MQ & Broker admin |
|
Back to top |
|
 |
tony2nd |
Posted: Mon Jul 11, 2016 5:39 am Post subject: |
|
|
Novice
Joined: 07 Apr 2014 Posts: 17
|
Dear fjb_saper,
Thank you for your response, it worked:
Code: |
DECLARE CICSReqMsg BLOB;
DECLARE CICSReqChar CHARACTER;
DECLARE MsgOut BLOB;
DECLARE MsgOutChar CHARACTER;
SET CICSReqMsg = InputRoot.BLOB.BLOB;
SET CICSReqChar = CAST(CICSReqMsg AS CHARACTER CCSID 437);
SET MsgOut = CAST(CICSReqChar AS BLOB CCSID 500);
SET OutputRoot.BLOB.BLOB = MsgOut;
|
Due to having FTM installed we still have support to WMB 7.0. We are moving to IIB 9.0 next.
Tony |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
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
|
|
|
|