|Date: ||Thu, 11 Oct 2001 13:05:58 -0400|
|Reply-To: ||"Meldrum, Sean" <Sean_Meldrum@URMC.ROCHESTER.EDU>|
|Sender: ||"SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>|
|From: ||"Meldrum, Sean" <Sean_Meldrum@URMC.ROCHESTER.EDU>|
|Subject: ||Re: error: Format not found|
|Content-Type: ||text/plain; charset="iso-8859-1"|
It sounds like when you created the dataset you saved some of the variables
with formats you built, but now that you are in a different session SAS
doesn't know where those formats are. By default SAS looks in it's
permanent format library and the work library for any formats that are
requested and then issues an error if it doesn't find them. If you want to
create your own permanent formats, you just need to tell SAS where they are.
libname mylib 'path' ;
libname library 'path' ;
proc format library=library ;
value yesno 0 = 'No'
1 = 'Yes' ;
data mylib.mydata ;
set workdata ;
format didyou willyou outcome yesno. ;
You can close your SAS session, but the next time you want to access
mylib.mydata you will have to declare both the mylib libname and the library
libname so that SAS knows where to find the permanent formats you created.
If instead you choose to stick with temporary formats (i.e. those that are
kept in the WORK library), you need to re-run your proc format at the
beginning of each session.
Hope this help/makes sense. You may want to check out the chapter on PROC
FORMAT in the manual - it may be a lot clearer than I am.
University of Rochester
From: Nicolas Roth [mailto:nicolas.roth@METRI.UNIGE.CH]
Sent: Thursday, October 11, 2001 11:36 AM
Subject: error: Format not found
My computer might be haunted.... Yesterday night I was able to read my data
(mydata.sas7dbat) using the command:
LIBNAME mylib 'path';
DATA ua97d; SET mylib.ua97d; RUN;
PROC CONTENTS POSITION;
The log file said:
4457 DATA ua97d; SET blah.ua97d; RUN;
NOTE: There were 16189 observations read from the dataset MYLIB.UA97D.
NOTE: The data set WORK.UA97D has 16189 observations and 261 variables.
NOTE: DATA statement used:
real time 18.77 seconds
so everything was ok. This morning I added the IF statements, and everything
crashed, i.e. SAS was not able to read the data. Am I doing something wrong?
(PS: Thanks all to help me getting started, I have order little sas book...)