Date: Mon, 1 Sep 1997 19:20:47 -0400
Reply-To: "Bassett Consulting Services, Inc." <0002395748@MCIMAIL.COM>
Sender: "SAS(r) Discussion" <SAS-L@UGA.CC.UGA.EDU>
From: "Bassett Consulting Services, Inc." <0002395748@MCIMAIL.COM>
Subject: Re: saving SCL lists to SAS data sets
-----------------------------------------------------------------------
CONTENT: re: create a SAS data set from an SCL list
SUMMARY: need to know purpose
REL/PLTF: 6.07/n.a.
NAME: Michael L. Davis
INTERNET: Bassett.Consulting@worldnet.att.net
AFFILIATION: Bassett Consulting Services, Inc.
P-ADDR: 10 Pleasant Drive, North Haven, CT 06473
PHONE: (203) 562-0640
FAX: (203) 498-1414
-----------------------------------------------------------------------
On Fri, 22 Aug 1997 09:31:21 -0700, Scott Carl <SCARL@THECREEK.COM>
wrote:
>Hi,
>
>I am looking for the "best" way to create a sas dataset from an SCL
>list. Any thoughts?
>
>
>Scott Carl
>Marketing Statistician
>Coldwater Creek
>One Coldwater Creek Drive
>Sandpoint, ID 83864
>scarl@thecreek.com
>(208) 265-7136
Scott, first, do you really need to create a SAS data set? If
you merely wish to save the contents of an SCL list between SAS
sessions, you might be better served by using the SCL SAVELIST
function to create a SLIST catalog entry. The SLIST entry can
be "reconstituted" into an SCL list using the FILLIST function.
If you use the strategy of saving the SCL list to an SLIST entry
instead of a data set, you may wish to know how to use those
values in a SAS data step or procedure. After using the FILLIST
function, convert the SCL list items to SCL variables using the
appropriate "GET" commands (e.g., GETITEMC, GETITEMN, etc.).
Then use the SYMPUT call routine to turn the resulting SCL
variables into macro variables, which can be inserted in your
SAS code as needed.
However, if you really want to turn an SCL list into a data set,
you need to watch out for two issues that previous posts seem to
have ignored. First, SCL lists can contain SCL list items as well
as character and numeric items. Inspect the SCL list to be saved
with PUTLIST call routine to identify any sublists imbedded within
the list to be converted to a SAS data set.
Last, you did not say whether the list has any named items
whose names need to be preserved. If your list does, my
recommendation is that you save the names as variable labels.
Remember that unlike labels, SCL list item names are stored in
upper case.