Cross Java To Mainframe Call Graph

Starting with IBM® AD V6.1.2, you can provide a configuration (.json) file with your own defined APIs to build and analyze the project to view the Mainframe calls from Java™ projects through the Cross Java To Mainframe Call Graph option.

1. Configuring the .json file.

After you installed IBM AD, a configuration (.json) file is available under <ADDI Installation Folder>/IBM AD Web Services/wlp/usr/servers/ad_server/conf.wazianalyze. Customize the .json file by following these steps:
  1. Open the .json file under <ADDI Installation Folder>/IBM AD Web Services/wlp/usr/servers/ad_server/conf.wazianalyze.
  2. Add your own API in the configuration file as follow to call the mainframe resources.
    {
          "MainframeAction": "",
          "Description": "",
          "Metadata": "",
          "execution": {
            "packageName": "",
            "className": "",
            "methodName": ""
          },
          "data": [
            {
              "packageName": "",
              "className": "",
              "methodName": "",
              "parameterPosition": <put an integer that indicates the parameter position>
            },
            {
              "packageName": "",
              "className": "",
              "methodName": "",
              "parameterPosition": <put an integer that indicates the parameter position>
            },
          ]
        }
    MainframeAction/Description
    These values are optional. You can add the information or leave it blank.
    Metadata
    This value is required. Only four types of metadata are supported, including Program, VSAM File, CICS Transaction, and Queue.
    execution
    The values are required. One execution is set.
    data
    The values are required. The data node must contain at least 1 entry.
    parameterPosition
    The value is required. Enter an integer that is equal to 1 or greater than 1 to indicate the position of the parameter.
  3. Save the file.

2. Enabling the option to use Cross Java To Mainframe Call Graph

After the .json file is configured with your own defined API, build the project by following these steps:
  1. Open IBM AD Build Client and click File > New project.
  2. In the open window, select Other/OOP languages (Java), and click Next.
  3. Enter your project name and click the check box of Enable Cross Applications Analysis.
    Important: To view the Mainframe calls from Java projects through the Cross Java To Mainframe Call Graph option, you must ensure that this option is enabled. If this option is not enabled, you can also see the Cross Java To Mainframe Call Graph in the IBM AD Analyze Client. However, the analysis graph of Cross Java To Mainframe Call Graph will be the same as the analysis graph of Java Call Graph, and the mainframe resources and data that are added cannot be displayed.
  4. Click Finish.
Note: If you did not enable the cross applications analysis option, go to the Dashboard to enable or disable it by following these steps:
  1. Access Start Menu > IBM Application Discovery and Delivery Intelligence > Launch IBM Application Discovery Configuration Service Admin.
  2. Go to the Dashboard > Environments > your_environment > Projects and select the project.
  3. Click the editing button. Then, click the check box of Enable cross applications analysis in the open window.
  4. Reopen IBM AD Build Client and rebuild the project.

After the option is enabled and the build is successfully complete, you will automatically receive the information about mainframe resources that are used in your program by default.

3. Performing the cross analysis in IBM AD Analyze Client

After the project build is complete, perform the cross analysis in IBM AD Analyze Client by following these steps:
  1. Open IBM AD Analyze Client.
  2. In the Explore Projects view, select a Java project that is enabled the option to cross applications analysis.
  3. Use one of the following ways to open the analysis wizard.
    • From the right panel with the available analysis on the project, double-click Explore project.
      1. When you are redirected to a new view that displays the list of packages included in the selected project, select a package from the list.
      2. Double -click Cross Java To Mainframe Call Graph. Then, the analysis wizard is displayed with pre-populated information of the selected package, * for Method name and Class name, and 3 for the default value of Graph Depth.
      3. If you need the analysis wizard is displayed with all pre-populated information, make sure to open the Methods view and select a method before you double-click Cross Java To Mainframe Call Graph. For more information, see step 3 and 4 at Explore project analysis.
    • From the right panel with the available analysis on the project, double-click Cross Java To Mainframe Call Graph. When you are redirected to the analysis wizard, click drop-down list to select the values of Package, Class name, and Method name correspondingly.
  4. Change the Graph Depth if you want.
  5. Click Next if you want to save the query for future usage, and click Save query. Then, when you click Back, you can see a Load query on the analysis wizard.
  6. Click Finish.

An analysis graph with a legend of a mainframe program is displayed. Each program has 2 edges with red dotted lines. One of the edges is to show the source library of API to call the program. The other one is to show your own code. Right-click the edge to display contextual menu and select the option View source. Then, you can see the details of your own code where you called the program.