Contributor
Posts: 39

# "Proc Format Library=Work Fmtlib; Run;" crashes SAS

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!

Posts: 1,118

## Re: "Proc Format Library=Work Fmtlib; Run;" crashes SAS

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.

1. Do you get an error message in the log (maybe visible only for a tenth of a second before the session closes)?
2. Is this error reproducible after rebooting? And in each of several parallel SAS sessions?
3. Does it still occur when you move the work library to a different drive (if available)?
4. Is the format catalog very large?
Super User
Posts: 19,875

## Re: "Proc Format Library=Work Fmtlib; Run;" crashes SAS

And if the issues mentioned by @FreelanceReinhard are true, then you should contact tech support with your issue. They'll also know if it's a bug or some other issue.

Contributor
Posts: 39

## Re: "Proc Format Library=Work Fmtlib; Run;" crashes SAS

I can't edit my sasv9.cfg file, so I don't think I can change my working library to test that.

I've tried re-opening sas multiple times and it crashes each time (if this is what is meant by parallel sessions?).

The program shuts down too fast most of the time, but occasionally I'll get the windows popup that sas.exe has stopped working before it shuts down, and on those occasions I don't see any problems noted on the log.

I also just noticed it crashes when I go through the sas explorer and double-click directly on a format.

There are 8 format names with total of 90 labels. I tried some other temporary formats and the problem continues.

Perplexing!
Posts: 1,118

## Re: "Proc Format Library=Work Fmtlib; Run;" crashes SAS

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.

Super User
Posts: 11,343

## Re: "Proc Format Library=Work Fmtlib; Run;" crashes SAS

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;
Discussion stats
• 5 replies
• 633 views
• 3 likes
• 4 in conversation