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 » Error converting ASCII to EBCDIC

Post new topic  Reply to topic
 Error converting ASCII to EBCDIC « View previous topic :: View next topic » 
Author Message
tony2nd
PostPosted: Fri Jul 08, 2016 11:58 am    Post subject: Error converting ASCII to EBCDIC Reply with quote

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
View user's profile Send private message
fjb_saper
PostPosted: Fri Jul 08, 2016 10:34 pm    Post subject: Re: Error converting ASCII to EBCDIC Reply with quote

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
View user's profile Send private message Send e-mail
tony2nd
PostPosted: Mon Jul 11, 2016 5:39 am    Post subject: Reply with quote

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
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 » WebSphere Message Broker (ACE) Support » Error converting ASCII to EBCDIC
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.