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.
- FTP in binary mode the programCodeFiles.tar file you created on the source product line into $LAWDIR/productLine of the target environment.
-
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
-
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*.*
-
Load the metadata in the target environment.
-
Change directory to the systemCodemeta directory for the program you are copying.
cd $LAWDIR/targetProductLine/metadata/systemCodemeta
-
Load the program metadata. At the command line, specify this information:
metaloadpgm targetProductLine programCode.pgm
-
Load the program's message metadata. At the command line, specify this information:
metaloadmsg targetProductLine programCode.msg
-
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
-
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
-
Change directory to the systemCodemeta directory for the program you are copying.
-
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.
- Verify programCode.err file does not exist. If it does, investigate and resolve the errors before recompiling.
- Verify the program by executing the program.
-
Remove the tar files from the source and target systems.
-
On the source system, at the command line, specify this information:
rm $LAWDIR/sourceProductLine/programCodeFiles.tar
-
On the target system, at the command line, specify this information:
rm $LAWDIR/targetProductLine/programCodeFiles.tar
-
On the source system, at the command line, specify this information: