Important considerations

This section provides important information that you need to consider before manually copying source files and metadata between product lines.

  • Programs can only be copied from one IBM i environment to another IBM i environment.

  • Windows and UNIX programs cannot be copied to an IBM i system.

  • The source and destination product lines must be the same release version.

  • Source and target can be on the same machine but must be in different environments.

  • The user performing the copy process must have security privileges to run the metadump and metaload utilities.

There are two types of files needed to transfer a program to another product line: source code files and metadata files.

Source code files are located in $LAWDIR/productLine/rpg/systemCoderpg/SYSTEMCODERPGSRC.

This section provides an overview of the copy process. These are the processes Program source code file Description

programcodePD.COPYGM

Contains the procedure source code.

programcodeWS.COPYGM

Contains the working storage source code.

programcodeD.SCRN

Contains the screen definition source code.

programcodeP.PRNT

Contains the report definition source code.
programcode.cfg For report programs, this file provides optional configuration parameters for printing. For online programs, this file provides a way to set up data record caching.

Metadata files of all types except .xlt are located in $LAWDIR/productLine/metadata/systemCodemeta

Metadata files of type .xlt are located in $LAWDIR/productLine/rpg/systemCoderpgmeta.

Program metadata file Description
Program code metadata This is the program definition created through pgmdef. Programs cannot have a "Run Type" of 'Prototyped' if they are to be copied to another product line.
Work file metadata You can determine if a program includes work files by using workdef.
Translation metadata This metadata is the translation for work file elements, and will not appear if the program does not access work files.
Message metadata This metadata defines the messages contained in msgmnt for the program.
Menu metadata This data is maintained in menudef. Batch programs have one *.mnu file. Online programs have a *.mnu file for each of screen.