iSeries home   |   Easy400     |   CGIDEV2     |   MMAIL  
Public-Source
 
  Introduction
 
  Commands:
zipsave
dspzipsave
unzipsave
 
 Download
 
 

 
Command ZIPSAVE

Command ZIPSAVE allows to perform a SAVLIB / SAVOBJ / SAV command and to compress the resulting save file, along with an optional "readme" stream file, into a standard "zip" file.

You may decide whether the compress operation is performed by

  • CL command CPYTOARCF (available since V7R2), OR
  • the UNIX QShell command jar (Java ARchive). In this case you may also add to compression a "readme" text stream file.
Note 1: Jar is a POSIX general-purpose archiving and compression tool, based on ZIP and the ZLIB compression format, available since ever on the PC platform.
Note 2: If submitting this command to batch execution, be sure to specify JOBQ(QSYSNOMAX) in the SUBMIT command.

Command parameters

There are three sections of parameters:

  1. Initial parameters
                                  Save & Zip (ZIPSAVE)
    
     Type choices, press Enter.                                                     
                                                                                    
     ZIP stream file  . . . . . . . . ZIPFILE                                              
          
     Type of save . . . . . . . . . . SAVETYPE    *SAVLIB       *SAVLIB, *SAVOBJ, *SAV     
    • ZIP stream file (ZIPFILE)
      The qualified name (path and name) of the stream file that will contain the compressed (zipped) files. This stream file, if already existing, is deleted and re-created.
      A .zip extension is recommended.
      The zip stream file will contain at maximum two compressed stream files:
      • A "readme" file (if using "jar" and requesting so)
      • A save file resulting from a SAVLIB, SAVOBJ or SAV operation (see the following parameters).
      The "readme" and the save file are assigned the same name, but different extensions: .txt for the "readme" file, .savf for the save file.
    • Type of save (SAVETYPE)
      The type of save that is going to be requested.
  2. SAVETYPE-dependent parameters
    These are the parameters needed to perform the type of save specified in parameter SAVETYPE.
    The save is always performed to a save file in library QTEMP.
    Depending on the value chosen for parameter SAVETYPE, one of the following is displayed:
    1. for SAVETYPE(*SAVLIB) a subset of command SAVLIB parameters is shown:
       Library  . . . . . . . . . . . . LIB                    Name
       Save file data . . . . . . . . . SAVFDTA  *NO           *YES, *NO
       Save file name . . . . . . . . . LIBSAVF  *LIB          name
      • Save file data (SAVFDATA)
        Specifies, for save file objects, whether the description of a save file, or both the description and the contents of a save file, are saved.
        • *YES - The description and contents of a save file are saved.
        • *NO - Only the description of a save file is saved.
      • Save file name (LIBSAVF)
        Enter a name for the save file used in this save operation. If the save is successful, a save file with this name will be compressed into the stream file specified in parameter ZIPFILE.
        If you leave the default value *LIB, the save file name is the same as the library name specified in parameter LIB.
    2. for SAVETYPE(*SAVOBJ) a subset of command SAVOBJ parameters is shown:
       Objects  . . . . . . . . . . . . OBJ                    Name, generic*, *ALL 
                      + for more values                    
       Library  . . . . . . . . . . . . OBJLIB                 Name
       Object types . . . . . . . . . . OBJTYPE         
                      + for more values                 
       Save file data . . . . . . . . . SAVFDTA  *NO           *YES, *NO
       Save file name . . . . . . . . . OBJSAVF  *OBJLIB       name
      • Save file data (SAVFDATA)
        Specifies, for save file objects, whether the description of a save file, or both the description and the contents of a save file, are saved.
        • *YES - The description and contents of a save file are saved.
        • *NO - Only the description of a save file is saved.
      • Save file name (OBJSAVF)
        Enter a name for the save file used in this save operation. If the save is successful, a save file with this name will be compressed into the stream file specified in parameter ZIPFILE.
        If you leave the default value *OBJLIB, the save file name is the same as the library name specified in parameter OBJLIB.
    3. for SAVETYPE(*SAV) a subset of command SAV parameters is shown:
       Objects:                         OBJSAV
         Name . . . . . . . . . . . . .                                             
            
         Include or omit  . . . . . . .          *INCLUDE   *INCLUDE, *OMIT
                      + for more values           
       Name pattern:                    PATTERN
         Pattern  . . . . . . . . . . .                                             
            
         Include or omit  . . . . . . .          *INCLUDE   *INCLUDE, *OMIT
                      + for more values           
       Directory subtree  . . . . . . . SUBTREE  *ALL       *ALL, *DIR, *NONE, *OBJ, *STG
       Save file name . . . . . . . . . IFSSAVF  *IFS_OBJ    name
      • Save file name (IFSSAVF)
        Enter a name for the save file used in this save operation. If the save is successful, a save file with this name will be compressed into the stream file specified in parameter ZIPFILE.
        The default save file name is IFS_OBJS.
  3. Additional parameters
     Target release . . . . . . . . . TGTRLS      *CURRENT      Character value
     Zip tool . . . . . . . . . . . . ZIPTOOL     *JAR          *JAR, *CPYTOARCF
    • Target release (TGTRLS) - Specifies the release of the operating system on which you intend to restore and use the object.
      VxRxMx is used to specify the release, where Vx is the version, Rx is the release, and Mx is the modification level. For example, V7R1M0 is version 7, release 1, modification 0.
    • Zip tool (ZIPTOOL) - The tool to be used for performing the ZIP operation. Select one of the following:
      • *JAR - To perform the compress operation with the Qshell "jar" command. In this case you may also add to compression a "readme" text stream file.
      • *CPYTOARCF - To perform the compress operation with CL command CPYTOPARCF.
        To run this command you must be at least at release V7R2.
        In this case you are not allowed to compress also a "readme" text stream file.
      Performance Note - "Jar" runs a little faster but uses about 20% more CPU units than CL command CPYTOARCF. This may have some relevance on other jobs in the system when a large save file is compressed.
  4. ZIPTOOL(*JAR)-dependent parameters
    The following parameters are available only when ZIPTOOL(*JAR) is selected:
     README stream file . . . . . . . README      *NONE                                    
          
     Output messages  . . . . . . . . OUTPUT      *            *, *PRINT, *NONE
    • README stream file (README)
      If specified, this is the qualified name (path and name) of a stream file containing a text with the installation instructions for the save file. It is recommended a .txt extension for such a document, so that it does not require any special utility to be displayed.
      Note1: If this text is a source file member, you can specify it by using the IFS syntax, example:
      /qsys.lib/library_name.lib/file_name.lib/member_name.mbr
      Note 2: The readme file, when packaged into the zip file, is renamed to the same name of the save file, with a .txt extension.
    • Output messages (OUTPUT)
      This parameter is used to display or print "jar" completion messages about the compress operation.
      Select one of the following:
      • * - If the command is running in an interactive job, display output messages on the screen, otherwise display them on a printout named JAROUT
      • *PRINT - Display output messages on a printout named JAROUT.
      • *NONE - Do not display output messages.

Example

  • ZIPSAVE ZIPFILE('/myzip.zip') README('/mytext.txt') LIB(MYLIB)
    The above command
    • creates save file QTEMP/MYLIB
    • saves library MYLIB to save file QTEMP/MYLIB
    • copies save file QTEMP/MYLIB to temporary stream file /MYLIB.savf with page code 819
    • creates stream file /tmp/myzip.zip with page code 819
    • opens a QShell session and runs command JAR to compress temporary stream files /mtext.txt and /MYLIB.savf into stream file /tmp/myzip.zip
    • deletes temporary stream file /MYLIB.savf
      deletes temporary save file QTEMP/MYLIB.




previous page Previous page   Next page next page