IBM Skip to main content
     Home  |  Products & services  |  Support & downloads  |  My account
 Select a country
 
TRSMAIN
License
Downloading
· Batch Job
· TSO Command line
· Workstation browser
· Workstation FTP
Installing
Using
Updates

 

  

TRSMAIN Utility

In z/OS Release 1.9 the TRSMAIN program has been added to the BCP element of z/OS, and it has been redesigned to support large format sequential data sets. This program has also been rewritten to follow IBM programming conventions. The new utility is called AMATERSE.

AMATERSE is available on z/OS Releases 7 and 8 via PTFs UA36927 and UA36928 for APAR OA19194.

TRSMAIN is shipped as an alias entry point to AMATERSE. When the TRSMAIN entry point of AMATERSE is invoked, ddnames INFILE and OUTFILE remain as the defaults, so little or no change to JCL should be required to take advantage of AMATERSE. The ddnames INFILE and OUTFILE that were required by the TRSMAIN utility are replaced by SYSUT1 and SYSUT2 respectively when the utility is called as AMATERSE.

TRSMAIN is a utility program to compress and decompress data exchanged with IBM.

There are two steps required to use the TRSMAIN utility:

  1. Download the binary source file to the z/OS or OS/390 system.
  2. Install the utility using the TSO RECEIVE command.

  License Agreement

Accept License Cancel
  Downloading TRSMAIN

Prior to downloading you must review and accept the License agreement above.

The TSO TRANSMIT format binary file for TRSMAIN is available via anonymous ftp to ftp.software.ibm.com in directory s390/mvs/tools/packlib. Click on one of the options below for detailed instructions to download TRSMAIN directly to the z/OS or OS/390 Host, or via the workstation.

  Installing TRSMAIN

Once you have used one of the methods above to place a dataset containing TRSMAIN (attributes are RECFM=FB, LRECL=80, BLKSIZE=3120) on your z/OS or OS/390 Host system you must use the TSO RECEIVE command from your TSO session to convert the TRSMAIN program back into its load module format.

  • From the TSO command line, issue RECEIVE INDSN('trsmain.data.set') -- where 'trsmain.data.set' is the name of the FB dataset created in the previous step.

    The RECEIVE INDSN(...) command will generate these messages:

    INMR901I Dataset PTFLCG.TERSE409.LOADLIB from NHAN on PLPSC
    INMR902I Members: TRSMAIN
    INMR906A Enter restore parameters or 'DELETE' or 'END' +
    

The original attributes of PTFLCG.TERSE409.LOADLIB were RECFM=U, LRECL=0, and BLKSIZE=27998. You can either receive TRSMAIN into an existing PDS which has identical attributes or place it into a new PDS by itself. To place it into a new or existing PDS, reply to INMR906A with the PDS name and/or with a member name (i.e. DA(PACKLIB) or DA(LIB_NAME(TRSMAIN)).

  Using TRSMAIN

Once TRSMAIN is installed, you may need to utilize a STEPLIB, JOBLIB, TSOLIB or LNKLSTxx to make this dataset accessible on the system.

Once the TRSMAIN program is in the normal module search list, any user can compress or decompress data or program files.

SAMPLE JCL to run TRSMAIN is shown below. Lower case text in the sample reflects data which must be modified. Additional information follows this sample, but a basic knowledge of JCL is assumed.

//jobname   JOB ...
//stepname  EXEC PGM=TRSMAIN,PARM='aaaaa'
//STEPLIB   DD DISP=SHR,DSN=your.joblib.or.steplib.dsn
//SYSPRINT  DD SYSOUT=*,DCB=(LRECL=133,BLKSIZE=12901,RECFM=FBA)
//INFILE    DD DISP=bbb,DSN=your.input.dataset.name
//OUTFILE   DD DISP=ccc,DCB=ddd,DSN=your.output.dataset.name,
//             SPACE=space_parameters
/*
EXEC statement parameters:
Replace "aaaaa" in the sample with one of the following values. (There is no default value.)
PACKCompresses records in a dataset so that the output produced is the `simple format'.
SPACKCompresses records in a dataset. so that the output produced is the `complex format'. The SPACK option is more time-consuming than the PACK option, by about a factor of 3, but, in many cases produces much smaller output.
Caution:
A dataset compressed by PACK or SPACK should not be modified in any way. If such a dataset is modified, the UNPACK routines are unable to reconstruct the original dataset. (i.e. if using FTP to transfer the dataset, specify binary mode.)

UNPACK Uncompresses records compressed via the PACK or SPACK operation. If a dataset is inadvertently PACKed multiple times, it can still be uncompressed simply by using the UNPACK function the same multiple number of times.

DD Statements:

DDNames SYSPRINT, INFILE and OUTFILE are required. A mising INFILE DD statement will result in RC10, 'INPUT DATASET HAS AN UNSUPPORTED DATASET ORGANIZATION'. A missing OUTFILE DD statement will result in RC28, 'UNABLE TO OPEN OUTPUT DATASET'.

SYSPRINT statement:
This DD defines where all messages from the program are sent. It must be RECFM=FBA and an LRECL between 121 and 133. Any blocksize that is a legal multiple of the LRECL is supported. Note: The DCB information does not have to be specified on the DD statement and will default to the correct values.

INFILE statement:
This DD defines the dataset to be compressed if PACK is specified on the EXEC statement, or the dataset to be uncompressed if UNPACK is specified.

Please refer to the section titled RESTRICTIONS below.

OUTFILE statement:
This DD defines the dataset to receive the compressed output if PACK is specified on the EXEC statement, or the dataset to receive the uncompressed output if UNPACK is specified.

Please refer to the sections titled ALLOCATION CONSIDERATIONS and SPACE CONSIDERATIONS below.

RESTRICTIONS:

SEQUENTIAL and PARTITIONED datasets are supported.

PARTITIONED dataset Extended (PDSE) datasets, VSAM Datasets, DA datasets, and ISAM datasets are not supported.

Uncompressed files with LRECL of more than 32K cannot be handled except that RECFM=VBS datasets are allowed to be up to 64K LRECL.

TAPE datasets are not supported.

ALLOCATION CONSIDERATIONS:

The compressed dataset (produced by PACK) must be of fixed or fixed blocked record format (RECFM) with a record length (LRECL) of 1024 and any legal blocksize (BLKSIZE). NOTE: These values do not have to be specified on the DD statement and will default to the correct values.

The uncompressed dataset (produced by UNPACK) must match the RECFM and LRECL of the original. Therefore it is better to leave DCB information off the DD statement and let the TRSMAIN program set it. If it unpacks to an already existing dataset, then the DCB parameters are checked for compatibility. The RECFM must be the same in all cases except for Variable to Undefined and Undefined to Variable. If you specify the DCB parameters to force data that was originally variable (V) format into undefined (U) format, or vice versa, a warning message is written and the operation is performed.

SPACE CONSIDERATIONS:

When allocating space for the OUTFILE dataset for either the PACK or UNPACK option, some thought must be given since the required size information is not known to the TRSMAIN program. A compressed dataset can be expected to be about 1/2 the size of the original. It is best to allocate more space than expected and use the RLSE sub-parameter of the SPACE parameter to release the unused portion back to the system.

For an UNPACK operation it is nice to know the original size, but if the uncompressed allocation is set to 3 to 5 times the size of the compressed dataset if the dataset contains random data, or is set from 5 to 10 times the size of the compressed dataset if the dataset contains Listing/Document/Messages type data, there should not be too many B37 ABENDS. (A B37 ABEND indicates not enough space was allocated for the output dataset.) It is best to allocate more space than expected and use the RLSE sub-parameter of the SPACE parameter to release the unused portion back to the system.

  Updates to TRSMAIN

4.14 2006-03-16
Fixed a problem with dynamic allocation call that was abending when tersing and untersing PDS'.
4.13 2006-01-11
Fixed problem that TRSUNPCK was broken in version 4.12
4.12 2005-06-08
Fixed problem that when TERSEing and the "dirty getmain" was enabled TRSMAIN incorrectly returned that the input dataset was empty.
4.11 2004-11-29
  • Fixed intermittent 0C4 abend when TERSEing. This was most noticeable when the MVS "dirty getmain" was enabled.
  • Allow UNTERSing a VB dataset to a VBS dataset.
  • Allow overriding the temporary dataset space allocations.

This page last updated November 2007.

  About IBM  |  Privacy  |  Legal  |  Contact