SQL/MP Programming Manual for COBOL

Character Processing Rules (CPRL) Procedures
HP NonStop SQL/MP Programming Manual for COBOL529758-003
11-10
CPRL_DOWNSHIFT_
decodedstringlength pic S9(4) output
is the number of bytes of encodedstring that were decoded. CPRL_DECODE_
pads the remainder of decodedstring with blanks up to
decodedstringmaxlength.
cprladdr pic S9(9) input
is a pointer to the SQL collation or collation object.
CPRL_DOWNSHIFT_
The CPRL_DOWNSHIFT_ procedure downshifts a character string according to the
downshift rules in a specified SQL collation or collation object.
The CPRL_DOWNSHIFT_ procedure returns these error codes:
inputstring pic X(inputstringlength) input
is an array in which CPRL_UPSHIFT_ returns the downshifted string.
inputstringlength pic S9(4) input
is the number of bytes to be downshifted in inputstring.
shiftedstring pic X(shiftedstringmaxlength) output
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.
ENTER TAL "CPRL_DOWNSHIFT_" USING
inputstring,
inputstringlength,
shiftedstring,
shiftedstringmaxlength,
shiftedstringlength,
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.
–20 The user-specified buffer is not large enough to receive the returned string.
–21 The collations in the two specified SQL collations or collation objects do not
match.