z/OS TSO/E REXX User's Guide
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


Using Quotations Marks in Commands

z/OS TSO/E REXX User's Guide
SA32-0982-00

Generally, to differentiate commands from other types of instructions, enclose the command within single or double quotation marks. When issuing TSO/E commands in an exec, it is recommended that you enclose them in double quotation marks. If the command is not enclosed within quotation marks, it will be processed as an expression and might end in error. For example, a word immediately followed by a left parenthesis is processed by the language processor as a function call. Several TSO/E commands, one of which is ALLOCATE, require keywords followed by parentheses.
"ALLOC DA(NEW.DATA) LIKE(OLD.DATA) NEW"

If the ALLOCATE command in the example above was not enclosed in quotation marks, the parentheses would indicate to the language processor that DA and LIKE were function calls, and the command would end in an error.

Many TSO/E commands use single quotation marks within the command. For example, the EXEC command encloses an argument within single quotation marks, and other commands, such as ALLOCATE, require single quotation marks around fully-qualified data set names.
EXEC myrexx.exec(add) '25 78 33' exec

ALLOC DA('USERID.MYREXX.EXEC') F(SYSEXEC) SHR REUSE
As REXX instructions, these commands can be entirely enclosed in double quotation marks and still retain the single quotation marks for the specific information within the command. For this reason, it is recommended that, as a matter of course, you enclose TSO/E commands with double quotation marks.
"EXEC myrexx.exec(add) '25 78 33' exec"

"ALLOC DA('USERID.MYREXX.EXEC') F(SYSEXEC) SHR REUSE"
Remember that data set names beginning with your prefix (usually your user ID) can be specified without the prefix and without quotation marks.
"ALLOC DA(MYREXX.EXEC) F(SYSEXEC) SHR REUSE"

More about data sets names and when to enclose them in quotation marks is covered in the next topic.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014