Can't open an existing SAS dataset?

Accepted Solution Solved
Reply
Frequent Contributor
Posts: 88
Accepted Solution

Can't open an existing SAS dataset?

[ Edited ]

I don't know what I'm doing wrong, but I'm trying to open an existing SAS dataset that is saved on my computer.

 

The code I'm using to try an open the dataset is the following:

%let fpath = xxxx;

libname effct "&fpath";

data efficiency;
set effct.omrdataset;
run;

but when I try to run this I get the following error:

 

ERROR: The format SITEF was not found or could not be loaded.

 

What am I doing wrong? I'm pretty sure I've opened SAS datasets this way before

 


Accepted Solutions
Solution
‎08-18-2016 02:39 PM
Grand Advisor
Posts: 17,331

Re: Can't open an existing SAS dataset?

Your colleague created a format to display a variable a certain way, ie they recoded age into groups and applied a format rather than create a new variable. However, formats aren't stored within a dataset so they need to give you the format code as well.

 

WIll it cause issues, yes, you'll see the variables differently. For example, if it was age, you would see the individual ages but they would see the age categories. 

 

I would ask your colleague for the SAS format code. 

View solution in original post


All Replies
Grand Advisor
Posts: 17,331

Re: Can't open an existing SAS dataset?

The dataset has a custom format applied to it that you don't have in your system. 

Do you have any code to go along with the data?

 

Otherwise, you can tell SAS to ignore this error using the option below.

 

option nofmterr;
Frequent Contributor
Posts: 88

Re: Can't open an existing SAS dataset?

Hi Reeza,

 

Can you explain more by what you mean? What do you mean it has a format that I don't have on my computer?

 

The sas dataset is one that my colleague created and I'm trying to work off their dataset?

 

Will using the statement to ignore the format cause any problems?

Solution
‎08-18-2016 02:39 PM
Grand Advisor
Posts: 17,331

Re: Can't open an existing SAS dataset?

Your colleague created a format to display a variable a certain way, ie they recoded age into groups and applied a format rather than create a new variable. However, formats aren't stored within a dataset so they need to give you the format code as well.

 

WIll it cause issues, yes, you'll see the variables differently. For example, if it was age, you would see the individual ages but they would see the age categories. 

 

I would ask your colleague for the SAS format code. 

Frequent Contributor
Posts: 88

Re: Can't open an existing SAS dataset?

sweet. thanks for that awesome and clear explanation! 

 

I will ask themSmiley Happy

☑ This topic is SOLVED.

Need further help from the community? Please ask a new question.

Discussion stats
  • 4 replies
  • 310 views
  • 3 likes
  • 2 in conversation