Rational Developer for System z


Create a new menu action with default override values for identified parameters

This lesson describes how to use Menu Manager to create a new menu action for supplying values for the parameters identified in the JCL.

You create new actions and specify default override values for parameters using Menu Manager. To create a new action and specify override parameter values, do these steps:

  1. Click Window > Preferences, expand the list under Menu Manager, and click Actions and Menus.
  2. Click New to create a new action file. The New File window opens.
  3. Click File to indicate that the actions in the new file will be executed against files. The Project/Subproject option enables you to create actions that will be executed against projects and subprojects.
  4. Type a file path name for the new action file, or click Browse to navigate to the location where you want to store the action file and type a file name for it. Action files are stored in XML format, so specify a file name with extension .xml, such as c:\worklocation\myActions.xml (Windows) or /root/worklocation/myActions.xml (Linux). The directory path you specify must already exist.
  5. Click Next. The Create file content page opens.
  6. Click Create a new local/remote action and then click Finish. The Menu Manager New Action Wizard opens.
  7. Type Define Program to CICS in the Name field and, optionally, a comment describing the new action, and then click Next. The name you specify is the name that appears in the context menu when you select the program or file and right-click to execute the action. The File Associations page opens.
  8. Select one or more file types that you want to associate with this action and click Add. The file types are added to the Chosen file Types list.
  9. Click Next. The Run Options page opens.
  10. Enter the command and parameters for the actions, separated by commas. You must enter the command on one line. Use one of the following formats, depending on whether a dialog needs to prompt for overrides for the default parameters. If you specify PROMPT, a dialog is displayed allowing you to override some of the values before the JCL is submitted. If you specified all necessary values and do not need a prompt, specify NOPROMPT. For repetitive tasks, where the values are either the same or supplied in variables, NOPROMPT might be preferred. For other tasks where input is required, PROMPT might be preferred.
    • <Action>,<Program>,PROMPT,<Columns>,<Column headers="">,<Button text="">,<Title>,<Column Values="">
    • <Action>,<Program>,NOPROMPT,<Columns>,<Column Values=""></Column></Columns></Program></Action></Column></Title></Button></Column></Columns></Program></Action>
    The following command prompts users to enter a value.
    Submit,ELISEE.TEST.JCL(PROGRDO),PROMPT,2,Variable,Value,Submit,Define program to CICS using batch RDO definition,PROGRAM,$name,USERID,$userid,GROUP,MYGROUP,LANGUAGE,COBOL
    The following command does not prompt users for a value:
    Submit,ELISEE.TEST.JCL(PROGRDO),NOPROMPT,2, PROGRAM,$name,USERID,$userid,GROUP,MYGROUP,LANGUAGE,COBOL
  11. Click Show on generic menu.
  12. Click Use existing action and then click Select. The Action Selection window opens.
  13. Expand com.ibm.etools.varsubstitution, select com.ibm.ftt.ui.menumanager.mfivarsubsaction, and click OK.
  14. To save the new action, do one of the following steps:
    • Click Finish to save the action that you created.
    • Click OK save the new action to the menu file.

Some considerations when creating actions

The following considerations apply when you are specifying parameter override values:
  • If you do not specify a value for the PROGRAM parameter, then when the resource is selected it is the resource that is acted on as the JCL to execute. For example, you might need to submit a CICS® startup JCL that has certain options without modifying the JCL itself. Different users can submit the same JCL, but with different parameter values.
  • If you do specify a value for the PROGRAM parameter, then it is the JCL to execute when the action is executed. The resource that is selected by right-clicking is then associated with the JCL to be submitted.
  • If you specify a parameter in the JCL but you do not specify an override value, then that parameter value is replaced with an empty string. For example, consider the following entry in a JCL:
    MEMBER=!PROG!,PARM='1920'
    If you do not specify an override value for the !PROG! entry, then that entry becomes:
    MEMBER=,PARM='1920'
The following variable values are useful. To see all the available variable values, click Variables on the Run Options page of the Menu Manager New Action Wizard.
$name
Returns the name of the resource that is currently selected when the pop-up menu option is displayed. It returns the name of the member.
$fullname
Returns the name of the resource that is currently selected when the pop-up menu option is displayed. It returns the name of the data set and the member name in the format DATASET(MEMBER).
$datasetname
Returns the name of the data set that contains the member resource that is selected by right-clicking on it.

Terms of use | Feedback



This information center is powered by Eclipse technology. (http://www.eclipse.org)