× 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.



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'000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F202122232425262728292A2B2C2D2E2F303132333435363738393A3B3C3D3E3FFF' 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


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

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.