

Managing Model Objects › Commands to Manipulate Model Object Lists › Example 2
Example 2
You can use the following set of commands to compare model objects between two models:
- Use the Build Model List (YBLDMDLLST) command to create a list of all objects in a model by specifying the All Objects list (*ALLOBJ) as input and a named model object list as output.
YBLDMDLLST OBJNAM(*ALLOBJ)+
MDLLST(list-name1)
- Build another model object list for the second model; e.g., NEWMDL.
YBLDMDLLST OBJNAM(*ALLOBJ)+
MDLLST(NEWMDL/list-name2)
- Copy the model object list just created to the original model and ensure that the surrogate number of each list entry matches that of the corresponding model object in the original model.
YCPYMDLLST+
FRMMDLLST(NEWMDL/list-name2)+
TOMDLLST(OLDMDL/list-name2)+
TOUPDOPT(*RFSSGT)
- Filter out any errors. This creates a list of model objects that exist in the new model but do not exist in the original model.
YFLTMDLLST FLAGVAL(*ERROR)+
MDLLST(NEWMDL/list-name2)+
OUTLST(list-fail)
- Now compare the two lists in the target model and save the differences in another model object list.
YOPRMDLLST MDLLSTA(list-name1)+
LISTOPR(*DIFF) MDLLSTB(list-name2)+
TOMDLLST(list-diffs)+
OPRTYPE(*OBJSGT)
- Print the output lists for a permanent hard copy record of the differences between the two models.
YDOCMDLLST MDDLST(NEWMDL/list-fail)
YDOCMDLLST MDLLST(OLDMDL/list-diffs)
Copyright © 2014 CA.
All rights reserved.
 
|
|