|
Hmmm. I thought the numeric overflow was only affected if I converted to use EVAL.
Correct. The ADD, SUB, MULT, DIV (etc) op-codes work identically in RPG IV to the way they did in RPG III.
Will the date conversion trick bomb if I leave it straight from the RPG-III style?
No, it'll work just as well (or poorly!) it did in RPG III
I don't think DDEs are an issue. I'll have to check on *BLANKS and numerics.
Okay... DDEs are the same in RPG III and RPG IV unless you've specified IGNDECERR on the RPG III compile. RPG IV has FIXNBR instead of IGNDECERR, and although they have similar purposes, they don't work identically.
So, decimal data errors (as well as *blanks in a number) aren't an issue unless you were using the IGNDECERR workaround in RPG III.
If there was a "MOVE *BLANKS NUMBER" and NUMBER is numeric,
will the -IV compiler catch it? Or will run-time act any differently than it did under RPG-III?
Correct me if I'm wrong, but neither RPG III nor RPG IV allows you to move blanks to a numeric field. You'd have to go through a data structure to get them in there (or read bad data from a file or a parameter, etc). Should work the same in RPG IV as RPG III.
Generally speaking (and thankfully), the legacy apps here were all fairly well written for their day. I've yet to come across doing funny stuff with blanks and numerics, and have never seen a 100.0001 or 10000.01 kind of multiplication in the code here. I did come across a FREE opcode in the converted app but, fortunately, the app being FREE'd was updated at some point to accept a negative number in a batch number parameter to signal the program to seton LR and get out.
And that should work, as long as you don't compile the RPG IV version into a different activation group. Use DFTACTGRP(*YES) if you want your RPG IV programs to behave like RPG III programs, and you shouldn't have problems.
Naturally, if you want to use some of the modern features of RPG IV, you'll have to change the activation group -- but you can always cross that bridge when you come to it. Presumably at that point, you'll have a programmer who is making changes to the program, and therefore it'll have to be re-tested, anyway.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 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.