
When total=7 then new='purple'
When total=9 then new='orange'
When total=10 then new='green'
Otherwise new=var1
/* entered duplicates */
END
Say new; exit
/* Displays: "purple" */
Err:
say 'Input error--color is not "red" or "blue" or "yellow"'; exit
ARG converts alphabetic characters to uppercase before parsing. An example of ARG with the arguments
in the CALL to a subroutine is in section “Parsing Multiple Strings.”
PARSE ARG
works the same as ARG except that PARSE ARG does not convert alphabetic characters to
uppercase before parsing.
PARSE EXTERNAL
Say "Enter Yes or No =====> "
parse upper external answer 2 .
If answer='Y'
then say "You said 'Yes'!"
else say "You said 'No'!"
PARSE NUMERIC
parse numeric digits fuzz form
say digits fuzz form
/* Displays: '9 0 SCIENTIFIC'
*/
/* (if defaults are in effect)
*/
PARSE PULL
PUSH '80 7'
/* Puts data on queue
*/
parse pull fourscore seven /* Assigns: fourscore='80'; seven='7' */
SAY foseven
/* Displays: "87"
*/
PARSE SOURCE
parse source sysname .
Say sysname
/* Displays:
"CICS"
*/
PARSE VALUE
example is on page 203.
PARSE VAR
examples are throughout the chapter, starting on page 204.
PARSE VERSION
parse version . level .
say level
/* Displays: "3.48" */
PULL
works the same as PARSE PULL except that PULL converts alphabetic characters to uppercase
before parsing.
Advanced Topics in Parsing
This section includes parsing multiple strings and flow charts depicting a conceptual view of parsing.
Parsing Multiple Strings
Only ARG and PARSE ARG can have more than one source string. To parse
multiple strings
, you can
specify multiple comma-separated templates. Here is an example:
parse arg template1, template2, template3
Parsing
Chapter 15. Parsing
211
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...