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



On 19 April 2015 at 13:26, Hoteltravelfundotcom
<hoteltravelfun@xxxxxxxxx> wrote:

i have coded this: eval ord_wt = %dec(PHWtot:7:2) but still
got error of data decimal error.

To locate this I have taken a D' and have the program dump.

Is this all i need> here it will tell me which is the bad data?

The dump will show you the contents of PHWtot. The contents of PHWtot
cannot be converted to a number via the %DEC() BIF, so you need to do
something else.

other wise can I code in the RPG to handle such an occurance?

As the programmer, you can do quite a few things in RPG to deal with
the situation. Only you can know what is proper for this particular
situation: no one on this list can tell you what your business rules
are, or ought to be. As Chuck notes, in some situations you might be
fine to set ord_wt to zero. In some situations it would be a very bad
thing to not know the order weight.

There is one question I haven't heard you answer yet. Why is PHWtot a
character field? The point of the question is this: often, when one
receives a file from a trading partner and that file has 'numeric'
data that looks like this '12,785.5# FOB Detroit' it is because one is
receiving something meant for a person to read, not a computer. In
many cases, the trading partner can supply a file that is unedited,
that is intended for a computer to read. Yes, I realise that the
trading partner in your case is your new software, but the point still
stands.

I have walked many miles in your shoes and I strongly recommend that
you try to get a better input file.
--buck

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.