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



Use %check. You need a list of valid characters, and check will return zero, or the position of the first character that is not in the list.

Porterfield, Sean wrote:

That is a really cool idea! My question may need to go to the RPG list, as that would be my preferred language, but I have a similar problem to solve. The difference is that mine is a text entry field, so all normal characters including punctuation are valid. I could just build up a list of valid characters and use the technique, but I wonder if there is a "better" way. I need to validate at input time as well as clean up the database (maybe - I might have fixed them all). The problem I have is people paste from email and have characters that are not valid on a 5250 display. I'm not sure why it allows them to be entered, but it does. Any suggestion as to whether the below approach is better or if there is an easy way to check for characters outside the "normal" range?
--
Sean Porterfield



-----Original Message-----
From: Elvis Budimlic



I think you're best off TRANSLATing all valid characters to
blanks and then
comparing if field is all blanks or not. If not, you've hit
upon a field
with funny data. Here's an example:

SELECT cnmacc
FROM arstageeo/arcnm
WHERE TRANSLATE(UPPER(cnmacc),'
','0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ')
<> ' '


This email is confidential, intended only for the named recipient(s) above and may contain information that is privileged. If you have received this message in error or are not the named recipient(s), please notify the sender immediately and delete this email message from your computer as any and all unauthorized distribution or use of this message is strictly prohibited. Thank you.


As an Amazon Associate we earn from qualifying purchases.

This thread ...

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.