On 21 August 2013 14:59, Richard Pinion <rpin...@netscape.com> wrote:
> A data set is compressed using TRSMAIN on z/OS. It is transmitted, using 
> binary format, to a non-z/OS server.  For whatever reason the compressed file 
> on the server is incomplete.  When the compressed file is transmitted, using 
> binary format, back to a z/OS system, and uncompressed, will TRSMAIN know the 
> data set is incomplete?

Depends on what you mean by incomplete. A TRSMAIN/AMATERSE compressed
data stream consists of a short header, and then 12-bit units with a
value from 1 to 4096, terminated by a unit of zeros. The header does
not contain an overall length field. (There is also a trailer, but I'm
not sure it's used for anything.) If decompression hits EOF before
seeing that ending zero unit, it should complain, though I don't know
how elegantly. So if your data is truncated, it can and should be
detected. But if you restore your damaged data into an FB dataset, the
last block may be zero padded regardless, so a silent failure seems
quite possible.

If your compressed stream is missing a chunk in the middle, it's
possible - and with anything bigger than a very small dataset, even
likely - that what remains is decodable, but after the gap it
certainly won't decode into anything much like the original.

Tony H.

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

Reply via email to