Checking data afterwards is not so easy - if you build a SQL/DDL table, the data is validated on INSERT - this differs completely from a PF/DDS file, as there data is validated on READ.

So one solution could be, to create a view over the /36 file with extra columns created using the INTERPRET function:

https://www.ibm.com/docs/en/i/7.5.0?topic=functions-interpret

As an example, a packed decimal with 6 digits and 2 decimals reserves 4 bytes. A binary value of 0x0123456F would then stand for a value of 1234.56. If this 4 bytes start at position 25 of a string, you can extract and interpret it with

INTERPRET( SUBSTR(yourString, 25, 4) as DECIMAL(6, 2) )

But it can be a problem, as the /36 file has no named record format and I also don't know which name the single large field has - but you can find out with a SELECT.

HTH
Daniel


Am 16.03.2026 um 15:56 schrieb stefan@xxxxxxxxxx:

Or to check for bad data after the conversion when the files are externally described.


Best regards



Stefan



--

No trees were killed in the sending of this message, but a large number of electrons were terribly upset.



Stefan Tageson

+46 732 369934

stefan@xxxxxxxxxx<mailto:stefan@xxxxxxxxxx>



________________________________
From: MIDRANGE-L <midrange-l-bounces@xxxxxxxxxxxxxxxxxx> on behalf of Rob Berendt <robertowenberendt@xxxxxxxxx>
Sent: Monday, March 16, 2026 15:54
To: Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxxxxxxxx>
Subject: Re: Identifying Numeric Columns with Bad Data - S36 DDS Conversion

Richard,
Good finding those services. However, they do not look like they were
built to handle S/36 flat files either.
IDK if you could make a LF over them, with the appropriate substringing and
conversions, and then run those services against that.

On Mon, Mar 16, 2026 at 10:44 AM Rob Berendt <robertowenberendt@xxxxxxxxx>
wrote:

map/drop doesn't make sense for a S/36 flat file

On Mon, Mar 16, 2026 at 10:41 AM stefan@xxxxxxxxxx <stefan@xxxxxxxxxx>
wrote:

I would expect a cpyf fmtopt(*map *drop) to find errors as well....


Best regards



Stefan



--

No trees were killed in the sending of this message, but a large number
of electrons were terribly upset.



Stefan Tageson

+46 732 369934

stefan@xxxxxxxxxx<mailto:stefan@xxxxxxxxxx>



________________________________
From: MIDRANGE-L <midrange-l-bounces@xxxxxxxxxxxxxxxxxx> on behalf of
Richard Schoen <richard@xxxxxxxxxxxxxxxxx>
Sent: Monday, March 16, 2026 15:29
To: midrange-l@xxxxxxxxxxxxxxxxxx <midrange-l@xxxxxxxxxxxxxxxxxx>
Subject: Identifying Numeric Columns with Bad Data - S36 DDS Conversion

Hi All,

Doing a S36 conversion to add DDS/DDL to tables.

Is there a good methodology to check for decimal data errors on columns
and fix them quickly ?

We do a CPYF *NOCHK to populate the tables.

And I’ve seen SQL function “systools.validate_data” as one possible
method.

Thoughts appreciated.

Regards,
Richard Schoen
Web: http://www.richardschoen.net
Email: richard@xxxxxxxxxxxxxxxxx

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

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


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

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

This thread ...

Replies:

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

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