What's New since 7.6?

This section was last updated in the last half of the year 2025.

This section describes the enhancements to ILE RPG after 7.6 with PTFs.

See https://www.ibm.com/support/pages/rpg-cafe to determine the PTFs you need on the systems where you are compiling and running your programs.

Warning: Some enhancements require a compile-time PTF and a runtime PTF.

If a program uses an enhancement that requires a runtime PTF, you must ensure that the runtime PTF is applied on any system where the program is restored.

Some enhancements are also available with PTFs for TGTRLS(V7R5M0). If you compile your program with TGTRLS(V7R5M0), different runtime PTFs are required for 7.5 and 7.6 systems.

You can define a data type for an enumeration, and define variables, prototyped parameters, and procedure return values like the typed enumeration.
  • For an item defined like a typed enumeration, the item is restricted to the values in the enumeration.
  • When you define a typed enumeration, you can identify one of the constants as the default value using the DFT keyword. This constant is the default value for initialization and it is the value used for the CLEAR operation code.
  • The high and low values for an item defined like an enumeration are the same as the %HIVAL and %LOVAL values for the enumeration.

dcl-enum FILE_ERROR_CODES int(10) qualified;
   LIBRARY_NOT_FOUND 1;
   FILE_NOT_FOUND 2;
   MEMBER_NOT_FOUND 3;
   IFS_FILE_NOT_FOUND 4;
   NO_ERROR 0 DFT;
end-enum;
dcl-s file_error like(FILE_ERROR_CODES);
dcl-s ifs_file_error like(FILE_ERROR_CODES) INZ(FILE_ERROR_CODES.IFS_FILE_NOT_FOUND);

if file_error <> FILE_ERROR_CODES.NO_ERROR;
   ...
endif;
See Typed Enumerations.

This enhancement is available with a compile-time PTF in the second half of the year 2025.

This enhancement is also available for TGTRLS(V7R5M0) with a compile-time PTF.

This enhancement is also available in 7.5 with a compile-time PTF.

You can specify date formats *DMYY, *MDYY, and *YYMD for some operations.
These formats support the same separators as the *DMY, *MDY, and *YMD formats.
These formats are not supported for defining items of type date. They are supported for the TEST operation code and for conversion between date values and character or numeric values using the following operations:
  • %DEC built-in function
  • %CHAR built-in function
  • %DATE built-in function
  • MOVE operation code
  • MOVEL operation code
See Formats for conversion between character and numeric dates with 2-digit years and the equivalent formats with 4-digit years.

This enhancement is available with a compile-time PTF in the second half of the year 2025.

This enhancement is also available for TGTRLS(V7R5M0) with a compile-time PTF.

This enhancement is also available in 7.5 with a compile-time PTF.

Implicit CCSID conversion is supported for built-in functions with more than one string operand.
If the string operands for the following built-in functions have a different type or CCSID, CCSID conversion is automatically done:
Table 1. Implicit CCSID conversion for built-in functions
Built-in functions Implicit conversion
%CHECK(string1:string2) and %CHECKR(string1:string2) The comparator string, string1, is converted to the type and CCSID of the string to be checked, string2.
%LOOKUPxx(string1:array) and %TLOOKUPxx(string1:table) The search argument, string1, is converted to the type and CCSID of the array or table to be searched.
%REPLACE(string1:string2) The replacement string, string1, is converted to the type and CCSID of the source string, string2.
%SCAN(string1:string2) and %SCANR(string1:string2) The search argument, string1, is converted to the type and CCSID of the source string, string2.
%SCANRPL(string1:string2:string3) The from-string, string1, and to-string, string2, are converted to the type and CCSID of the source string, string3.
%SPLIT(string1:string2) The separators, string2, is converted to the type and CCSID of the source string, string1.
%TRIM(string1:string2), %TRIML(string1:string2), and %TRIMR(string1:string2) The string with the characters to trim, string2, is converted to the type and CCSID of the source string, string1.
%XLATE(string1:string2:string3) The from-string, string1, and to-string, string2, are converted to the type and CCSID of the source string, string3.
See CCSID conversions.

This enhancement is available with a compile-time PTF in the second half of the year 2025.

This enhancement is also available for TGTRLS(V7R5M0) with a compile-time PTF.

This enhancement is also available in 7.5 with a compile-time PTF.

Table 2. Changed Language Elements Since 7.6: Built-in functions
Element Description
%CHECK Implicit CCSID conversion is supported. See %CHECK (Check Characters)
%CHECKR Implicit CCSID conversion is supported. See %CHECKR (Check Reverse)
%LOOKUPxx Implicit CCSID conversion is supported. See %LOOKUPxx (Look Up an Array Element)
%REPLACE Implicit CCSID conversion is supported. See %REPLACE (Replace Character String)
%SCAN Implicit CCSID conversion is supported. See %SCAN (Scan for Characters)
%SCANR Implicit CCSID conversion is supported. See %SCANR (Scan Reverse for Characters)
%SCANRPL Implicit CCSID conversion is supported. See %SCANRPL (Scan and Replace Characters)
%SPLIT Implicit CCSID conversion is supported. See %SPLIT (Split String into Substrings)
%TLOOKUPxx Implicit CCSID conversion is supported. See %TLOOKUPxx (Look Up a Table Element)
%TRIM, %TRIML, %TRIMR Implicit CCSID conversion is supported. See %TRIM (Trim Characters at Edges)
%XLATE Implicit CCSID conversion is supported. See %XLATE (Translate)
Table 3. New Language Elements Since 7.6: Free-form statements
Element Description
DCL-ENUM Supports data type keywords to define a typed enumeration See Typed Enumerations.
Table 4. New Language Elements Since 7.6: Definition specification keywords
Element Description
DFT keyword This keyword identifies the default constant in a typed enumeration. See DFT (Default enumeration constant).