


I do not believe the above answer is correct.
It will produce CPF3789: Only one library allowed with specified parameters.
What you can fo is to create a new library.
Then either manually or with a CL, do a CRTSAVF in that library with the name of the library you are saving, then do a SAVLIB for a single library to that *SAVF.
Now loop through the above process for each library you want to save.
End result wil a a single library with a *SAVF for each library you wanted to save. You can then backup that library to tape or sent it to a backup location.
You can use SAVLIB command,
enter ‘+’ for more values
<pre> Save Library (SAVLIB)
Type choices, press Enter.
Library . . . . . . . . . . . . + Name, generic*, *NONSYS…
+ for more values
Device . . . . . . . . . . . . . Name, *SAVF, *MEDDFN
+ for more values </pre>
You will be able to enter more than one Library Name
<pre> Specify More Values for Parameter LIB
Type choices, press Enter.
Library . . . . . . . . . . . . LIB1 Name, generic*, *NONSYS…
LIB2
LIB3
</pre>
Pradeep.


While multiple libraries can be specified on a SAVLIB command, they can only be specified when DEV(*SAVF) is not also specified. CharlieBrowne is correct.
To get multiple libraries into a single savefile, they must first be saved into individual savefiles that have been created in the same library. After each savefile has been populated, you can then save that one library into a single savefile with SAVLIB SAVFDTA(*YES). Later, that library can be restored and the individual libraries can be restored from the savefiles that are in it. (Or an individual savefile can be restored from the consolidated savefile, and a library can be restored out of that individual savefile.)
In short, it takes multiple steps if savefiles are going to be used.
Tom
go to the save menu (go save) and take option23 (all user data)
charlie u r correct, its says the same error, but i don’t know CL, is there any other way ,plz help me, or else i have to sav one by one…:-(
If you must use *SAVF, then you can only do one at a time.
Can you go to TAPE?
Is this something you want to run once or everyday?
If you are on V5R4 and above and have enough disk space research Virtual tape. You can then use savlib to save all user libraries to the Virtual tape that resides in the IFS.
charlie can u give me a sample program for this issue
Is there a requirement that you must use a save file? If not, Idfalls suggestion is probably the simplest solution.
Rajasekhar15 — Can you answer these questions. There are various solutiuons depending on what your requirement is.
The answer could be as simple as a couple of User Defined PDM options to creatiing a DB that has the libraries you want to save, to dynamically creating a list of libraries each time you run it.
1. If you must use *SAVF, then you can only do one at a time.
2. Can you go to TAPE?
3. Is this something you want to run once or everyday?
4. Is the list of libraries static or can be be changing?
5. How many libraries in need to be included?
1. If you must use *SAVF, then you can only do one at a time.
i need to do in save file
2. Can you go to TAPE?
no i can’t
3. Is this something you want to run once or everyday?
r u asking abt those lib r wat? but i’m not going to use those lib right, might be in
future.
4. Is the list of libraries static or can be be changing?
objects in the libraries r cobal prgms
5. How many libraries in need to be included?
16 lib
thanks in advance charlie……:-)
This should do it for you.
/* *******************************************************************/ /* Program Name : LIBS2SAVF */ /* Description : Save Selected Librarties to a *SAVF */ /* */ /* Created By : Charlie Browne */ /* Create Date : 09/22/11 */ /* *******************************************************************/ PGM /*-------------------------------------------------------------------*/ /* Define the variables */ /*-------------------------------------------------------------------*/ DCL VAR(&wJobNbr) TYPE(*CHAR) LEN(06) DCL VAR(&JobLib ) TYPE(*CHAR) LEN(10) DCL VAR(&SaveLib) TYPE(*CHAR) LEN(10) /*-------------------------------------------------------------------*/ /* Retrieve Job Number to build Job library */ /*-------------------------------------------------------------------*/ RTVJOBA NBR(&wJobNbr) /*-------------------------------------------------------------------*/ /* Create the library and make it first in the list */ /*-------------------------------------------------------------------*/ Chgvar &JobLib ('JOB' || &wJobNbr) CRTLIB LIB(&JobLib) TYPE(*TEST) ADDLIBLE &JobLib /*-------------------------------------------------------------------------*/ /* Create *SAVF with name of library to be saved */ /* Save that library to the *SAVF */ /* */ /* Replace 'YourLib' with the name of a library you want to save */ /* Do this for each of the 16 occurances. Then compile program */ /*-------------------------------------------------------------------------*/ Chgvar &SaveLib 'YourLib' CallSubr SrSaveLib Chgvar &SaveLib 'YourLib' CallSubr SrSaveLib Chgvar &SaveLib 'YourLib' CallSubr SrSaveLib Chgvar &SaveLib 'YourLib' CallSubr SrSaveLib Chgvar &SaveLib 'YourLib' CallSubr SrSaveLib Chgvar &SaveLib 'YourLib' CallSubr SrSaveLib Chgvar &SaveLib 'YourLib' CallSubr SrSaveLib Chgvar &SaveLib 'YourLib' CallSubr SrSaveLib Chgvar &SaveLib 'YourLib' CallSubr SrSaveLib Chgvar &SaveLib 'YourLib' CallSubr SrSaveLib Chgvar &SaveLib 'YourLib' CallSubr SrSaveLib Chgvar &SaveLib 'YourLib' CallSubr SrSaveLib Chgvar &SaveLib 'YourLib' CallSubr SrSaveLib Chgvar &SaveLib 'YourLib' CallSubr SrSaveLib Chgvar &SaveLib 'YourLib' CallSubr SrSaveLib Chgvar &SaveLib 'YourLib' CallSubr SrSaveLib Subr Subr(SrSaveLib) CrtSavf &JobLib/&SaveLib Savlib &Savelib *savf SAVF(&JobLib/&SaveLib) SAVACT(*LIB) EndSubr END: ENDPGM