TRSMAIN-PDSE - Support for PDSE in the TRSMAIN Utility

Support for PDSE in the TRSMAIN Utility

                 

TRSMAIN is a free IBM utility for MVS, OS/390 and z/OS systems. TRSMAIN compresses sequential and partitioned data sets (TERSE) and stores the resulting data as fixed-length records into a sequential data set which can easily be downloaded to a work-station and transmitted over the Internet. TRSMAIN is described on the IBM Web site.

All recent versions of TRSMAIN (up to release 414 in 2007) do NOT support a PDSE as input to the PACK (or SPACK) function. The reason for this lack of support is the following: when it processes a data set with DSORG=PO (PDS or PDSE), TRSMAIN unloads the INFILE members into TRSTMP, a sequential temporary data set which it allocates dynamically. The size of TRSTMP is calculated by the TRSOBT routine of TRSMAIN, using the value of the DS1LSTAR field of the INFILE data set's format-1 DSCB. Because DS1LSTAR is always zero for a PDSE, the value of the SPACE parameter used to allocate TRSTMP is too small and the PDSE unload function terminates with an SB37-04 abend.

Notes:

  1. SB37-04 generally does not occur if the INFILE PDSE only contains a small amount of data
  2. As far as we can tell, SB37-04 does not occur when PARM=UNPACK is specified and OUTFILE is a PDSE.

The one-byte ZAP below prevents SB37-04 from occurring when PARM=PACK or PARM=SPACK is specified and INFILE is a PDSE. When the ZAP is applied, TRSOBT returns the size of the input data set (i.e. the number of tracks currently allocated to the data set) instead of zero, resulting in TRSTMP being allocated with a sufficient number of tracks.

//ZAP     EXEC PGM=AMASPZAP
//SYSPRINT DD SYSOUT=*
//SYSLIB   DD DSN=PTFLCG.TERSE414.LOADLIB,DISP=SHR
 NAME TRSMAIN TRSOBT
 IDRDATA TRS-PDSE
 VER 057C BF87B2A6,4780C5A2,48A0B2A6,54A0C5D8,1EA9,40A0205C,47F0C5A2
 REP 057C BF87B2A6,4780C59E
/* 

The maximum size of a PDS is 65535 tracks (64k-1), but a PDSE can be larger. What will happen when TRSMAIN runs with the above ZAP and the size of the PDSE is 64k tracks or more, I don't know - sorry!

Note: IBM has no plans to enhance TRSMAIN to support INFILE as a PDSE, but in 2007, an enhanced version of TRSMAIN was created; it is called AMATERSE and supports PDSEs. AMATERSE is part of the z/OS V1R9 BCP and can also be installed in z/OS R7 and R8 (refer to OA19194).