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

What’s the 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.

In some programming environments, such as the SAS Windowing environment, this error message may appear when you try to open a SAS dataset using user-specific formats.

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

Use Case

Here is a programme that creates a CLASS dataset in the WORK library, applying the user-defined character format $SEX to the variable SEX.

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;a
quit;

Possible Solution

A quick solution is to open the dataset without using the missing formats, after first enabling the global option nofmterr.

options nofmterr;

Leave a Reply

Your email address will not be published. Required fields are marked *