I tried your suggestion and had the same results as you described Mr. Merrill.



--- ba...@mxg.com wrote:

From:         Barry Merrill <ba...@mxg.com>
To:           IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: TRSMAIN
Date:         Wed, 21 Aug 2013 19:39:31 -0500

It's an easy JCL exercise to conduct an experiment to confirm what happens:

TRSMAIN/AMATERSE will read a truncated tersed file and never detect it was 
truncated.

I copied a 105472 byte valid tersed file into a 
DISP=(,CATLG,CATLG),SPACE=(TRK,(1)).
The original untersed to 360,480 bytes, while the truncated file untersed to 
only 48152,
and there was no message nor warning that the input file was short.

-----Original Message-----
From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On Behalf 
Of Tony Harminc
Sent: Wednesday, August 21, 2013 5:57 PM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: TRSMAIN

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

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




_____________________________________________________________
Netscape.  Just the Net You Need.

----------------------------------------------------------------------
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