BookmarkSubscribeRSS Feed
FatCaptain
Fluorite | Level 6
Hi,

We're having space issues on our server. As such, i'm trying to find out the size and owners of the sessions in the work directory on the server.

The code I have at the moment is;


RSUBMIT ;

filename workserv 'E:/saswork' ;

data dirdata ;
did = dopen('workserv');
numberOfFiles=dnum(did);
do i=1 to numberOfFiles;
filename=dread(did,i);
output;
end;
run;

ENDRSUBMIT ;


This will create a data set with the names of the sessions. How would I add the owner of the sessions and the size?

If I am going about this in the wrong way, please feel free to offer an alternative solution.

As always, any help is greatly appreciated!

Cheers,

Fat Captain.
2 REPLIES 2
Doc_Duke
Rhodochrosite | Level 12
Why not use OS commands to do the work?

The DIR command in Windows has the options you need to get a report. See
http://www.computerhope.com/dirhlp.htm#04
You could use the ls command in *nix to get similar information.

If you run it periodically as a scheduled task (cron), you could pipe the output to a file and then analyze the trends with SAS.
FatCaptain
Fluorite | Level 6
Thanks for the reply Doc@Duke.

Unfortunately, I am unable to issue OS commands as these have been disabled for security reasons.

My only real access to the server is through Base SAS.

Cheers,

Fat Captain.

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 2 replies
  • 960 views
  • 0 likes
  • 2 in conversation