Wednesday, August 01, 2007

Built-in Functions or BIF list for RPGLE and RPGIV

Built-in functions are one of the best features of the modern RPG language. What are they? Well here's what the IBM website has to say:

"Built-in functions are similar to operation codes in that they perform operations on data you specify. Built-in functions can be used in expressions. Additionally, constant-valued built-in functions can be used in named constants. These named constants can be used in any specification."

Some of my personal and frequently used BIF are:

non-float numeric expression:edit code {:*CURSYM | *ASTFILL | currency symbol}
string representing edited value

%FOUND {file name}
'1' if the most recent relevant operation (for a particular file, if specified) found a record (CHAIN, DELETE, SETGT, SETLL), an element (LOOKUP), or a match (CHECK, CHECKR, SCAN)

Built-in functions, BIF, replaced many standard commands, such as SUBST, is now a BIF, %SUBST.

I highly recommend printing out the list and keeping it handy as a reference.
Need help using one of these? Drop me a comment or email me and we'll see what we can do.

The full list with explanations can be found here.

email: tojosan - at -

No comments: