respAddNumericValue()

This procedure adds Numeric value for existing field.

ParameterTypeDescription
ptrPOINTERMandatoryPointer to field
numericValue30P 9MandatoryNumeric value

The procedure returns pointer of field. If procedure can’t add value, 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:

xxPtr = respAddField('data': 'stockOnHand');
respAddNumericValue(xxPtr: SRSTHQ);