COMPAKTOR Examples


The following examples illustrate the most common ways of executing COMPAKTOR.

Important

For convenience, all STEPLIB/JOBLIB DD statements have been omitted in the examples; they may be required, depending on your installation's placement of COMPAKTOR.

All examples in this section are found in the JCL library installed with FDR. The member names are EX4023x.

MAP a single DASD volume using the DISK DD statement example

MAP a direct access volume using a DISK DD statement

//MAP EXEC PGM=FDRCPK,REGION=0M //SYSPRINT DD SYSOUT=* //SYSMAP DD SYSOUT=* //SYSSUMM DD SYSOUT=* //SYSUDUMP DD SYSOUT=* //DISK1 DD UNIT=SYSALLDA,VOL=SER=MYDISK,DISP=OLD //SYSIN DD * MAP /*

MAP multiple DASD volumes with “VOL=” example

MAP one DASD volume.

//MAP EXEC PGM=FDRCPK,REGION=0M //SYSPRINT DD SYSOUT=* //SYSMAP DD SYSOUT=* //SYSSUMM DD SYSOUT=* //SYSUDUMP DD SYSOUT=* //SYSIN DD * MAP VOL=(BM1800,BM23*) /*

In addition to the SYSMAP output, the SYSSUMM DD shows a one-line summary of each volume processed.

CPK301I INNOVATION DATA PROCESSING - COMPAKTOR VER. 5.4/91P COMBINED SUMMARY DATE 2020.088 TIME 13.52.16 PAGE 1



- NUMBER OF - >1 -- ALLOCATED --- ------- FREE ------- FRAG - EMPTY TRACKS IN - - VTOC - TIME COMP


VOLSER DEVTYPE CYLS DSNS EXTS TRACKS EXTS %AL TRACKS AREAS LARGEST INDEX VSAM PS PO SIZE %US (MIN) CODE




BM1800 3390-2 2226 41 0 403 42 1 32987 20 32736 0.006 0 28 0 14 6 .1 0


BM23C3 3390-27 32760 1399 0 404342 1400 82 87058 3 87039 0.000 0 385 0 119 24 .0 0


BM23C4 3390-27 32760 2 0 145 3 0 491255 2 490866 0.000 0 0 0 119 0 .0 0


BM23C5 3390-27 32760 2 0 145 3 0 491255 2 442919 0.026 0 0 0 119 0 .0 0


BM23C6 3390-27 32760 2 0 145 3 0 491255 2 442919 0.026 0 0 0 119 0 .0 0


*** END OF SUMMARY MAP ***

MAP a single DASD volume from an FDR backup tape example

MAP a DASD volume dumped by FDR, from the backup tape.

//MAP EXEC PGM=FDRCPK,REGION=0M //SYSPRINT DD SYSOUT=* //SYSMAP DD SYSOUT=* //SYSSUMM DD SYSOUT=* //SYSUDUMP DD SYSOUT=* //TAPE1 DD UNIT=TAPE,VOL=SER=FDRDMP,DISP=OLD, // DSN=FDR.DUMP //SYSIN DD * MAP FROMDD=TAPE1 /*


Important

COMPAKTOR can only map a full-volume backup tape. To map a data set or full backup, including VSAM information, use FDREPORT “PRINT DATATYPE=TVTOC” FDREPORT-Generalized-Report-Writer or FDRABRP-Tape-VTOC-Report.

Simulate a COMPAKT on all volumes within an SMS storage group example

SIMULATE (SIM) a COMPAKT on all volumes within an SMS storage group.

//SIM EXEC PGM=FDRCPK,REGION=0M //SYSPRINT DD SYSOUT=* //SYSMAP DD SYSOUT=* //SYSSUMM DD SYSOUT=* //SYSUDUMP DD SYSOUT=* //SYSIN DD * SIMULATE TYPE=FASTCPK,STORGRP=DATADB /*

Simulate a FASTCPK on selected online DASD volumes example

SIMULATE (SIM) Fast COMPAKTion on selected online DASD volumes. All online volumes whose serial begins with “TSO” or “PROD” are simulated, using all Fast COMPAKTOR defaults. Only summaries are printed.

//SIM EXEC PGM=FDRCPK,REGION=0M //SYSPRINT DD SYSOUT=* //SYSMAP DD SYSOUT=* //SYSSUMM DD SYSOUT=* //SYSUDUMP DD SYSOUT=* //SYSIN DD * SIMULATE TYPE=FASTCPK,VOL=(TSO*,PROD*),MAPS=SUMMARY,DSNENQ=USE /*

Simulate a FASTCPK example

The default of SIZEKEEP=(100,90,60) is recommended for volumes with many multi-extent data sets or with an extremely large number of small data sets (especially 3390-9 and larger devices). This simulates the result of compacting.

//SIM EXEC PGM=FDRCPK,REGION=0M //SYSPRINT DD SYSOUT=* //SYSMAP DD SYSOUT=* //SYSSUM DD SYSOUT=* //SYSUDUMP DD SYSOUT=* //SYSIN DD * SIM TYPE=FASTCPK,VOL=DB*,DSNENQ=USE, CPKFRAGI=2,CPKFREEX=20
  • To run these simulations for real, just change SIM to CPK.
  • Add LOG=YES to real COMPAKTions to display FDRW82 operator messages when COMPAKTOR begins and ends modifying each volume.
  • If you plan to run a real COMPAKTion immediately after a SIMULATE, be sure to add DSNENQ=USE to the simulation to get a more accurate report of what FASTCPK will do.

Example of combined summary report from simulation

CPK301I INNOVATION DATA PROCESSING - COMPAKTOR VER. 5.4/91P COMBINED SUMMARY DATE 2020.055 TIME 11.08.56 PAGE 1




- NUMBER OF - >1 -- ALLOCATED --- ------- FREE ------- FRAG - EMPTY TRACKS IN - - VTOC - TIME COMP


VOLSER DEVTYPE CYLS DSNS EXTS TRACKS EXTS %AL TRACKS AREAS LARGEST INDEX VSAM PS PO SIZE %US (MIN) CODE


SH2512 3390-A 262668 13 4 42888 284 1 3.8M 247 2.8M 0.047 1 1796 222 29 3


--AFTER-CPK--> 13 2 40968 258 1 3.8M 2 2.9M 0.039 1 56 42 29 3 .4 0






CPK RELEASED 1920 TRKS AND ELIMINATED 245 FREE SPACE AREAS FROM 1 VOLS WITH 3940020 TRKS ( 1% ALLOCATED)


*** END OF SUMMARY MAP ***


Before

After

Multi-Extent Data Sets

4

2

Free Areas

247

2

Estimated Elapsed Time

0.4 minutes

Space release and FASTCPK on multiple volumes example

The first step releases free space from all inactive PS, PO, and VSAM data sets. The second step does a FASTCPK on any of those volumes where there are more than 20 free space areas. Active data sets are not moved. This 2-step technique is slightly faster than doing a single-step FASTCPK including space release, since the FASTCPK step moves fewer tracks than the single-step job.

Tip

We recommend that space release and compaction always be done as a 2-step process.

//CPKRLSE EXEC PGM=FDRCPK,REGION=0M //SYSPRINT DD SYSOUT=* //SYSMAP DD SYSOUT=* //SYSSUMM DD SYSOUT=* //SYSUDUMP DD SYSOUT=* //SYSIN DD * COMPAKT TYPE=RLSE,VOL=(TSO*,TEST*), PSRLSE=ALL,PORLSE=ALL,VSRLSE=ALL,NOSECOND=NORLSE /* //FASTCPK EXEC PGM=FDRCPK,REGION=0M,COND=EVEN //SYSPRINT DD SYSOUT=* //SYSMAP DD SYSOUT=* //SYSSUMM DD SYSOUT=* //SYSUDUMP DD SYSOUT=* //SYSIN DD * COMPAKT TYPE=FASTCPK,VOL=(TSO*,TEST*), CPKFREEX=20,LOG=YES,UNABLE=IGNORE /*

FASTCPK of SMS STORGRP example

Perform a FASTCPK of all the volumes in the SMS STORGRP of QA1 and leave a maximum of 20 (CPKFREEX=20) free space areas on the volume after the compaction.

//FASTCPK EXEC PGM=FDRCPK,REGION=0M //SYSPRINT DD SYSOUT=* //SYSMAP DD SYSOUT=* //SYSSUMM DD SYSOUT=* //SYSUDUMP DD SYSOUT=* //SYSIN DD * COMPAKT TYPE=FASTCPK,STORGRP=QA1, CPKFREEX=20,LOG=YES,UNABLE=IGNORE /*

Tip

If processing multiple storage groups with lots of volumes in the storage groups, multiple jobs processing the different storage groups concurrently is recommended to process the volumes/storage groups quicker.

COMPAKT a DASD volume onto another DASD volume example

First, the DASD volume is dumped, and then restored onto the target volume. The volume serial of the target volume is changed to OLDDSK on completion of the COMPAKTion. At that time, the original volume should be VARYed offline, and the new volume should be MOUNTed. If the original volume had an indexed VTOC, it must be rebuilt on the new volume with ICKDSF.

//COMPAKT EXEC PGM=FDRCPK,REGION=0M //SYSPRINT DD SYSOUT=* //SYSMAP DD SYSOUT=* //SYSUDUMP DD SYSOUT=* //TAPE1 DD DSN=FDR.DUMP.VOLDDSK,DISP=(,KEEP), // UNIT=TAPE,VOL=(,,,99) //DISK1 DD UNIT=SYSALLDA,VOL=SER=OLDDSK,DISP=OLD //NEWDISK1 DD UNIT=SYSALLDA,VOL=SER=NEWDSK,DISP=OLD //SYSIN DD * DUMP TYPE=FDR,RTC=YES CPK DUMP=YES,TODD=NEWDISK1,SIZEKEEP=0 /*

RELEASE space from selected online volumes example

All online volumes whose serial begins with “TSO” are released. COMPAKTOR attempts to release all excess tracks or cylinders from all PS, PO, and VSAM data sets, leaving 10% of the allocated space as free space in the final data sets. However, space is not released from data sets that do not have a secondary allocation quantity. VSAM clusters with “IPCS” in their name do not have space released. Space release is not done on active data sets.

//RELEASE EXEC PGM=FDRCPK,REGION=0M //SYSPRINT DD SYSOUT=* //SYSMAP DD SYSOUT=* //SYSSUMM DD SYSOUT=* //SYSUDUMP DD SYSOUT=* //SYSIN DD * COMPAKT TYPE=RLSE,VOL=TSO*, PSRLSE=ALL,PORLSE=ALL,VSRLSE=ALL, %FREE=10,NOSECOND=NORLSE,UNABLE=IGNORE SELECT DSN=**IPCS**,VSRLSE=NO /*

RELEASE space from selected volumes that have more than 15 free space areas example

All online volumes whose serial number begins with “PRI93” are processed and have more than 15 free space areas. COMPAKTOR attempts to release all excess tracks or cylinders from all PO and VSAM data sets. Space is not released from data sets that do not have a secondary allocation quantity. Active data sets are not released. Additionally, if COMPAKTOR cannot improve a selected volume, the UNABLE=IGNORE operand is used to disable the U0888 abend from being issued.

//RELEASE EXEC PGM=FDRCPK,REGION=0M //SYSPRINT DD SYSOUT=* //SYSMAP DD SYSOUT=* //SYSSUMM DD SYSOUT=* //SYSUDUMP DD SYSOUT=* //SYSIN DD * COMPAKT TYPE=RLSE,VOL=PRI93*,DSNENQ=USE, PORLSE=ALL,VSRLSE=ALL,CPKFREEX=15, NOSECOND=NORLSE,UNABLE=IGNORE /*

Convert a 3390-3 to a 3390-2 volume with CPK, moving the VTOC to the beginning of the volume example

The VTOC index and the VVDS (if they exist) are placed adjacent to the VTOC. The volume serial of the output DASD is changed to that of the original volume, and the new volume is automatically placed offline at the end of the COMPAKTion. At that time, the original volume should be VARYed offline, and the new volume should be MOUNTed. If the original volume had an indexed VTOC, it must be rebuilt on the new volume with ICKDSF. This procedure works only if there are no unmovable data sets in the upper third of the 3390-3 and if the total allocated tracks do not exceed the capacity of the output 3390 data set.

//COMPAKT EXEC PGM=FDRCPK,REGION=0M //SYSPRINT DD SYSOUT=* //SYSMAP DD SYSOUT=* //SYSUDUMP DD SYSOUT=* //NEWDISK1 DD UNIT=SYSALLDA,DISP=OLD, // VOL=SER=D33902 <---3390-2 output //TAPE1 DD DSN=BACKUP.D33903,DISP=(,CATLG), // UNIT=(TAPE,2),VOL=(,,,99) //SYSIN DD * DUMP TYPE=FDR,DATA=USED CPK DUMP=YES,TODD=NEWDISK1,VTOC=COMPAKT, SIZEKEEP=0,OVERRIDE=YES,SELTERR=NO, VOL=D33903 <---3390-3 input SELECT ***VTOC,POS=BEGIN SELECT DSN=SYS1.VTOCIX.**,POS=VTOC SELECT DSN=SYS1.VVDS.**,POS=VTOC /*

Expand the VTOC on a volume example

This can only be done if you COMPAKT a DASD from a backup; this example uses DUMP=YES to do so. If necessary, COMPAKTOR moves data sets in order to free space to expand the VTOC. The SIZE= operand on the SELECT statement specifies the new VTOC size in tracks. If you added the POS= operand you could also move the VTOC. The other SELECT statements move the VTOCIX and VVDS next to the VTOC.

//COMPAKT EXEC PGM=FDRCPK,REGION=0M //SYSPRINT DD SYSOUT=* //SYSMAP DD SYSOUT=* //SYSUDUMP DD SYSOUT=* //TAPE1 DD DSN=BACKUP.D33901,DISP=(,CATLG), // UNIT=CART,VOL=(,,,99) //SYSIN DD * DUMP TYPE=FDR,DATA=USED,DSNENQ=USE CPK DUMP=YES,VOL=D33901,SIZEKEEP=0,VTOC=COMPAKT, OVERRIDE=YES SELECT ***VTOC,SIZE=30 SELECT DSN=SYS1.VTOCIX.**,POS=VTOC SELECT DSN=SYS1.VVDS.**,POS=VTOC /*

Release unused space within PS and PO data sets on all volumes starting with “TSO” example

CPK does not COMPAKT the volumes, only release space. PS data sets with a group name of “TEST” are completely freed. All other data sets are left with 10% free space in the final data sets.

//RELEASE EXEC PGM=FDRCPK,REGION=0M //SYSPRINT DD SYSOUT=* //SYSMAP DD SYSOUT=* //SYSUDUMP DD SYSOUT=* //SYSIN DD * CPK TYPE=RLSE,VOL=TSO*,PSRLSE=ALL,PORLSE=ALL,%FREE=10 SELECT DSN=TEST**,DSORG=PS,RLSE=TRK /*

Release all free space in selective data sets example

Release all free cylinders in data sets beginning with “A.B.C”, and reduce all data sets (including VSAM clusters) beginning with “C.D” to contain 20% free tracks in the final data sets, on all online volumes.

The RLSE= and VSRLSE= operands appear only on SELECT statements, and not on the CPK statement; this is the proper way to release space ONLY on selected data sets.

//RELEASE EXEC PGM=FDRCPK,REGION=0M //SYSPRINT DD SYSOUT=* //SYSMAP DD SYSOUT=* //SYSUDUMP DD SYSOUT=* //SYSIN DD * CPK TYPE=RLSE,VOL=* SELECT DSN=A.B.C,RLSE=ALL SELECT DSN=C.D.**,%FREE=20,RLSE=TRK,VSRLSE=ALL /*

Release all the free space in a specific HFS file example

Release all the free space in a HFS file OMVS.ZOSAR1.JAVA on volume HFSZ01 that has not been used. FASTCPK only releases space down to the “high-water” mark of used blocks.

Important

You must dismount the HFS file before running CPK as HFS files are bypassed if the SYSDSN enqueue fails.

//RELEASE EXEC PGM=FDRCPK,REGION=0M //SYSPRINT DD SYSOUT=* //SYSMAP DD SYSOUT=* //SYSUDUMP DD SYSOUT=* //SYSIN DD * CPK TYPE=RLSE,VOL=HFSZ01 SELECT DSN=OMVS.ZOSAR1.JAVA,RLSE=TRK /*

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*