Copying Application Components
You can copy components of an application to another application, called the target application, using the iiexport and iiimport commands. Unlike the copyapp command, which copies an entire application, iiimport, and iiexport copy individual components.
The components you can copy are frames, procedures, records, global variables, and global constants. You can copy all the components of a particular type using one of the -all flags:
-allframes, -allprocs, -allrecords, -allglobals, -allconstants.
Copying components requires two steps:
1. Use iiexport to extract the components to an intermediate file.
2. Use iiimport to load the components from the intermediate file into the target application.
By default, the intermediate file is called iiexport.tmp. You can change the name of the intermediate file with the -intfile flag. If the applications are not on the same machine or virtual file system, you must copy the intermediate file to the target machine before running iiimport.
Using the iiimport and iiexport commands allows you to merge components into an existing application. For example, if you are working on a development team, the team can have one master application. Each team member can develop frames and other components independently, and use iiimport and iiexport to copy the components into the master application.
You could also use the intermediate file created by iiexport as a snapshot of a frame or other component at a particular stage of development. For example, you can check the file into a source control system or store it as a backup file.
Last modified date: 01/30/2023