DBWIDTH

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

returns the length of string in bytes.

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:
DBWIDTH('ab<.A.B>','Y')    ->    8
DBWIDTH('ab<.A.B>','N')    ->    6


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