[18944] in s-news-athena
[S] sas.get and formats
daemon@ATHENA.MIT.EDU (ecm@skew2.kellogg.nwu.edu)
Sat Aug 14 13:25:49 1999
From: ecm@skew2.kellogg.nwu.edu
Message-Id: <199908141716.MAA17496@skew2.kellogg.nwu.edu>
To: s-news@wubios.wustl.edu
Date: Sat, 14 Aug 1999 12:16:39 -0500 (CDT)
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Dear s-news readers,
I uses Splus Ver 3.4, Release 1 under the HP-UX 9.0.5.
I have a SAS data set with user-defined formats (they show up in my
contents). When working with this data set in sas I execute the
following code at the beginning of every program:
proc format cntlin=curr.fmts; run;
How can I read this data set into splus? When I use the sas.get
command I get a sas error message saying that the user-defined
formats are undefined. The help page for sas.get mentions
format.library: The UNIX directory containing the file
formats.sct, which contains the definitions of the user
defined formats used in this dataset. By default, we look
for the formats in the same directory as the data. N.B.
The user defined formats must be available (so SAS can
read the data), but they are not used by this version of
sas.get.
How does this work? What is a formats.sct file? As far as I can
tell, this is not documented under proc format of the sas procedures
manual. I've tried linking fmts.ssd01 to formats.sct and also
placing the proc format command that creates fmts.ssd01 in
formats.sct.
I could easily fix the problem by removing the association between
the variables and the user-defined variables from the data set, but
then I have to respecify the formats every time I do an analysis in
sas.
Given that splus seems to ignore the user-defined formats anyway,
why isn't there a
format _all_;
statement in the %sas_get macro so that sas doesn't worry about the
formats in the first place? Also, I am using the variables= option
in splus and none of the particular variables I am keeping are
assigned user-defined formats. It would seem like the %sas_get
macro should put a keep= statement when it sets the sas data set,
e.g. set &library.&data(keep=&variables)
This would also clear up the problem without using the
library.format option.
Ed Malthouse
Dr. Edward C. Malthouse
Assistant Professor
Integrated Marketing Communications Department
Medill School of Journalism
1908 Sheridan Road
Evanston, IL 60208-1290
Tele: 847-467-3376
Fax: 847-491-5925
-----------------------------------------------------------------------
This message was distributed by s-news@wubios.wustl.edu. To unsubscribe
send e-mail to s-news-request@wubios.wustl.edu with the BODY of the
message: unsubscribe s-news