I am trying to get a quick list of the temporary formats & values in my working library. I think the correct code for this is:
Proc format library=work fmtlib; Run;
However, SAS crashes whenever I try this. Am I just overlooking some obvious error in my code? Or does anyone else have this problem? I have SAS 9.4, W32_7PRO WIN 6.1.7601 Service Pack 1 Workstation
I am able to get what I need using the following code, but was wondering if anyone else has the crash problem with the code above.
Proc Format Library=Work Cntlout=Fmtds; Run; Proc Print Data=Fmtds; Run;
Thanks!
Hi Michelle,
Your code is correct and works as expected on my SAS 9.4 (TS1M2) X64_7PRO WIN 6.1.7601 Service Pack 1 Workstation.
And if the issues mentioned by @FreelanceReinh are true, then you should contact tech support with your issue. They'll also know if it's a bug or some other issue.
Hi Michelle,
With "parallel sessions" I meant two or more instances of SAS open at the same time, not one session after the other. This would give you two (or more) physically separate work folders, hence two physically separate formats.sas7bcat files.
The size of the format catalog does not seem to be an issue in your case.
Using a different configuration file should be no problem, I think, as long as you can copy the existing sasv9.cfg to any other place. However, you don't even need a different .cfg file to change the WORK system option. According to the documentation, "the options that are specified in the SAS invocation command" are processed at such a late stage, that they can override the settings in all existing configuration files. So, you can simply call SAS like this:
"C:\Program Files\SASHome\SASFoundation\9.4\sas.exe" -WORK "X:\your\path\to\SASwork"
(This would be the content of the "Target" field of the "SAS Properties" dialog box, of course with suitable paths.)
I've just tested it and, indeed, SAS created the session-specific work folder at the new location. My idea was to rule out potential (hardware?) issues with the disk where your work library is normally located.
This should get you a list of characteristics of any formats in the specified library. The libname must be in upper case or use the upcase function. If you want to list formats in multiple libraries then use Libname in ('WORK' 'OTHER');
proc sql;
select *
from dictionary.formats
where libname='WORK'
;
run;
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.