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.
  1. In the Preferences window, expand Menu Manager and click Actions and Menus.
  2. 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.
  3. Click New Local/Remote Action. The Menu Manager New Action Wizard opens.
  4. In the Name field, type the action name as you want it to appear on the pop-up menu. For this example, type LISTDS.
  5. Click Next.
  6. 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.
  7. Click Next. The Run Options page opens.
  8. 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.
  9. In the Action Properties group box:
    1. Choose Use existing action, and then do these steps:
      1. Click Select.
      2. 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.
      3. Click OK.
    2. 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:
  10. 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.
  11. Click Apply and Close.

Testing the action

  1. In the Remote Systems view, connect to a z/OS system and expand MVS Files > My Data Sets.
  2. Select a partitioned data set.
  3. 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