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
-
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.
-
Click Next, and then select Create a new local/remote
action and click Finish.
-
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.
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
-
Click Next, and on the Data Set Filters window,
click Next again.
-
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
-
Select the Show on generic menu action property and click
Finish.
-
On the Preferences window, click OK to save the action.
-
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:
-
When you select the action, a window prompts you for a member name. Type a member name and
click OK.
The new member is added and the
Remote Systems view is
refreshed: