Date: Thu, 30 Oct 1997 07:24:17 +0000
Reply-To: "M. Esther Colwell" <mec7@ITSA.UCSF.EDU>
Sender: "SAS(r) Discussion" <SAS-L@UGA.CC.UGA.EDU>
From: "M. Esther Colwell" <mec7@ITSA.UCSF.EDU>
Subject: Re: How to JOIN without SQL
Content-Type: text/plain; charset="us-ascii"
Another alternative is to access the SASHELP.VTABLE and put
the number of obs. in a macro variable, e.g.
where libname = 'Yourlibrary' and memname = 'Yourdata';
call symput('numobs', put(nobs,8.));
At 10:30 PM 10/29/97 -0800, you wrote:
>To join the fray, I suspect that Tim's suggestion could be simplified by
>eliminating the first SET statement on ZIPFILE and moving the NOBS= option
>to the second set statement. NOBS= is calculated at compile time, not
>execute time (I thin, very much, without actually being able to test it).
>To prove or refute, try the following, which never _executes_ the set
>statement. I believe it should work as intended:
> /* With apologies to the current thread on style */
> data in; do i= 1 to 100; output; end; run;
> data _null_;
> put nobs=;
> set in nobs= nobs;
>I believe you will have
> nobs= 100
>...output to your log.
>See below for appropriate modifications.
>On Wednesday, October 29, 1997 10:46 AM, Tim Berryhill 3rd time
>> Esther, I think your friend is concerned about a problem which does not
>> She would not actually need a STOP statement. SAS does not stop a data
>> step for
>> reading the last obs using random access, so the reads to ZIPFILE would
>> not stop
>> the step. Just to be cute I might avoid coding the number of obs in
>> DATA DISTFILE;
>> /* if 0 then set zipfile nobs=maxobs; /* commented */
>> SET HOSPFILE;
>> DO OBSNUM=1 TO maxobs;
>> SET ZIPFILE POINT=OBSNUM nobs= maxobs; /* nobs added */
>> DISTANCE = .......................
>> Tim Berryhill - Contract Programmer and General Wizard
>> TWB2@PGE.COM or http://www.aartwolf.com/twb.html
>> Frequently at Pacific Gas & Electric Co., San Francisco
>> The correlation coefficient between their views and
>> my postings is slightly less than 0
>Karsten M. Self (firstname.lastname@example.org)
> What part of "gestalt" don't you understand?
> (Welchen Teil von <<Gestalt>> verstehn Sie nicht?)