Create a menu action with default override values for identified parameters

Learn how to use Menu Manager to create a menu action for supplying values for the parameters that are identified in the JCL.

About this task

You create actions and specify default override values for parameters by using Menu Manager.

Procedure

To create an action and specify override parameter values:

  1. In the Preferences window, navigate to Menu Manager > Actions and Menus.
  2. To create an action file, click New.
    The New File window opens.
  3. To indicate that the actions in the new file are run against files, click File.
    The Project/Subproject option allows for the creation of actions that are run against projects and subprojects.
  4. Type a file path name for the action file, or to open the location to store the file, click Browse, and type a file name for it.
    Action files are stored in XML format, so specify a file name with the .xml extension, such as c:\worklocation\myActions.xml. The directory path you specify must 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. In the Name field, type Define Program to CICS and, in the Comment field, type a comment that describes the new action.
    The name that you specify is the name that is displayed in the menu when you select the program or file and right-click to do the action.
  8. From the Context list, select a context for the action.
    The context defines the areas of the workbench in which the action is available.
    Selecting All, for example, makes the action available in all contexts. Selecting MVS Files in Remote Systems view makes the action available only when you select an MVS file in the Remote Systems view of the workbench.
  9. Click Next.
    The File Associations page opens.
  10. Select one or more file types to associate with this action and click Add.
    The file types are added to the Chosen File Types list.
  11. Click Next.
    The Data Set Filters page opens.
  12. Click Next.
    The Run Options page opens.
  13. Enter the command and parameters for the Submit action. Separate multiple entries with commas.
    You must enter the command on one line. You can specify the following parameters with the Submit command:
    PROMPT | NOPROMPT
    Use one of these parameters, depending on whether a window must prompt for overrides for the default parameters. PROMPT opens a window that allows for the overriding of 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 needed, PROMPT might be preferred.
    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
    SPECIFYCASE M | U
    SPECIFYCASE is specified after the PROMPT | NOPROMPT keyword. For each variable value, specify the M or U option to indicate whether the value can be mixed case or must be uppercase. The following example defines three variables: websvdir, WSDLFILE, and CORRFILE. The websvdir variable is substituted with an uppercase value. The other two variables are substituted with mixed-case values.
    Submit,ELISEE.TEST.JCL(PROGRAM),PROMPT,SPECIFYCASE,2,Variable,Value,Submit,Define program,websvdir,$input(Web Service directory,testdir),U,WSDLFILE,$input(WSDL filename, wsdlfile),M,CORRFILE,$input(XML Correlator file name,Corrfile),M
  14. Click Show on generic menu.
  15. Click Use existing action.
  16. Click Select.
    The Action Selection window opens.
  17. Expand com.ibm.etools.varsubstitution.
  18. Select com.ibm.ftt.ui.menumanager.mfivarsubsaction and click OK.
  19. To save the action and close the wizard, click Finish.
  20. To close the Preferences window, click OK.

Parameter override values

The following considerations apply when you are specifying parameter override values:
  • If you do not specify a value for the PROGRAM parameter, then the selected resource is the one that is acted on as the JCL to run. For example, you might have to submit a CICS® start 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 run when the action is requested. 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 selected when the menu option is displayed. It returns the name of the member.
$fullname
Returns the name of the resource that is selected when the 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.