APIs support character data and binary data.
In the API parameter tables, CHAR(*) represents character data that has:
In the API parameter tables, BINARY(2) and BINARY(4) represent numeric data. These parameters must be signed, 2- or 4-byte numeric values with a precision of 15 (halfword) or 31 (fullword) bits and one high-order bit for the sign. Numeric parameters that must be unsigned 4-byte numeric values are explicitly defined as BINARY(4) UNSIGNED.
When you develop applications that use binary values, be aware that some high-level languages allow the definition of binary variables by using precision and not length. For example, an RPG definition of binary length 4 specifies a precision of 4 digits, which can be stored in a 2-byte binary field. For API BINARY(4) fields, RPG developers should use one of the following: