I'm never one to do things the easy way when I can do it the complicated
way <grin>. Anyway, below is a way to create a ZIP file containing a
SINGLE z/OS sequential file. It uses Dovetailed Technologies DTLSPAWN,
fromdsn, todsn, and the Java jar command. It must use a z/OS UNIX file
as intermediary storage.

//EX1 EXEC DTLSPAWN
//STDIN DD *
. /etc/profile
cd /tozip &&
fromdsn -t 819  "//...zos.file..." >intermediate.unix.file &&
jar cvM intermediate.unix.file |
todsn -o 'recfm=fb,lrecl=1,space=(cyl,(500,200))' -b \
 "//...zos.file.ZIP"
rm intermediate.unix.file
/*

The fromdsn command copies the data to the intermediate unix file,
converting it to ISO8859-1 (with UNIX line endings, not Windows line
endings, but you can specify other line endings with the -l parameter).
The jar command reads the intermediate unix file, sending its output to
STDOUT.
Which is piped to the todsn command which writes its output to a z/OS
sequential file.
You need to replace "intermediate.unix.file" to be the proper file name.
That is, what you want it called when unzipped.

Now, I know most are likely saying: Gee, John has been putting in too
many hours and his poor brain has fried. Why all the messing around?
Well, mainly because I could. Secondarily because I need to zip a file
for transmission to a UNIX platform. This way I did not need any
non-free software. Note that the && guarantees that the previous command
finished correctly before doing the next command. A primitive form of
condition code checking.


--
John McKown
Senior Systems Programmer
HealthMarkets
Keeping the Promise of Affordable Coverage
Administrative Services Group
Information Technology

The information contained in this e-mail message may be privileged
and/or confidential.  It is for intended addressee(s) only.  If you are
not the intended recipient, you are hereby notified that any disclosure,
reproduction, distribution or other use of this communication is
strictly prohibited and could, in certain circumstances, be a criminal
offense.  If you have received this e-mail in error, please notify the
sender by reply and delete this message without copying or disclosing
it. 

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html

Reply via email to