See also:
EXPAND in this section.
|
Storing data is extremely inefficient when the data consists of many embedded blanks and other duplicated characters. To avoid this inefficiency, the COMPRESS/EXPAND facility allows compression before writing, and expansion back to the full record size after reading a compressed record.
COMPRESS and EXPAND operate on storage only, and are not concerned with any particular file.
If the source length is not provided, the default length used for the COMPRESS statement is LRECL.
After compression or expansion, the LRECL value is modified to reflect the size of the compressed or expanded data.
It is possible that the compressed data is longer than the source.
COMPRESS 1 TO 1001 * Gives a syntax error. COMPRESS FR 1 TO 1001 * Acceptable. (Length=LRECL.) COMPRESS 456 AT 1 TO 1001 * Acceptable. COMPRESS LRECL AT 1 TO 1001 * Acceptable. |
READ BIGFILE NORDW W=2222 * Read normal file. COMPRESS FR 1 TO=1001 * Compress LRECL bytes. WR TAPEFIL RECFM=VB FR=1001 B=32000 L=512 * Write Back-up. |
The NORDW parameter has been included on the input file
because we do not wish to include any RDW
in the compression algorithm.
If input is not RECFM=V, then the NORDW parameter
is simply accepted with no error message because RECFM=F and RECFM=U
records have no RDW anyway.
SELCOPY will of course generate an appropriate RDW
for the output file which is explicitly coded as RECFM=V.
| COMPUTE(Bridgend)Ltd UK Tel:+44(1656) 65 2222 Fx:2227 | |||
| 2003/07/31 | Op Wd - COMPRESS | SELCOPY Rel 2.0x | |