This procedure adds Numeric field into response.
Parameter | Type | Description | |
---|---|---|---|
element | 30A VARYING, VARSIZE | Mandatory | Name of element |
fieldName | 30A VARYING, VARSIZE | Mandatory | Field name |
value | 30P 9 | Mandatory | Numeric 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);