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 » checking Hex values!!

Post new topic  Reply to topic
 checking Hex values!! « View previous topic :: View next topic » 
Author Message
cute_pav
PostPosted: Fri Apr 25, 2003 9:17 am    Post subject: checking Hex values!! Reply with quote

Acolyte

Joined: 04 Jan 2002
Posts: 65
Location: usa

Hi,
I would like to check if an element with 10 chars contains hex values from A1 to A9 delete that char and generate a new element.
I would appreciate help in writing ESQL

pavan
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger MSN Messenger
yaakovd
PostPosted: Sun Apr 27, 2003 9:40 am    Post subject: Reply with quote

Partisan

Joined: 20 Jan 2003
Posts: 319
Location: Israel

This should be your direction:
Code:

DECLARE STR_IN = CAST(<input hexa value>); --you will get a string value: X'hhhh'

DECLARE POS INT;
DECLARE POS_H INT;
DECLARE I INT;

I = 1;
WHILE I <= 9 DO
   POS = 0;
   POS = POSITION( (A || CAST(I AS CHAR)) IN STR_IN);
   POS_H = POS/2;

   IF(POS > o AND (2*POS_H = POS)) THEN --You mast check every 2 characters
        --generate yor output when
   END IF;

   SET I=I+1;
END WHILE;


You will need modify this code according your requirments.
If you only need recognize A1 - A9 in input element, you can use some flag.
If you need to replase those values from element -use SUBSTRING.

use CAST AS BLOB in case you output also hexadecimal...

Hope it will help
_________________
Best regards.
Yaakov
SWG, IBM Commerce, Israel
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » checking Hex values!!
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.