SQL/MP Programming Manual for C

Character Processing Rules (CPRL) Procedures
HP NonStop SQL/MP Programming Manual for C429847-008
11-5
CPRL_ARENUMERICS_
exceptcharaddr
is set as follows:
If the call is successful, all the scanned characters are in the ALPHAS
character class, and exceptcharaddr is set as follows:
exceptcharaddr = address(inputstring) + inputstringlength
If –6 is returned, the first character in inputstring that is not in the
ALPHAS character class was found; exceptcharaddr is set to the address
of this character.
For other error codes, exceptcharaddr is set to an invalid address.
cprladdr
is a pointer to the SQL collation or collation object.
CPRL_ARENUMERICS_
The CPRL_ARENUMERICS_ procedure determines if all characters in a string are
numeric according to the specified SQL collation or collation object. You can also use
CPRL_ARENUMERICS_ to scan for the first nonnumeric character in a string.
The CPRL_ARENUMERICS_ procedure returns these values:
inputstring
is an array containing the data to be scanned.
inputstringlength
is the number of bytes in inputstring to be scanned.
#include <cextdecs(CPRL_ARENUMERICS_)>
short CPRL_ARENUMERICS_ (
char *inputstring /* i */
,short inputstringlength /* i */
,long *exceptcharaddr /* o */
,long cprladdr ); /* i */
Code Description
0 The operation was successful.
–2 The SQL collation or collation object is invalid.
–4 The version of the SQL collation or collation object is not supported.
–6 The input string contains a character not in the specified character class.