When you develop you model functions with 2E, sometimes you find that after some changes the result is not what you would like and you would like to restore from the backups. How you would do that? This article outlines steps that you can follow to restore a function in 2E.
CA 2E 8.7 and higher versions
To restore, please do the following
1) Take the backup of the current model library by using SAVLIB command.
2) Restore the old backup model to an new library.
3) use the YCOPYMDLOBJ command to copy the required function from one old backup model to current model. More details see
More details regarding 3):
1) Set the library list from the model library (Old backup model library list).
2) Create a model list by the YBLDMDLLST command and place the objects(in our case function) that must be copied in that list.
3) Use the YEDTCPYLST command to confirm objects again for copying.
4) Add TO model library(Current model library) at the top of the library list.
5) Execute the YCPYMDLOBj command to copy the required function to the current model library by giving the model list prepared in 3rd step to copy only required model object.