This document will explain how to specify the Reduce to Fit variables in all
environments to help to prevent Space-Not-Available (SNA) abends.
And very importantly, how to reset PRI and SEC to their original values
The Allocate User Guide, chapter 2, DOES IT FIT (DIF) Support, describes in great detail
how you can dynamically reduce the allocation amounts if the space is not available.
The following is the essential information about RTF.
Both terms, "Does It Fit" and "Reduce To Fit" are used in the User Guide.
I prefer the term "Reduce To Fit" (or just RTF) because it describes what the process is.
RTF can reduce PRImary space quantity in ALLOC & DEFINE and SECondary in EXTEND, EOV and EOV_VSAM,
when a volume in the assigned Storage Group (STORGRP) can't be found with the space needed.
The RTF process utilizes just two simple variables:
SET &RB = nn -- Reduce the PRI/SEC amount by 'nn' percent increments
SET &MP = nn -- Do not reduce the PRI/SEC amount to less than 'nn' percent of the original amount
These Vkgparms would need to be specified to use RTF in these instances:
PLSOPT10 (Y) SMS allocations intercepted in ALLOC and DEFINE
PLSOPT11 (Y) VSAM allocations intercepted in EXTEND.
When the size of SEC has been adjusted for non-VSAM allocations by either RTF or your ASR logic,
you need to reset the value of SEC in EXTEND and/or EOV or the size of the first extent on the next
volume will be the value that was last set by RTF or your ASRs, which could be a very small amount.
How to specify the DIF-RTF Variables and how to reset original PRI and SEC values
Here is how the RTF variables are specified in the various environments.
In the ALLOC or DEFINE environments, add these statements for RTF processing:
SET &RB = 10 /* REDUCE PRIMARY */
SET &MP = 40 /* DON'T REDUCE BELOW THIS PERCENT */
In the EXTEND environment, add these statements for RTF and to reset SEC (see comments):
IF &EXTENDVOL EQ 'NEW' AND &SEC_ORIG NE 0 AND &SMS EQ 'N' THEN
SET &SEC = &SEC_ORIG
/* EOV MAY NOT BE INVOKED IF CANDIDATE VOLS IN ALLOCATION. */
/* SO THE ABOVE RULE WILL PERFORM THE NEEDED "SET &SEC...". */
SET &RB = 10 /* REDUCE EXTENT */
SET &MP = 40 /* DON'T REDUCE BELOW THIS PERCENT */
In the EOV environment, add these statements for RTF and to reset SEC:
IF &SEC_ORIG NE 0 THEN
SET &SEC = &SEC_ORIG /* RESET SEC TO ORIGINAL VALUE */
SET &POOLSUB = 'Y' /* ADD ANOTHER VOLUME TO ALLOCATION */
SET &RB = 10 /* REDUCE EXTENT TO FIT */
SET &MP = 40 /* DON'T REDUCE BELOW THIS PERCENT */
In the EOV_VSAM environment, the value the data set was originally defined
with is contained in the applicable PRIMARYD/I and SECONDARY/I variables.
Add these statements for RTF and to reset PRI and SEC:
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
IF &ABENDCOMP = 'DATA' THEN
DO
SET &PRIMARYD = &PRIMARYD
SET &SECONDARYD = &SECONDARYD
END
IF &ABENDCOMP = 'INDEX' THEN
DO
SET &PRIMARYI = &PRIMARYI
SET &SECONDARYI = &SECONDARYI
END
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
SET &POOLSUB = 'Y' /* ADD ANOTHER VOLUME TO ALLOCATION */
SET &RB = 10 /* REDUCE EXTENT TO FIT */
SET &MP = 40 /* DON'T REDUCE BELOW THIS PERCENT */