The SPACE ENLARGER CLIST in Figure 1 invokes
ICQSPC00 to automatically enlarge the specified data set by 50%.
The SPACE ENLARGER CLIST displays a message if the data set was enlarged
successfully or, if not, it displays an error message from ICQSPC00.
Figure 1. Example 2:
The SPACE ENLARGER CLIST/*********************************************************************
/* This CLIST invokes ICQSPC00 to enlarge the specified data set */
/* by 50%. */
/**********************************************************************/
PROC 1 DATASET
%ICQSPC00 &DATASET /* Invoke space manager to... */+
SPACEFULL(0) /* Force the space to be enlarged */+
DIRFULL(0) /* Force the dir blocks to be enlarged */+
SPACEINCREASE(50) /* Increase primary extent by 50% */+
DIRINCREASE(50) /* Increase size of directory by 50% */+
ALLOCATENEW(NO) /* Don't create the data set, if it +
doesn't exist */
SET RCODE = &LASTCC /* Save the return code */
CONTROL ASIS
IF &RCODE = 0 THEN +
WRITE The data set was enlarged successfully.
ELSE +
DO /* Error enlarging data set */
ISPEXEC VGET (QSPRCMSG) /* Get reason code message & display it */
ISPEXEC GETMSG MSG(&QSPRCMSG) LONGMSG(MESSAGE)
WRITE &MESSAGE
END
EXIT CODE(&RCODE)