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 » Looping hexadecimal values

Post new topic  Reply to topic
 Looping hexadecimal values « View previous topic :: View next topic » 
Author Message
venky
PostPosted: Tue Oct 26, 2004 7:26 am    Post subject: Looping hexadecimal values Reply with quote

Master

Joined: 08 Jul 2003
Posts: 205

Hi All,

Can we run a while loop for hexadecimal values.
ie.., starting from X'80' to X'FF'.
incrementing the looping value by 1 ( hex value ).

Iam having problems with incrementing the value by 1 Hex value.

Thanks,
Venky
--
Back to top
View user's profile Send private message
RocknRambo
PostPosted: Tue Oct 26, 2004 8:20 am    Post subject: Reply with quote

Partisan

Joined: 24 Sep 2003
Posts: 355

can elborate ur scenario to achieve,

I mean incrementing the Hex value...?? so for initializing what the datatype r u declaring ??

probably there wud b a better way if u can explain the scenario to achieve?


-RR
Back to top
View user's profile Send private message
venky
PostPosted: Tue Oct 26, 2004 10:49 am    Post subject: Reply with quote

Master

Joined: 08 Jul 2003
Posts: 205

hi RR,

This is a piece of code I have.

DECLARE Start_char INTEGER;
DECLARE end_char INTEGER;

SET Start_char = X'80';
SET End_char = X'FF';

WHILE ( Start_char <= End_char ) DO
--Do Something.
SET Start_char = Start_char + X'01';
END WHILE;

Iam trying to Loop through the Hexadecimal values which are between X'80' and X'FF'

I don't know if I can acheive the above, if anyone of you have come across such situation, please share .....

Thanks,
Venky
--
Back to top
View user's profile Send private message
RocknRambo
PostPosted: Tue Oct 26, 2004 11:01 am    Post subject: Reply with quote

Partisan

Joined: 24 Sep 2003
Posts: 355

First thing...

U cannot declare variable as INT and assign...hex value.

and I dont think so...u can increment a hex value..in ESQL...

but what z ur scenario???..probably we handle in diff way.


-RR
Back to top
View user's profile Send private message
siliconfish
PostPosted: Tue Oct 26, 2004 12:58 pm    Post subject: Reply with quote

Master

Joined: 12 Aug 2002
Posts: 203
Location: USA

Try this :

DECLARE start_char INTEGER;
DECLARE end_char INTEGER;

SET start_char = 0x80;
SET end_char = 0xFF;

WHILE ( start_char <= end_char ) DO
--Do Something.
SET start_char = start_char + 0x01;
END WHILE;
_________________
siliconfish
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 » Looping hexadecimal 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.