Date: Sun, 26 Oct 2003 15:21:26 +0000
Reply-To: John Whittington <John.W@MEDISCIENCE.CO.UK>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: John Whittington <John.W@MEDISCIENCE.CO.UK>
Subject: Re: help explain the code
In-Reply-To: <E1ADR8F-0006O7-00@coumxnn02.netbenefit.co.uk>
Content-Type: text/plain; charset="us-ascii"; format=flowed
At 12:19 25/10/03 -0400, Ian Whitlock wrote (in small part):
>Now SAS sets some variables to missing at the beginning of every iteration
>of the implied loop of the DATA step. But it does not do this with
>variables that come from SAS datasets, so the values of the one record read
>in dataset TWO will propagate to all records on the output ONE.
>Consequently, in your step, the output ONE will contain all the data of the
>input ONE plus the information from TWO on every record. This idea
>represents one common method of combing data in SAS.
Indeed. Just to be sure that Jerry (or anyone else) does not get confused,
it's probably worth underlining (as I did in the follow-up to my initial
response to Jerry) that the ('propagating') functionality you describe
obviously only happens for variables present in dataset TWO which are NOT
also present in the other source dataset (ONE).
For variables present in both input datasets, there will obviously NOT be
any such 'propagation to all records' (of the values read once from dataset
TWO), even for the first record of the new dataset, since new incoming
values from ONE (even if those values are 'missing') will obviously
'overwrite' anything attempting to 'propagate'.
Kind Regards
John
----------------------------------------------------------------
Dr John Whittington, Voice: +44 (0) 1296 730225
Mediscience Services Fax: +44 (0) 1296 738893
Twyford Manor, Twyford, E-mail: John.W@mediscience.co.uk
Buckingham MK18 4EL, UK mediscience@compuserve.com
----------------------------------------------------------------
|