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


  • Subject: Re: The target for a numeric operation is too small!!!!!
  • From: Jim Langston <jlangston@xxxxxxxxxxxxxxxx>
  • Date: Mon, 26 Jun 2000 10:03:13 -0700

Personally, I've always been under the impression that no data is much
better than wrong data.

I do see your point, but just what is the program supposed to stick into
the variable?  If the number is supposed to be 12345.67, and it can only
fit 6 digits, what should it make it?  1234.56?  1234.67?  2345.67?  0?
9999.99?  All answers are blatantly wrong.

On the other hand, some have argued that an answer of zero for a division
by zero makes sense.  Some have argued that it is the original number.
Some have argued infinity, and some have argued negative infinity.  But,
there is an answer that people can agree on, stick a 0 in there and we'll
know what's going on usually.

Just how can you do this with an overflow?

Regards,

Jim Langston

John Hall wrote:

> I think this misses the point.  Why cannot the system allow an I
> response.  Many have suggested that the program needs to be fixed and
> suggested that the only reason to have an I is to give the users invalid
> data.
>
> Might I point out that if you take a G you can cause far more damage
> than an I which should simply set the value to 0.  Suppose this program
> is updating files.  At least if you flag the error this gives you the
> chance to allow processing to complete normally and then you can fix the
> one record with the problem.  If you take a G you may process all of the
> records again and get the same error.  Been there - Done that.
>
> The same argument goes for divide by zero.
>
> On the s36 a divide by zero generated error but you could Ignore it and
> allow the process to continue.  The results may or may not have been
> correct but the updating of the files could complete in an orderly
> manner.  This would permit the programmer to correct the program without
> having to restore all of the files which were corrupted by an abnormal
> halt to the process.
>
> All he is asking for is the ability to minimize the damage!  The program
> should HALT but you should be able to continue processing once you have
> identified the problem.
>
> John Hall

+---
| This is the RPG/400 Mailing List!
| To submit a new message, send your mail to RPG400-L@midrange.com.
| To subscribe to this list send email to RPG400-L-SUB@midrange.com.
| To unsubscribe from this list send email to RPG400-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---

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