Creating an MVS TSO menu action for a local file

Complete the steps in this tutorial to create a menu action for a file in a local z/OSĀ® project.

Before you begin

This tutorial uses the sample files in the Dependency Based Build GitHub repository to show how you can use Menu Manager to process mainframe files that are stored in a GitHub repository clone and imported into a local z/OS project. If you are not familiar with the Dependency Based Build samples, you can review the information in Integrating IBM Dependency Based Build and Developer for z/OS.

About this task

This tutorial guides you through the process of creating a menu action for a file in a local z/OS project. It teaches you how to:
  1. Connect to the Dependency Based Build example repository on GitHub.
  2. Import the sample files into a z/OS project.
  3. Create a Menu Manager action that executes an MVS TSO command.

Connect to the Dependency Based Build repository

Before you begin

Verify that the Git Integration for Eclipse is installed:
  1. Select Help > About IBM Developer for z/OS.
  2. On the About window, click Installation Details.
  3. Expand the entry for IBM Developer for z/OS and look for Git Integration for Eclipse.
    Tip: You can also type the name or a portion of it into the filter text box and press Enter.

If the feature is not installed, follow the instructions in EGit Download.

About this task

This tutorial uses sample files from the IBM Dependency Based Build repository on GitHub at https://github.com/IBM/dbb. The following procedure explains how to clone this repository from Developer for z/OS.

Procedure

  1. Click this link to navigate to the IBM Dependency Based Build repository on GitHub: https://github.com/IBM/dbb.
  2. Sign in to GitHub and then, in the GitHub web interface, click Fork to fork a copy of the repository to your account.
    Fork repository
  3. From your forked copy, click the Code menu and then click Use SSH.
    If you do not have a public SSH key, GitHub prompts you to create one. Click the link in the prompt and follow the instructions.
    Clone with SSH
  4. Copy the URI.
  5. In the Developer for z/OS Git Repositories view, click Clone Repository Clone a Git repository.
  6. In the URI field of the Clone Git Repository window, paste the copied URI and type the passphrase for your public SSH key into the Password field.
    Clone Git Repository
  7. Click Next.
    If prompted to accept and store the key, click Accept.
  8. Select the branches you want to clone and then click Next.
    Branch Selection
  9. Choose a location for the clone and click Finish.
    Local Destination

Results

The sample files are added to the Git Repositories view.
Git Repositories view

Import sample files into a z/OS project

About this task

The Dependency Based Build repository contains source files for several applications. This procedure imports the source files for the MortgageApplication into a local z/OS project.

Procedure

  1. In the Git Repositories view, expand the Working Tree node of the dbb repository.
  2. Expand the Build folder.
  3. Right-click MortgageApplication and click Create a z/OS project.
    The MortgageApplication folder is imported into the z/OS Projects view.
    A git folder imported into the z/OS Projects view

Create a Menu Manager action

About this task

This procedure creates a Menu Manager action that executes the following TSO command against a selected folder in the local z/OS project:
LISTDS '$datasetname' $input(LISTDS $datasetname,,$list{LABEL,HISTORY,MEMBERS})

Procedure

  1. From the Developer for z/OS menu bar, select Window > Preferences, and then expand Menu Manager and select Actions and Menus.
  2. From the File Selection area, choose a location for the new menu action.
    If you do not have a file for storing menu actions, you can create one by following the instructions in Creating files to store menus and actions.
  3. Click New Local/Remote Action.
  4. In the New Action Wizard, enter the following values in these fields. For all other fields, accept default values.
    Field Value
    Name Local Project MVS Command
    Chosen File Types Add All
    Command LISTDS '$datasetname' $input(LISTDS $datasetname,,$list{LABEL,HISTORY,MEMBERS})
    Use existing action Select and choose the com.ibm.ftt.ui.menumanager.tsoaction action
    Add to generic menu Select
  5. To close the wizard, click Finish.
  6. To save the new menu action, click Apply and Close.
  7. In the z/OS Projects view, expand the MortgageApplication project and the cobol folder.
  8. Select a file, right-click, and select Local Project MVS Command.
    Menu Manager prompts you to associate the local file with a remote resource.
    Associate Resource
  9. Click Browse.
    The Browse for File window opens.
    Browse for File
    This window lists remote resources in remote system connections and in remote z/OS projects. If you find that the remote connections take a long time to expand, then you can add the data sets you need to a remote z/OS project. Because z/OS projects usually contain a small subset of the resources in a remote connection, you can navigate them more quickly.
  10. In the Browse for File window, choose a remote resource to associate with the local file and then click OK.
    The Local Project MVS Command runs and prompts for a data set information selection.
    Menu Manager prompt window
  11. Select an item from the list and click OK.
    The command output displays in the Remote Console.
    Remote Console

Summary

In this tutorial, you learned the following:
  • How to clone to a GitHub repository.
  • How to import files from a GitHub clone to a local z/OS project.
  • How to create a Menu Manager action that operates on a file in a local z/OS project.