Previous topic |
Next topic |
Contents |
Contact z/OS |
Library |
PDF
Parsing multiple strings z/OS TSO/E REXX Reference SA32-0972-00 |
|
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:
This instruction consists of the keywords PARSE ARG and three comma-separated templates. (For an ARG instruction, the source strings to parse come from arguments you specify when you call a program or CALL a subroutine or function.) Each comma is an instruction to the parser to move on to the next string. Example:
Note that when a REXX program is started as a command, only one
argument string is recognized. You can pass multiple argument strings
for parsing:
If there are more templates than source strings, each variable in a leftover template receives a null string. If there are more source strings than templates, the language processor ignores leftover source strings. If a template is empty (two commas in a row) or contains no variable names, parsing proceeds to the next template and source string. |
Copyright IBM Corporation 1990, 2014
|