VisualAge Generator to Enterprise Generation Language Migration Guide

Common code scenarios

Common code is code that is shared between subsystems or programs. The following figure shows common code that is shared by two subsystems.
Graphic of common code considerations (high level)

In this case, there are one or more Java projects or Smalltalk configuration maps that contain Corporate Common Code. The code in these projects or configuration maps can be shared by multiple subsystems. In this example, SubsystemA and SubsystemB use subsets of the common code. Some of the Corporate Common Code is used by both subsystems. For example, Corporate Common Code might include SQL record definitions that are used by many subsystems.

The next figure shows the same basic sharing of Corporate Common Code by the two subsystems, with SubsystemA shown in more detail.
Graphic of common code considerations (more detailed)

SubsystemA has SubsystemA Common Code that used by multiple programs within SubsystemA, but only by programs within SubsystemA. In this case, Program1 and Program2 each make use of some of the SubsystemA Common Code as well as some of the Corporate Common Code. Between the two programs, there is some overlap of both the SubsystemA Common Code and the Corporate Common Code, including overlap with Corporate Common Code that SubsystemB uses. For example, SubsystemA Common Code might include SQL record definitions that are used only by programs within SubsystemA. SubsystemA Common Code might also include a map group definition that is used by several programs within SubsystemA.

Common code and VisualAge Generator

To facilitate the use of common code, VisualAge Generator determines at test and generation time how a particular piece of source code should be interpreted. The advantage of this is that each subsystem or program can make slight variations in the code, just by varying the specific map group that a program uses or by varying data item or record definitions that are in the workspace during generation. The following are three examples:

Common code and the migration tool

Common code is generally code that is used in many programs. You need to include the common code in every migration set because it influences the migration tool in the following ways:

To ensure the best possible migration, when you are migrating a subsystem, you should always include Corporate Common Code and the Subsystem Common Code in your migration set.


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]