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


Passing Data Set Names as Arguments

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

How you pass a data set name as an argument depends on the way you specify the data set name and whether you invoke the exec explicitly or implicitly.

Ways to specify the data set name are controlled by the TSO/E naming conventions, which define fully-qualified and non fully-qualified data sets. A fully-qualified data set name specifies all three qualifiers including the prefix and must appear within a set of quotation marks.
'userid.myrexx.exec'
A non fully-qualified data set name can eliminate the prefix and is not enclosed within quotation marks.
myrexx.exec
If you use the EXEC command to explicitly invoke an exec, the EXEC command processor requires a set of single quotation marks around the argument. When passing a non fully-qualified data set name as an argument, you need not add additional quotation marks. The following EXEC command is issued at the READY prompt and passes the data set name REXX.INPUT as an argument to the exec contained in MYREXX.EXEC(TEST2). Both data sets are specified as non fully-qualified data set names.
READY
 EXEC myrexx.exec(test2) 'rexx.input' exec
When passing a fully-qualified data set name as an argument with the EXEC command, you must include more than one set of quotation marks; one to indicate it is a fully-qualified data set and one to indicate it is the argument to be passed. Because TSO/E commands process two sets of single quotation marks as one and do not recognize double quotation marks as does the language processor, you must use three sets of single quotation marks. The following EXEC command passes USERID.REXX.INPUT as an argument expressed as a fully-qualified data set name.
READY
 EXEC myrexx.exec(test2) 'userid.rexx.input'' exec
When passing a non fully-qualified data set name as an argument while implicitly invoking the exec, you need no quotation marks.
READY
 test2 rexx.input
To pass a fully-qualified data set name as an argument while implicitly invoking an exec, enclose the data set name in a single set of quotation marks.
READY
 test2 'userid.rexx.input'

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014