Storage; Strip; Substr (Substring) - IBM SC34-5764-01 Manual

Cics transaction server for vse/esa
Table of Contents

Advertisement

Functions
Here are some examples:
SPACE('abc def ')
SPACE(' abc def',3)
SPACE('abc def ',1)
SPACE('abc def ',0)
SPACE('abc def ',2,'+')

STORAGE

See section "External Functions Provided in REXX/CICS" on page 200.

STRIP

STRIP(string
,
returns string with leading or trailing characters or both removed, based on the option you specify. The
following are valid options. (Only the capitalized and highlighted letter is needed; all characters following it
are ignored.)
Both
removes both leading and trailing characters from string. This is the default.
Leading
removes leading characters from string.
Trailing
removes trailing characters from string.
The third argument, char, specifies the character to be removed, and the default is a blank. If you specify
char, it must be exactly one character long.
Here are some examples:
STRIP(' ab c ')
STRIP(' ab c ','L')
STRIP(' ab c ','t')
STRIP('12.7000',,0)
STRIP('0012.700',,0)

SUBSTR (Substring)

SUBSTR(string,n
,
returns the substring of string that begins at the nth character and is of length length, padded with pad if
necessary. The n must be a positive whole number. If n is greater than LENGTH(string), then only pad
characters are returned.
If you omit length, the rest of the string is returned. The default pad character is a blank.
Here are some examples:
SUBSTR('abc',2)
SUBSTR('abc',2,4)
SUBSTR('abc',2,6,'.')
Note: In some situations the positional (numeric) patterns of parsing templates are more convenient for
selecting substrings, especially if more than one substring is to be extracted from a string. See also
the LEFT and RIGHT functions.
192
CICS TS for VSE/ESA: REXX Guide
->
'abc def'
->
'abc
def'
->
'abc def'
->
'abcdef'
->
'abc++def'
)
option
,char
->
'ab c'
->
'ab c '
->
' ab c'
->
'12.7'
->
'12.7'
length
,pad
->
'bc'
->
'bc '
->
'bc....'
)

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Rexx

Table of Contents