SQL/MP Programming Manual for COBOL

Character Processing Rules (CPRL) Procedures
HP NonStop SQL/MP Programming Manual for COBOL529758-003
11-14
CPRL_GETDOWNSHIFTTABLE_
CPRL_GETDOWNSHIFTTABLE_
The CPRL_GETDOWNSHIFTTABLE_ procedure extracts downshift information from
an SQL collation or collation object.
The CPRL_GETDOWNSHIFTTABLE_ procedure returns these error codes:
array pic X(256) output
is a 256-byte array specified by the user.
If the call is successful, CPRL_GETDOWNSHIFTTABLE_ sets each byte in array
to the downshifted version of the corresponding character in the SQL collation or
collation object.
If the call is unsuccessful, array is not modified.
cprladdr pic S9(9) input
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
non-binary collating sequences.
ENTER TAL "CPRL_GETDOWNSHIFTTABLE_" USING
array,
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.
ENTER TAL "CPRL_GETFIRST_" USING
firststring,
firststringmaxlength,
firststringlength,
cprladdr
GIVING errorcode.