Example: Creating an action for a data set
This procedure creates a menu action that issues a TSO
LISTDS command for a data set from any of the available contexts. It describes
the minimal steps for using the Menu Manager New Action Wizard to create an
action for a data set.
It
describes variations on the minimum or default options in note boxes labeled
Variations.For descriptions of all of the fields and options on the Menu Manager New Action Wizard, see the context-sensitive helps. For more examples of Menu Manager actions, see Examples and tutorials.
- In the Preferences window, expand Menu Manager and click Actions and Menus.
- On the Actions tab, click New to create a file for
the action, and then choose Data set as the resource type and
Browse to select a file location.Variations: If you already have a file for storing data set actions, you can select it from the File Selection list or click Import or Find to locate an action storage file. Files can contain actions for only one resource type. You cannot mix actions for files, data sets, and projects in the same file. To learn more about storing actions in files, see Creating files to store menus and actions.
- Click New Local/Remote Action. The Menu Manager New Action Wizard opens.
- In the Name field, type the action name as you want it to appear on the pop-up menu. For this example, type LISTDS.
- Click Next.
- If you want to restrict the action to certain data set name patterns, type a filter in the Data set filter field and click Add. If you want the action to apply to any data set name, leave this page blank.
- Click Next. The Run Options page opens.
- In the Command text entry field of the Run Options
page, type or copy and paste this command. In this command,
$name
is a substitution variable that obtains the fully qualified name of the selected resource. Because the variable is enclosed in single quotes, it is processed by the LISTDS command as-is, without being prefixed with a high-level qualifier.listds ('$name') members
Variations: To see a list of all available substitution variables and their definitions, click Variables. To learn more about substitution variables, see Adding variables to an action. - In the Action Properties group box:
- Choose Use existing action, and then do these steps:
- Click Select.
- In the Action Selection window, expand
com.ibm.ftt.ui.menumanager and select
com.ibm.ftt.ui.menumanager.tsoaction.Variations: The com.ibm.ftt.ui.menumanager.tsoaction action is a Java™ class that processes TSO commands. To learn more about the other command processors that are available with Menu Manager, see Constructing the command for a menu action.
- Click OK.
- Choose Show on generic menu.Variations: This option places the action on the main pop-up menu of the view you are working in. You can also add actions to new or existing Menu Manager menus and associate them with resources and views:
- To learn more about creating other menus and adding actions to them, see Creating a menu for an action.
- To learn more about associating menus and actions with resources and views, see Associating menus with resources and views
- Choose Use existing action, and then do these steps:
- Click Finish. The new action is added to the Actions list of the Actions and Menus page. If it is a [GENERIC] action, you can test it right away. Otherwise, you can add it to a new or existing menu and then test it. For more information about adding actions to menus, see Creating a menu for an action.
- Click Apply and Close.
Testing the action
- In the Remote Systems view, connect to a z/OS system and expand .
- Select a partitioned data set.
- Right-click a data set member and click LISTDS. The TSO command runs and
output similar to the following is added to the Remote Console
view:
---------------------------------------- > listds ('USERIBM.APE.PLI') members USERIBM.APE.PLI --RECFM-LRECL-BLKSIZE-DSORG FB 80 32720 PO --VOLUMES-- V3S936 --MEMBERS-- CKPA303 DANISH DANISHL DB2008A DCLEND