proc sql;
create table size as
select*from dictionary.tables
where libname="SASHELP";
quit;
proc format;
picture dd low - high="999999MB";
run;
data data;
set size;
size=filesize*(1024*1024);
keep memname filesize size;
format size dd.;
run;
check out the above program....is it right ?
if it is right ...i am not getting accurate result.....
please help by modifying the program.....give the best suggetions....
thank you inadvance.
Change to this:
size = filesize / 1024 / 1024;
Filesize contains the number of bytes. Dividing by 1024 gives you KB, dividing again gives you MB.
One more divsion would give you GB.
You could even use a multiplicator in the format and assign the format directly to filesize.
Change to this:
size = filesize / 1024 / 1024;
Filesize contains the number of bytes. Dividing by 1024 gives you KB, dividing again gives you MB.
One more divsion would give you GB.
You could even use a multiplicator in the format and assign the format directly to filesize.
Some things helping us to help you:
The SAS environment i have access to prints the following error message:
40
41 data data;
____
57
ERROR 57-185: DATA is not allowed in the DATA statement when option DATASTMTCHK=ALLKEYWORDS. Check for a missing semicolon in the
DATA statement, or use DATASTMTCHK=NONE.
After renaming the dataset the numbers seem to be to high. Maybe using the standard format sizekmgw.d is what you need.
Don't miss out on SAS Innovate - Register now for the FREE Livestream!
Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.
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.