Rational Developer for System z

What is the migration help and how does it work?

This function is useful when you migrate the code of a Program, Screen or Server generated in Pacbase to RPPz. It positions warnings on the lines which are generated from the design wherever it detects differences between the code generated in Pacbase and the locally generated code.

The PDP LPEX editor, in which you open the .cbl file, differentiates the generated code (which comes from the design) from the specific code.

Once the instance has been generated both from Pacbase and from the local generator, it also displays as specific code lines the lines where it has detected differences between the two versions of the generated code.

The migration help function sets warnings on the lines where such differences have been found. It enables you to ensure that both generations (in Pacbase and RPPz) were identically performed (from the same Library/package, the same instance, with all the required Macros...) and draws your attention to differences which might be caused by the change of generator.

Differences due to the change of generator

The Pacbase constants and the generation date will never be identical in the locally generated code and in the Pacbase generated code. So the migration help function enables you to choose between:
  • Replacing the constants and the date generated in Pacbase with those from the local generator (default). These lines will not be displayed as specific lines.
  • Keeping the constants and the date generated in Pacbase without displaying a warning. These lines will be displayed as specific lines.
  • Keeping the constants and the date generated in Pacbase and displaying a warning. These lines will be displayed as specific lines. A warning will be associated with them and will provide quick fixes to manage the differences.

Other differences, due to the change of generator, can be also detected by the PDP editor (for example because the Macro dispatching is not identically managed in the Pacbase generator and in the local generator). The migration help then puts warnings on such lines.

How does the migration help work?

To be able to use the migration help function, you must first generate the Program, Screen or Server in Pacbase:
  • If the instance calls Macros, you must generate them in Pacbase and import the corresponding .cblgen files into your local workspace.
  • You must generate two .cbl files:
    • The first file contains both the code generated from the design and the specific code. It is generated with the Pacbase generation procedure.
    • The second file only contains the code generated from the design. This file, named the control file, is generated with the Pacbase MIA1 (for Programs), MIA2 (for Screens), MIA3 (for TUI Clients), or MIA4 (for Servers) batch procedure.

You must then enter a migration help batch command line from a command prompt, or open the migration help wizard.

The migration help function performs the following steps:
  1. Copies the Pacbase generated .cbl file to your local workspace. This file is copied to the COBOL target indicated in the Definition tab, and named after the COBOL program ID (for Programs) or Program external name (for Screens or Servers) indicated in the Definition. The file is then renamed if the name of the file generated in Pacbase is not identical to the value of entered in the Definition.
    Note: If you expand the instance in the Design Explorer view after running the migration help, you can see the COBOL target and the name of the file copied by the migration help function.
  2. Launches the RPPz local generation, which produces the code corresponding to the design of the instance.
  3. Compares the Pacbase control file with the locally generated file and sets warnings wherever it detects differences.
    Note: The warnings are stored in the .cblpdp file. So if you keep the warnings and deliver the generated instance to the server, the users who will load the instance into their own workspaces will see them as well.
  4. Copies the control file into the .cblpdp file produced by the local generation.

You must then look into the warnings and use the available quick fixes.

The warnings are calculated again upon each new generation, unless you select the quick fix which permanently removes the warnings.

How to manage the warnings

To see the warnings positioned by the help migration function, you must open the .cbl file with the PDP LPEX editor. Each warning is associated with a node in the generated code. The warnings are displayed:
  • Directly on the COBOL lines of the PDP LPEX editor,
  • In the Problems view. Double-clicking on a warning selects the corresponding lines in the PDP editor.
Note: An information message is displayed if no difference has been detected.
You can use quick fixes to manage the warnings. To do so, right-click a warning and select Quick fix. In the Quick fix wizard, select the appropriate quick fix and click Finish. The following quick fixes are available:
  • Remove migration control. This quick fix is available when no difference has been detected. It removes the information related to the migration help function from the .cblpdp file.
  • Remove warning. If you select this quick fix, the warning is removed and the line is displayed as all the other specific lines. However if this difference is detected again upon the next generation, this warning will be displayed again.
  • Remove migration control and all warnings. If you select this quick fix, all the warnings are permanently removed and the lines are displayed as all the other specific lines. The warnings will not be calculated again upon the next generations.
  • Restore local generated code. If you select this quick fix, the line content, which comes from the Pacbase generation, is replaced with the line content of the local generation. The corresponding lines are no longer be considered as specific lines and the warning is no longer displayed.
  • Show differences. If you select this quick fix, the Compare editor opens up. This editor displays the code of the generated Pacbase control file and the code of the locally generated file and shows the differences. The file contents are not displayed as a whole but fragmented. If you click the Show ancestor pane button in its toolbar, the ancestor pane will show the complete code of the instance generated in Pacbase (which includes both the code from the design and the specific code).
  • Show differences on the whole file. This quick fix is identical to the previous quick fix, except that the editor displays the file contents as a whole.

Terms of use | Feedback

This information center is powered by Eclipse technology. (http://www.eclipse.org)