FWIW, the "jar" command is just a special launcher for the Java class
"sun.tools.jar.Main". The heavy lifting is done by the "java.util.zip"
package, which provides a public API.
The "jar" command is written only to support z/OS Unix files, but the
ZipDatasets sample class (source provided) supports z/OS datasets.
The ZipDatasets sample is written so as to read the datasets as a text
stream (newlines added) and write the output to Zip entries that are
converted to ISO8859-1. The "-t" option can be used to specify a
different target encoding.
Usage: com.ibm.jzos.sample.ZipDatasets [-t targetEncoding] outfile
indsname...
where:
-t targetEncoding can optionally specify the codepage name to encode the
text data as it is written to the Zip file. If not specified,
this defaults to ISO8859-1 (Latin/ASCII)
and outfile is either:
- a Unix file path name: /path/to/some/file.zip
- a dataset name: //A.B.C
- a PDS member name: //A.B.C(MEM)
- a DD name: //DD:XYZ
- a DD name and member: //DD:XYZ(MEM)
and each (at least one) indsname is either:
- a dataset name: //A.B.C
- a dataset pattern: //A.*.D
- a PDS member name: //A.B.C(MEM)
- a PDS member pattern: //A.B.C(D*X)
- a DD name: //DD:XYZ
- a DD name and member: //DD:XYZ(MEM)
- a DD name and member pattern: //DD:XYZ(D*X)
\"//\" prefixes may be omitted from indsnames
All dataset names are assumed to be fully qualified.
PS> The JZOS sample programs and source can be downloaded from links on the
main z/OS JZOS page:
http://www-03.ibm.com/systems/z/os/zos/tools/java/products/jzos/overview.html
On Sun, Jun 23, 2013 at 1:12 AM, Ed Jaffe <[email protected]>wrote:
> On 6/21/2013 2:38 AM, Norbert Friemel wrote:
>
>> The jar command is free (comes with Java) but supports Unix files only:
>> http://planetmvs.com/ibm-main/**jarbatch.txt<http://planetmvs.com/ibm-main/jarbatch.txt>
>>
>
> We currently use jar on z/OS to create zip files for distribution to
> customers. These files can be unzipped on any platform e.g., Windows. As
> Norbert says, you must precede the jar command with a cp command to copy
> the classic MVS file(s) to a z/OS UNIX directory. jar will not read them
> directly.
>
>
>
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN