How Visual Expert can help you in a PowerBuilder Migration

When a need to migrate across PB versions arises, the major part of the work is accomplished automatically by just migrating the application using the built-in PowerBuilder features. This task most of the times is seamless when a migration is done following the releases of PowerBuilder. Problems come when sequential versions are skipped, i.e. moving from PB 9.0 to PB10.5 or PB 11.0.

With each single release of PowerBuilder, Sybase beefs up the release with multiple new features and upgrades to existing objects. Deciding to skip one version of PB could result in countless hours trying to go over system documentation, code comments and original requirements for an application in trying to determine where an obsolete function has been used in an application and replace it.

Chances are that the application, needing the modifications, is in Maintenance Mode, already in Production, and that the original development team that owns all the system knowledge, outside the documentation, has moved on with another project.

Visual Expert will help you in compensating for the loss of knowledge, sometime incomplete or not updated documentation of the system, with the implementation of two simple steps, 1) purify your code before the migration and 2) provide metrics for each change by performing an accurate Impact Analysis.

Step 1 – Purify your application code with Visual Expert

Before starting a migration, it’s recommended to clean your code.
This will avoid the migration of useless code that will only make your application harder to maintain.

Visual Expert will help in accomplishing this by:

  • Easily identify each component’s category dead, unused code,
  • Providing you with the capabilities of performing a static analysis of the application and thanks to its advanced features also to take into account some of the application dynamic references (i.e. exceptions or dynamic calls),
  • Full documentation generation capabilities for all your unused components in RTF format.

Identifying Dead Code:

  • Select category of components in the Tree View
  • In the Navigation Bar, click on « Unused ... » in the Miscellaneous section.

  • You can also use the Details View to the right of the Treeview

Generating a documentation for your unused components

  • Open the documentation center

  • Choose your "Generate path" to choose the place where your documentation will be saved
  • Select the Format > rtf
  • Select the Tab Page "Development rules"
  • Select the option "Development rules check"
  • Click on "Run"

  • Modify the PowerBuilder Standards if needed and click next (>>)

  • Check the boxes to select the components included in the documentation
  • Click on Generate.

  • Open your Documentation

Step 2 - Look for the call to obsolete PowerBuilder functions

Unfortunately some of the PB functions become obsolete with new releases of PB. Developers quite often are called to modify and updated these obsolete functions to avoid regressions and to ensure that the application still behaves as it was intended to.

With Visual Expert you will easy list all obsolete or unused functions, and find where in the application such functions are being used

Visual Expert allows users to:

  • List in one click the built-in functions
  • Proceed to an Impact Analysis (you will see if they are used and where they are called in the application)
  • Open the calling code in PB IDE to remove / replace the obsolete calls.

1. In the navigation bar select Built-in Functions.

2. Impact Analysis:

  • Select the complete list of your functions
  • In the Navigation Bar click on Calling Functions

  • Select one of the Calling functions (of_ShiftBand in our example).
  • In the in the Find field of the Source Code View, enter the name of the built-in function (abs).
  • Visual Expert automatically highlights the function name in the source code of the function.
  • Use the green arrows "Find Next" to find the next reference.

  • To open the highlighted item in PB IDE, click on "Open in PB IDE" the navigation bar.