A simple SAS program to read the output of the df command into a SAS file looks like that:
filename oscmd pipe "df -k";
data diskfree;
infile oscmd dlm=" " truncover firstobs=2;
length
volume $30
space 8
used 8
nodes 8
directory $100
;
informat
percent
npercent
percent5.
;
format
percent
npercent
percent5.
space
used
comma12.
nodes comma9.
;
input
volume@
;
if volume ne '/proc';
input
space
used
percent
nodes
npercent
directory
;
run;
Note that I use -k instead of the -h option, as it spares me the hassle of interpreting the K, M, or G.
Also note the subsetting if that suppresses the /proc filesystem, as it does not contain valid numerical values (AIX)
... View more