z/OS TSO/E REXX Reference
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


DBLEFT

z/OS TSO/E REXX Reference
SA32-0972-00

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

returns a string of length length containing the leftmost length characters of string. The string returned is padded with pad characters (or truncated) on the right as needed. The default pad character is a blank.

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:
DBLEFT('ab<.A.B>',4)             ->    'ab<.A>'
DBLEFT('ab<.A.B>',3)             ->    'ab '
DBLEFT('ab<.A.B>',4,'x','Y')     ->    'abxx'
DBLEFT('ab<.A.B>',3,'x','Y')     ->    'abx'
DBLEFT('ab<.A.B>',8,'<.P>')      ->    'ab<.A.B.P>'
DBLEFT('ab<.A.B>',9,'<.P>')      ->    'ab<.A.B.P> '
DBLEFT('ab<.A.B>',8,'<.P>','Y')  ->    'ab<.A.B>'
DBLEFT('ab<.A.B>',9,'<.P>','Y')  ->    'ab<.A.B> '

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014