VisualAge Generator to Enterprise Generation Language Migration Guide


Running single file migration using batch mode

The user interface enables you to migrate one External Source Format file at a time. With batch mode, you can migrate multiple External Source Format files in a single command file. To use batch mode do the following:

  1. Create a file with a .bat file extension. The contents of this file should be:
    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\ExternalSourceFormatFile.esf
        -eglFile Path\EGLFile.egl 
        -data Path\workspace 
        -package packageName 
        -overwrite 
        >Path\LogName.log
    

    Repeat the java statement once for each External Source Format file you want to migrate.

    Note:
    • The set classpath 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.
    • The --overwrite parameter is optional. This parameter tells the migration tool whether or not to overwrite an existing EGL file in the specified directory with the specified name.
    • WebSphere_Studio_Install_Directory is the drive and directory in which you installed WebSphere Studio.
    • Path\ExternalSourceFormatFile refers to the drive, directory, and file name of the External Source Format file you want to migrate. (For example, d:\temp\VAGenFiles\PROG1.esf.)
    • Path\EGLFile.egl refers to the drive, directory, and file name of the EGL file you want to create. The directory must include the workspace, EGL source folder, and package where you want to place the EGL source file. (For example, d:\myworkspace\MyProject\EGLSource\my\pkg\prog1.egl.) EGLFile.egl is used in the same way as the EGL File Name field you specify when you use the Import VAGen External Source Format File wizard. See Overview of Single File Migration for information about how migration tool uses the Separate parts into EGL files preference and the type of parts in the External Source Format file to determine what files to create during migration in single file mode.
    • Path\workspace is the drive and directory for your workspace. (For example, d:\workspaces\myworkspace) If you do not specify the -data option, anything you specified in the VAGen Migration Syntax Preferences is ignored and the migration tool uses the default VAGen Migration Syntax Preferences. If you want to specify VAGen Migration Syntax Preferences, you must specify the -data option and point to the workspace in which you set the preferences.
    • packageName is the name of the package with which you want to associate the EGL file. (For example, my.pkg.) The package name is also used in the package statement of the .egl files that the migration tool creates.
    • Path\LogName refers to the location and file name of the log file you want to create for the migration of the corresponding External Source Format file. Sending your migration messages to a log file is also optional, but it is highly recommended.
    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:\temp\VAGenFiles\prog1.esf
       -eglFile d:\workspaces\myworkspace\MyEGLProject\EGLSource\my\pkg\prog1.egl
       -data d:\workspaces\myworkspace
       -package my.pkg -overwrite >d:\temp\EGLLogs\prog1.log 
    
  2. Shut down WebSphere Studio.
  3. Open a command prompt window, navigate to the directory containing your .bat file, and run your .bat file.
  4. When the process completes, your EGL files and log files will be stored in the directories you specified for them, respectively. The log file contains a list of the migrated parts and any error messages. The messages are the same messages that are listed in the pop--up window when you use the Import Wizard in online mode.
  5. Start WebSphere Studio.
  6. Select the project into which you imported External Source Format files, then right-click and select Refresh. This refreshes the project from the file system so that the EGL files that were created, appended, or overwritten during migration in batch mode are recognized by WebSphere Studio. This in turn cases validation to run so that the Tasks list reflects the most current messages for all files in the project. Then you can expand the package you created to see your EGL files.


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