SQL/MP Programming Manual for COBOL

Character Processing Rules (CPRL) Procedures
HP NonStop SQL/MP Programming Manual for COBOL529758-003
11-4
CPRL_AREALPHAS_
If -6 is returned, the first character in istring not in the specified 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 pic S9(9) input
is a pointer to the SQL collation or collation object.
CPRL_AREALPHAS_
The CPRL_AREALPHAS_ procedure determines if all characters in a string are in the
ALPHAS character class according to a specified SQL collation or collation object. You
can also use this procedure to scan for the first character in the string that is not in the
ALPHAS character class.
The CPRL_AREALPHAS_ procedure returns these error codes:
inputstring pic X(inputstringlength) input
is an array containing the string to be scanned.
inputstringlength pic S9(4) input
is the number of bytes to be scanned in inputstring.
exceptcharaddr pic S9(9) output
is set as follows:
If the call is successful, all the scanned characters are ALPHAS character
class, and exceptcharaddr is set:
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.
ENTER TAL "CPRL_AREALPHAS_" USING
inputstring,
inputstringlength,
exceptcharaddr,
cprladdr
GIVING errorcode.
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 ALPHAS character class.