The SPACE MANAGER CLIST in Figure 1 receives
a data set name as input using a positional parameter called DATA
SET. The CLIST then invokes ICQSPC00, which checks to see if the
data set is 75% full. If it is 75% or more full, ICQSPC00 tries to
compress the data set. If compression is not possible, ICQSPC00 reallocates
the data set, preserving the RACF® protection.
If the data set does not exist, ICQSPC00 can allocate a new data
set with the specified name.
Figure 1. Example 1:
The SPACE MANAGER CLIST/*********************************************************************/
/* This CLIST invokes the space manager function to ensure that the */
/* specified data set is no more than 75% full. If it is too full, */
/* space management will enlarge (compress or reallocate) the data */
/* set by 50%. If the data set does not exist, space manager will */
/* ask the user if it should be created. Data set protection will */
/* be maintained if the data set is reallocated. */
/* */
/*********************************************************************/
PROC 1 DATASET
%ICQSPC00 &DATASET /* Invoke space manager to... */+
SPACEFULL(75) /* If the data set is over 75% full, */+
SPACEINCREASE(50) /* increase it by 50% */+
DIRFULL(75) /* If the dir blocks are over 75% full, */+
DIRINCREASE(50) /* increase them by 50% */+
ALLOCATENEW(ASK) /* If the data set doesn't exist, ask +
the user if it should be created, +
using the following ALLOC parameters */+
PRIMSPACE(10) /* Primary space of 10 tracks, */+
SECSPACE(5) /* Secondary space of 5 tracks, */+
UNITS(TRACKS) /* Allocate in tracks, */+
DIRBLOCKS(10) /* 10 directory blocks, */+
BLKSIZE(800) /* Block size of 800 */+
LRECL(80) /* Logical record length of 80 */+
RECFM(FB) /* Fixed, blocked record format */
SET RCODE = &LASTCC /* Save the return code */
ISPEXEC VGET (QSPRCMSG) /* Get reason code message & display it */
ISPEXEC GETMSG MSG(&QSPRCMSG) LONGMSG(MESSAGE)
CONTROL ASIS
WRITE &MESSAGE
EXIT CODE(&RCODE)