1. Packaging a library for the first time
To package a library named SAMPLE, you must enter command
EZPACK/PKLIB LIB(SAMPLE) .
The following screen appears:
|
Figure 1 - Packaging a library for the first time |
The default target release for the save operation is the current release of the system, but you can change it to another supported release.
When you press the Enter key, you are requested to specify the name of an IFS directory where the zip file - containing the save file - should be created:
|
Figure 2 - IFS directory for the ZIP file |
Please note that the root directory "/" is not accepted. You must specify an IFS directory within the root directory.
As soon as you press the Enter key, you are requested to specify the name of the user profile that should be used to restore this "SAMPLE" library.
The name of this user profile will be mentioned in the "Readme" file bundled in the ZIP file with the save file.
|
Figure 3 - User profile to be used for restoring the library |
The program assumes as a default the name of the current user profile, but you must replace it with the appropriate one.
when you press the Enter key, library "SAMPLE" is saved - with the requested target release - in a save file with the same name in library QGPL.
This is done to make sure that the final save - which takes place at the end of this process - is successful. Should the save fail, you would by displayd an error message.
If the save has success, the text for the "Readme" file is generated and edited, so that you may update it as needed:
|
Figure 4 - Text for the "Readme" file |
As soon as you confirm the text for the "Readme" file, the program invokes command EZPACK/ZIPSAVE to
- save again the library to a temporary save file
- copy the save file to a stream file
- copy the "Readme" file to another stream file
- compress the two stream files into the requested ZIP file.
The last screen shows where the final pieces are staying:
2. Re-packaging a library
When you need to release a new version of a library that you already packaged in the past with command EZPACK/PKLIB, you must enter command
EZPACK/PKLIB LIB(*SELECT) .
In this way you will be shown a list of all the libraries packaged in the past.
- The libraries are listed by library name in ascending order.
- If the same library was packaged several times, you will see an entry for eack package. Entries are ordered by descending date and time.
- Each entry reports the the target release and the library title.
- Each entry has a pointer to its "Readme" file
- Each entry remembers the IFS path were the ZIP file was created.
|
Figure 6 - Libraries previously packaged |
- To reach the library you want to process, type its initial characters in "Position to" .
Options:
- 3 prints the "Readme" memo.
- 5 displays the "Readme" memo.
- 4 removes the entry and the related "Readme" memo.
- 2 lets you edit a "Readme" text. This may be done so that the next time you select that entry with option 1, you will get the updated text.
- 1 is the most important. It performs the preliminary save, edits the existing "Readme" memo and generates the ZIPSAVE zip stream file,
going through the steps illustrated in Figure 4 and Figure 5.
3.Template for the "Readme" file
The text of the "Readme" memos (see Figure 4) is generated from a template, member README of source file EZPACK/QTXTSRC.
You may change the template according to your needs (for instance, you could re-write it in Franch lamguage).
Great care should be used with variables &n, because they are replaced with given values at execution time.
The meanings of those variables are as follow:
- &D: date
- &T: time
- &1: name of the saved library
- &2: library text description
- &4: OS/400 release the library was saved for
- &5: name of the save file (lowercase)
- &U: user profile to be used when restoring the library
4.Template for the "Packing List" screen
Also the screen in Figure 5 is generated from a template: member PACKAGE in source file EZPACK/QTXTSRC.
If you want to change it, pay attention to the following variables:
- &1: name of the saved library
- &3: user profile to be used when restoring the library
- &4: IFS directory where the ZIP stream file is created
- &5: name of the save file (lowercase)
5.Unzipping a PKLIB-generated ZIP stream file
You have two ways to unzip the ZIP stream file created from command PKLIB:
- Receive the ZIP file on your PC, and use the "Extract all" Windows facility.
Then you will have to upload the save file to your IBM i.
- Receive the ZIP file on your IBM i.
In such a case, you must have some tool on the IBM i able to unzip the ZIP file.
Command EZPACK/UNZIPSAVE can do that.
|