nonobject information that represents data known to the system, such as job infor-
mation or system status.
Description of an API
Most APIs have similar topic headings. The following lists the API topic headings,
each with an overview and details on how to use the information.

Parameters

The Parameters box describes how to call the API. The first column in the Param-
eters box lists the required order of the parameters. The second column lists each
parameter used on the call.
The third column lists whether the parameter is defined for input, output, or input
and output. Input parameters and fields are not changed by the API. They have
the same value on the return from the API call as they do before the API call. In
contrast, output parameters are changed. Any information that an API caller places
in an output parameter or output field before the call to the API could be lost on the
return from the call to the API.
In the fourth column of the Parameters box is the type of data defined for the
parameter. CHAR(*) represents a data type that is not known, such as character,
binary, and so on, or a length that is not known. Binary(
x
) represents
x
bytes of a
binary value. CHAR(
x
) represents
x
bytes of character data. When calling the
QWDRJOBD API, for example, there is an 8-byte character format name, a 4-byte
binary value named length of receiver variable, and a variable-length receiver vari-
able. The receiver variable is a structure made up of several character and binary
fields. For more information on format names, see “Format Name” on page 3-4.
RPG Call Statement—Parameter Example:
In this example program, you must
pass 5 parameters to use the API. For example, your RPG CALL statement might
look like the following:
C CALL 'QWDRJOBD'
C PARM QWDBH Receiver Var.
C PARM RCVLEN Length QWDBH
C PARM FORMAT Format Name
C PARM LFNAM Qual. Job Desc
C PARM QUSBN Error Code
Note: There is no parameter for the HOLD information. The first parameter,
receiver variable (QWDBH), is where the information is passed back from
the job description API. You will receive a data structure that contains infor-
mation, and you will need to find the specific location within the data struc-
ture for where the HOLD information is stored.

Authorities and Locks

The Authorities and Locks topic lists all the authorities that you need to use the
API. This topic also lists the locks that the API uses. To use an API, you must
have the correct authority to the following:
The API itself
All the objects that the API uses
Any locks that the API places on any objects
3-2 System API Programming V4R1