SQL/MP Programming Manual for COBOL

Character Processing Rules (CPRL) Procedures
HP NonStop SQL/MP Programming Manual for COBOL529758-003
11-3
CPRL_ARE_
CPRL_ARE_
The CPRL_ARE_ procedure determines if all characters in a string are in the character
class defined by the specified CPRL. You can also call CPRL_ARE_ to scan a string
for the first character not in a specific character class.
The CPRL_ARE_ procedure returns these error codes:
classname pic X(classnamelength) input
is an array containing the name of the specified character class.
classnamelength pic S9(4) input
is the number of bytes in the character class name classname.
inputstring pic X(inputstringlength) input
is a string containing the data 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 in the character class
defined by the specified SQL collation or collation object, and
exceptcharaddr is set as follows:
exceptcharaddr = address(inputstring) + inputstringlength
ENTER TAL "CPRL_ARE_" USING
classname,
classnamelength,
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.
–5 The user-specified character class does not exist in the specified SQL collation or
collation object.
–6 The input string contains a character not in the specified character class.