Loading copied program source code and metadata files to the target product line

Use this procedure to transfer the archive tar file from your program source code product line to the target product line, expand the archive file, load the metadata, and compile the programs.

  1. FTP in binary mode the programCodeFiles.tar file you created on the source product line into $LAWDIR/productLine of the target environment.
  2. Expand the archive file. This puts the metadata files and the source code files in the appropriate locations in the product line. At the command line in the target environment, specify this information:

    cd $LAWDIR/targetProductLine

    tar –xvf programCodeFiles.tar

  3. Confirm that the target product line contains the same metadata files that you identified for the program in the source product line. At the command line in the target environment, specify this information:

    ls ./metadata/systemCodemeta/programCode*.*

  4. Load the metadata in the target environment.
    1. Change directory to the systemCodemeta directory for the program you are copying.

      cd $LAWDIR/targetProductLine/metadata/systemCodemeta

    2. Load the program metadata. At the command line, specify this information:

      metaloadpgm targetProductLine programCode.pgm

    3. Load the program's message metadata. At the command line, specify this information:

      metaloadmsg targetProductLine programCode.msg

    4. If the program uses work files, load the program's work file metadata. For each work file, at the command line, specify this information:

      metaloadwrk targetProductLine workFileName.wrk

    5. Load the program's menu metadata. At the command line, specify this information:

      For batch programs:

      metaloadmnu targetProductLine programCode.mnu

      For online programs, for each .mnu file for the program:

      metaloadmnu targetProductLine programCode.scrNbr.mnu

  5. Compile the program on the target machine:

    qcompile targetProductLine systemCode programCode

    For detailed instructions on compiling a program, see Doc for Developers: Application Development Workbench.

  6. Verify programCode.err file does not exist. If it does, investigate and resolve the errors before recompiling.
  7. Verify the program by executing the program.
  8. Remove the tar files from the source and target systems.
    1. On the source system, at the command line, specify this information:

      rm $LAWDIR/sourceProductLine/programCodeFiles.tar

    2. On the target system, at the command line, specify this information:

      rm $LAWDIR/targetProductLine/programCodeFiles.tar