Here's a link to the What's New section in the 7.2 ILE RPG Reference. http://www-01.ibm.com/support/knowledgecenter/api/content/ssw_ibm_i_72/rzasd/rpgrelv7r2.htm?locale=en#rpgrelv7r2
Here's a link to the PDF for the ILE RPG Reference for 7.2: http://www-01.ibm.com/support/knowledgecenter/api/content/ssw_ibm_i_72/rzasd/sc092508.pdf
If you have followed the enhancements delivered through PTFs during 7.1, especially the new free-form support in November 2013, a lot of the What's New section may already be familiar to you. But there are several new enhancements too.
Most of the brand-new enhancements are related to CCSID support for alphanumeric data.
Until 7.2, the only CCSID directly support by RPG for alphanumeric data was the job CCSID. If you actually had data in another CCSID, such as UTF-8, you had to be careful to avoid using it in ordinary RPG assignment and comparison statements. For example, if your field had UTF-8 data, and you compared it to *blanks, it would compare it to the EBCDIC blank, x'40', not to the UTF-8 blank, x'20'. Now, you will be able to define your field to contain UTF-8 data, using the CCSID(*UTF8) keyword. Or any other alphanumeric CCSID you need, such as the ASCII CCSID(819), or a specific EBCDIC CCSID such as CCSID(37), or even CCSID(*HEX) if you never want CCSID conversion to be done on it.
Since RPG could only handle alphanumeric data in the job CCSID, database files were always opened such that alphanumeric data would be converted to the job CCSID on an input operation, and converted from the job CCSID for keys or output/update. Now that RPG can handle alphanumeric data in any CCSID, you'll be able to request that files be opened so that alphanumeric and graphic data is not converted to the job CCSID, using H spec OPENOPT(*NOCVTDATA) or F spec DATA(*NOCVT).
If you are opening your file to get the data directly, you might want to define an EXTNAME or LIKEREC data structure to have the alphanumeric subfields with the same CCSID as the fields in the file. You can do that using CCSID(*EXACT) on the data structure. But it will still work if you use an ordinary externally-described data structure, where the alphanumeric subfields are in the job CCSID. In that case, the compiler will handle any necessary conversions between the I/O buffer and the subfields.
There are also some enhancements related to timestamps. Historically, timestamps have 6 microseconds. Now, the system supports timestamps with between 0 and 12 fractional seconds.
RPG supports these different length timestamps too, but RPG still only produces timestamps with 3-millisecond precision.
Historically, RPG had specific support for microseconds with the %MSECONDS built-in function and the *MSECONDS special value for durations. Now, you will be able to handle the fractional seconds together with the seconds.
You can add fractional seconds by specifying a value with decimal places for %SECONDS, for example %SECONDS(1.5).
You can get the difference between two timestamps as a number of seconds with decimal places. %DIFF(z1:z2:*SECONDS:5) will return the difference as a number of seconds with 5 decimal places.
You can extract the number of seconds and fractional seconds by specifying the length and decimal places for %SUBDT with *SECONDS. For example, if z = '2014-04-28-16.05.23.123456789012', %SUBDT(z:*SECONDS:11:9) will return 23.1234567901.
Related to the %SUBDT enhancement for timestamps is a general enhancement that allows you to specify the number of digits to return. For example, %SUBDT(d:*YEARS:4) will return a 4-digit number containing the year value of the date. This will make it easier to build character strings with these extracted values. %CHAR(%SUBDT(d:*YEARS:4)) returns '2014'. %CHAR(%SUBDT(d:*YEARS)) returns '0000002014' which is not quite as useful.
If you have comments related to the enhancements, please come on over to the RPG Cafe forum. https://www.ibm.com/developerworks/community/forums/html/forum?id=11111111-0000-0000-0000-000000002284
If you want to read about IBM i enhancements in general, here's Steve Will's "You and I" blog about the announcement: http://ibmsystemsmag.blogs.com/you_and_i/2014/04/announcing-ibm-i-72.html