You can add user-input variables to a custom action that
executes a TSO command. A user-input variable prompts users to specify
or select a parameter value for a TSO command after selecting a custom
action from the pop-up menu.
To add user-input variables to a TSO command, do these steps:
- From the Menu Manager New Action wizard, click the Variables button. The Substitution Variables window opens. This window contains
two options that you can use to create a user-input variable for a
TSO command:
- $input
- Collects input from the user invoking the custom action. When
you add this variable to a custom action. The action prompts the user
with a dialog box for specifying input or for selecting input from
a drop-down list.
- $list
- Provides the option of including a list of values from which the
user can select one.
- Select $input from the Substitution
Variables window and click Insert.
- To include a list of possible values from which the user
can select one, select $list from the Substitution
Variables window and click Insert. This variable
is optional and is used to construct a drop-down list of possible
values for the action input.
- To use this variable in a custom action, you need to specify
it as follows:
$input(PromptString, DefaultValue, $list{string1,string2,string3, . . .,stringn})
- PromptString
- Specify the dialog box label that prompts the user for input.
The prompt string can contain spaces but no commas (,) or dollars
signs($). The prompt string is required.
- DefaultValue
- Specify the value to be used as the default if the user does not
enter a value when prompted. The default value can contain spaces
but no commas (,) or dollars signs($). The default value is required.
- $list{string1,string2,string3, . . .,stringn
- Specify a list of strings from which the user can select a value.
This variable is optional. If you include it, the dialog prompts the
user to select one of these strings from a drop-down list. If you
omit it, the dialog prompts the user to type a value. Each value in
the list can contain spaces but no commas (,) or dollar signs($).
The following examples show the prompts that open when
you create menu items with user-input variables. The examples illustrate
a dialog with a text-entry field and a dialog with a drop-down list.
The following example displays a dialog with a drop-down
list labeled
Parameter from which a user can
select either
SMSINFO or
DIRECTORY. The
default value is
SMSINFO.FEKFLDSI '$datasetname' $input(Parameter,SMSINFO,$list{SMSINFO,DIRECTORY})
The following example displays
a dialog with a text field labeled Parameter into
which a user can enter data. The default value for the text field
is SMSINFO.
FEKFLDSI '$datasetname' $input(Parameter,SMSINFO)
The following example displays
a dialog with a drop-down list labeled Data Set Name from
which a user can select either the data set name HLQ.MY.DATASET or
the name of the currently selected data set. The default is the name
of the currently selected data set.
FEKFLDSI '$input(Data Set Name, $datasetname, $list{HLQ.MY.DATASET,$datasetname})'