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 conversion through ESQL!!!

Post new topic  Reply to topic
 EBCDIC conversion through ESQL!!! « View previous topic :: View next topic » 
Author Message
cute_pav
PostPosted: Mon Oct 07, 2002 5:37 am    Post subject: EBCDIC conversion through ESQL!!! Reply with quote

Acolyte

Joined: 04 Jan 2002
Posts: 65
Location: usa

HI,

My message flow gets the input from OS/390 (EBCDIC) and my MQSI broker is on Solaris and sending output to OS/390(EBCDIC). Input I am getting as some special character that I need to check in ESQL for transformation.Can any one know how can I do using ESQL?.

I am not doing any Conversion in Broker as I am sending to OS/390.

Input source people says they are sending hex FF (in EBCDIC).I would like to know how can I check in ESQL code for this character? Any kind of help is appreciated.

pavan
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger MSN Messenger
cute_pav
PostPosted: Mon Oct 07, 2002 8:02 am    Post subject: Reply with quote

Acolyte

Joined: 04 Jan 2002
Posts: 65
Location: usa

Again with reference to EBCDIC conversion....

When I saved the input message in my solaris system in vi editor I could see the special char as '\237'.Anyone knows how could I check this element through ESQL?

pavan
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger MSN Messenger
kirani
PostPosted: Mon Oct 07, 2002 8:13 am    Post subject: Reply with quote

Jedi Knight

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

Pavan,

Which parser are you applying to your input data? What is the field-type that contains value x'FF'. Do you need to compare this field with some String/Integer/HEx value?
_________________
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
cute_pav
PostPosted: Mon Oct 07, 2002 8:19 am    Post subject: Reply with quote

Acolyte

Joined: 04 Jan 2002
Posts: 65
Location: usa

Hi kiran,

thanks for your reply.As I was saying I am taking input message from os/390 ie EBCDIC. I am just taking as it is using MRM (CWF format). When I save this input message the element contains \237 as one char.
I prefer to check this char in ESQL for my translation.do you have any thoughts that I could check this element in ESQL?.
additional info: when I ask for mainframe people(input source) they says its an X'FF and sending through their system.

thanks for any help...

pavan
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger MSN Messenger
kirani
PostPosted: Mon Oct 07, 2002 8:30 am    Post subject: Reply with quote

Jedi Knight

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

Pavan,

Pl provide more details on this statement [u]"When I save this input message the element contains \237 as one char." [/b]
What do you mean by "Save this input message"? Are you storing it into Database?

You said, you are parsing input message using MRM-CWF format, so what is your field type defined into MRM Message Set?
_________________
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
cute_pav
PostPosted: Mon Oct 07, 2002 8:35 am    Post subject: Reply with quote

Acolyte

Joined: 04 Jan 2002
Posts: 65
Location: usa

Hi kiran,

I am using MRM parser and the element type is string.I want to some how need to compare that special value in ESQL to process the rest of my element.
The element length has 11chars out of which 10th and 11th elements contains this spl value.I would like to chech these elements atleast one char. any help is appreciated.

pavan
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger MSN Messenger
kirani
PostPosted: Mon Oct 07, 2002 8:42 am    Post subject: Reply with quote

Jedi Knight

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

Pavan,

You will have to modify this code to work with your example, but this is how you would do it,
Code:

DECLARE HEXCHARVAL CHAR;
SET HEXCHARVAL = CAST(X'FFFF' AS CHAR CCSID InputRoot.Properties.CodedCharSetId);

IF ( SUBSTRING(InputRoot.MRM.FieldName FROM 10 FOR 2) = HEXCHARVAL) THEN
-- Do your processing for special char here.
END IF;

_________________
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
cute_pav
PostPosted: Mon Oct 07, 2002 8:42 am    Post subject: Reply with quote

Acolyte

Joined: 04 Jan 2002
Posts: 65
Location: usa

hi, kiran,
I saved input message from input queue by with mqget code and saved in file using vi editor(just to check what they are sending to my system(solaris).

eg of element looks like :

01\237\237\237\237\237\237\237\237\237\237\237\237\237\23708.

\237 is special char that I could see in vi editor as single char.I would like to compare 10th position char.

pavan
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger MSN Messenger
cute_pav
PostPosted: Mon Oct 07, 2002 12:48 pm    Post subject: Reply with quote

Acolyte

Joined: 04 Jan 2002
Posts: 65
Location: usa

Hi, Kiran,

When I tried saving input message on Solaris the line of message contains '\237'.Do you know what exactly it has been converted into.I tried reusing this message with your code but it never works out as I am not sure exactly what hex code equivalent for '\237'. appreciate any thoughts.

pavan
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger MSN Messenger
kirani
PostPosted: Mon Oct 07, 2002 7:42 pm    Post subject: Reply with quote

Jedi Knight

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

Pavan,

This is not the correct way to check the HEX values. Pl use MQSeries Explorer or some other tool, which shows HEX values in corresponding MQMD.CCSID charset and NOT using native CCSID. Your program is displaying HEX values in native (solaris) charset, that's why you are seeing \237 "special char" in your file.

If you want to verify hex values of your input message, read your input message as BLOB and then print ${Root} in a Trace node, configure the node to write to some file. This will print your message in HEX values. This way you can verify whether you are getting correct HEX values or not.

I hope this helps!
_________________
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
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » EBCDIC conversion through ESQL!!!
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.