Data types used in name-value information

Data types used in name-value information.

The name of the constant that defines the type is followed by the numeric value of the constant in parentheses. This numeric value is provided for debugging purposes only; handler providers should use the named constant within their code.

QrnDatatype_Alpha (1)
Fixed-length character string in the job CCSID. For input operations, if the value provided by the handler is shorter than the size of the field, the value will be padded on the right with single-byte blanks when the value is used to set the RPG field.
QrnDatatype_AlphaVarying (2)
Varying-length character string in the job CCSID.
QrnDatatype_Date (12)
Date. The value is in the job CCSID. The format of the field is given by the dtzFormat subfield and the separator is given by the dtSeparator subfield. The value for an output field or a key field is in the form returned by the %CHAR built-in function of RPG, for example "2025-02-28". The value required for an input field must be in the same format. The value is converted to a date value using the same processing as the %DATE RPG built-in function.
QrnDatatype_Dbcs (5)
Fixed-length DBCS string. The CCSID is indicated by the valueCcsid subfield. For input operations, if the value provided by the handler is shorter than the size of the field, the value will be padded on the right with double-byte blanks when the value is used to set the RPG field.
QrnDatatype_DbcsVarying (6)
Varying-length DBCS string. The CCSID is indicated by the valueCcsid subfield.
QrnDatatype_Decimal (8)
Decimal numeric, used for packed, zoned, and binary RPG fields. The value is in the job CCSID. The total number of digits is given by the numericDefinedLen subfield and the number of decimal places is given by the decimals subfield. The value for an output field or a key field is in the form returned by the %CHAR built-in function of RPG, for example "12.34" or "-5,67". The value required for an input field must be in a similar form. The length of the value is not required to match the length of the field; the value is converted to a packed, zoned, or binary value using the same processing as the %DECH RPG built-in function. For example, if the field has 7 digits and 1 decimal position, the value provided for an input operation could be "-1.76". The value placed in the RPG field would be -1.8.

The decimal point may be the period or the comma.

QrnDatatype_Float (11)
Float numeric. The value is in the job CCSID. The number of bytes of the field (4 or 8) is given by the numericDefinedLen subfield. The value for an output field or a key field is in the form returned by the %CHAR built-in function of RPG, for example "+1.2300000E+00". The value required for an input field must be in a similar form. The length of the value is not required to match the length of the field and is not required to have the exponent. The value is converted to a float value using the same processing as the %FLOAT RPG built-in function. For example, if the field has length 4, the value provided for an input operation could be "-1.76". The value placed in the RPG float field would be -1.76E00.
QrnDatatype_Indicator (7)
Single-byte character with the value '0' or '1', used as a Boolean type in RPG.
QrnDatatype_Integer (9)
Integer numeric. The value is in the job CCSID. The number of bytes of the field (1, 2, 4, or 8) is given by the numericDefinedLen subfield. The value for an output field or a key field is in the form returned by the %CHAR built-in function of RPG, for example "12" or "-5". The value required for an input field must be in a similar form. The length of the value is not required to match the length of the field; the value is converted to a integer value using the same processing as the %INTH RPG built-in function. For example, if the field has length 4 (defined as having 10 digits in RPG), the value provided for an input operation could be "-1.76". The value placed in the RPG integer field would be -2.
QrnDatatype_Time (13)
Time. The value is in the job CCSID. The format of the field is given by the dtzFormat subfield and the separator is given by the dtSeparator subfield. The value for an output field or a key field is in the form returned by the %CHAR built-in function of RPG, for example "23.30.01". The value required for an input field must be in the same format. The value is converted to a date value using the same processing as the %TIME RPG built-in function.
QrnDatatype_Timestamp (14)
Timestamp. The value is in the job CCSID. The value for an output field or a key field is in the form returned by the %CHAR built-in function of RPG, for example "2010-12-25-23.30.01.000000". The value required for an input field must be in the same format. The value is converted to a date value using the same processing as the %TIMESTAMP RPG built-in function.
QrnDatatype_Unicode (3)
Fixed-length UCS-2 string. The CCSID is indicated by the valueCcsid subfield. For input operations, if the value provided by the handler is shorter than the size of the field, the value will be padded on the right with UCS-2 blanks when the value is used to set the RPG field.
QrnDatatype_UnicodeVarying (4)
Varying-length UCS-2 string. The CCSID is indicated by the valueCcsid subfield.
QrnDatatype_Unsigned (10)
Unsigned integer numeric. The value is in the job CCSID. The number of bytes of the field (1, 2, 4, or 8) is given by the numericDefinedLen subfield. The value for an output field or a key field is in the form returned by the %CHAR built-in function of RPG, for example "12" or "5". The value required for an input field must be in a similar form. The length of the value is not required to match the length of the field; the value is converted to a unsigned integer value using the same processing as the %UNSH RPG built-in function. For example, if the field has length 2 (defined as having 5 digits in RPG), the value provided for an input operation could be "1.76". The value placed in the RPG unsigned field would be 2.