Analyze Multiple PB applications with Visual Expert

1. Select your PB code by files or folders (not target)

Each PBL should be unique in the VE project.
If you include PB targets in your VE project, ancestor libraries will probably be duplicated (1 copy per application).

So you shoul dinclude your PB code by selecting PBL files - or folders -
Folders are faster to select PBLs, but it depends how you organized your code.

If you have 3 applications, you should select 4 sets of PBLs in your VE Project (3 apps + 1 set of ancestor libraries)

For each set of PBLs, use the following steps:

In the project wizard, choose "PowerBuilder library folders/files"

Selecting PBL files or folders instead of PB targets in the Visual Expert project wizard

Select PBL Files or folders for the first set of PBLs, for instance, your ancestor libraries.

Four sets of PBLs in a Visual Expert project: three applications plus the ancestor libraries

Click next, and select "Add more code in your project"

Choosing 'PowerBuilder library folders/files' in the Visual Expert project wizard

This will loop back to the first page of the wizard:

  • Then, you can select the second set of PBLs, for instance application #1 PBLs (except the ancestor PBLs)
  • Click "Next" > select "Add more code"
  • Select the PBLs of the second PB application (except the ancestor PBLs)
  • And so on, for each PB application you wish to include in the VE project.

Complete the project wizard, until you can select "Open project setup"

Selecting 'Add more code' to add the PBLs of the next PowerBuilder application

2. Rename your PB Applications

Visual Expert will give a default name to each PB application (based on the folder or files you selected).

To simplify the maintenance of your VE project, it is recommended to rename each set of PBLs.

For instance:

Selecting 'Open project setup' at the end of the Visual Expert project wizard

Select each line, corresponding to a set of PBL, click "Rename", enter the proper name for each PBL set.

3. Define Dependencies between Applications

  • Open the tab "Application Dependencies"
  • Select a PB application (not the set of ancestor libraries)
  • Click on "Add"
  • Select the set of ancestor libraries from the list
  • Repeat the same operation for each PB application (not the set of ancestor libraries)

Once completed, it should look like this:

Attaching the set of ancestor libraries to a PowerBuilder application in the project setup

4. Launch the Code Analysis

  • Close the setup Window
  • Visual Expert should offer to analyze your code
  • Click "Yes"
  • The analysis will start

Once completed, you should see a list of applications + 1 Framework in the Visual Expert treeview:

5. Run Impact Analyses

You can now explore dependencies across your PB applications and framework.

In the example below, the ancestor library " pfcmain.pbl" includes the method " pfc_w_master.of_setresize ()".
An impact Analysis on this method will show references from several applications:

 

PowerBuilder, Impact Analysis, VE 2016