Desktop productivity for business analysts and programmers

Is there a way to view the physical size of SAS Data set within Enterprise Guide?

Accepted Solution Solved
Reply
Contributor
Posts: 41
Accepted Solution

Is there a way to view the physical size of SAS Data set within Enterprise Guide?

One of our users is looking to obtain the actual windows physical size of a SAS Data Set within Enterprise Guide - just wondering does anybody know a quick way of surfacing the file size up via Enterprise Guide?

We can provide this info by logging onto the server and using right click properties on the file in question via Windows. And we also have a piece of SAS code that will produce a report of physical table size in the library location. But both of these options are not a quick, click and view option for the user.

Thanks,

Tom


Accepted Solutions
Solution
‎08-24-2017 08:37 AM
SAS Employee
Posts: 23

Re: Is there a way to view the physical size of SAS Data set within Enterprise Guide?

[ Edited ]

Does this help? This lists the file sizes for all data sets in SASHELP library.

 

proc sql;
 select memname, filesize format=sizekmg10.1
   from dictionary.tables
   where libname='SASHELP' and memtype='DATA';
quit;

fsize.png

 

You can also use the Tasks->Data->Data Set Attributes task, which includes a File Size field in its report.

 

dsattr.png

 

View solution in original post


All Replies
Respected Advisor
Posts: 4,132

Re: Is there a way to view the physical size of SAS Data set within Enterprise Guide?

If you have already a piece of SAS code why can't the user run this code as well? You could implement it as an autocall macro so the end user would only need to call the macro passing in the path/filename. Is options XCMD set?

Oh, and if this is about SAS tables then you would want to create some SAS code which also lists the related indexes and the like.

Contributor
Posts: 41

Re: Is there a way to view the physical size of SAS Data set within Enterprise Guide?

Hello Partick,

Thank you for your response.

The SAS code uses the XCMD PIPE option which is unavailable to users for security reasons, we have to run the code directly on our SAS servers to get a successful output in the report.

I will take a look at the autocall macro's to see if we can provide a solution using those.

Thanks,

Tom

Super User
Posts: 3,233

Re: Is there a way to view the physical size of SAS Data set within Enterprise Guide?

Another option if you have a Windows SAS server is to provide a Windows share like: \\SASServer\FolderShare.

Then uses can navigate to the share in Windows Explorer on their PC and look at file properties.

Respected Advisor
Posts: 4,132

Re: Is there a way to view the physical size of SAS Data set within Enterprise Guide?

That means you have NOXCMD set. That will make it very hard for users to retrieve file size information via SAS programs (autocall macro won't help).

You could try to implement this as a stored process which the user can call - the stored process would then need under a user/in an environment with XCMD set.

As for "NOXCMD for security reasons": Chris Hemedinger wrote a very good blog about this:

http://blogs.sas.com/content/sasdummy/2012/08/31/the-case-for-xcmd-privileges-in-sas-enterprise-guid...

SAS Employee
Posts: 1

Re: Is there a way to view the physical size of SAS Data set within Enterprise Guide?

Hi Tom,

If you're not able to access the XCMD I'm fairly sure you can use the VEXTFL (or DICTIONARY.EXTFILES if accessing via PROC SQL) dictionary table to achieve this, e.g.;

filename myfile 'C:\<path-to>\<my-file>.sas7bdat';

data _null_;
set sashelp.vextfl(where=(fileref='MYFILE'));
/* Calculate size in MB */
filesize=filesize/(1024**2);
call symputx('filesize',filesize);
run;

Solution
‎08-24-2017 08:37 AM
SAS Employee
Posts: 23

Re: Is there a way to view the physical size of SAS Data set within Enterprise Guide?

[ Edited ]

Does this help? This lists the file sizes for all data sets in SASHELP library.

 

proc sql;
 select memname, filesize format=sizekmg10.1
   from dictionary.tables
   where libname='SASHELP' and memtype='DATA';
quit;

fsize.png

 

You can also use the Tasks->Data->Data Set Attributes task, which includes a File Size field in its report.

 

dsattr.png

 

Contributor tlk
Contributor
Posts: 53

Re: Is there a way to view the physical size of SAS Data set within Enterprise Guide?

I didn't know about that dictionnary library, I guess it use sashelp.vtable, but vtable seems to contain only user define library.   Good to know about the dictonnay library.

Thanks, I'm always on the look out for those little things.

Super User
Posts: 9,867

Re: Is there a way to view the physical size of SAS Data set within Enterprise Guide?

No. I don't think so. It is depended on different engine.

If engine is SPDS , you can't get that on account of a table is split into a several sub-table stored in different fold .

If it was SPDS , there is a command SPDSLS you can use to get the library’s size . Or use my code via UNIX command .

PROC Star
Posts: 1,146

Re: Is there a way to view the physical size of SAS Data set within Enterprise Guide?

Another option is to use the "External Files" routines to pull out the file size. I don't have access to a server environment to test it, but I believe it would work fine, and it doesn't involve the X command capability.

Tom

Valued Guide
Posts: 3,208

Re: Is there a way to view the physical size of SAS Data set within Enterprise Guide?

My question would be what is the logical reason for that question. Dataset physical sizes will get a different meaning in some time. You can have index/auditfiles (adding more needed space) and having compression. It makes the once hard lined information become soft and less predictable.  When it is about managing the space and predicting the future needs than that is the question to solve.

---->-- ja karman --<-----
☑ This topic is solved.

Need further help from the community? Please ask a new question.

Discussion stats
  • 10 replies
  • 6482 views
  • 6 likes
  • 9 in conversation