When creating/replacing a data set with a data step with a REPLACE=YES option, does the old data set get deleted/truncated as soon as new data shows up, or does the new copy get created so that both the old and new exist during the data step and the old one gets deleted at the successful conclusion of the data step? The reason I'm asking is, we have some large (relative to their available storage) data sets that occasionally get rebuilt from scratch from external data. We could delete the data set first to ensure there's enough space for the new version, and in practice that's what we end up doing manually when multiple jobs lay claim to insufficient free space and things blow up. The argument then becomes "the replace=yes option was set, so it shouldn't be a problem." Clearly we need better data management around this constrained resource. But the question remains: Does REPLACE=YES in a data step free up and re-use the original data sets space, or does it essentially need at least as much free space as the data set it's replacing?
... View more