Will this work ? How does HLQ.TEST.ZIP get created and contain the zipped information from the flat file .
why not look at the PKZIP manual Yourself ?
just using a bit of logic
if the snippet was executed successfully then PKZIP made the dynamic allocation of the output.
otherwise /repeat on look at the PKZIP manual /repeat off
on how to write a proper PKZIP jcl
and by whatever mean was the output allocated it was PKZIP itself that filled it up with the compressed data from the input file