COMPRESS: Compress Partitioned Data Sets in TSO/E - PDS

                    

Overview

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.

           

Syntax

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 

Operation

  1. The "COMPRESS" command requires no APF authorization and can be executed out of any load-library. "COMPRESS" uses the TSO/E service routine (IKJEFTSR) to create the authorized environment required to execute IEBCOPY. The default IKJEFTAP table is set up for this purpose (and so is the IKJTSOxx parmlib member if your system supports it).
  2. The protection scheme used by "COMPRESS" is similar to the one implemented by ISPF/PDF V2 and provides against simultaneous updates by ISPF and the linkage editor. However, when you compress a PDS with DISP=SHR you don't have any read integrity. This is particularly critical for load libraries and compressing one while it is used may cause S106 abends.
  3. If you specify a volser together with a generic data set name, "COMPRESS" looks in the catalog for the full data set names, skipping the data sets that are cataloged on other disk packs. "COMPRESS" does not read the VTOC: if uncataloged data sets that satisfy the generic name requirement exist on the pack, they are not processed.
  4. If you intend to use the "COMPRESS" edit macro, copy it to a clist library such as IPO1.CMDPROC or ISR.V2R3M0.ISRCLIB. That's all you need to be able to invoke it as an edit primary commands like 'CANCEL' or 'RESET'. At any moment while you're editing a member, you may enter 'COMPRESS' to compress the PDS. When it is compressed, the edit macro returns an ISPF message that indicates how full the PDS now is.
  5. The TSO/E service routine creates a parallel TMP to invoke IEBCOPY.
    This is what the TCB structure looks like while IEBCOPY is executing:
    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 
  6. The STTMPMD (set TMP mode) macro is used to disable the attention and PA1 keys. This prevents users from destroying their PDS which can so easily happen when they use ISPF compress services.

LOAD Libraries

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.

After you compress a CICS load-library (DFHRPL) with DISP=SHR, tell CICS to refresh the directory using the following command : CEMT SET PROGRAM ALL NEWCOPY

Examples

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

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. 

ISPF EDIT Macro

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.