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)
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.