Asked By
jimmy
10 points
N/A
Posted on - 07/18/2011
I have a SAS 9.1 installed in my PC running on Windows XP. I was attempting to open my SAS data file in ViewTable mode but it seems that it is having a trouble displaying the data. Here is what stated in the error dialog box:
SAS
ERROR: unable to open the table
TMP1.FORMATDB. TMP1.FormatDB cannot be
opened. Do you want to select a different
table to open?
What can be the most effective solution in fixing format error like this? Is there any other option statement that I can run to deactivate format errors for the duration of the SAS session? I have a formats file (.sas7bcat) that came with the data, and I’ve tried to copy it to the WORK library and use the FMTSEARCH option to specify additional format search locations but it did’nt work for me. Any help would be appreciated.
Thanks in advance!
SAS ERROR MESSAGE UNABLE TO OPEN TABLE
The double-clicking operation opens the table via the Windows OLE Automation associations of the .sas7bdat file type, and this launch does not by itself set up the format libraries or options to support viewing a table with user-written formats.
There are some workarounds possible for this issue. One approach is to add the -NOFMTERR option to your sasv8.cfg or sasv9.cfg file, which will allow the table to be opened, although you will not be able to see the data with the associated user formats. If your table is in a SAS library that has the user formats in a FORMATS.SAS7BCAT catalog, you can create an autoexec.sas file on the root of your current drive (usually C:) or where your sas.exe executable is located with the following code:
  %macro testtmp;
     %if (%sysfunc(libref(tmp1))) %then
        options fmtsearch=(tmp1);
  %mend;
  %testtmp;