Rational Programming Patterns

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 Rational Programming Patterns. 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 COBOL editor in which you open the .cbl file, differentiates the generated code (which comes from the design) from the specific code.

When 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. You can then verify that both generations were identically performed (from the same Library/project, the same instance, with all the required Macros). It 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.

Other differences, due to the change of generator, can be also detected by the PDP editor. It can be, 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 .cbl 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 contains only 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 run the migration help in one of the following modes:
  • Batch mode:

    Indicate a migration help batch command line from a command prompt or a command file. With this mode, you can compare many files, with all the options available for the migration help. Three execution reports are generated.

  • Interactive mode:

    Open the migration help wizard. This mode must be reserved for few comparisons. No execution report is generated.

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. Starts the local generation, which produces the code corresponding to the design of the instance.
    Note: The generated skeleton language of the instance is identical to the Pacbase skeleton language. This piece of information is retrieved from the extraction of the Pacbase models and from the import.
  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.
  5. Generates three execution reports if the migration help was run in batch mode. These reports are generated in the folder specified in the --reportFolder parameter of the command line.

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.

An information message is displayed when you open the COBOL code of an instance which still contains 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 COBOL editor. Each warning is associated with a node in the generated code. The warnings are displayed:
  • Directly on the COBOL lines of the PDP COBOL 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)