DBRRIGHT

Read syntax diagramSkip visual syntax diagram
>>-DBRRIGHT--(--string--,--length--+-----------+--)------------><
                                   '-,--option-'      

returns the remainder from the DBRIGHT function of string. If length 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')         ->    ''


dfhrxci.html | Timestamp icon Last updated: Monday, 5 June 2017