Summary: Store permanent formats
Your data is stored in a SAS library (directory under Windows or
Unix). You could store the formats permanently in the same
library. If you use the libref LIBRARY they will automatically
be found. If you choose something like MYLIB and
options fmtsearch = ( mylib ) ;
Then the format will be found. The parentheses indicate a list
of librefs. Hence you can spread formats over several
directories. They will be searched in the order listed. By
default WORK and LIBRARY assumed first.
If you come from a system where formats are stored with data this
may not seem natural, but it pays off when you have the same
format for hundred different data sets. Personally I generally
store formats in one place for a project while the data may be
spread over several libraries, but it is largely a matter of
style and the nature of the projects.
Date: Fri, 24 Nov 2006 07:14:28 -0800
Reply-To: Andreww <andrew.whittam@GMAIL.COM>
Sender: "SAS(r) Discussion"
From: Andreww <andrew.whittam@GMAIL.COM>
Subject: Format in data step - errot on reopening table
Comments: To: sas-l
Content-Type: text/plain; charset="iso-8859-1"
I have a format in a datastep which gives a variables value a
When I try to reopen the table to view it I get a "Error: Unable
open table xyz..." when the format itself no longer exists.
Rather than hard code the labels in the data step, is there some
that I can permanently format the variable in the datastep?