 | 
ILE RPG – V6R1 The ILE RPG compiler is part of the IBM WebSphere® Development Studio for System i ILE Compilers feature The productivity features of RPG IV and the ILE common runtime environment deliver a powerful programming language ILE RPG is the compiler for RPG IV, the latest generation of RPG, enriched with the new functions you've been asking for. With ILE, you've got the power of a suite of compilers for multilanguage interoperability and faster call performance. Your investment in RPG applications is protected with full upward compatibility. A conversion aid helps you easily convert your RPG III applications to RPG IV language definition. ILE Extends Your Programming Reach Using static calls to bound procedures, you can create applications comprised of smaller, easier-to-maintain modules then link them together as one program, without the execution overhead of dynamic calls. ILE permits the binding of C, RPG, COBOL, and CL modules into a single program, thus creating a multi-language application. And you can reuse those modules in many applications, realizing savings in time and money for your organization. To promote consistency across the ILE languages, ILE RPG has support for integers, floating point, variable length fields, unicode, parameters passed by value, return values, null terminated strings, pointers and pointer arithmetic, long names and dynamic storage management. ILE RPG has support for easily calling Java and being called by Java. ILE ensures consistent runtime behaviors across all languages. Results are the same, and what you expect, whatever language you are using. RPG programs written using ILE RPG for iSeries can coexist and communicate with programs written using RPG/400. Enhancements for V6R1 The following list describes the enhancements made to ILE RPG in V6R1: - Ability to run concurrently in multiple threads
- each thread has its own static storage for fields. - STATIC(ALLTHREAD) for fields is used by all threads. - Procedures can be serialized individually.
- Ability to specify the main procedure to be called. An RPG program can be created with no RPG cycle
- Local file support by defining files in a procedure after a P Specification
- Other enhancements related to the use of the files
- Qualified record formats FILENAME.RECNAME - LIKEFILE keyword to define one file the same as another - New TEMPLATE keyword to define file types - Passing files as parameters using the LIKEFILE prototype keyword - New EXTDESC keyword to specify file to be used at compile time - Data structure that can be defined in the result field for EXFMT
- Significantly higher limits for the size of variables
- Size of variables from 64K to 16K MB - Number of elements in an array from 32K to no set limit - Length of string literals from 1K to 8K
- Relaxation of some UCS-2 rules (available starting in V5R3 through PTFs).
- Miscellaneous enhancements
- New TEMPLATE keyword to define field and data structure types - Reduce module size with OPTION(*NOUNREF) - PCML can now be stored in the module
Enhancements for V5R4 The following list describes the enhancements made to ILE RPG in V5R4: - New operation code EVAL-CORR assigns subfields with the same name from one data structure to another. This is useful for transferring data between data structures used as the result field in I/O operations.
- New operation code XML-SAX initiates a SAX parse for an XML document. A user-provided SAX-event-handling procedure receives control for each XML event detected by the XML parser.
- New operation code XML-INTO reads the contents of an XML document directly into an RPG variable, which can be a field, array, data structure, or array of data structures. It can also read an unlimited number of array elements using a user-provided procedure that handles the data for several array elements at a time.
- OPTIONS(*NULLIND) can be specified for a parameter of a prototyped procedure, indicating that the null-indicators for the field or data structure should be passed with the parameter. This allows the called program or procedure to directly access the null-indicator of the caller's variable.
- The ILE RPG syntax checker used by SEU now checks the syntax of /FREE calculation statements.
- The DEBUG keyword for Control specifications is enhanced to provide more granular control over which debugging features are generated into the module. New parameters *INPUT and *DUMP provide the two features that were previously available with DEBUG(*YES). A new value *XMLSAX can be specified to enable an array of event names that can be used while debugging an XML-SAX event handling procedure.
Enhancements for V5R3 The following list describes the enhancements made to ILE RPG in V5R3: - New builtin function %SUBARR:
New builtin function %SUBARR allows assignment to a sub-array or returning a sub-array as a value. Along with the existing %LOOKUP builtin function, this enhancements enables the implementation of dynamically sized arrays with a varying number of elements. %SUBARR(array : start) specifies array elements array(start) to the end of the array %SUBARR(array : start : num) specifies array elements array(start) to array(start + num - 1) - The SORTA operation code is enhanced to allow sorting of partial arrays.
When %SUBARR is specified in factor 2, the sort only affects the partial array indicated by the %SUBARR builtin function. - Direct conversion of date/time/timestamp to numeric, using %DEC:
%DEC is enhanced to allow the first parameter to be a date, time or timestamp, and the optional second parameter to specify the format of the resulting numeric value. - Control specification CCSID(*CHAR : *JOBRUN) for correct conversion of character data at runtime:
The Control specification CCSID keyword is enhanced to allow a first parameter of *CHAR. When the first parameter is *CHAR, the second parameter must be *JOBRUN. CCSID(*CHAR : *JOBRUN) controls the way character data is converted to UCS-2 at runtime. When CCSID(*CHAR:*JOBRUN) is specified, character data will be assumed to be in the job CCSID; when CCSID(*CHAR : *JOBRUN) is not specified, character data will be assumed to be in the mixed-byte CCSID related to the job CCSID. - Second parameter for %TRIM, %TRIMR and %TRIML indicating what characters to trim:
%TRIM is enhanced to allow an optional second parameter giving the list of characters to be trimmed. - New prototype option OPTIONS(*TRIM) to pass a trimmed parameter:
When OPTIONS(*TRIM) is specified on a prototyped parameter, the data that is passed be trimmed of leading and trailing blanks. OPTIONS(*TRIM) is valid for character, UCS-2 and graphic parameters defined with CONST or VALUE. It is also valid for pointer parameters defined with OPTIONS(*STRING). With OPTIONS(*STRING : *TRIM), the passed data will be trimmed even if a pointer is passed on the call. - Support for 63 digit packed and zoned decimal values
Packed and zoned data can be defined with up to 63 digits and 63 decimal positions. The previous limit was 31 digits. - Relaxation of the rules for using a result data structure for I/O to externally-described files and record formats
- The result data structure for I/O to a record format may be an externally-described data structure.
- A data structure may be specified in the result field for I/O to an externally-described file name for operation codes CHAIN, READ, READE, READP and READPE.
- Support for new environment variables for use with RPG programs calling Java methods
- QIBM_RPG_JAVA_PROPERTIES allows RPG users to explicitly set the java properties used to start the JVM
This environment variable must be set before any RPG program calls a Java method in a job. This environment variable has contains Java options, separated and terminated by some character that does not appear in any of the option strings. Semicolon is usually a good choice. - QIBM_RPG_JAVA_EXCP_TRACE allows RPG users to get the exception trace when an RPG call to a Java method ends with an exception
This environment variable can be set, changed, or removed at any time. If this environment variable contains the value 'Y', then when a Java exception occurs during a Java method call from RPG, or a called Java method throws an exception to its caller, the Java trace for the exception will be printed. By default, it will be printed to the screen, and may not be possible to read. To get it printed to a file, set the Java option os400.stderr. (This would have to be done in a new job; it could be done by setting the QIBM_RPG_JAVA_PROPERTIES environment variable to '-Dos400.stderr=file:stderr.txt;'
- An RPG preprocessor enabling the SQL preprocessor to handle conditional compilation and nested /COPY
When the RPG compiler is called with a value other than *NONE for parameter PPGENOPT, it will behave as an RPG preprocessor. It will generate a new source file rather than generating a program. The new source file will contain the original source lines that are accepted by the conditional compilation directives such as /DEFINE and /IF. It will also have the source lines from files included by /COPY statements, and optionally it will have the source lines included by /INCLUDE statements. The new source file will have the comments from the original source file if PPGENOPT(*DFT) or PPGENOPT(*NORMVCOMMENT) is specified.When the SQL precompiler is called with a value other than *NONE for new parameter RPGPPOPT, the precompiler will use this RPG preprocessor to handle /COPY, the conditional compilation directives and possibly the /INCLUDE directive. This will allow SQLRPGLE source to have nested /COPY statements, and conditionally used statements.
Enhancements for V5R2 Enhancements for V5R1 The major enhancements to RPG IV since V4R4 are easier interfacing with Java™, new built-in functions, free form calculation specifications, control of which file is opened, qualified subfield names, and enhanced error handling. The following list describes these enhancements: - Improved support for calls between Java and ILE RPG using the Java Native Interface (JNI):
- A new data type: Object
- A new definition specification keyword: CLASS
- The LIKE definition specification keyword has been extended to support objects.
- The EXTPROC definition specification keyword has been extended to support Java procedures.
- New status codes.
- New built-in functions:
- Functions for converting a number into a duration that can be used in arithmetic expressions: %MSECONDS, %SECONDS, %MINUTES, %HOURS, %DAYS, %MONTHS, and %YEARS.
- The %DIFF function, for subtracting one date, time, or timestamp value from another.
- Functions for converting a character string (or date or timestamp) into a date, time, or timestamp: %DATE, %TIME, and %TIMESTAMP.
- The %SUBDT function, for extracting a subset of a date, time, or timestamp.
- Functions for finding an element in an array: %LOOKUP, %LOOKUPGT, %LOOKUPGE, %LOOKUPLT, and %LOOKUPLE.
- Functions for finding an element in a table: %TLOOKUP, %TLOOKUPGT, %TLOOKUPGE, %TLOOKUPLT, and %TLOOKUPLE.
- Functions for verifying that a string contains only specified characters (or finding the first or last exception to this rule): %CHECK and %CHECKR
- The %XLATE function, for translating a string based on a list of from-characters and to-characters.
- The %OCCUR function, for getting or setting the current occurrence in a multiple-occurrence data structure.
- The %SHTDN function, for determining if the operator has requested shutdown.
- The %SQRT function, for calculating the square root of a number.
- A new free-form syntax for calculation specifications. A block of free-form calculation specifcations is delimited by the compile directives /FREE and /END-FREE
- You can specify the EXTFILE and EXTMBR keywords on the file specification to control which external file is used when a file is opened.
- Support for qualified names in data structures:
- A new definition specification keyword: QUALIFIED. This keyword specifies that subfield names will be qualified with the data structure name.
- A new definition specification keyword: LIKEDS. This keyword specifies that subfields are replicated from another data structure. The subfield names will be qualified with the new data structure name. LIKEDS is allowed for prototyped parameters; it allows the parameter's subfields to be used directly in the called procedure.
- The INZ definition specification keyword has been extended to allow a data structure to be initialized based on its parent data structure.
- Enhanced error handling:
- Three new operation codes (MONITOR, ON-ERROR, and ENDMON) allow you to define a group of operations with conditional error handling based on the status code.
Other enhancements have been made to this release as well. These include: - You can specify parentheses on a procedure call that has no parameters.
- You can specify that a procedure uses ILE C or ILE CL calling conventions, on the EXTPROC definition specification keyw ord.
- The following /DEFINE names are predefined: *VnRnMn, *ILERPG, *CRTBNDRPG, and *CRTRPGMOD.
- The search string in a %SCAN operation can now be longer than string being searched. (The string will not be found, but this will no longer generate an error condition.)
- The parameter to the DIM, OCCURS, and PERRCD keywords no longer needs to be previously defined.
- The %PADDR built-in function can now take either a prototype name or an entry point name as its argument.
- A new operation code, ELSEIF, combines the ELSE and IF operation codes without requiring an additional ENDIF.
- The DUMP operation code now supports the A extender, which means that a dump is always produced - even if DEBUG(*NO) was specified.
- A new directive, /INCLUDE, is equivalent to /COPY except that /INCLUDE is not expanded by the SQL preprocessor. Included files cannot contain embedded SQL or host variables.
- The OFLIND file-specification keyword can now take any indicator, including a named indicator, as an argument.
- The LICOPT (licensed internal code options) keyword is now available on the CRTRPGMOD and CRTBNDRPG commands.
- The PREFIX file description keyword can now take an uppercase character literal as an argument. The literal can end in a period, which allows the file to be used with qualified subfields.
- The PREFIX definition specification keyword can also take an uppercase character literal as an argument. This literal cannot end in a period.
Back to top
|  |
|