|Date: ||Wed, 17 Dec 2003 22:30:20 -0500|
|Reply-To: ||Howard Schreier <Howard_Schreier@ITA.DOC.GOV>|
|Sender: ||"SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>|
|From: ||Howard Schreier <Howard_Schreier@ITA.DOC.GOV>|
|Subject: ||Re: Question about Permanent Datasets|
You've had some good advice from experienced people. I'd like to add a bit.
SAS is not a DBMS, and with the exception of a few techniques (which are
used relatively little), it does not operate on datasets *in place*.
Rather, it creates new datasets from old ones.
This is not always apparent. For example, when you perform a PROC SORT and
do not code the OUT= option, SAS creates the output dataset with some
temporary name, then deletes the input dataset, then renames the output
dataset. Pretty much the same thing happens in other PROC and DATA steps
when input and output datasets have the same name.
Also, there is no rollback possible after a dataset is replaced. In the
case of a sort, you can of course do another sort; but you cannot restore
to some previous arbitrary order. If you happen to code some faulty logic
and write a subsetting statement which filters out 100% of your
observations, you end up with an empty dataset.
On Wed, 17 Dec 2003 07:25:37 -0800, Sober Hi <soberhi@YAHOO.COM> wrote:
>I am a newbie, so kindly be gentle. Any DIRECT references to relevant
>articles would be appreciated.
>Let's say I have a folder called: DAT which contains various datasets
>(ds1, ds2, etc.....); So the data is stored on the SAS server in a
>Let's also say that I need my SAS program to do various calculations
>QUESTION: Is it better to:
>(1) Create a dataset in the SAS temporary WORK folder, process all
>calculations in the WORK-based dataset andthen copy it out to the flat
>Example of (1):
> set dat.ds1;
>process multitudes of calculations on ds
> set ds; /* where this is from WORK */
>(2) Do the actual calculations on the dat.ds1 itself (including a
>couple of sorts)..... and not create the temporary dataset?
>What considerations do I need to think about (ie: size of dataset,
>number of calculations, etc....)?
>Thank you so much to all the responders......