Many of the functions provided by TSO commands need to be integrated into the user experience for Rational® Developer for System z®. This is provided by the Menu Manager. Menu manager provides a set of panels where you can define actions and name pairs that are added to a right-click drop-down menu. After the definitions are established, you can select a Name (as defined in the menu manager preferences) and the action it is associated with is performed. These menu manager preferences are recorded into an XML document that can be shared or centrally located (for example, on a host) for import by other users.
Menu items are configured using the Menu Manager Preference page. To access the Menu Manager Preference page, select Window -> Preferences -> Menu Manager. The Menu Manager preferences page is displayed.
Typically, you can accept the defaults values and click Actions and Menus to move forward.
The most important field of the Action Details definition window is the Command field. This is the TSO command that is issued when the menu item is invoked. Predefined substitution variables in the form $variable or ${variable} can be used as part of the command. The value of the substitution variable depends on the current selection. Table 1 shows a list of recognized variables. The menu must be associated with one or more file extensions. Additional file extensions can be defined using the File Types button.
HATSRCP=HCmvs211Parms hatsgv_userid hatsgv_password hatsgv_var1=value1 hatsgv_var2=value2 hatsgv_var3=value3
In the above example, the HATS Web application is invoked
and the user ID and password are passed. Additionally, 3 other paramaters
(hatsgv_var1, hatsgv_var2 and hatsgv_var3)are passed, along with their
corresponding values. Please note that more than 3 parameters can
be passed.http://hostname/appname/?parameter1=one hatsgv_userid hatsgv_password
There must be a space between the HATSRCP=appname and hatsgv_userid and between hatsgv_userid and hatsgv_password. The substitution rules used by Rational Developer for System z are shown in Variable Substitution. The name of the global variables for userid and password are not important (except that HATS does require the hatsgv_ prefix to know that a specified parameter is a global variable). What is important is that hastgv_userid will be interpreted as the user ID and hatsgv_password will be interpreted as the password.
http://hostURL/myapp?tabs1=structures hatsgv_userid hatsgv_password var1=value1 var2=value2 var3=value3
In the above example, the HATS Web application is invoked
and the user ID and password are passed. Additionally, 3 other paramaters
(hatsgv_var1, hatsgv_var2 and hatsgv_var3)are passed, along with their
corresponding values. Please note that more than 3 parameters can
be passed.http://hostURL/myapp?tabs1=structures&hatsgv_userid=userid&hatsgv_password=password&var1=value1&var2=value2&var3=value3
For the Web interface, the URL specified in the command
can be with or without parameters in the URL itself. Host Connect
correctly detects this and adjusts accordingly. For example, without
any parameters in the URL itself, is as follows: http://hostURL/myapp hatsgv_userid hatsgv_password var1=value1 var2=value2 var3=value3
And, with parameters in the URL is as follows: http://hostURL/myapp?tabs1=structures&oneparm=good hatsgv_userid hatsgv_password var1=value1 var2=value2 var3=value3
Table 1 shows the list of defined substitution variables that can be used for constructing a command.
| Variable | Description |
|---|---|
| $clientaddress | |
| $userid | ID of the user connected to the system associated with the selected resource |
| $systemhostname | Host name or IP address of the system associated with the selected resource |
| $systemname | name of the connection associated with the selected resource (i.e. the system "short" name) |
| $datasetname | name of the dataset containing the selected resource |
| $systemhostname | host name of IP address of the system associated with the selected resource |
| $fullname | fully qualified name of the selected resource in the form DATATSETNAME(MEMBERNAME). |
| $name | name of the selected resource |
| $projectname | name of the project associated with the selected resource |
To show the menu item in the context menu, select Show on Generic Menu when defining the menu item.
Select the file types that this command should be associated with. You can select them all by clicking the Select All button, or individual file types by checking the check box next to the appropriate file type. If a file type is missing it can be added with the File Types button.
The menu item must be added to a menu. Menus can be defined, and menu items (actions) associated with it using the Menus page in the Actions and Menus preference page. To access the Actions and Menus preference page, select Window -> Preferences -> Menu Manager ->Actions and Menus.
After the menu item has been added to the menu, the menu must be selected as the base file, the default file menu or both. This is done using the Menu Selection preferences page. To access the Menu Selection preference page, select Window -> Preferences -> Menu Manager -> Menu Selection
Menu items that are either defined with Show on Generic Menu or have been added to a menu that is active for the current view will show up in the context menu. Right clicking the appropriate object in the z/OS projects view displays the context menu.
The output of the action (if any), is displayed in the TPF Toolkit console. This is consistent with the output of local actions.
To change an existing action definition, select the action you want to change, right-click and select Edit.
On the Edit Action Information window, you can change any of the properties associated with the command including the file types it is associated with.