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: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 16. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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