On 21-Sep-2016 08:29 -0600,
jke...@lipipe.com wrote:
> I appreciate the response and thoroughness of answer.
The reply by jsev99 points out a flaw in the commands I gave in which
I allude to the possible use of a save file. Originally I had composed
the save request for use without save files [for which they should work
as shown, given a proper Device (DEV) specification]. But that backup
request is not as easily converted to use with a save file, as is
implied by my suggestion of just un-commenting; i.e. merely adding the
noted DEV() and SAVF() parameter specifications is not sufficient, due
to the limitation of "back up 1 library to a save file", because the
request would error per the restriction with msg CPF3789 "Only one
library allowed with specified parameters." Thus, I give a revised
version below:
The backup [to local DASD\storage] phase:
CRTSAVF QGPL/SV_ADPDATA AUT(*EXCLUDE)
TEXT('SAVLIB LIB(ADPDATA)')
CRTSAVF QGPL/SV_AVPZIP AUT(*EXCLUDE)
TEXT('SAVLIB LIB(AVPZIP )')
SAVLIB LIB(ADPDATA ) UPDHST(*NO) SAVACT(*NO)
SAVFDTA(*YES) SPLFDTA(*ALL) QDTA(*DTAQ)
PVTAUT(*YES) ACCPTH(*YES)
STG(*KEEP) DTACPR(*YES)
OMITLIB(*NONE) OMITOBJ((*NONE))
OUTPUT(*PRINT) INFTYPE(*OBJ)
DEV(*SAVF) SAVF(QGPL/SV_ADPDATA)
SAVLIB LIB( AVPZIP ) UPDHST(*NO) SAVACT(*NO)
SAVFDTA(*YES) SPLFDTA(*ALL) QDTA(*DTAQ)
PVTAUT(*YES) ACCPTH(*YES)
STG(*KEEP) DTACPR(*YES)
OMITLIB(*NONE) OMITOBJ((*NONE))
OUTPUT(*PRINT) INFTYPE(*OBJ)
DEV(*SAVF) SAVF(QGPL/SV_AVPZIP)
The recovery phase [refer to prior response for additional commentary]:
DLTLIB LIB(ADPDATA)
DLTLIB LIB(AVPZIP )
RSTLIB SAVLIB(ADPDATA )
DEV(*SAVF) SAVF(QGPL/SV_ADPDATA)
OMITLIB(*NONE) OMITOBJ((*NONE))
OPTION(*ALL) MBROPT(*ALL)
SPLFDTA(*NEW) PVTAUT(*YES)
RSTLIB(*SAVLIB) RSTASPDEV(*SAVASPDEV) RSTASP(*SAVASP)
DFRID(*DFT) ALWOBJDIF(*NONE)
OUTPUT(*PRINT) INFTYPE(*OBJ)
RSTLIB SAVLIB( AVPZIP )
DEV(*SAVF) SAVF(QGPL/SV_AVPZIP)
OMITLIB(*NONE) OMITOBJ((*NONE))
OPTION(*ALL) MBROPT(*ALL)
SPLFDTA(*NEW) PVTAUT(*YES)
RSTLIB(*SAVLIB) RSTASPDEV(*SAVASPDEV) RSTASP(*SAVASP)
DFRID(*DFT) ALWOBJDIF(*NONE)
OUTPUT(*PRINT) INFTYPE(*OBJ)
After recovery is verified, consider what to do with the backup made
to disk; e.g. perhaps the following cleanup:
DLTF QGPL/SV_ADPDATA
DLTF QGPL/SV_AVPZIP
>
> As for the commands you listed, are you typing each line one by one
> onto a command line
That is how they are presented; as an interactive script of
successive requests to be issued on\at a command-line.
> or is there a way to type all this commands and then execute?
The requests can be typed\stored elsewhere from which they can later
be executed, but that would likely be a much longer discussion. Also,
for the layperson, there are complications to be overcome [especially
for save\restore] whereby there may be /errors/ for which [re]actions
are not as easily coded as they are handled by actual review of the
issuer of the commands; decisions on whether or how to re-issue the
commands is not something a novice would want to undertake without
direct review of the result from each request.
The requests could be coded in a file [a source member] that either
could be interpreted CL or compiled CL [into a CL Program (CLP) or an
ILE CL Program (CLLE)]. The system offers REXX that enables the
double-quote delimited commands to be interpreted directly, or the CL
stream job [e.g. Submit Database Job (SBMDBJOB)] to process the requests
when coded with appropriate line-continuation and encapsulated in
//BCHJOB and //ENDBCHJOB control specifications [like mainframe job
control statements].
>
> I am also thinking instead of setting it to backup to an external
> drive what commands can I use to just save it locally.
Without any punctuation within, and ending with a period vs a
question mark [per "can I" vs /I can/], I am unsure how to interpret
what is stated [¿or inquired?] above; also unsure, if "external drive"
implies /remote media/ or external media [by which I mean physical
storage other than internal DASD]. Nonetheless:
Saving to external media [vs save file] would allow specifying both
libraries on just the one Save Library (SAVLIB) command.
>
> Then when I update the 2 Libraries I can just run a command to
> restore the Libraries if the updates do not work.
And having saved to external media would allow specifying both
libraries on just the one Restore Library (RSTLIB) command.
>
> I agree that a backup should be the external drive but the mainframe
> is at a remote location.
FWiW: The AS/400 was often called a mini-computer in its earliest
incarnation, though long [since] categorized as a /midrange/ system,
situated somewhere between the mini and the mainframe; the IBM Power
Systems are not the same as the IBM Mainframe was, and I presume the
mainframes are still not [solely] Power architecture, even if they might
have integrated some Power chips.
I infer the IBM i is being referred to, above, as the "mainframe"?
And if so, after a backup is made, the [binary\image] of the data can be
copied elsewhere [e.g. off-site to other media, including DASD on
another system including a PC]; i.e. the system being in a /remote/
location is limited only by the bandwidth for copying the data to any
other location(s).
--
Regards, Chuck