|
There are a number of RPG messages which I wish you could do an "I" or "R" on (such as the failure of a called program) but that's just the way messages work in RPG. I doubt that'll change either.
Dave
-----Original Message-----
From: keith mcintosh [mailto:keith_eh@yahoo.ca]
Sent: Monday, June 26, 2000 7:54 AM
To: RPG400-L@midrange.com
Subject: Re:(2) The target for a numeric operation is too small!!!!!
I still can not agree that the program should Bomb,
send a Message YES!.
What I mean is there should an "I" to Iqnore the
problem, or allow you to set the result to another
value. Having the message _will_ help with design
faults in software.
The same question is raised for a Division by Zero.
Didn't the S36 allow the user to set the result of a
Division by Zero.
--- Jim Langston <jlangston@conexfreight.com> wrote:
> I've complained in the past about some of the way
> the Eval
> expression works, but I must say in this case I
> absolulty agree
> that your program should bomb and not continue. My
> biggest
> issue with Eval is when it *doesn't* tell me
> something may be
> wrong. The fact is, you are trying to stick ten
> pounds of stuff
> in a five pound bag, it just ain't gonna happen.
>
> If you really want this to work, then use the old op
> codes in
> your RPG program as others stated. Use ADD instead
> of
> EVAL. But I would strongly suggest you fix your
> program.
>
> What I have done in this same circumstance is to use
> the full
> 9,2 then just position it on the report as if it was
> only a 7,2
> field. This allows your program to run, and when
> the report
> is printed out if there is an overflow it is very
> obvious on your
> report that things just ain't cosher.
>
> For example. Say I am printing 2 colums of numbers,
> quantity
> and price. I would give just enough room for a 7
> digit number in
> my end position. So you would get stuff like:
>
> Qty Price
> 1 1234.56
> 2 2345.67
> 372345.67
>
>
> On that third item, it is obvious that there was an
> overflow problem.
> What is not as obvious is is the first 3 the
> quantity, and the price is
> 72,345.67 or did the qty get overwritten and the
> price is 372,345.67.
> but, at least the users know something is wrong.
>
> Regards,
>
> Jim Langston
>
> keith mcintosh wrote:
>
> > Maybe someone from IBM T.O. could answer this.
> >
> > I am creating a report and adding up totals into
> an
> > array. When I eval the total into a Report Field
> I
> > get
> > a error.
> >
> > Message . . . . : The target for a numeric
> operation
> > is too small to hold the result (C G D F).
> >
> > Why does it give me a Hard Halt? and why is there
> no
> > "I"?
> >
> > Why would the system send a Message to qsysopr or
> have
> > a user cancel the program in the middle of a
> process
> > because a REPORT Field is To Small...
> >
> > I have "Truncate numeric . . . . . . . . *YES"
> > on the Create RPG Module.
> >
> > The field sizes are P(9,2) being put into a P(7,2)
> > report field.
> >
> > RPG III is looking better every time I use RPG IV.
> >
> > The Statement is
> >
> > C Eval RPITC1 = RptValx(1)
> > On v4r2m0.
> >
> > K.
> >
> >
>
_______________________________________________________
> > Do You Yahoo!?
> > Get your free @yahoo.ca address at
> http://mail.yahoo.ca
> > +---
> > | 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
> > +---
>
> +---
> | 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
> +---
_______________________________________________________
Do You Yahoo!?
Get your free @yahoo.ca address at http://mail.yahoo.ca
+---
| 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 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.