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

Post new topic  Reply to topic
 EBCDIC to ASCII « View previous topic :: View next topic » 
Author Message
megani
PostPosted: Tue Jun 03, 2003 9:54 am    Post subject: EBCDIC to ASCII Reply with quote

Apprentice

Joined: 19 Dec 2001
Posts: 27

Hello, I'm using WMQI 2.1. I am try to take an EBCDIC blob from the mainframe and cast it to ASCII.

I have been using the statement
Set OutputRoot.XML.Message.COmmand = CAST (InputRoot.BLOB.BLOB as CHAR CCSID 437).

This is taking the X'40' ebcdic spaces and converting to @ signs. The @ sign is X'40' in ASCII, but I want it to be X'20' spaces in ASCII. I'd appreciate any input on this.

Thank you
Back to top
View user's profile Send private message
shalabh1976
PostPosted: Tue Jun 03, 2003 11:50 am    Post subject: Reply with quote

Partisan

Joined: 18 Jul 2002
Posts: 381
Location: Gurgaon, India

I don't know your exact environment but I'll describe mine:
The Broker is on S390 and the data returned is in EBCDIC but we want to view the output in ASCII (as it should be readable).
So in the input queue itself we specify the Encoding to 546 and CCSID to 437 and it works fine.
Actually the bitstream itself will remain unchanged so if you want to convert X'40' to X'20' then you must code it.


Last edited by shalabh1976 on Wed Jun 04, 2003 4:26 am; edited 1 time in total
Back to top
View user's profile Send private message Yahoo Messenger MSN Messenger
kirani
PostPosted: Tue Jun 03, 2003 4:34 pm    Post subject: Reply with quote

Jedi Knight

Joined: 05 Sep 2001
Posts: 3779
Location: Torrance, CA, USA

well .. you are missing 2 lines of code here ...

Code:

SET OutputRoot.Properties.CodedCharSetId = 437;
SET OutputRoot.Properties.Encoding = 546;

_________________
Kiran


IBM Cert. Solution Designer & System Administrator - WBIMB V5
IBM Cert. Solutions Expert - WMQI
IBM Cert. Specialist - WMQI, MQSeries
IBM Cert. Developer - MQSeries

Back to top
View user's profile Send private message Visit poster's website
warrenpage
PostPosted: Tue Jun 03, 2003 8:38 pm    Post subject: Cant convert blobs inside WMQI Reply with quote

Acolyte

Joined: 19 Feb 2002
Posts: 56
Location: Australia

I had the same problem. You can do conversions

1. At the input queue - if the MQFMT = MQSTR, then you can have the input converted to Ascii there.. Look at the parameters in the input node.

2. Writing MRM/XML to an output queue - as per Kiranis note above - if you specify a Char set it will convert the current data into that Charset.

I could never get it to work for BLOBS.

I ended up writing my own Java node to do this for BLOBS. using some code like this

public static void convertetoa (InputStream in, OutputStream out) {
try {
//output file in ebcdic from unicode
InputStreamReader inputReader = new InputStreamReader(in,"Cp500");
OutputStreamWriter outWriter = new OutputStreamWriter(out,"Cp1252");

int c;
while ((c = inputReader.read()) >= 0)
outWriter.write(c);

inputReader.close();
outWriter.close();
}
catch (Exception e) { e.printStackTrace(); }
}
Back to top
View user's profile Send private message Yahoo Messenger MSN Messenger
shalabh1976
PostPosted: Wed Jun 04, 2003 4:40 pm    Post subject: Reply with quote

Partisan

Joined: 18 Jul 2002
Posts: 381
Location: Gurgaon, India

Warren,
My Input is in BLOB and the output is in XML (EBCDIC to ASCII)
and using the convert options on the MQinput node to 437 and 546 for encoding worked for me.
Back to top
View user's profile Send private message Yahoo Messenger MSN Messenger
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » EBCDIC to ASCII
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.