
Here are some examples:
SPACE('abc
def
')
->
'abc def'
SPACE('
abc def',3)
->
'abc
def'
SPACE('abc
def
',1)
->
'abc def'
SPACE('abc
def
',0)
->
'abcdef'
SPACE('abc
def
',2,'+')
->
'abc++def'
STORAGE
See section “External Functions Provided in REXX/CICS” on page 200.
STRIP
STRIP(
string
,
option
,
char
)
returns
string
with leading or trailing characters or both removed, based on the
option
you specify. The
following are valid
option
s. (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
')
->
'ab c'
STRIP('
ab c
','L')
->
'ab c
'
STRIP('
ab c
','t')
->
'
ab c'
STRIP('12.7000',,0)
->
'12.7'
STRIP('0012.700',,0)
->
'12.7'
SUBSTR (Substring)
SUBSTR(
string
,
n
,
length
,
pad
)
returns the substring of
string
that begins at the
n
th 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)
->
'bc'
SUBSTR('abc',2,4)
->
'bc
'
SUBSTR('abc',2,6,'.')
->
'bc....'
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.
Functions
192
CICS TS for VSE/ESA: REXX Guide
Summary of Contents for SC34-5764-01
Page 1: ...CICS Transaction Server for VSE ESA REXX Guide SC34 5764 01...
Page 2: ......
Page 3: ...CICS Transaction Server for VSE ESA REXX Guide SC34 5764 01...
Page 22: ...xx CICS TS for VSE ESA REXX Guide...
Page 23: ...Part 1 User s Guide Copyright IBM Corp 1992 2009 1...
Page 24: ...2 CICS TS for VSE ESA REXX Guide...
Page 40: ...18 CICS TS for VSE ESA REXX Guide...
Page 54: ...Using Variables and Expressions 32 CICS TS for VSE ESA REXX Guide...
Page 106: ...84 CICS TS for VSE ESA REXX Guide...
Page 110: ...88 CICS TS for VSE ESA REXX Guide...
Page 122: ...100 CICS TS for VSE ESA REXX Guide...
Page 123: ...Part 2 Reference Copyright IBM Corp 1992 2009 101...
Page 124: ...102 CICS TS for VSE ESA REXX Guide...
Page 130: ...Introduction 108 CICS TS for VSE ESA REXX Guide...
Page 152: ...REXX General Concepts 130 CICS TS for VSE ESA REXX Guide...
Page 224: ...Functions 202 CICS TS for VSE ESA REXX Guide...
Page 252: ...230 CICS TS for VSE ESA REXX Guide...
Page 278: ...256 CICS TS for VSE ESA REXX Guide...
Page 312: ...DB2 Interface 290 CICS TS for VSE ESA REXX Guide...
Page 316: ...High level Client Server Support 294 CICS TS for VSE ESA REXX Guide...
Page 340: ...318 CICS TS for VSE ESA REXX Guide...
Page 344: ...for execs Commands 322 CICS TS for VSE ESA REXX Guide...
Page 399: ...Part 3 Appendixes Copyright IBM Corp 1992 2009 377...
Page 400: ...378 CICS TS for VSE ESA REXX Guide...
Page 438: ...416 CICS TS for VSE ESA REXX Guide...
Page 442: ...System Definition Customization Administration 420 CICS TS for VSE ESA REXX Guide...
Page 446: ...Security 424 CICS TS for VSE ESA REXX Guide...
Page 448: ...426 CICS TS for VSE ESA REXX Guide...
Page 464: ...442 CICS TS for VSE ESA REXX Guide...
Page 466: ...444 CICS TS for VSE ESA REXX Guide...
Page 468: ...446 CICS TS for VSE ESA REXX Guide...
Page 476: ...454 CICS TS for VSE ESA REXX Guide...
Page 478: ...456 CICS TS for VSE ESA REXX Guide...
Page 479: ......
Page 480: ...SC34 5764 01...
Page 481: ...Spine information CICS TS for VSE ESA REXX Guide...