Compresses a PDS.
&CONTROL SHRVARS=($DS)
EXEC $DSCALL OPT=COMPRESS
DSN=dataset_name
[ DISPLAY= {YES | NO } ]
[ STAT= { OLD | SHR } ]
[ SYSPRINT= { DELETE | KEEP | DSN } ]
This call is used to compress a PDS using IEBCOPY. The compress function is used to reclaim unused space in the data set. This reduces fragmentation within the PDS and can result in more efficient use of the space allocated to the PDS.
Operands:
Specifies that the data set be compressed.
Specifies the name of the data set to be compressed. No member name is specified.
Specifies whether to display the output on completion of the function. This operand is only valid if SYSPRINT=DSN is specified. If DISPLAY=YES is specified, a full-screen display of the SYSPRINT data set is presented after the compress operation has completed.
Specifies if the data set to be compressed is allocated exclusively for IEBCOPY (STAT=OLD) or is allowed to be shared with other users (STAT=SHR). It is recommended that STAT=OLD be specified to avoid the possibility of the PDS being corrupted if another user updates the PDS during the compress operation.
Specifies the type of data set to be allocated to the SYSPRINT DD for IEBCOPY.
Return Codes:
Note: For more information about &SYSMSG, &$DSRC, and &$DSFDBK, see Return Codes and Feedback Codes.
Return Variables:
SYSPRINT data set name if SYSPRINT=DSN is specified, or SYSOUT=A if SYSPRINT=DELETE or SYSPRINT=KEEP
SYSPRINT ddname
SYSPRINT data set volume
Example: OPT=CLOSE
EXEC $DSCALL OPT=CLOSE DSN=SYS.WORK.DEV01 STAT=SHR + SYSPRINT=DSN DISPLAY=NO
Note: IEBCOPY is invoked internally.