ILE RPG Built-in-functions. %ABS – Absolute Value of Expression. %ADDR – Get Address of Variable. %ALLOC – Allocate Storage. %CHAR – Convert to. In addition, under OS/ V3R2 and V3R7 the %PARMS built-in function was introduced. Since then, several built-in functions have been added to RPG IV. ‘1’ if the most recent file input operation or write to a subfile (for a particular file, if specified) ended in an end-of-file or beginning-of-file condition.

Author: Vijora Doulkree
Country: Iceland
Language: English (Spanish)
Genre: Science
Published (Last): 13 October 2004
Pages: 162
PDF File Size: 6.25 Mb
ePub File Size: 11.37 Mb
ISBN: 829-6-50006-470-3
Downloads: 25457
Price: Free* [*Free Regsitration Required]
Uploader: Akinojora

The two operands must be numeric values with zero decimal positions.

Exception is issued if the value is less than 1 or funtions than the total number of occurrences. Buil a file name is specified, this function applies to the most recent SETLL operation for the specified file.

If the pointer is not set, an error will occur. If the start position is specified, the search begins at the starting position.

An expression argument can include a built-in function. Most built in functions accept parameters which can be coded in parenthesis.

Marc’s Place

Date and date Time and time Timestamp and timestamp Date and timestamp only the date portion of the timestamp is considered Time and timestamp only builh time portion of the timestamp is considered. For example, if the string contains the third character in fromevery occurrence of that character is replaced with the third character in to. This built-in gives non-static native methods access to the class instance.


The first three parameters can be of type character, graphic, or UCS The value returned by the function is compatible with both type numeric and type duration. Float expressions are not allowed in the first parameter.

Built In Functions

It cannot contain an expression, but some constant-valued built-in functions and constant expressions may be accepted. Unindexed arrays are allowed for string, start, and length. When any parameter is variable in length, the values of the other parameters are checked against the current length, not the maximum length.

If the operation cannot complete successfully, exception or is issued. If it is not specified, the starting position is at the beginning of the source string.

The second parameter must be a non-float numeric value with zero decimal places. The result is always the position in the source string even if the starting position is specified. The length indicates the amount ib storage that the pointer points to. As a result, the length of each occurrence may have to be increased enough to make the length an exact multiple of 16 so that the pointer subfields will be positioned correctly in storage for every occurrence.

The starting position must be greater than zero.


The fieldname can be a null-capable array element, data structure, stand-alone field, subfield, or multiple occurrence data structure. If the value is negative, the value returned is the value of the expression but with the negative sign removed. The value is fucntions address of the specified variable. The starting position defaults to 1.

Marc’s Place – RPG Essentials – Built-In Functions

Adding or subtracting a number of months to the 29th, 30th, or 31st day of a month may not be reversible. The prototype must a prototype for a bound call. Unindexed arrays are not allowed for start and length. The sequence the statement will be evaluated is as follows: For information on the input formats that can be used, see Time Data Type.

New functions are added with each release of the operation system.

The second parameter is the date format for character or numeric input. Multiple parameters should be separated by a colon: If rplge value matches the specified condition, zero is returned. For date, time, or timestamp data, the second parameter contains the date, time, or timestamp format to which the returned character data is converted.