Though you do not need to know nor to practice it, you may still be interested about how Qshell command "jar" (Java Archive) works in its native mode.
Have a look at the ORACLE page for it.
- Command STRQSH (start QSH) has a CMD parameter. It allows to run a Qshell command.
If you enter command STRQSH from the Command Entry screen without spacifying anything for the CMD parameter, you get to the Qshell Command Entry screen.
- Enter command jar without anything else. You will receive the help of this command, showing all its options:
You may then try the following sample commands. After installing this utility you may work with stream files a.txt and b.txt in IFS directory /zip/test.
Examples:
- jar -cvfM /tmp/x.zip /zip/test/a.txt /zip/test/b.txt
This command compresses into file /tmp/x.zip the following objects:
- zip/test/a.txt
- zip/css/
- zip/css/css.css
- zip/css/cssprint.css
The compressed files maintain partially their directory paths.
How to decompress this zipped file:
- Windows unzips the objects - with their directories- in a subdirectory of the directory hosting the zipped file.
- On IBMi
- command jar -xvfM /tmp/x.zip and
- command jar -xvf /tmp/x.zip
re-create the objects with their directories in the current directory ( usually directory /home/user_name ).
- jar -cvfMP /tmp/x.zip /zip/test/a.txt /zip/test/b.txt
This command compresses into file /tmp/x.zip the following objects:
- /zip/test/a.txt
- /zip/css/
- /zip/css/css.css
- /zip/css/cssprint.css
The compressed files maintain completely their directory paths.
How to decompress this zipped file:
- Windows detects the compressed (zipped) file as invalid, whatever directory you load it.
- On IBMi
- command jar -xvfMP /tmp/x.zip
re-creates the objects with their directories in the root directory.
In other words, every object is recreated exactly where it was.
- command jar -xvfM /tmp/x.zip
re-creates the objects with their directories in the current directory ( usually directory /home/user_name ).
- jar -tvf /tmp/x.zip
This command displays the table of contents of the zipped file.
|