Introduction:
Physical files created from a 2E model will often contain data that should be kept. When these files need to change, this document describes a method to retain this data; you can also make this behavior the default for your 2E environment.
Question:
How to retain existing data when you change physical files created from a 2E model?
Answer:
There are 2 model values that control this action:
Normally these two model values are the same because you store data in an archive library and then copy the data back from the same library.
First create an archive library for this process (I refer to this as arc-lib):
CRTLIB LIB(arc-lib) TYPE(*TEST) TEXT('Archive library for my model')
Change the model values YOLDLIB and YCPYLIB to be arc-lib:
YCHGMDLVAL MDLVAL(YOLDLIB) VALUE(arc-lib)
YCHGMDLVAL MDLVAL(YCPYLIB) VALUE(arc-lib)
Use YEDTLIBLST to edit your model's interactive and batch JOBD library lists to include the archive library.
If you have changed a physical file and want to retain its data:
If you wish, you can make CPYLIB(*CPYLIB) and OLDLIB (*OLDLIB) the defaults for your 2E installation.
Change the command defaults for YSBMMDLCRT with:
For the command YSBMMDLCRT called from option 1 of the Services Menu:
Additional Information: