DBRRIGHT(string,length
,option
)
returns the remainder from the DBRIGHT function of string.Iflength is greater than the length of string,
returns a null string.
The option controls the counting rule. Y counts SO and SI within mixed strings as one each. N does not
count the SO and SI and is the default.
Here are some EBCDIC examples:
DBRRIGHT('ab<.A.B>',4) -> 'ab'
DBRRIGHT('ab<.A.B>',3) -> 'ab<.A>'
DBRRIGHT('ab<.A.B>',5) -> 'a'
DBRRIGHT('ab<.A.B>',4,'Y') -> 'ab<.A>'
DBRRIGHT('ab<.A.B>',5,'Y') -> 'ab<.A>'
DBRRIGHT('ab<.A.B>',8) -> ''
DBRRIGHT('ab<.A.B>',8,'Y') -> ''
DBTODBCS
DBTODBCS(string)
converts all passed, valid SBCS characters (including the SBCS blank) within string to the corresponding
DBCS equivalents. Other single-byte codes and all DBCS characters are not changed. In EBCDIC, SO
and SI brackets are added and removed where appropriate.
Here are some EBCDIC examples:
DBTODBCS('Rexx 1988') -> '<.R.e.x.x. .1.9.8.8>'
DBTODBCS('<.A> <.B>') -> '<.A. .B>'
Note: In these examples, the .x is the DBCS character corresponding to an SBCS x.
DBTOSBCS
DBTOSBCS(string)
converts all passed, valid DBCS characters (including the DBCS blank) within string to the corresponding
SBCS equivalents. Other DBCS characters and all SBCS characters are not changed. In EBCDIC, SO and
SI brackets are removed where appropriate.
Here are some EBCDIC examples:
DBTOSBCS('<.S.d>/<.2.-.1>') -> 'Sd/2-1'
DBTOSBCS('<.X. .Y>') -> '<.X> <.Y>'
Note: In these examples, the .d is the DBCS character corresponding to an SBCS d. But the .X and .Y
do not have corresponding SBCS characters and are not converted.
DBUNBRACKET
DBUNBRACKET(string)
In EBCDIC, removes the SO and SI brackets from a DBCS-only string enclosed by SO and SI brackets. If
the string is not bracketed, a SYNTAX error results.
Here are some EBCDIC examples:
DBUNBRACKET('<.A.B>') -> '.A.B'
DBUNBRACKET('ab<.A>') -> SYNTAX error
Appendix C. Double-Byte Character Set (DBCS) Support 407