Cprl_Compare1Encoded - HP NonStop SQL/MP Programming Manual

For c
Table of Contents

Advertisement

Character Processing Rules (CPRL) Procedures
exceptcharaddr
is set as follows:
If the call is successful, all the scanned characters are numeric characters, and
exceptcharaddr is set as follows:
exceptcharaddr = address(inputstring) + inputstringlength
If –6 is returned, the first nonnumeric character in inputstring 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_COMPARE1ENCODED_

The CPRL_COMPARE1ENCODED_ procedure compares two strings according to an
SQL collation or collation object. The first string is assumed to be in encoded form, and
the second is assumed to be in original (not encoded) form. For strings of unequal
length, the procedure logically pads the shorter string with blanks.
Use the CPRL_COMPARE1ENCODED_ procedure to compare a constant with a set
of values in one pass. The procedure encodes as much of the second string as
necessary to perform the compare, and the overhead of repeatedly encoding the
constant is saved.
#include <cextdecs(CPRL_COMPARE1ENCODED_)>
short CPRL_COMPARE1ENCODED_ (
The CPRL_COMPARE1ENCODED_ procedure returns these values:
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.
string1
is an array containing the first string to be compared. string1 is assumed to be
in encoded form.
HP NonStop SQL/MP Programming Manual for C—429847-008
char *string1
,short string1length
,char *string2
,short string2length
,short *result
,long cprladdr );
11-6
CPRL_COMPARE1ENCODED_
/* i */
/* i */
/* i */
/* i */
/* o */
/* i */

Advertisement

Table of Contents
loading

Table of Contents