Creating a member and refreshing a view

Use the $refreshselectionafter variable to refresh the selected resource after an action.

About this task

In this example procedure, the <HLQ>.CLIST(UPDATEDS) file represents a CLIST program that can do these tasks:
  • Create a member in a selected data set.
  • Update an existing data set member with additional data.
The <HLQ>.MENUMAN.COBOL data set represents a partitioned data set for COBOL source files.

Procedure

  1. To create a file to contain data set actions, click New on the Actions tab of the Actions and Menus page of the Menu Manager preferences, select the Data set resource type option, and specify a file name and location.
    New action file window
  2. Click Next, and then select Create a new local/remote action and click Finish.
    Create file content window
  3. On the New Action Page, type a name for the action, such as Create Member and Refresh View, and then select a context for the action.
    New action page
    The $refreshselectionafter variable is available in the following contexts:
    • MVS Files in Remote Systems view
    • MVS File in Remote z/OS Search view
    • MVS Files in z/OS Projects
  4. Click Next, and on the Data Set Filters window, click Next again.
  5. In the Command field of the Run Options window, type a command to execute the CLIST program with the $refreshselectionafter variable.
    This example executes the CLIST program for the selected data set and prompts the user for a member name:
    ex '<HLQ>.CLIST(UPDATEDS)' '$datasetname($input(Name,MEMBER1))' $refreshselectionafter
  6. Select the Show on generic menu action property and click Finish.
    Run options window
  7. On the Preferences window, click OK to save the action.
  8. To test the sample action that was created in this procedure, in the Remote Systems view, select the <HLQ>.MENUMAN.COBOL data set and right-click.
    The pop-up menu contains the new action:
    Pop-up menu with new action
  9. When you select the action, a window prompts you for a member name. Type a member name and click OK.
    Member name prompt
    The new member is added and the Remote Systems view is refreshed:
    Remote Systems view with new member