respAddNumericField()

This procedure adds Numeric field into response.

ParameterTypeDescription
element30A VARYING, VARSIZEMandatoryName of element
fieldName30A VARYING, VARSIZEMandatoryField name
value30P 9MandatoryNumeric value

The procedure returns pointer of field. If procedure can’t add field, then returns null.

NOTE: Numeric values must be rounded to reqired number of decimals prior to add value to response. `

NOTE: Integer numbers are handled by JSON but only until 15 digits. If number is higher than 15 digits then most of JSON parser dumps. In RPG we can have up to 20 digits per integer number. Such big numbers must be then pack to JSON as string. See respAddNumValueAsString()`

Examples:

respAddNumericField('data': 'quantity': xxQTY);