Example
:
Parse Numeric Var1
After this instruction,
Var1
would be equal to: 9 0 SCIENTIFIC. See section “NUMERIC” on page 150
and the built-in functions in section “DIGITS” on page 183, and section “FORM” on page 185, and
section “FUZZ” on page 186.
PARSE PULL
parses the next string from the external data queue. If the external data queue is empty, PARSE PULL
reads a line from the default input stream (the user's terminal), and the program pauses, if necessary,
until a line is complete. You can add data to the head or tail of the queue by using the PUSH and
QUEUE instructions. You can find the number of lines currently in the queue with the QUEUED built-in
function, see page 190. Other programs in the system can alter the queue and use it as a means of
communication with programs written in REXX. See also the PULL instruction on page 158.
Note:
PULL and PARSE PULL read from the program stack. If that is empty, they read from the
terminal input buffer; and if that too is empty, they read from the console. (See the PULL
instruction, on page “Purpose” on page 158, for further details.)
PARSE SOURCE
parses data describing the source of the program running. The language processor returns a string
that is fixed (does not change) while the program is running. It returns a source string containing the
following tokens:
1. The characters CICS.
2. The string COMMAND, FUNCTION, or SUBROUTINE depending on whether the program was
invoked as some kind of host command, from a function call in an expression, by a CALL
instruction, or as a server process.
3. The name of the exec in uppercase. The name of the file (RFS), or VSE Librarian Sublibrary from
which the exec was originally loaded. The three formats are:
v
Library.sublibrary(member)
v
RFS fully qualified file identifier
v
Dataset name (member)
4. Initial (default) host command environment that is always REXXCICS.
5. Identifier of the specific CICS/ESA environment, which in this case is REXX/CICS.
PARSE VALUE
parses the data that is the result of evaluating
expression
. If you specify no
expression
, the null string
is used. Note that WITH is a subkeyword in this context and cannot be used as a symbol within
expression
.
Thus, for example:
PARSE VALUE time() WITH
hours ':' mins ':' secs
gets the current time and splits it into its constituent parts.
PARSE VAR
name
parses the value of the variable
name
. The
name
must be a symbol that is valid as a variable name
(that is, it cannot start with a period or a digit). Note that the variable
name
is not changed unless it
appears in the template, so that for example:
PARSE VAR string word1 string
removes the first word from
string
, puts it in the variable
word1
, and assigns the remainder back to
string
. Similarly
PARSE UPPER VAR string word1 string
in addition translates the data from
string
to uppercase before it is parsed.
PARSE
Chapter 13. Keyword Instructions
153
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...