Setting Up a Multi-Modeling Environment › Copying a Model › Copying the Model Objects
Copying the Model Objects
After editing the model object list, you use the YCPYMDLOBJ command to copy the objects. As a safety check, the target model must be the first model in the library list. The source model must be the second. This section describes how the YCPYMDLOBJ command functions and provides an example of how you might use the command.
The YCPYMDLOBJ command does the following:
- Expands the model object list. Each of the selected objects in the list is examined for referenced objects that are required for each object to be complete. These implicitly required objects must be copied if they do not exist in the target model.
- Adds to or updates the referenced objects in the list and flags them as implicitly selected.
- Checks for discrepancies between the objects.
- Depending on the option you specify in the CPYOPT parameter, does one of the following:
- If you specified the prepass check option (*PREPASS), generates a prepass report with discrepancies and stops so that you can resolve them before you continue the copy. Note that only exceptions are reported during this procedure.
- If you specified the copy option (*COPY) and the procedure does not detect errors, copies the objects in the model object list to the target model and generates a prepass report of warnings and an audit report that lists all objects copied.
For example, to copy model objects from model object list MYMDLLST of the objects in model MYOLDMDL to the model MYMDL, you would enter the following and press Enter:
YCPYMDLOBJ FROMMDLLIB(MYOLDMDL)+ TOMDLLIB(MYMDL) CPYLST(MYMDLLST)
This example leaves the CPYOBJ parameter at the default *PREPASS option.