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-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

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
  • 742 views
  • 0 likes
  • 2 in conversation