SQL/MP Programming Manual for C
Character Processing Rules (CPRL) Procedures
HP NonStop SQL/MP Programming Manual for C—429847-008
11-11
CPRL_ENCODE_
inputstring
is an array in which CPRL_UPSHIFT_ returns the downshifted string. 
inputstringlength
is the number of bytes to be downshifted in inputstring.
shiftedstring
is an array in which CPRL_DOWNSHIFT_ returns the downshifted string. 
The values for inputstring and shiftedstring can be equal, but other 
values can cause unpredictable results.
shiftedstringmaxlength
specifies the maximum length of shiftedstring; it must be greater than equal to 
inputstring.
shiftedstringlength
specifies the length of the downshifted string returned in shiftedstring.
cprladdr
is a pointer to the SQL collation or collation object.
CPRL_ENCODE_ 
The CPRL_ENCODE_ procedure encodes a character string so that a subsequent 
binary comparison produces proper results for the specified SQL collation. Use 
CPRL_ENCODE_ in situations where the number of encodings required is 
substantially less than the number of comparisons (for example, during a sort).
#include <cextdecs(CPRL_ENCODE_)>
short CPRL_ENCODE_ ( 
 char *decodedstring /* i */
 ,short decodedstringlength /* i */
 ,char *encodedstring /* o */
 ,short encodedstringmaxlength /* i */
 ,short *encodedstringlength /* o */
 ,long cprladdr ); /* i */










