ERROR: Unable to open the table… (Missing Format)

ERROR: Unable to open the table… (Missing Format)

1. Problem

In some programming environments, such as the SAS Windowing Environment, you may see this error message while attempting to open a SAS dataset having user specific formats.

ERROR: Unable to open the table [...]. [...] cannot be opened. Do you want to select a different table to open?

2. Example

Here is a program which create a CLASS dataset in the WORK library with $SEX as user specific character format applied on the SEX variable.

proc format;
  value $ sex 'M'='Male' 'F'='Female';
run;

data class;
  set sashelp.class;
format sex $sex.;
run;

proc datasets lib=work memtype=cat kill;
run;
quit;

3. Possible Solution

One easy solution is to open the dataset without using the missing formats by running beforehand the following nofmterr global option:

options nofmterr;

About the Author

You may also like these