IBM AS/400 Frozen Dessert Maker User Manual


 
Differences Between OPM RPG/400 and ILE RPG
give different results than expected when DDS features are used that cause
more than one search argument to match a given key in the file.
For example, if ABSVAL is used on a numeric key, both -1 and 1 would
succeed as search arguments for a key in the file with a value of 1. Using the
hexadecimal collating sequence, a search argument of -1 will not succeed for
an actual key of 1.
ILE RPG does key comparisons using *HEX collating sequence only for
pre-V3R1 DDM files. See “Using Pre-V3R1 DDM Files” on page 313 for more
information.
13. ILE RPG allows the To File and the From File specified for prerun-time arrays
and tables to be different. In OPM RPG, both file names must be the same; if
they are different the diagnostic message QRG3038 is issued.
14. When translation of a RAF-Controlled file is specified, the results using ILE
RPG may differ from OPM RPG/400, depending on the translation table. This is
due to the different sequence of operations. In OPM RPG/400 the sequence is:
retrieve record, translate and compare; in ILE RPG the sequence is: translate,
compare and retrieve record.
DBCS Data in Character Fields
1. In OPM RPG/400, position 57 (Transparency Check) of the control specification
allows you to specify whether the RPG/400 compiler should scan character
literals and constants for DBCS characters. If you specify that the compiler
should scan for transparent literals, and if a character literal that starts with an
apostrophe followed by a shift-out fails the transparency check, the literal is
reparsed as a literal that is not transparent.
In ILE RPG, there is no option on the control specification to specify whether
the compiler should perform transparency check on character literals. If a char-
acter literal contains a shift-out control character, regardless of the position of
the shift-out character within the character literal, the shift-out character signi-
fies the beginning of DBCS data. The compiler will check for the following:
A matching shift-in for each shift-out (that is, the shift-out and shift-in
control characters should be balanced)
An even number (minimally two) between the shift-in and the shift-out
The absence of an embedded shift-out in the DBCS data
If the above conditions are not met, the compiler will issue a diagnostic
message, and the literal will not be reparsed. As a result, if there are character
literals in your OPM RPG programs that fail the transparency check performed
by the OPM RPG compiler, such programs will get compilation errors in ILE
RPG.
2. In OPM RPG/400, if there are two consecutive apostrophes enclosed within
shift-out and shift-in control characters inside a character literal, the two con-
secutive apostrophes are considered as one single apostrophe if the character
literal is not a transparent literal. The character literal will not be a transparent
literal if:
The character literal does not start with an apostrophe followed by a
shift-out
The character literal fails the transparency check performed by the compiler
Appendix A. Behavioral Differences Between OPM RPG/400 and ILE RPG for AS/400 377