COMPRESS: Compress Partitioned Data Sets in TSO/E - PDS
The COMPRESS command allows TSO/E users to compress a partitioned data set (PDS) with DISP=SHR using a protection scheme compatible with ISPF and the linkage-editor. It also allows several data sets to be compressed with a single command by specifying a generic data set name such as 'SYS2.*'. Together with the command itself, there is a COMPRESS edit macro particularly handy when abend SD37 strikes the PDS you're editing.
The COMPRESS command is written in assembler. It is a free program, available in source-code (under the name COMPRCMD) and load-module (called COMPRESS) format in the freeware section of this Web site.
The COMPRESS EDIT macro is written in REXX and also distributed in the freeware section of this Web site. Note that, in the TSO/E or ISPF/PDF environment, having a command and an EDIT macro with the same name is not ambiguous: ISPF/PDF searches an EDIT macro in SYSPROC and SYSEXEC first, and, if it didn't find it, looks for a command in LOAD libraries. When COMPRESS is invoked as a TSO/E command (inside or outside ISPF), then an available command is invoked before a REXX exec with the same name.
COMPRESS can be called from TSO/E or ISPF. The syntax for this command is as follows:
COMPRESS 'data-set-name' VOLUME('volser') CHECK/NOCHECK SHR/OLD/LLAREFRESH CHANGED/NOCHANGED SETMSG
IKJEFT01 TMP INIT (JSTCB) IKJEFT02 TMP MAINLINE IKJEFT09 TMP SECOND LEVEL COMPRESS Command Processor IKJEFT02 TMP MAINLINE (PARALLEL TMP) IKJEFT09 TMP SECOND LEVEL (PARALLEL TMP) IEBCOPY IEBCOPY
Compressing a private load-library with DISP=SHR is generally something safe, i.e. it will not cause a problem. When such a private load-library is part of ISPLLIB or STEPLIB in a TSO/ISPF session, compressing it with ISPF services (options 3.1, 3.4 or 11) allocates the PDS with DISP=OLD, which fails if the PDS is allocated by a job or another TSO session. If the allocation succeeds with DISP=OLD, further access by a batch job or another TSO session will fail.
Compressing a public load-library with DISP=SHR can cause an application or a system failure, particularily if the PDS is allocated to CICS or LLA/VLF. It is recommended to use the OLD or LLAREFRESH options to compress a load-library used by permanent jobs or tasks.
1. COMPRESS is issued as a TSO command, or as an ISPF EDIT macro
COMPRESS ('IBMUSER.EXEC' 'IBMUSER.CLIST') Two fully-qualified PDS names COMPRESS 'PRISMCS.LOCAL.*' CHANGED COMPRESS data set list if DS1DSCHA bit is ON COMPRESS 'SYS1.CMDLIB' LLAREFRESH Compress and refresh LLA COMPRESS / OLD COMPRESS current PDS in ISPF DSLIST with DISP=OLD COMPRESS COMPRESS current PDS in ISPF EDIT, VIEW, DSLIST
2. COMPRESS is issued as a TSO command in a batch job
//GO2 EXEC PGM=IKJEFT1B,REGION=2M REGION=2M is needed if default REGION is smaller //SYSTSPRT DD SYSOUT=* //SYSTSIN DD * COMPRESS 'USER.LINKLIB' OLD COMPRESS with DISP=OLD COMPRESS ('IBMUSER.EXEC' 'PRISMCS.LOCAL.*') Generic dsname must be last in list COMPRESS (EXEC CLIST MACLIB JCL LOAD) The user prefix is added to each DSNAME /*
Messages issued when COMPRESS is executed.
MSG000 COMPRESS successful for <dsname>, now nn% full. MSG008 COMPRESS failed for <dsname>, IEBCOPY return code is nn. MSG009 Error during processing of LLAREFRESH option, RC=nn, RSN=nn. MSG26 LOCATE failed for <dsname>, return code is nn. MSG26B <dsname> is not a disk data set. MSG26C <dsname> is a migrated data set. MSG28 OBTAIN failed for <dsname> on volume(<volser>), return code is nn. MSG28B <dsname> is not a partitioned data set. MSG28C COMPRESS bypassed for <dsname>, EXPDT is non-zero. MSG28D COMPRESS bypassed for <dsname>, same as ASM2ID. MSG28E <dsname> is a PDSE. MSG28F COMPRESS bypassed for <dsname>, data set CHANGED indicator off. MSG60 COMPRESS terminated, STOP command received. MSG62 <IEBCOPY SYSPRINT message> MSG63 GETMAIN failed, increase region.
The COMPRESS EDIT macro is written in REXX and also distributed in the freeware section of this Web site. Note that, in the TSO/E or ISPF/PDF environment, having a command and an EDIT macro with the same name is not ambiguous: ISPF/PDF searches COMPRESS EDIT macro (or a CLIST) in SYSPROC and SYSEXEC first, and, when it doesn't find it, it looks for a COMPRESS command with the same name in LOAD libraries (ISPLLIB, STEPLIB, LINK-LIST, etc). When COMPRESS is invoked as a TSO/E command (inside or outside ISPF), an available command is invoked if it is found in load-libraries, and, if it's not found, as a REXX exec or a CLIST with the same name.