What's New in V4R4?

The major enhancements to RPG IV since V4R2 are the support for running ILE RPG modules safely in a threaded environment, the new 3-digit and 20-digit signed and unsigned integer data types, and support for a new Universal Character Set Version 2 (UCS-2) data type and for conversion between UCS-2 fields and graphic or single-byte character fields.

The following list describes these enhancements:

Other enhancements have been made to this release as well. These include:

The following tables summarize the changed and new language elements, based on the part of the language affected.

Table 13. Changed Language Elements Since V4R2
Language Unit Element Description
Control specification keywords OPTION(*{NO}SRCSTMT) *SRCSTMT allows you to request that the compiler use SEU sequence numbers and source IDs when generating statement numbers for debugging. Otherwise, statement numbers are associated with the Line Numbers of the listing and the numbers are assigned sequentially.
OPTION(*{NO}DEBUGIO) *{NO}DEBUGIO, determines if breakpoints are generated for input and output specifications.
Definition specification keywords INZ(*EXTDFT) All externally described data structure subfields can now be initialized to the default values specified in the DDS.
INZ(*USER) Any character field or subfield can be initialized to the name of the current user profile.
OVERLAY(name:*NEXT) The special value *NEXT indicates that the subfield is to be positioned at the next available position within the overlayed field.
OPTIONS(*NOPASS *OMIT *VARSIZE *STRING *RIGHTADJ) The new OPTIONS(*RIGHTADJ) specified on a value or constant parameter in a function prototype indicates that the character, graphic, or UCS-2 value passed as a parameter is to be right adjusted before being passed on the procedure call.
Definition specification positions 33-39 (To Position/Length) 3 and 20 digits allowed for I and U data types Added to the list of allowed values for internal data types to support 1-byte and 8-byte integer and unsigned data.
Internal data type C (UCS-2 fixed or variable-length format) Added to the list of allowed internal data types on the definition specifications. The UCS-2 (Unicode) character set can encode the characters for many written languages. The field is a character field whose characters are two bytes long.
Data format C (UCS-2 fixed or variable-length format) UCS-2 format added to the list of allowed data formats on the input and output specifications for program described files.
Command parameter OPTION *NOSRCSTMT, *SRCSTMT, *NODEBUGIO, and *DEBUGIO have been added to the OPTION parameter on the CRTBNDRPG and CRTRPGMOD commands.
Table 14. New Language Elements Since V4R2
Language Unit Element Description
Control specification keywords CCSID(*GRAPH: *IGNORE | *SRC | number) Sets the default graphic CCSID for the module. This setting is used for literals, compile-time data and program-described input and output fields and definitions. The default is *IGNORE.
CCSID(*UCS2: number) Sets the default UCS-2 CCSID for the module. This setting is used for literals, compile-time data and program-described input and output fields and definitions. The default is 13488.
INTPREC(10 | 20) Specifies the decimal precision of integer and unsigned intermediate values in binary arithmetic operations in expressions. The default, INTPREC(10), indicates that 10-digit precision is to be used.
OPENOPT{(*NOINZOFL | *INZOFL)} Indicates whether the overflow indicators should be reset to *OFF when a file is opened.
THREAD(*SERIALIZE) Indicates that the module is enabled to run in a multithreaded environment. Access to the procedures in the module is to be serialized.
Definition specification keywords CCSID(number | *DFT) Sets the graphic and UCS-2 CCSID for the definition.
Built-in functions %DIV(n:m) Performs integer division on the two operands n and m; the result is the integer portion of n/m. The operands must be numeric values with zero decimal positions.
%GRAPH(char-expr | graph-expr | UCS2-expr {: ccsid}) Converts to graphic data from single-byte character, graphic, or UCS-2 data.
%REM(n:m) Performs the integer remainder operation on two operands n and m; the result is the remainder of n/m. The operands must be numeric values with zero decimal positions.
%UCS2(char-expr | graph-expr | UCS2-expr {: ccsid}) Converts to UCS-2 data from single-byte character, graphic, or UCS-2 data.
%XFOOT(array-expr) Produces the sum of all the elements in the specified numeric array expression.
Operation codes EVALR Evaluates an assignment statement of the form result=expression. The result will be right-justified.
FOR Begins a group of operations and indicates the number of times the group is to be processed. The initial, increment, and limit values can be free-form expressions.
ENDFOR ENDFOR ends a group of operations started by a FOR operation.
LEAVESR Used to exit from anywhere within a subroutine.


[ Top of Page | Previous Page | Next Page | Contents | Index ]