SQL/MP Programming Manual for COBOL

Character Processing Rules (CPRL) Procedures
HP NonStop SQL/MP Programming Manual for COBOL529758-003
11-8
CPRL_COMPAREOBJECTS_
string2 pic X(string2length) input
is an array containing the second string to be compared.
string2length pic S9(4) input
is the length in bytes of string2.
result pic S9(4) output
indicates the result of the comparison, if the error code is 0 (zero):
cprladdr pic S9(9) input
is a pointer to the SQL collation or collation object.
CPRL_COMPAREOBJECTS_
The CPRL_COMPAREOBJECTS_ procedure compares two SQL collations or collation
objects to determine whether they are equal.
The CPRL_COMPAREOBJECTS_ procedure returns these error codes:
cprladdr1 pic S9(9) input
is the address of the first SQL collation or collation object.
cprladdr2 pic S9(9) input
is the address of the second SQL collation or collation object.
-1 string1 is less than string2.
0 The strings collate equally.
1 string1 is greater than string2.
ENTER TAL "CPRL_COMPAREOBJECTS_" USING
cprladdr1,
cprladdr2
GIVING errorcode.
Code Description
0 The operation was successful; the SQL collations or collation objects are equal.
–2 The SQL collation or collation object is invalid.
–4 The version of the SQL collation or collation object is not supported.
–21 The collations in the two specified SQL collations or collation objects do not
match.