ONSUBCODE returns a FIXED BINARY(31,0) value that gives more information about an I/O, JSON, or conversion error that occurred.
>>-ONSUBCODE()-------------------------------------------------><
For an I/O error, ONSUBCODE corresponds to the SUBCODE1 values documented for messages IBM0236I and IBM0265I. The SUBCODE1 values are defined in Messages and Codes.
For JSON built-in functions, when the ERROR condition is raised, ONSUBCODE returns the index of the invalid character.
If a JSON or Unicode CONVERSION condition is raised, ONSUBCODE returns the index of the invalid character.