Function calls

Use this information to learn about the function calls available in IBM® i programming.

Conventions used in the call descriptions on IBM i

For each call, this collection of topics gives a description of the parameters and usage of the call. This is followed by typical invocations of the call, and typical declarations of its parameters, in the RPG programming language.

Important: When coding IBM MQ API calls you must ensure that all relevant parameters (as described in the following sections) are provided. Failure to do so can produce unpredictable results.
The description of each call contains the following sections:
Call name
The call name, followed by a brief description of the purpose of the call.
Parameters
For each parameter, the name is followed by its data type in parentheses ( ) and its direction; for example:
CMPCOD (9-digit decimal integer) - output
There is more information about the structure data types in Elementary data types.
The direction of the parameter can be:
Input
You (the programmer) must provide this parameter.
Output
The call returns this parameter.
Input/output
You must provide this parameter, but it is modified by the call.

There is also a brief description of the purpose of the parameter, together with a list of any values that the parameter can take.

The last two parameters in each call are a completion code and a reason code. The completion code indicates whether the call completed successfully, partially, or not at all. Further information about the partial success or the failure of the call is given in the reason code.

Usage notes
Additional information about the call, describing how to use it and any restrictions on its use.
RPG invocation
Typical invocation of the call, and declaration of its parameters, in RPG.
Other notational conventions are:
Constants
Names of constants are shown in uppercase; for example, OOOUT.
Arrays
In some calls, parameters are arrays of character strings with a size that is not fixed. In the descriptions of these parameters, a lowercase n represents a numeric constant. When you code the declaration for that parameter, replace the n with the numeric value you require.