decimal point. If you specify
n
, it must be a positive whole number or zero. The
number
is first rounded
according to standard REXX rules, just as though the operation
0
had been carried out. The
number is then truncated to
n
decimal places (or trailing zeros are added if needed to make up the
specified length). The result is never in exponential form.
Here are some examples:
TRUNC(12.3)
->
12
TRUNC(127.09782,3)
->
127.097
TRUNC(127.1,3)
->
127.100
TRUNC(127,2)
->
127.00
Note:
The
number
is rounded according to the current setting of NUMERIC DIGITS if necessary before
the function processes it.
USERID
USERID()
returns the CICS signon user ID if the user is signed onto CICS or the CICS region default user ID (if one
was specified by the CICS systems programmer). User IDs are padded on the right with blanks so that the
returned value is always eight bytes long.
Here is an example:
USERID()
->
'ARTHUR' /* Maybe */
VALUE
VALUE(
name
,
newvalue
,
selector
)
returns the value of the symbol that
name
(often constructed dynamically) represents and optionally
assigns it a new value. By default, VALUE refers to the current REXX-variables environment, however, if
you want to specify
selector
the value must be RLS. If the selector of RLS is specified, then the variable
operated on is a REXX List System (RLS) variable, rather than a REXX variable. If you use the function to
refer to REXX variables, then
name
must be a valid REXX symbol. (You can confirm this by using the
SYMBOL function.) Lowercase characters in
name
are translated to uppercase. Substitution in a
compound name (see section “Compound Symbols” on page 122) occurs if possible.
If you specify
newvalue
, then the named variable is assigned this new value. This does not affect the
result returned; that is, the function returns the value of
name
as it was before the new assignment.
Here are some examples:
/* After: Drop A3; A33=7; K=3; fred='K'; list.5='Hi' */
VALUE('a'k)
->
'A3' /* looks up A3
*/
VALUE('a'k||k)
->
'7'
/* looks up A33
*/
VALUE('fred')
->
'K'
/* looks up FRED
*/
VALUE(fred)
->
'3'
/* looks up K
*/
VALUE(fred,5)
->
'3'
/* looks up K and
*/
/* then sets K=5
*/
VALUE(fred)
->
'5'
/* looks up K
*/
VALUE('LIST.'k)
->
'Hi' /* looks up LIST.5 */
The following example returns the VALUE of the REXX variable FRED that has been stored in an RLS
variable.
Functions
196
CICS TS for VSE/ESA: REXX Guide
Содержание SC34-5764-01
Страница 1: ...CICS Transaction Server for VSE ESA REXX Guide SC34 5764 01...
Страница 2: ......
Страница 3: ...CICS Transaction Server for VSE ESA REXX Guide SC34 5764 01...
Страница 22: ...xx CICS TS for VSE ESA REXX Guide...
Страница 23: ...Part 1 User s Guide Copyright IBM Corp 1992 2009 1...
Страница 24: ...2 CICS TS for VSE ESA REXX Guide...
Страница 40: ...18 CICS TS for VSE ESA REXX Guide...
Страница 54: ...Using Variables and Expressions 32 CICS TS for VSE ESA REXX Guide...
Страница 106: ...84 CICS TS for VSE ESA REXX Guide...
Страница 110: ...88 CICS TS for VSE ESA REXX Guide...
Страница 122: ...100 CICS TS for VSE ESA REXX Guide...
Страница 123: ...Part 2 Reference Copyright IBM Corp 1992 2009 101...
Страница 124: ...102 CICS TS for VSE ESA REXX Guide...
Страница 130: ...Introduction 108 CICS TS for VSE ESA REXX Guide...
Страница 152: ...REXX General Concepts 130 CICS TS for VSE ESA REXX Guide...
Страница 224: ...Functions 202 CICS TS for VSE ESA REXX Guide...
Страница 252: ...230 CICS TS for VSE ESA REXX Guide...
Страница 278: ...256 CICS TS for VSE ESA REXX Guide...
Страница 312: ...DB2 Interface 290 CICS TS for VSE ESA REXX Guide...
Страница 316: ...High level Client Server Support 294 CICS TS for VSE ESA REXX Guide...
Страница 340: ...318 CICS TS for VSE ESA REXX Guide...
Страница 344: ...for execs Commands 322 CICS TS for VSE ESA REXX Guide...
Страница 399: ...Part 3 Appendixes Copyright IBM Corp 1992 2009 377...
Страница 400: ...378 CICS TS for VSE ESA REXX Guide...
Страница 438: ...416 CICS TS for VSE ESA REXX Guide...
Страница 442: ...System Definition Customization Administration 420 CICS TS for VSE ESA REXX Guide...
Страница 446: ...Security 424 CICS TS for VSE ESA REXX Guide...
Страница 448: ...426 CICS TS for VSE ESA REXX Guide...
Страница 464: ...442 CICS TS for VSE ESA REXX Guide...
Страница 466: ...444 CICS TS for VSE ESA REXX Guide...
Страница 468: ...446 CICS TS for VSE ESA REXX Guide...
Страница 476: ...454 CICS TS for VSE ESA REXX Guide...
Страница 478: ...456 CICS TS for VSE ESA REXX Guide...
Страница 479: ......
Страница 480: ...SC34 5764 01...
Страница 481: ...Spine information CICS TS for VSE ESA REXX Guide...