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



Jon,

Thanks!  your 5.1 trick should do the trick.

I hadn't thought of that (obviously), and as it happens, i already have a
monitor group around the calcs in question, so it should be a no brainer
change!

btw, enjoyed your cgidev2 class at common.

thanks again,

Rick Baird
317-655-7318



-----rpg400-l-bounces@xxxxxxxxxxxx wrote: -----

To: <rpg400-l@xxxxxxxxxxxx>
From: "Jon Paris" <Jon.Paris@xxxxxxxxxxxxxx>
Sent by: rpg400-l-bounces@xxxxxxxxxxxx
Date: 09/21/2003 01:43PM
Subject: RE: data decimal errors

>> my rpg program blows up on the read - no chance for the MONITOR in the
calcs.

Two simple options that allow for Monitor (TestN is a waste of time - it
doesn't always work! - you could use the numeric validation routine from
CGIDEV2 though.)

Option 1 - for V5R1+.

Program describe the file - use the option to have the Read go directly
into
an externally described DS created from the database. Wrap MONITOR round
the operations of the file fields - the explosion will only happen when the
fields are "touched" not when the record is read into the DS.

Option 2 - for V5R2+.

Same as option 1 but no need to externally describe the file. Simply create
the DS using the LIKEREC keyword and read directly into the DS.

Voila! Problem solved.


Of course if you really like hard work you could parse the CSV file
yourself
in RPG and validate the (supposedly) numeric fields as mentioned above -
but
these options are real easy to implement within your current framework.

Jon Paris
Partner400
www.Partner400.com


_______________________________________________
This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
 Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.



As an Amazon Associate we earn from qualifying purchases.

This thread ...


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.