KB Article 2428
1999/10/05

Close
X
Contact Tech Support

 Email Tech Support
 (250) 655-1766
 [7:30 - 5:00 PST]
Your Meeting ID will be Provided by a Rep.
Tech Support
Tech Support Home
Software Updates
Knowledge Base Search
Recent KB Articles
Product FAQs
Code Samples
Documentation
Tech Blog
System Requirements
Installation Instructions
Support Testimonials
Contact us to...
Create a Ticket
Request a Free Demo
Suggest a New Feature
Submit Feedback
Upload a Large File
Other Services
Software Training
Professional Services

Restoring a deleted or lost definition from a backup.

Product: ProGen Plus Type: Frequently Asked Question

Problem:
Need to restore a deleted or lost definition from a backup.
 
Comments:
If you delete a definition and need to restore it from a backup, there are a few issues to take into consideration. Below is an overview of the problems you have to work around, and some suggestions on an approach.
 
Solution:
First of all, the main challenge is that definitions don't exist as single entities anywhere (like a source member). A ProGen definition consists of records scattered across dozens of different files. So when you want to restore a definition, you need to restore the library containing all those files. There isn't a way to just restore X records from all those files.
 
A library that contains a set of definition files is called an 'environment library'. When ProGen is first shipped to you, the default environment used is GN#LIB. If you are using a different environment, you are probably aware of it, and what environments are, but if you're not certain what environments live on your system, you can do a WRKOBJ on the file GN#PDFF, the definition header file, and any library containing that file will likely be an environment library.
When you work in ProGen, the environment library that your definitions go into is handled by your library list; the first environment lib in your list is where they'll go. So if you aren't sure where you generally put your definitions, sign on to ProGen as you normally do, and check for environment library value at the top of your screen somewhere.

So the first step is determine if your definitions exist in GN#LIB or another environment library. Once you know that, follow the instructions below (these instructions assume that you have no version mismatches).
 
1. If your definitions exist in an environment library other than GN#LIB, then restore that library from backup, with a new name (so it doesn't overwrite your current version of it).
If your definitions were in GN#LIB, then the easiest thing to do is to rename your current copy of GN#LIB to something else, and restore the old one as GN#LIB. Then use the CRTLIB command to create another library to copy your deleted definitions to (PDFLIB is a good name), and then use the ZCRTENVR command to make that lib an environment library.
 
2. After restoring the library in question, you need to set change management processes to handle copying the definitions from one env to another. The first step in this is to use the ZWRKENV to create environment library definitions over all the environments in question, i.e., the restored library, and the one that you're going to copy to. The user guide has additional information on how to set up these environment definitions. The thing to keep in mind is that what you are building is a set of settings that apply when a definition is copied in or out of that library.
 
3. After building the two environment definitions, then you need to run the ZWRKCMP command to set up a change management process to copy the definitions from the restore environment to the new one. Generally, you should set up all the options as copies, and don't select any options that would change database file references, or regen and recompile.
 
4. Finally, once you have done that, add the From environment to the top of your library list, and run the ZMNGPDFL command. At the list of definitions presented, select your process, and the definitions that you want to copy, and hit Enter to continue.
 
5. Finally, if GN#LIB was your environment library, you can delete (or rename) the restored environment lib, and revert back to your current GN#LIB. Optionally, you can also create a new change management process to copy things back into that GN#LIB.
You should be aware that at older releases of ProGen we had experienced some problems with change management, particularly with losing parms on program calls. After you restore your definitions and get them back into place, you should double-check your calls before regenerating and recompiling the programs.

Rate This Article

Did this example help you to achieve your goal?
 Yes  No  Don't Know

Enter additional comments below.   If you want to hear back from us, include your contact information.

Email Address:
Comments:
Please enable JavaScript in order to rate this page.