IBM Version 4 Universal Remote User Manual


 
the size of the variable in your program. In the example program in “RPG Call
Statement—Parameter Example” on page 3-2, RCVLEN is the length of receiver
variable parameter.
The length field, according to the required parameter group, must be described as
BINARY(4). This means that a field of 4 bytes is passed where the value is speci-
fied in binary. You need to know how your high-level language allows you to define
a 4-byte field and place a binary value in it. The API does not care if the field is
declared as a binary type. For example, some languages, like control language
(CL), do not have a binary type. What is important is that the field is 4 bytes in
length and that it contains the receiver length in binary.
If you write programs in CL, you need the %BIN function to convert a decimal value
or variable to a character field that is declared as 4 bytes. If you write programs in
RPG, you can declare a data structure that contains a 4-byte field of zero decimals
and is defined as B for binary (4 on page 3-7). Because the field is a binary
type, RPG would make a binary value.
Format Name:
A format name is a name that identifies what type of information
you want returned in the receiver variable. Because this API has a single format
name, JOBD0100, you would use the format name given (5 on page 3-7) in the
Retrieve Job Description Information API. The format name variable in the
example program is called FORMAT. You can place the format name in a variable
or pass it as a literal.
Qualified Job Description Name:
This name must be passed as a 20-character
name with the job description name in the first 10 characters and the library qual-
ifier beginning in the 11th character. If you want JOBD1 in LIBX, you would
specify:
1 112
. . .
. . .
JOBD1 LIBX
The special values of *CURLIB or *LIBL can be used as the library qualifier.
Note: APIs generally do not convert parameter values to uppercase. When using
object names (like job description and library), you must provide the name
in uppercase.
Error Code:
This parameter allows you to select how errors are to be handled.
The include file QUSEC contains the definition for the error code structure that is
used for the error code parameter.
You can choose to receive exceptions (escape messages) or to receive an error-
code data structure that allows you to determine if an exception occurred.
Depending on your high-level language, you may not have a choice for which
method you use. You may have to use the error-code data structure because
some languages do not provide for escape messages.
In the example in “Retrieving the Hold Parameter (Exception Message)—OPM RPG
Example” on page 3-6, the RPG program requests that exceptions be sent if any
errors occur. To provide for this type of exception handling, a 4-byte binary field
3-4 System API Programming V4R1