Is it it possible to run a macro within the SET statement that exits out of Linux SAS 9.4,
calls gunzip (then chmod, then change group permissions),
and returns back to the calling program
AND reads in the dataset that has been unpacked into the temp SAS directory?
No. Well maybe dosubl()? Anyway, even if that worked, I'd redesign the approach.
Unpack BEFORE the data step, THEN read the data.
Don't let the tail (an easy search and replace) wag the dog (crappy or impossible design).
The fact that you have 80 programs that can be addressed by a simple search and replace on the set statement may indicate that they should have been modularized a while ago (for example macro-ized). It stinks of copy and paste code that is now too hard to maintain.
Are your programs consistent enough that a multi-line search and replace, say via sed or awk, would work?
For example, replace:
data want;
set &lib.&dataset;
with:
%unzip_macro(&path,&lib,&dataset);
data want;
set @lib.&dataset;
...
Or, are your programs SO similar that you could combine them into one, or at least much fewer than 80, via a well designed macro or set of macros?
... View more