VisualAge Generator to Enterprise Generation Language Migration Guide


Setting up the Stage 2 VAGen migration file

The tool that performs Stage 2 of the migration can be invoked through a wizard. To prepare for Stage 2, create a project where you can optionally save Stage 2 preferences for later use. To create the Stage 2 migration preferences, do the following:

  1. Start WebSphere Studio. Be sure to set your workbench preferences as explained in section Setting your workbench preferences.
  2. The Stage 2 wizard asks you for your database driver location. You can set a classpath variable to hold this value so that the wizard will pick it up automatically. The easiest way to do this is as follows:
    1. Under Window->Preferences, expand Java in the left pane and select Classpath Variables.
    2. Click the New button.
    3. For Name, enter the following: DB2_DRIVER_PATH
    4. For Path, click the File button and navigate to your db2java.zip file. (This is the same db2java.zip file that you used in Stage 1. By default the file is in \SQLLIB\java\db2java.zip.)
    5. Click OK in the New Variable Entry window, then click OK in the Preferences window.
  3. Create a simple project that can contain your Stage 2 preferences file if you choose to save it. This is useful if you want to run Stage 2 in batch mode. Start the wizard for this by selecting File->New->Project->Simple->Project->Next.
  4. Give the project a name. For example, VAGENMIG. Then click Finish.
  5. If you are not already using the EGL perspective, switch to it by selecting Window->Open Perspective->Other->EGL->OK. To view your project in the top left pane, switch to the Navigator view. Right click on the project you just created.
  6. From the Navigator view, click on New from the context menu.
  7. Click on Other. Select VAGen Migration to EGL in the left pane, and VAGen Migration File in the right pane. Click Next.
  8. Enter the appropriate Stage 2 preferences:
    1. On the first page of the wizard, edit the preferences as described in the following table. The migration tool does not validate any of the Database fields until you tab out of the field. This prevents multiple attempts to connect to the database while you are entering information.

      Figure 56. Preferences to enter on first page of wizard

      Preference
      Meaning Value
      Load Existing File This allows you to select a previously saved Stage 2 preferences file. Click the Choose File button to select an existing .vgmig file. Click the Load File button to retrieve the preferences from that file and display them in the wizard. Optionally, choose and load an existing .vgmig file.
      Database Driver Location This is the location of your DB2 driver. path_to_db2java.zip\db2java.zip
      Database Driver This is the name of your DB2 driver. This value should always one of the following:
      • COM.ibm.db2.jdbc.app.DB2Driver if you are using a local database.
      • COM.ibm.db2.jdbc.net.DB2Driver if you are using a remote database.
      Database Name This is the name of the DB2 database you used in Stage 1 of migration. This value should always be one of the following:
      • jdbc:DB2:databaseName if you are using a local database.
      • jdbc:nodeName:databaseName if you are using a remote database.
      databaseName is the name of the DB2 database you used in Stage 1 of migration. VGMIG is the default value for Stage 1.
      Database Schema This is the name of the DB2 database schema you used in Stage 1 of migration. MIGSCHEMA, where MIGSCHEMA is the name of the DB2 schema you used in Stage 1 of migration. MIGSCHEMA is the default value for Stage 1.
      Database User ID This is the database user ID you used in Stage 1 of migration. Use the same database user ID that you used for Stage 1. (The default value is your logon ID.)
      Database Password This is the database password you used in Stage 1 of migration. Use the same database password that you used for Stage 1. (The default value is your logon password.)
      Log File Location This is the location where a log file will be written. Enter a valid location (drive and directory) in the file system.
      Log File Name This is the name of the log file where you want the Stage 2 messages to be written. Enter a valid file name.
    2. On the second page of the wizard, edit the preferences as described in the following table:

      Figure 57. Preferences to enter on second page of wizard

      Preference
      Meaning Value
      Java or COBOL radio button This choice determines whether the migration tool creates projects that include Java Source folders.

      If you are using WebSphere Studio Site Developer or WebSphere Studio Application Developer, you should always select the Java radio button.

      For other WebSphere Studio projects, you can select COBOL if you only plan to generate COBOL and you plan to run migration in online mode. Selecting COBOL for batch migration can result in projects that do not have the required EGL properties and which are thus not usable.

      Migrate remaining VAGen parts This determines whether or not parts not referenced by any generatable part in the migration set will be converted to EGL. Select the box to convert unreferenced parts to EGL. Generally, you should select Migrate remaining parts. If you do not select Migrate remaining parts, control parts and any other parts that are unused within the migration set will not be migrated to EGL source.
      Import into workspace This determines whether or not Stage 3 (importing EGL into files in the current workspace) will be automatically started after Stage 2 is complete.
      Note:
      If you select this box, you must select one of the radio buttons under this checkbox to specify the version to want to import (latest or oldest - see description below), because `only one version of a project can be in the workspace at a time.
      Select this box to import EGL files directly after the conversion of parts to EGL. Leave this box unselected to import files later, during Stage 3.
      Note:
      • If you select this option, there is no need to run Stage 3 separately. The migration tool automatically starts Stage 3 (import) directly after Stage 2 (conversion) and completes the migration process.
      Latest version This specifies that the latest version of the desired migration sets should be imported. This option can only be selected if the Import into workspace checkbox is selected.
      Oldest version This specifies that the oldest version of the desired migration sets should be imported. This option can only be selected if the Import into workspace checkbox is selected.
      Override existing files Stage 3 (the import process) uses EGL produced by Stage 2 to create and import the EGL files specified in the Stage 1 report. If EGL files with the same names as the EGL files that Stage 3 is about to import already exist in the workspace, this option determines whether or not those files will be overwritten. This option can only be selected if the Import into workspace checkbox is selected. Override existing files enables you to specify how you want the Stage 3 migration tool to handle the situation in which the migration set you are currently migrating contains parts that should be placed in a file that is already in your workspace. If you select Override existing files, the Stage 3 migration tool replaces the existing file and includes only those parts that are in the current migration set. If you do not select Override existing files, the Stage 3 migration tool merges any new parts into the existing file. The new parts are placed alphabetically by part type. See Overwriting and merging files for a more complete discussion of the effects of this option.
      Save migrated files to temporary directory This provides the option to save EGL files to a location in the file system. This allows you to access EGL files for multiple versions of a project at the same time (whereas you can only see one version at a time in the workspace). You can move EGL files directly from here to your repository. If you plan to migrate multiple versions of a migration set, then do the following:
      • Select this box so that each version can be written to a different subdirectory.
      • Specify the Folder under which the subdirectories for the versions will be placed.
      • Do not select Migrate Now. If you select Migrate Now to migrate in online mode, then the Stage 3 migration tool ignores Save migrated files to temporary directory. Migration to a temporary directory can only be done in batch mode.
      • Select Save current configuration to file. Specify the project and file name where the current configuration is to be saved as a .vgmig file. When you run Stage 2 in batch mode, point to the saved .vgmig file to specify your migration preferences.
      Folder This is the directory in which you want to save EGL files. Each migration set version becomes a subdirectory under the directory you specify for Folder. Specify an existing directory in your file system.
      Migrate Now This specifies that you want Stage 2 to run at this time, rather than just setting up the preferences file to migrate at a later time. You must select either Migrate Now to run Stage 2 in online mode or Save current configuration to file to save your preferences so that you can run Stage 2 in batch mode at a later time. You can select both options if you want to retain a copy of your preferences for later reference. Do not select Migrate Now if you have already selected Save migrated files to temporary directory. Saving to a temporary directory can only be done in batch mode. Selecting Migrate Now indicates that you want to migrate in online mode.
      Save current configuration to file This allows you to save the preferences you are specifying in the wizard to a file. You can later run Stage 2 again with the saved preferences by right-clicking on the saved file and selecting Start Migration from the context menu.
      Note:
      If you select this box, you must specify a Path and a File Name. (See the next two rows in this table.)
      You must select either Migrate Now to run Stage 2 in online mode or Save current configuration to file to save your preferences so that you can run Stage 2 in batch mode at a later time. You can select both options if you want to retain a copy of your preferences for later reference. If you select this option you must also specify the Path and File Name where the current configuration is to be saved as a .vgmig file. When you run Stage 2 in batch mode, point to the saved .vgmig file to specify your migration preferences.
      Path This specifies the project into which the file should be saved. \projectName, where projectName is the name of the project that you want to contain your saved file.
      File Name This specifies the name of the file to which preferences will be saved. fileName, where fileName is the desired name for your file WITHOUT a file extension. The extension .vgmig will automatically be appended for you.
    3. On the third page of the wizard, the wizard lists the migration sets in the database you specified. Select the migration sets you want to migrate. If you do not select any migration sets, then the migration tool migrates all the migration sets in the database. Click Finish.

The combinations of the check boxes that you select determine the actions that are performed by the wizard:

Here is an example of a Stage 2 preferences file, stage2.vgmig:

databaseDriverLocation=d:\SQLLIB\java\java\db2java.zip
databaseDriver=COM.ibm.db2.jdbc.app.DB2Driver
databaseName=jdbc:DB2:VGMIG
databaseSchema=MIGSCHEMA
databaseUserid=myuserID
databasePassword=encoded:AAEDAwQFBwYKCwo+Pw==
configurationPlan=MyMigrationSetA,1.1
migrateRemainingParts=yes
workspaceImport=latest
overrideExistingFiles=yes
tempDirectory=
logFileLocation=D:\tempmig\MyMigrationSetA\stage2\MyMigrationSetA.log
migrateNow=yes
projectType=COBOL


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