SQL/MP Programming Manual for C

Character Processing Rules (CPRL) Procedures
HP NonStop SQL/MP Programming Manual for C429847-008
11-15
CPRL_GETFIRST_
cprladdr
is a pointer to the SQL collation or collation object.
CPRL_GETFIRST_
The CPRL_GETFIRST_ procedure finds the first string of a specified length according
to an SQL collation or collation object.
This procedure replaces the practice of using a string of hexadecimal zeros to
generate the first string of a specified length, which does not work correctly for
nonbinary collating sequences.
The CPRL_GETFIRST_ procedure returns these values:
firststring
is an array in which CPRL_GETFIRST_ returns the first string.
firststringmaxlength
is the maximum length of firststring.
firststringlength
specifies the number of bytes of firststring that were scanned. (If
CPRL_GETFIRST_ is successful, firststringmaxlength and
firststringlength are equal.)
cprladdr
is a pointer to the SQL collation or collation object.
#include <cextdecs(CPRL_GETFIRST_)>
short CPRL_GETFIRST_ (
char *firststring /* o */
,short firststringmaxlength /* i */
,short *firststringlength /* o */
,long cprladdr ); /* i */
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.