Yep, that's correct. When I talked with Scott Forstie about that he
mentioned that I to run it multiple times (after having corrected the wrong
contents).
But the function is in the SYSTOOLS library, so you can get the source code,
modify it and create your own function based on your modification.
For to detect or correct invalid numeric values, I use the TRY_CAST function
and convert the column value into a numeric value with the same definition.
If an invalid value is detected a NULL value is returned ... and NULL Values
can be trapped.
Something like this
Select *
From YourFile
Where Try_Cast(Col1 as Dec(11, 1)) is NULL
Or Try_Cast(Col2 as Dec(7, 2)) is NULL
Or ...
Or Try_Cast(ColN as Dec(15, 5)) is NULL;
Mit freundlichen Grüßen / Best regards
Birgitta Hauser
Modernization ? Education ? Consulting on IBM i
Database and Software Architect
IBM Champion since 2020
"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!"
"Train people well enough so they can leave, treat them well enough so they
don't want to. " (Richard Branson)
"Learning is experience ? everything else is only information!" (Albert
Einstein)
-----Original Message-----
From: MIDRANGE-L <midrange-l-bounces@xxxxxxxxxxxxxxxxxx> On Behalf Of
Richard Schoen
Sent: Tuesday, 15 July 2025 07:07
To: midrange-l@xxxxxxxxxxxxxxxxxx
Subject: SYSTOOLS.VALIDATE_DATA issues?
Anyone else using this to validate table data ?
I'm seeing that it's only identifying a single column even though multiple
columns have bad numeric data.
Any thought s ?
Regards,
Richard Schoen
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxxxxxxxx To subscribe,
unsubscribe, or change list options,
visit:
https://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives at
https://archive.midrange.com/midrange-l.
Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription related
questions.
As an Amazon Associate we earn from qualifying purchases.