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



Thank you.  I would think they should mention that in the online help. 

Rick Weber | TЯU International 

-----Original Message-----
From: HauserSSS [mailto:Hauser@xxxxxxxxxxxxxxx] 
Sent: Wednesday, August 31, 2005 2:11 PM
To: RPG programming on the AS400 / iSeries
Subject: AW: TRUNCNBR(*Yes)

Hi Richard,

TRUNCNBR(*YES) works only for the old fixed format opcodes
that are not supported in RPG free format, such as Z-ADD, ADD, MULT, DIV and
MOVE.

In free format you'll always get the Error-Code 103.
You either have to use the old fixed format opcodes or a Monitor group to
handle the failure.

Birgitta

-----Ursprungliche Nachricht-----
Von: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx]Im
Auftrag von Weber, Richard
Gesendet: Mittwoch, 31. August 2005 16:10
An: 'rpg400-l@xxxxxxxxxxxx'
Betreff: TRUNCNBR(*Yes)


I'm trying to use this compile option in V5R1 compile of a free format
program.  I know: why do I want to put the number on the screen in a field
that's too small?  I don't, but the business analyst does because all the
old Cobol coded programs just truncate: Short story, I lost the argument.

Anyway, I put TRUNCNBR(*YES) in the H spec and the create command (belt and
suspenders approach).  I read the caution about it not catching the overflow
condition, if it occurs within an expression.  So I coded the following
lines:

V1 = HoldLYYTD/YTDDISDOL;
V2 = V1 * 100;
LYYTDDS = V2;

V2 is large enough to hold the result, LYYTDDS is smaller.  I still get a
"receiver too small" run time error on the LYYTDDS = V2; instruction.  There
shouldn't be anything going on within the expression since this is the
simplest instruction I can think of.  It's basically a move.  If TRUNCNBR
can't even handle overflow on a simple assignment instruction, what can it
do?


Richard L. Weber  |  Senior Systems Analyst, TOYS 'Я' US International  |
973.617.3497  |  weberr@xxxxxxxxxxx <mailto:weberr@xxxxxxxxxxx>



========================================================================
This email message is for the sole use of the intended recipient (s) and may
contain confidential and privileged information. Any unauthorized review,
use, disclosure or distribution is prohibited. If you are not the intended
recipient, please contact the sender by reply email and destroy all copies
of the original message. To reply to our email administrator directly, send
an email to EmailAdmin@xxxxxxxxxxxx
Toys "R" Us, Inc.
--
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-Ups:

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.