SQL/MP Programming Manual for COBOL

Character Processing Rules (CPRL) Procedures
HP NonStop SQL/MP Programming Manual for COBOL529758-003
11-21
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 error codes:
If a file-system error occurs, CPRL_READOBJECT_ return 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 pic S9(4) output
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 pic S9(4) input
is the size of buffer in bytes.
objectlength pic S9(4) output
is the actual length in bytes of the collation object read into buffer.
ENTER TAL "CPRL_READOBJECT_" USING
buffer
bufferlength
objectlength
filename
filenamelength
cprladdr
GIVING errorcode.
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.