VisualAge Generator to Enterprise Generation Language Migration Guide

Running Stage 2 in batch mode

The Stage 2 wizard enables you to select one or more migration sets for immediate migration. It also enables you to save the information in a file for later migration in batch mode. To create a file for later migration, do the following:

  1. Follow the steps described in Setting up the Stage 2 VAGen migration file, except do the following:
  2. Create a file with a .bat file extension. The contents of this file should be the following:
    set path=WebSphere_Studio_Install_Directory\eclipse\jre\bin;%path%
    set classpath=WebSphere_Studio_Install_Directory\eclipse\startup.jar;
            WebSphere_Studio_Install_Directory\wstools\eclipse\plugins\
            com.ibm.etools.egl.vagenmigration_5.1.2\runtime\eglMigration.jar;
    cd WebSphere_Studio_Install_Directory
    java com.ibm.etools.egl.internal.vagenmigration.batch.VGMIG
         -importFile Path\vgmigFileName.vgmig 
         -data Path\workspace
         >Path\LogName.log
    

    Repeat the java statement once for each .vgmig file that you want to migrate in batch mode. However, if you selected Import into workspace when you created any of your .vgmig files, then be sure that none of the .vgmig files result in the same EGL project names. If you attempt to migrate multiple .vgmig files for the same EGL project in the same .bat file, the EGL project will only reflect the last of the .vgmig files to be migrated.

    Note:
    • The set classpath statement must be written so that it is all on one line. The java statement must also be written so that it is all on one line.
    • WebSphere_Studio_Install_Directory is the drive and directory in which you installed WebSphere Studio. You must include the WebSphere_Studio_Install_Directory in the set path statement, the set classpath statement, and the cd (change directory) statement.
    • -importFile Path\vgmigFileName.vgmig refers to the drive, directory, and file name of the .vgmig file that specifies the migration set (or sets) you want to migrate from the migration database. The directory must include the workspace name. This is the .vgmig file you saved in step 1. (For example, d:\myworkspace\mySimpleProject\myMigrationInformation.vgmig.)
    • -data Path\workspace is the drive, directory, and workspace name where you want to place the EGL files. (For example, the workspace could be d:\myworkspace.) Any EGL projects and packages that are used by the migration set(s) are created automatically by the migration tool. The -data parameter is optional; -data is only required if you need to specify VAGen Migration Syntax Preferences other than the default values. If you want to set any VAGen Migration Syntax Preferences, you must specify them in the workspace specified by the -data parameter before you run the .bat file. See syntax migration preferences for information about how to set your preferences.
    • Path\LogName.log points to the drive, directory, and file name of the log file you want to create for the java command. This log file lists any problems with the java command itself. Any log messages produced by Stage 2 or Stage 3 are placed in the log file that you specified on the first page of the wizard and then saved into the .vgmig file. If you include multiple java commands in the same .bat file, be sure to specify a different log file name for each java command.

    For example, the java command might look something like this (though it should be all on one line) :

    java com.ibm.etools.egl.internal.vagenmigration.batch.VGMIG
      -importFile d:\myworkspace\mySimpleProject\myMigrationInformation.vgmig 
      -data d:\myworkspace\
      >d:\migrationLogs\myMigrationInformationPiped.log
    
  3. Shut down WebSphere Studio.
  4. Open a Command Prompt window, navigate to the directory containing your .bat file, and run your .bat file.
  5. When the process completes, your EGL project, source folders, packages, and files will be stored in the directories you specified for them respectively. The log file corresponding to each java command contains a list of the migrated parts and any error messages. The messages are the same messages that are written to the log file if you run Stage 2 using the user interface. Similarly, the "to do" list file contains the same messages that are written to this file if you run Stage 2 using the user interface.
  6. Start WebSphere Studio.
  7. You should see the EGL projects, source folders, packages, and files in your workspace.


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