| Date: | Fri, 3 Nov 2006 06:21:36 -0700 |
| Reply-To: | "Workman, Rob" <Rob.Workman@SORIN-NA.COM> |
| Sender: | "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU> |
| From: | "Workman, Rob" <Rob.Workman@SORIN-NA.COM> |
| Subject: | Re: OT: Chance to Make SAS-L History: Did You Know That... |
|
| Content-Type: | text/plain; charset="us-ascii" |
Did you know that the continue statement works differently in SCL than
in the datastep?
"In DATA step code, the CONTINUE statement stops processing only the
current DO loop. In SCL code, the CONTINUE statement stops processing
the current DO loop or *DO group*" -help documentation (my emphasis)
In SCL, CONTINUE simply goes to the line following the next end
statement in the current do group. In the datastep, the CONTINUE
statement goes to the end statement of the current loop even if nested
in a non-looping do group.
For example:
SCL:
init:
do ii = 1 to 5;
if ii = 2 then
do;
continue;
end; *** CONTINUE exits here;
jj + 1;
end;
put jj=;
return;
*** Log;
jj=5
DATASTEP:
data _null_;
do ii = 1 to 5;
if ii = 2 then
do;
continue;
end;
jj + 1;
end; *** CONTINUE exits here;
put jj=;
run;
*** Log;
jj=4
Kind regards,
Rob Workman
-----Original Message-----
From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of
Michael L. Davis
Sent: Friday, November 03, 2006 6:30 AM
To: SAS-L@LISTSERV.UGA.EDU
Subject: Re: OT: Chance to Make SAS-L History: Did You Know That...
Hello Mikeeee (and other friends),
I'll bite. As an aid to figuring out what your created data sets are
about
when a few days have elapsed, consider using data set labels. Easiest
way
is to use a data set option:
data foo
(label="This data set created for SAS-L by pgm 123, &sysdate")
;
set .....
run ;
This works for PROC SQL fans, too.
proc sql ;
create table foo
(label="This data set created for SAS-L by pgm 123, &sysdate")
as select ....
;
The labels are most easily viewed in a SAS Explorer directory window.
HTH.
Michael Davis
At 01:17 PM 11/2/2006 -0500, you wrote:
>Dear SAS-L-ers,
>
>This is it! This is _YOUR_ chance to help make SAS-L history! You can
>do so by joining me in making this the longest thread that has ever
>existed in the storied history of this happy medium that we call:
>SAS-L. In doing so, you will not only help to make SAS-L history, you
>will also be an integral part of it!
>
>All that you have to do is contribute a single SAS tip to this thread.
>It doesn't necessarily have to be something profound; just solid and
>accurate.
>
>This opportunity is good for prolific posters, for occasional posters,
>for once-in-a-blue-moon posters, and especially for lurkers who have
>never posted before. Everybody on this list knows _SOMETHING_ about
>SAS. So, pick your best tip and post it--even if you are sure that
>others already know it. It could be that somebody doesn't know it, or
>that you refresh somebody's memory.
>
>So, here is how this will work. You simply write: "Did you know that:
>" and follow it up with your brief SAS tip. It couldn't be any easier,
>could it?
>
>Okay, so I'll get the ball rolling. Here goes:
>
>Did you know that: you can increase the page size of SAS indexes when
>they are first created by using the IBUFSIZE option? The default
>IBUFSIZE is 4096 bytes. You can change that setting by specifying
>IBUFSIZE=xxxxx. The author of a recent book on SAS indexes recommends
>setting IBUFSIZE=32767 (the maximum) on all SAS platforms except for
>z/OS, where he recommends setting it to 27648. (However, he presents
>the caution that this has not been rigorously tested on SAS data sets
of
>varying sizes on _ALL_ of the operating systems that SAS is run on.
So,
>your mileage may vary).
>
>Hey, that was easy. Now, it is your turn!
>
>If you need more incentive to participate, then consider these
inspiring
>words:
>
> From this day to the ending of the world,
>But we in it shall be remember'd;
>We few, we happy few, we band of brothers (and sisters);
>For he (or she) to-day that posts with me Shall be my brother (or
>sister);
>
>I'll bet that did it. Okay, now get posting!
>
>
>I hope that this suggestion proves helpful now, and in the future!
>
>Of course, all of these opinions and insights are my own, and do not
>reflect those of my organization or my associates. All SAS code and/or
>methodologies specified in this posting are for illustrative purposes
>only and no warranty is stated or implied as to their accuracy or
>applicability. People deciding to use information in this posting do so
>at their own risk.
>
>+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>Michael A. Raithel
>"The man who wrote the book on performance"
>E-mail: MichaelRaithel@westat.com
>
>Author: Tuning SAS Applications in the MVS Environment
>
>Author: Tuning SAS Applications in the OS/390 and z/OS Environments,
>Second Edition
>http://www.sas.com/apps/pubscat/bookdetails.jsp?catid=1&pc=58172
>
>Author: The Complete Guide to SAS Indexes
>http://www.sas.com/apps/pubscat/bookdetails.jsp?catid=1&pc=60409
>
>+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>Be great in act, as you have been in thought. - William Shakespeare
>+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Michael L. Davis
Ambler PA
E-Mail: michael.davis@alumni.duke.edu
----------------------------------------------------------------------------------------------
This message contains confidential information intended only for the use of the addressee(s).
If you are not the addressee, or the person responsible for delivering it to the addressee, you
are hereby notified that reading, disseminating, distributing or copying this message is strictly
prohibited. If you have received this message by mistake, please notify us, by replying to the
sender, and delete the original message immediately thereafter. Thank you.
|