×
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.
There is not a straight forward replacement in free-format for the Z-ADD
opcode. An example of this is splitting a dollar amount into the whole
dollar value and the cents value and storing them as separate fields.
The following example shows just how simple it is in [old] fixed-column
RPG:
D DLRAMT S 10s 2 Inz(876.54)
D DOLLARS S 4p 0
D CENTS S 2p 2
C Z-ADD DLRAMT DOLLARS
C Z-ADD DLRAMT CENTS
Now, DOLLARS contains the value 876, and CENTS contains the value .54.
That was easy because Z-ADD opcode does not throw errors when the receiver
is too small to hold the full result. Instead, it truncates in a way that
RPG programmers have been able to exploit. Now so with EVAL.
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.