On 19 Apr 2012 09:58, memallazzo@xxxxxxxxxxx wrote:

I need to retrieve an RPGLE pgm from a SaveFile of a library.
Unfortunately the library is contained in all user library lists in a
24 hour work place.

Is there a way to just retrieve the one pgm ...or restore the
library to a different name?


To restore the single program object type *PGM named THEPGM that was previously saved from the library named THELIB [saved via SAVLIB THELIB] into the save file named THESAVFILE in the library THESAVFLIB:

RSTOBJ ThePgm TheLib *SAVF *PGM SAVF(TheSavfLib/TheSavFile) RSTLIB(QTEMP)

The Restore to Library (RSTLIB) parameter could specify your personal library instead. If QTEMP is used, the object can then be target of a MOVOBJ to move the object wherever... after the restore has completed and been verified to have completed with the desired effect; e.g. authority or adoption may have been impacted, and corrections may be desirable before moving the object into a particular library where someone might start using the restored object before "ready".

Note: Regardless the save file was the target of a SAVLIB rather than SAVOBJ, the RSTOBJ is still perfectly capable to restore effectively any specific [set of] object(s) from that save file.

Regards, Chuck

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2019 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].