Jim,

I'm since I'm having to deal with that glorified PC with database
support (AKA S/36), I'm going to use some older RPG methods:

This is a poor pseudocode attempt but hopefully you get the idea.

F Input1

F Output1

I DS Inrec

I 1 10 AlphaF1

I 11 15 Num1

I* ALL FIELDS DEFINED AS ALPHA

C READ Input1

C Move Inputrec Inrec

C TESTN Num1

C* If error then fix the field

C* Optionally you could use monitor for the same purposes.

IN THEORY you SHOULD know the data types (zoned, packed, etc) of the
numeric fields you're working with for input.... If you don't then just
do a DSPPFM, hex fmt, and figure it out.

Treat the incoming record as just one big field and then move it to the
DS to work with.

It's been a LONG time since I've had to do this but as I recall this is
the concept of how I did it....

DR2

On 2026-03-16 12:31, Jim Franz wrote:

simple rpgle - it does not identify where the bad data is inserted, but
will fix the numeric columns
this is a fix after file converted to dds

HALWNULL(*INPUTONLY) FIXNBR(*ZONED)
Faddr up e k disk
C update @addr
****************** End of data *******

if character data issue (like copy/paste from word docs or email... replace
invalid character data with a blank
f* 10/24/2015 jf replace invalid characters with blank

Faddr up e disk

D svlong S 150

D @chg S 1

D pos S 3S 0
position
D Valid C 'ABCDEFGHIJKLMNOPQRSTUVWXYZ012345678-

D 9!abcdefghijklmnopqrstuvwxyz:;_''"-

D @#$%&*()+-=/?,.\<> '

c*

c eval svlong = adlong

c eval @chg = 'N'

c* replace invalid characters with blank

c dow 1=1

c eval pos=%check(valid : adlong)

c if pos > 0

c eval %subst(adlong:pos:1) = ' '

c eval @chg = 'Y'

c else

c leave

c ENDIF

c ENDDO

c if @chg = 'Y'

c update @addr

c endif
****************** End of data *

Jim Franz

On Mon, Mar 16, 2026 at 11:58 AM <dr2@xxxxxxxx> wrote:

OK, I've not done this in a long time, but presuming you can still
compile with ignore decimal data error, create a conversion pgm that has
that, then test each field you're reading in and respond/correct pro re
nata....

Just a thought off the top of my balding pointed little head....

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