Here's the deal. We have three different contract formats (depending on the
database). This one is free-format (they can put anything in it - yes, I
know, but I wasn't here back then). The other two formats limit the users on
screen to 10 numeric digits in the charcter field or one alpha and 9 numeric
digits. The databases using those formats are fine. Based on a flag in the
division control file, we turn on an indicator for the display file so it
knows which contract format to display on all screens.

On Tue, Mar 25, 2008 at 4:03 PM, Elvis Budimlic <
ebudimlic@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:

I'm not sure about data validation on 5250 display... does it have a
concept
of a "mask"?

As for database integrity, there is no substitute for check constraints.
If
you had them on, you would never have to worry about ANY method putting
"bad" data in (5250 or otherwise).

Using RPG built-in for input data validation will probably perform better
than embedded SQL call to a TRANSLATE function.

HTH, Elvis

Celebrating 11-Years of SQL Performance Excellence on IBM i5/OS and OS/400
www.centerfieldtechnology.com


-----Original Message-----
Subject: RE: Finding non-alphanumeric characters using SQL

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

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





This thread ...

Replies:

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

This mailing list archive is Copyright 1997-2019 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].