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



Hi,

there is no equivalent to the %Check bit in RPG.
If I need something like this, I convert all characters that must be
included in the string into blanks.
After I trim off the blanks and determine the length of the result.
If the length is 0 no dissident characters are in the string.

For example my UDF isDigit to check a string for other characters than
digits:
Create Function isDigit (
ParAlpha VarChar(32))
Returns Integer
Language SQL
Deterministic
Reads SQL Data
Called on NULL Input
Disallow Parallel
Return Length(Trim(Translate(ParAlpha, ' ', '1234567890')));

I think it can be easily modified.

Mit freundlichen Grüßen / Best regards

Birgitta Hauser

"Shoot for the moon, even if you miss, you'll land among the stars." (Les
Brown)
"If you think education is expensive, try ignorance." (Derek Bok)
"What is worse than training your staff and losing them? Not training them
and keeping them!"

-----Ursprüngliche Nachricht-----
Von: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx] Im
Auftrag von Bruce Guetzkow
Gesendet: Friday, 19. December 2008 18:30
An: 'RPG400-L Posting'
Betreff: SQL equivalent of RPG %Check BIF

All:

I've checked the archives, but can't find anything like this. I suspect
this has been asked before, but I haven't found the right search criteria.

Is there a function in SQL that is equivalent to the %check BIF in RPG? I'm
trying to scan a file, looking at the name field to find any names that
contain any characters other than upper-case alpha or blanks. It's pretty
simple in RPG, but I'd like to be able to do this in SQL if possible.

Thanks in advance,
--Bruce Guetzkow





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.