z/OS CMPSC-Komprimierungsalgorithmus
Das JZOS-Toolkit stellt die Wrapperklasse com.ibm.jzos.ZCompressorfür den Komprimierungsalgorithmus z/OS® CMPSC für statische Wörterverzeichnisse bereit. Statische Komprimierungsalgorithmen für Wörterverzeichnisse, wie z. B. CMPSC, lösen nicht dieselben Probleme wie adaptive Komprimierungsalgorithmen. Die statische Komprimierung funktioniert gut für die Komprimierung diskreter Datenblöcke, während die adaptive Komprimierung, wie sie beispielsweise von den GZIP-oder ZIP-Programmen verwendet wird, die Lebensdauer eines Datenstroms, der komprimiert werden soll, beschleunigt.
Jedes System, auf dem Datenblöcke diskret verarbeitet werden (z. B. Db2® -Seiten, VSAM-Steuerintervalle, SAM-Plattenblöcke), sollte von einem statischen Komprimierungsalgorithmus profitieren.
Weitere Informationen zum Komprimierungsalgorithmus und zur Maschineninstruktion CMPSC finden Sie in der Veröffentlichung z/Architecture ® Principles of Operation, SA22-7832-13 und in der Veröffentlichung Enterprise Systems Architecture/390 Data Compression, SA22-7208.
SYS1.SAMPLIB(CSRBDICT) SAMPLE können Sie ein Komprimierungs-und Erweiterungsverzeichnis für eine repräsentative Beispieldatei erstellen. Sie können den folgenden JCL-Beispielcode verwenden, um diese Wörterverzeichnisse zu erstellen und anschließend zu einem einzigen Dataset zu verketten, wie es für die Klasse ZCompressor erforderlich ist. Weitere Informationen finden Sie in der Dokumentation, die in den Kommentaren des Programms CSRBDICT oder in den vorherigen Referenzen enthalten ist.//CSRBDICT JOB (),’USER’
//*
//* The following symbol defines the data set containing the
//* text that you will scan. This will also become the
//* prefix for other data sets that are created,
//* and assumes that you have created a ".SPECFILE"
//* data set containing the specs for CSRBDICT.
//* In this example, we have downloaded the public domain text
//* of "Moby Dick" from http://www.gutenberg.org/files/2701/2701.txt
//* and we will generate dictionaries with 4K entries which implies
//* 12 bit symbol sizes, since 4096 = 2**(12+3) / 8.
//*
// SET DSNPREF=MYUSER.MOBYDICK
//*
//TSOTMP EXEC PGM=IKJEFT1A,DYNAMNBR=20
//SYSPROC DD DSN=SYS1.SAMPLIB,DISP=SHR
//SYSTSPRT DD SYSOUT=*
//SYSTSIN DD *
%CSRBDICT 4 1 EB ’MYUSER.MOBYDICK’
//*
//* Concatenate the dictionaries, selecting only
//* the leading (non-blank) 8 bytes from each entry record
//* This assumes that your specfile does NOT have the "asm"
//* option. For this example, the total size in bytes of the
//* output data set will be 64K (4K * 8 * 2).
//*
//CONCAT EXEC PGM=SORT,COND=(4,LT)
//SORTIN DD DSN=&DSNPREF..ACDICT41,DISP=SHR
// DD DSN=&DSNPREF..AEDICT41,DISP=SHR
//SORTOUT DD DSN=&DSNPREF..CDICTS41,
// DISP=(NEW,CATLG),SPACE=(CYL,(1)),
// DCB=(LRECL=8,BLKSIZE=0,RECFM=FB)
//SYSOUT DD SYSOUT=*
//SYSIN DD *
OPTION COPY
INREC FIELDS=(1,8)
//&DSNPREF..SPECFILE :** This is the TEXT FILE example from SYS1.SAMPLIB(CSRBDICT):
** - removed "asm" option - output is 8-byte binary entries
** - added "opt"
**
**The following is with a 4K-entry dictionary.
**Provides 30.88% compression (output/input) for the source of
**Chapter 5 of the ESA/390 Principles of Operation (30.32% if all output
**bits are concatenated together).
**Optimization (change x under opt to opt) improves compression by 0.7%.
**results maxnodes maxlevels msglevel stepping prperiod dicts
r 40000 60 3 f 7 2 7 1000 afd
**colaps opt treedisp treehex treenode dupccs
aam opt x h n x
**FLD col type dcenmen INT intspec
FLD 1 sa dce 4 INT aeis 1 (40)
INT a12b3s (40)
FLD end
**Note: Some text will be compressed better if the INT aeis 1 (40) is
**omitted; i.e., try it with and without the INT aeis 1 (40). Also, if
**the text is ASCII instead of EBCDIC, the 40 should be changed to 20.