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 » convert a character into integer using ESQL

Post new topic  Reply to topic
 convert a character into integer using ESQL « View previous topic :: View next topic » 
Author Message
vickas
PostPosted: Wed Nov 13, 2013 3:49 am    Post subject: convert a character into integer using ESQL Reply with quote

Centurion

Joined: 18 Aug 2013
Posts: 126

Is it possible to convert a character into INTEGER ?
I have tried some scenarios ,one od them includes BLOB --> CHAR --> INT , even this didnt work ...
Is there any one who can help me out !!
Back to top
View user's profile Send private message
smdavies99
PostPosted: Wed Nov 13, 2013 4:02 am    Post subject: Reply with quote

Jedi Council

Joined: 10 Feb 2003
Posts: 6076
Location: Somewhere over the Rainbow this side of Never-never land.

Why don't you show us what you have tried?

I am assuming that you are checking the data before trying the conversion as well. You need to check that it contains only 0-9, +, -
Easy to do though.
_________________
WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995

Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions.
Back to top
View user's profile Send private message
dogorsy
PostPosted: Wed Nov 13, 2013 4:12 am    Post subject: Reply with quote

Knight

Joined: 13 Mar 2013
Posts: 553
Location: Home Office

Look up "Complex ESQL functions" in the infocenter
Back to top
View user's profile Send private message
vickas
PostPosted: Wed Nov 13, 2013 4:55 am    Post subject: Reply with quote

Centurion

Joined: 18 Aug 2013
Posts: 126

@ dogorsy , Am trying to display an ASCCI value of a character..
i.e i wanted to convert a charcter 'A' to its ascii value 65....
Is this scenario possible using ESQL in WMB ?
Back to top
View user's profile Send private message
dogorsy
PostPosted: Wed Nov 13, 2013 5:28 am    Post subject: Reply with quote

Knight

Joined: 13 Mar 2013
Posts: 553
Location: Home Office

vickas wrote:
@ dogorsy , Am trying to display an ASCCI value of a character..
i.e i wanted to convert a charcter 'A' to its ascii value 65....
Is this scenario possible using ESQL in WMB ?

Yes.
IF mychar = 'A' THEN
SET OutputRoot.XMLNSC.Test.Value = '65';
END IF;
Now, if you want something more complex, you will have to work out the logic yourself, or explain the requirement better.
Back to top
View user's profile Send private message
smdavies99
PostPosted: Wed Nov 13, 2013 5:53 am    Post subject: Reply with quote

Jedi Council

Joined: 10 Feb 2003
Posts: 6076
Location: Somewhere over the Rainbow this side of Never-never land.

vickas wrote:
@ dogorsy , Am trying to display an ASCCI value of a character..
i.e i wanted to convert a charcter 'A' to its ascii value 65....
Is this scenario possible using ESQL in WMB ?


Please be aware that internally Broker uses a multi-byte character set namely UNICODE. This is a long-long way from US-ASCII (don't get me started on 7-bit Ascii) or even the ISO-LATIN character sets.
What you see now might not be what you see in the future?
_________________
WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995

Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions.
Back to top
View user's profile Send private message
kimbert
PostPosted: Wed Nov 13, 2013 6:12 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Quote:
Am trying to display an ASCCI value of a character..
There is a reason why you want to do this. What is it?
_________________
Before you criticize someone, walk a mile in their shoes. That way you're a mile away, and you have their shoes too.
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 » convert a character into integer using 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.