SQL/MP Programming Manual for C

Character Processing Rules (CPRL) Procedures
HP NonStop SQL/MP Programming Manual for C429847-008
11-22
CPRL_READOBJECT_
CPRL_READOBJECT_
The CPRL_READOBJECT_ procedure reads a collation object from a Guardian disk
file (file code 199) into a user-specified buffer. CPRL_READOBJECT_ does not read
SQL collations (file code 941) generated by a CREATE COLLATION statement.
The CPRL_READOBJECT_ procedure returns these values:
If a file-system error occurs, CPRL_READOBJECT_ returns a file-system error code
rather than a CPRL error code. File-system error codes are always positive, whereas
CPRL error codes are less than or equal to zero (0).
buffer
is a user-supplied buffer to which CPRL_READOBJECT_ returns the collation
object if the call is successful. CPRL_READOBJECT_ uses a local 4 KB buffer
allocated on the data stack. If you are concerned about stack size limitations, use
this procedure with caution.
bufferlength
is the size of buffer in bytes.
objectlength
is the actual length in bytes of the collation object read into buffer.
#include <cextdecs(CPRL_READOBJECT_)>
short CPRL_READOBJECT_ (
short *buffer /* o */
,short bufferlength /* i */
,short *objectlength /* o */
,char *filename /* i */
,short filenamelength /* i */
,long *cprladdr ); /* o */
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.
–11 The user-specified buffer is too small for the SQL collation or collation object.
–12 The CPRL_READOBJECT_ local buffer is too small for the SQL collation or
collation object.
–13 An error occurred during a call to the FNAMEEXPAND procedure for the Guardian
file name.
–14 The file code of the Guardian file containing the collation object is not 199.