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.
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.
See Typed Enumerations.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;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*YYMDfor some operations. - These formats support the same separators as
the
*DMY,*MDY, and*YMDformats.These formats are not supported for defining items of type date. They are supported for theSee Formats for conversion between character and numeric dates with 2-digit years and the equivalent formats with 4-digit years.TESToperation code and for conversion between date values and character or numeric values using the following operations:%DECbuilt-in function%CHARbuilt-in function%DATEbuilt-in functionMOVEoperation codeMOVELoperation code
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:
See CCSID conversions.
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. 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.
| 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) |
| Element | Description |
|---|---|
| DCL-ENUM | Supports data type keywords to define a typed enumeration See Typed Enumerations. |
| Element | Description |
|---|---|
| DFT keyword | This keyword identifies the default constant in a typed enumeration. See DFT (Default enumeration constant). |
| Element | Description |
|---|---|
| *DMYY | *DMYY is similar to *DMY but with 4-digit years. See Formats for conversion between character and numeric dates with 2-digit years and the equivalent formats with 4-digit years and Date Data Type. |
| *MDYY | *MDYY is similar to *MDY but with 4-digit years. See Formats for conversion between character and numeric dates with 2-digit years and the equivalent formats with 4-digit years and Date Data Type. |
| *YYMD | *YYMD is similar to *YMD but with 4-digit years. See Formats for conversion between character and numeric dates with 2-digit years and the equivalent formats with 4-digit years and Date Data Type. |