Previous topic |
Next topic |
Contents |
Contact z/OS |
Library |
PDF
ARG z/OS TSO/E REXX Reference SA32-0972-00 |
|
>>-ARG-+---------------+-;------------------------------------->< '-template_list-' ARG retrieves the argument strings
provided to a program or internal routine and assigns them to variables.
It is a short form of the instruction:
>>-PARSE UPPER ARG-+---------------+-;------------------------->< '-template_list-' The template_list is often a single template but can be several templates separated by commas. If specified, each template is a list of symbols separated by blanks or patterns or both. Unless a subroutine or internal function is being processed, the strings passed as parameters to the program are parsed into variables according to the rules described in Parsing. If a subroutine or internal function is being processed, the data used will be the argument strings that the caller passes to the routine. In either case, the language processor translates the passed strings to uppercase (that is, lowercase a–z to uppercase A–Z) before processing them. Use the PARSE ARG instruction if you do not want uppercase translation. You can use the ARG and PARSE ARG instructions repeatedly on the same source string or strings (typically with different templates). The source string does not change. The only restrictions on the length or content of the data parsed are those the caller imposes. Example:
If you expect more than one string to be available to the program or routine, you can use a comma in the parsing template_list so each template is selected in turn. Example:
Note:
|
Copyright IBM Corporation 1990, 2014
|