You must run the migration help function to migrate the
code of a Program, Screen, or Server generated in Pacbase. This function copies
the Pacbase COBOL
into your workspace and generates it again locally. The COBOL obtained
after the local generation is then compared with the initial COBOL.
The migration help function sets warnings on the lines where it detects
differences. It excludes the differences in the formatting or comments.
With the migration help function, you can verify that the Pacbase and the local generations
were identically run. For example, you can check that they were run
from the same Library/project, with all the required Macros. It draws
your attention to significant differences (local modification of the
instance design before the migration help for example) or nonsignificant
differences (difference in the generation date and time for example).
You must manage the warnings.
Actions carried out by the migration help
The
migration help function carries out the following actions:
- It copies the Pacbase generated .cbl file
into your local workspace. This file is copied into the COBOL target
indicated in the Definition tab. It is 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 Pacbase file name is not
identical to the name entered in the Definition.
Note: If
you expand the instance in the Design Explorer view
after you run the migration help, you can see the COBOL target and
the name of the file that is copied by the migration help function.
- It starts the local generation. This generation takes into account
the files that are generated by MIA1 (for Programs), MIA2 (for
Screens), MIA3 (for TUI clients), or MIA4 (for
Servers). It runs the local generation and carries out the post-processing
and code reconciliation.
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.
The result of the local generation is stored
in a sandbox. Its content will not replace the content of the .cbl file
that is already copied into your workspace unless you explicitly request
it.
- It compares the Pacbase .cbl file
with the locally generated file. If it detects differences other than
a difference in formatting or comment, it set warnings. It informs
you that you must manage the warnings and remove them before you can
work on the instance.
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.
- It generates three execution reports if the migration help was
run in batch mode. These reports are generated in the folder that
is 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,
until you correct or remove them all. You must manage all the warnings
before the local file replaces the .cbl file
that is already copied into your workspace.
An information message
is displayed when you open the COBOL code of an instance which still
contains warnings.
How to manage the warnings
The warnings
are displayed at two levels:
- On the COBOL lines of the PDP COBOL editor,
- In the Problems view. Double-clicking a
warning selects the corresponding lines in the PDP editor, if it is open.
To use a quick fix, 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 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 while the PDP editor is open, the Compare editor
opens. This editor displays the code of the Pacbase .cbl file
and the code of the locally generated file in parallel. It emphasizes
all the differences that are detected in these two codes.
The code
of the locally generated file can be modified. You can then copy the
lines of the
Pacbase file
into the local file. You can proceed in two ways:
- Copy all the nonconflicting changes by clicking the corresponding
button in the toolbar. You must manage the remaining changes individually.
- Select a change in the Pacbase file and copy it
into the local file. You can place the cursor at the insertion point
or click the toolbar button with which you can copy the currently
selected change.
Note: If you do not want to keep your changes, you can close
the PDP COBOL
editor without saving.
After this manual validation, run
a new local generation. As the migration help function is disabled,
the warnings are no longer calculated. You must then save the locally
generated code. It replaces the Pacbase generated code.
You can then work on the instance.
Note: If you
select this quick while the PDP COBOL
editor is closed, the local code is implicitly saved. The local code
automatically replaces the Pacbase generated code and
the warnings are removed.
- Show differences. If you select this quick
fix, the Compare editor opens. This editor
displays the code of the Pacbase .cbl file
and the code of the locally generated file in parallel, in a fragmented
way. It emphasizes the differences that are detected in the two codes.
With
this quick fix, the code of the locally generated file cannot be modified
directly in the Compare editor.
- Show differences on the whole file. This
quick fix is identical to the previous quick fix, except that the Compare editor
displays the file content as a whole.
With this quick fix, the
code of the locally generated file cannot be modified directly in
the Compare editor.