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 » Finding the Ascii values for each alphabet in esql

Post new topic  Reply to topic Goto page 1, 2  Next
 Finding the Ascii values for each alphabet in esql « View previous topic :: View next topic » 
Author Message
balu2608
PostPosted: Tue Jan 08, 2013 9:11 am    Post subject: Finding the Ascii values for each alphabet in esql Reply with quote

Apprentice

Joined: 18 May 2012
Posts: 39

Hi All,

Can any one help me how can i find the ascii value of each and every alphabet in esql ,is their any function or i have to write any procedure,
my equirement is i will be getting some input values i have chek wheather the values coming in the fields are alphabet or not....

its an urgent requirement ....

thanks in advance...
Back to top
View user's profile Send private message
mqjeff
PostPosted: Tue Jan 08, 2013 9:14 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

ESQL knows nothing about alphabets.

ESQL only works with CHARACTER data types that are in a specific codepage, CCSID 1200.

An alphabet is not remotely the same thing as a codepage. A code page maps from a set of binary values into characters that belong to an alphabet.
Back to top
View user's profile Send private message
balu2608
PostPosted: Tue Jan 08, 2013 9:18 am    Post subject: Reply with quote

Apprentice

Joined: 18 May 2012
Posts: 39

I think we can find the ascii value of the particular alphabet coming and we can ty....
Back to top
View user's profile Send private message
lancelotlinc
PostPosted: Tue Jan 08, 2013 9:28 am    Post subject: Reply with quote

Jedi Knight

Joined: 22 Mar 2010
Posts: 4941
Location: Bloomington, IL USA

balu2608 wrote:
I think we can find the ascii value of the particular alphabet coming and we can ty....


The mapping node may help you.
_________________
http://leanpub.com/IIB_Tips_and_Tricks
Save $20: Coupon Code: MQSERIES_READER
Back to top
View user's profile Send private message Send e-mail
balu2608
PostPosted: Tue Jan 08, 2013 9:30 am    Post subject: Reply with quote

Apprentice

Joined: 18 May 2012
Posts: 39

Can you explain me brefly how can i use he mapping node or is their any procedure for finding ascii value of the particular alphabet in esql code
Back to top
View user's profile Send private message
McueMart
PostPosted: Tue Jan 08, 2013 9:41 am    Post subject: Reply with quote

Chevalier

Joined: 29 Nov 2011
Posts: 490
Location: UK...somewhere

After reading your first post 3 times im still not 100% sure what you are asking. So im going to take a stab in the dark:

Do you have an input message field such as:

<InputField>ABCDEFGHIJ</InputField>

And you need to test if this is made up of only Alphabetic characters (i.e. a-z A-Z) ?

(Im also thrown by the forum that this is posted to, 'Mainframe, CICS, TXSeries')
Back to top
View user's profile Send private message
balu2608
PostPosted: Tue Jan 08, 2013 9:44 am    Post subject: And you need to test if this is made up of only Alphabetic c Reply with quote

Apprentice

Joined: 18 May 2012
Posts: 39

Hi McueMart,

Yes ur right ....can you help me...
Back to top
View user's profile Send private message
McueMart
PostPosted: Tue Jan 08, 2013 9:51 am    Post subject: Reply with quote

Chevalier

Joined: 29 Nov 2011
Posts: 490
Location: UK...somewhere

Well normally I would tell you to go and try some things yourself, but its late in the day so I think something like this should work.

Code:


IF LENGTH(TRANSLATE(InputString,'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ')) > 0 THEN

-- STRING CONTAINS NON-ALPHABETIC CHARACTERS

END IF;



This is just one way of doing it and there may well be other better ways!
Back to top
View user's profile Send private message
balu2608
PostPosted: Tue Jan 08, 2013 9:55 am    Post subject: This is just one way of doing it and there may well be other Reply with quote

Apprentice

Joined: 18 May 2012
Posts: 39

Thanks McueMart,

i will try with this ,but Can you suggest me the other ways also...
Back to top
View user's profile Send private message
Vitor
PostPosted: Tue Jan 08, 2013 10:00 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

McueMart wrote:
(Im also thrown by the forum that this is posted to, 'Mainframe, CICS, TXSeries')


Moved on the assumption the OP plumped for the first section his mouse went over.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
mqjeff
PostPosted: Tue Jan 08, 2013 10:03 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

I would typically replace all characters that ARE alphabet characters with a null character and then check the length of the resulting string.

Except, in Broker, I would actually convince the message model to do this validation for me and then make sure the flow asks for the parser to validate the contents and the values.
Back to top
View user's profile Send private message
lancelotlinc
PostPosted: Tue Jan 08, 2013 10:09 am    Post subject: Reply with quote

Jedi Knight

Joined: 22 Mar 2010
Posts: 4941
Location: Bloomington, IL USA

balu2608 wrote:
Can you explain me brefly how can i use he mapping node or is their any procedure for finding ascii value of the particular alphabet in esql code


Why not give the mapping node a spin and see?
_________________
http://leanpub.com/IIB_Tips_and_Tricks
Save $20: Coupon Code: MQSERIES_READER
Back to top
View user's profile Send private message Send e-mail
balu2608
PostPosted: Tue Jan 08, 2013 9:53 pm    Post subject: Reply with quote

Apprentice

Joined: 18 May 2012
Posts: 39

Good morning all is their any solution for this.....
Back to top
View user's profile Send private message
smdavies99
PostPosted: Tue Jan 08, 2013 11:34 pm    Post subject: Reply with quote

Jedi Council

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

As has been stated the actual byte values for a character depend upon the CCSID/Codepage under which thewy were encoded.

ASCII = American Society for Computer Information Interchange.
This is a very old standard and was originall ony 7 bits (if my memory is correct).


This has been replaced by the ISO standards (8859-x and others) PLUS Unicode & UTF-8 (-16 & -32).

The values of the '#' sign (for example) changes from one CCSID to another.

Please redefine your question after taking into consideration all the information you have been given. If you really want the ASCII Character set values then a simple google for 'ASCII table' comes up with the following URL

http://www.asciitable.com/
_________________
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
balu2608
PostPosted: Wed Jan 09, 2013 1:08 am    Post subject: Reply with quote

Apprentice

Joined: 18 May 2012
Posts: 39

Thanks smdavies99,

Ur Right ,But ht thing which i need is the

i will be getting some input field same for example

<name>APPLE</name>

i have find the where the value coming in the field is alpha character or not so this i have to implement in esql ,
my thinking is to find the ascii value of the coming input values and thought of finding the wheather it is alphabetic or not ...

can please suggest me in this scenario.....
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Goto page 1, 2  Next Page 1 of 2

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Finding the Ascii values for each alphabet in 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.