What's New in V5R2?

The following list describes the enhancements made to ILE RPG in V5R2:

Table 9. Changed Language Elements Since V5R1
Language Unit Element Description
Built-in functions %DEC(expression) Can now take parameters of type character.
%DECH(expression)
%FLOAT(expression)
%INT(expression)
%INTH(expression)
%UNS(expression)
%UNSH(expression)
Definition specification keywords DTAARA({*VAR:}data-area-name) The data area name can be a name, a character literal specifying 'LIBRARY/NAME' or a character variable which will determine the actual data area at runtime.
DIM Allowed for data structure specifications.
LIKEDS Allowed for subfield specifications.
EXTNAME(filename{:extrecname}
{:*ALL|*INPUT|*OUTPUT|*KEY}
)
The optional "type" parameter controls which type of field is extracted for the externally-described data structure.
Definition Specifications Length and decimal place entries The length and number of decimal places can be 31 for packed and zoned fields.
Operation codes CHAIN, DELETEREADE, READPE, SETGT, SETLL In free-form operations, Factor 1 can be a list of key values.
CHAIN, READ, READC, READE, READP, READPE, UPDATE, WRITE When used with externally-described files or record formats, a data structure may be specified in the result field.
UPDATE In free-form calculations, the final argument can contain a list of the fields to be updated.
FEOD Operation extender N is allowed. This indicates that the unwritten buffers must be made available to the database, but not necessarily be written to disk.
Calculation specifications Length and decimal place entries The length and number of decimal places can be 31 for packed and zoned fields.
Table 10. New Language Elements Since V5R1
Language Unit Element Description
Expressions Assignment Operators += -= *= /= **= When these assignment operators are used, the target of the operation is also the first operand of the operation.
Control Specification Keywords DECPREC(30|31) Controls the precision of decimal intermediate values for presentation, for example, for %EDITC and %EDITW
Definition specification keywords
LIKEREC(intrecname{:*ALL|
*INPUT|*OUTPUT|*KEY})
Defines a data structure whose subfields are the same as a record format.
Built-in functions %BITAND(expression : expression) Returns a result whose bits are on if the corresponding bits of the operands are both on.
%BITNOT(expression) Returns a result whose bits are the inverse of the bits in the argument.
%BITOR(expression : expression) Returns a result whose bits are on if either of the corresponding bits of the operands is on.
%BITXOR(expression : expression) Returns a result whose bits are on if exactly one of the corresponding bits of the operands is on.
%FIELDS(name{:name...}) Used in free-form "UPDATE to specify the fields to be updated.
%KDS(data structure) Used in free-form keyed operation codes CHAIN, SETLL, SETGT, READE and READPE, to indicate that the keys for the operation are in the data structure.


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