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




I don't know how the DSPPGM option correlates to the RPG III vs RPG IV options, so I won't try to comment on it. :)

Also, FWIW, the defaults for CRTBNDRPG include TRUNCNBR(*YES) &
FIXNBR(*NONE), so does this "match" the default behavior of CRTRPGPGM's
defaults?

TRUNCNBR(*YES) (the default) means that the ADD, MULT, SUB, DIV, etc operations work like they do in RPG III. When you have overflow, the leftmost digits are truncated.

If you changed it to TRUNCNBR(*NO) ADD, MULT, SUB, etc would act more like EVAL does.

Surprise, surprise!  RPG-III:
 C                MOVE *BLANKS   NUMBER  50
Compiles fine, RUNS FINE!  The dump shows:
   NUMBER   001176  PACKED(5,0)   0

RPG-IV:
Compiles fine, RUNS FINE!  The dump shows:
 NUMBER            PACKED(5,0)      00000.       '00000F'X

Okay, so it _does_ compile (I wasn't 100% sure, thanks for clarifying). But, I was correct that it behaves the same way in both languages.

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.