Verify; Word - IBM SC34-5764-01 Manual

Cics transaction server for vse/esa
Table of Contents

Advertisement

/* REXX EXEC - ASSIGN FIND VALUE OF FRED */
FRED = 7
'RLS VARPUT FRED \USERS\userid\'
X = VALUE(FRED,,RLS)
SAY X
/* X now = 7
Notes:
1. If the VALUE function refers to an uninitialized REXX variable then the default value of the variable is
always returned; the NOVALUE condition is not raised. A reference to RLS variables never raises
NOVALUE.
2. If you specify the name as a single literal string and omit newvalue and selector, the symbol is a
constant and so the string between the quotation marks can usually replace the whole function call.
(For example, fred=VALUE('k'); is identical with the assignment fred=k;, unless the NOVALUE
condition is being trapped. See Chapter 17, "Conditions and Condition Traps," on page 225.)

VERIFY

VERIFY(string,reference
returns a number that, by default, indicates whether string is composed only of characters from reference;
returns 0 if all characters in string are in reference, or returns the position of the first character in string not
in reference.
The option can be either Nomatch (the default) or Match. (Only the capitalized and highlighted letter is
needed. All characters following it are ignored, and it can be in upper- or lowercase, as usual.) If you
specify Match, the function returns the position of the first character in string that is in reference, or returns
0 if none of the characters are found.
The default for start is 1; thus, the search starts at the first character of string. You can override this by
specifying a different start point, which must be a positive whole number.
If string is null, the function returns 0, regardless of the value of the third argument. Similarly, if start is
greater than LENGTH(string), the function returns 0. If reference is null, the function returns 0 if you specify
Match; otherwise the function returns the start value.
Here are some examples:
VERIFY('123','1234567890')
VERIFY('1Z3','1234567890')
VERIFY('AB4T','1234567890')
VERIFY('AB4T','1234567890','M')
VERIFY('AB4T','1234567890','N')
VERIFY('1P3Q4','1234567890',,3)
VERIFY('123','',N,2)
VERIFY('ABCDE','',,3)
VERIFY('AB3CD5','1234567890','M',4)

WORD

WORD(string,n)
returns the nth blank-delimited word in string or returns the null string if fewer than n words are in string.
The n must be a positive whole number. This function is exactly equivalent to SUBWORD(string,n,1).
Here are some examples:
WORD('Now is the time',3)
WORD('Now is the time',5)
*/
,
option
,start
->
0
->
2
->
1
->
3
->
1
->
4
->
2
->
3
->
6
->
'the'
->
''
)
Chapter 14. Functions
Functions
197

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Rexx

Table of Contents