× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Can someone help me out here :

I want to declare the constant x'000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D
1E1F202122232425262728292A2B2C2D2E2F303132333435363738393A3B3C3D3E3FFF'

But I can't seem to get the syntax right for it to occupy several lines of source. Without the 'X' I can do it.

-----Message d'origine-----
De : midrange-l-bounces@xxxxxxxxxxxx
[mailto:midrange-l-bounces@xxxxxxxxxxxx] De la part de Vern Hamberg
Envoyé : jeudi 26 mars 2009 17:28
À : Midrange Systems Technical Discussion
Objet : Re: SQL find hexadecimal values in a given range

David

I really don't think SQL is the tool for this - if this is
about replacing non-displayable characters. You would be
better off using the %xlate function, I think. It is useful
for simple case conversion, but you could set up 2 constants
- the first would be something like
x'000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D
1E1F202122232425262728292A2B2C2D2E2F303132333435363738393A3B3C
3D3E3FFF'
and the other would be all blanks and the same length -
remember that the above value is in HEX, so it is 2 hex
digits for each "character" or byte - you need the same
number of blanks as there are bytes above. Then use %xlate -
I don't have the exact syntax right in my head - get the ILE
RPG manual. %xlate will do the read through the entire string
and do the replace for you.

I do hope there is an easier way!!

HTH
Vern

David FOXWELL wrote:
This will show the first position and all rows containing
the value hex 40.

SELECT locate( X'40', myfield, 1), myfield FROM myfile
WHERE locate(
X'40', myfield)>0

How can I find hex values less that 40?

Thanks


--
This is the Midrange Systems Technical Discussion
(MIDRANGE-L) mailing list To post a message email:
MIDRANGE-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change
list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting,
please take a moment to review the archives at
http://archive.midrange.com/midrange-l.



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.