Download - Chance to make SAS-L History!
![Page 1: Chance to make SAS-L History!](https://reader034.vdocument.in/reader034/viewer/2022051620/56812d15550346895d91fc07/html5/thumbnails/1.jpg)
AST Analytics
December 17, 2010
Chance to make SAS-L History!
![Page 2: Chance to make SAS-L History!](https://reader034.vdocument.in/reader034/viewer/2022051620/56812d15550346895d91fc07/html5/thumbnails/2.jpg)
AST Analytics
December 17, 2010
where it is
some of my favorite tips
Chance to make SAS-L history (CTMSLH)
what it is
![Page 3: Chance to make SAS-L History!](https://reader034.vdocument.in/reader034/viewer/2022051620/56812d15550346895d91fc07/html5/thumbnails/3.jpg)
AST Analytics
December 17, 2010
What CTMSLH is
Join me in making this the longest thread that has ever existed on SAS-L
Pick your best tip and post it
![Page 4: Chance to make SAS-L History!](https://reader034.vdocument.in/reader034/viewer/2022051620/56812d15550346895d91fc07/html5/thumbnails/4.jpg)
AST Analytics
December 17, 2010
What CTMSLH is
![Page 5: Chance to make SAS-L History!](https://reader034.vdocument.in/reader034/viewer/2022051620/56812d15550346895d91fc07/html5/thumbnails/5.jpg)
AST Analytics
December 17, 2010
Where you can find CTMSLH
http://www.sascommunity.org/wiki/Index_to_SAS-L_Chance_to_Make_SAS-L_History_Posts
www.torsas.ca
![Page 6: Chance to make SAS-L History!](https://reader034.vdocument.in/reader034/viewer/2022051620/56812d15550346895d91fc07/html5/thumbnails/6.jpg)
AST Analytics
December 17, 2010
Some of my favorite tips
Did you know that you can use data step options in proc sql?
For example:
proc sql noprint; create table want as select * from sashelp.class (drop=height weight);quit;
![Page 7: Chance to make SAS-L History!](https://reader034.vdocument.in/reader034/viewer/2022051620/56812d15550346895d91fc07/html5/thumbnails/7.jpg)
AST Analytics
December 17, 2010
Some of my favorite tips
Did you know that the F1 key is your friend?
For example:
In the enhanced editor, if you highlight a procedure name, a function name, or a keyword, then press the F1 key, you get immediate access to the documentation pertaining (or relevant) to that topic
![Page 8: Chance to make SAS-L History!](https://reader034.vdocument.in/reader034/viewer/2022051620/56812d15550346895d91fc07/html5/thumbnails/8.jpg)
AST Analytics
December 17, 2010
Some of my favorite tips
Did you know that ctrl-shift-w trims all the unwanted whitespace from the ends of your code?
i.e., if you highlight some lines (or your entire program by entering ctrl-a), simultaneously pressing ctrl-shift-w trims any white space at the ends of the lines
![Page 9: Chance to make SAS-L History!](https://reader034.vdocument.in/reader034/viewer/2022051620/56812d15550346895d91fc07/html5/thumbnails/9.jpg)
AST Analytics
December 17, 2010
Some of my favorite tips
Did you know that for any procedure (or data step) that ends with a run (rather than quit) statement, changing the ‘run;’ to ‘run cancel;’ will result in SAS compiling the step for syntax check but without executing it?
![Page 10: Chance to make SAS-L History!](https://reader034.vdocument.in/reader034/viewer/2022051620/56812d15550346895d91fc07/html5/thumbnails/10.jpg)
AST Analytics
December 17, 2010
Some of my favorite tips
Did you know that there is an easy way to keep the last non-missing value of a sort group?For example, given the following data:
data notflat; input id math verbal comp; cards;8188 560 . . 8188 . 540 . 8188 . . 12 8189 660 . . 8189 . 740 13 8189 . . . ;
![Page 11: Chance to make SAS-L History!](https://reader034.vdocument.in/reader034/viewer/2022051620/56812d15550346895d91fc07/html5/thumbnails/11.jpg)
AST Analytics
December 17, 2010
Some of my favorite tips
This code will result in the following dataset:
data flat; update notflat(obs=0) notflat; by id;run;
result:8188 560 540 128189 660 740 13
![Page 12: Chance to make SAS-L History!](https://reader034.vdocument.in/reader034/viewer/2022051620/56812d15550346895d91fc07/html5/thumbnails/12.jpg)
AST Analytics
December 17, 2010
Some of my favorite tips
Did you know about filename clipbrd?For example (try this back at work):
run this: filename _temp_ clipbrd; data _null_; set sashelp.class; file _temp_; put (_all_) (=);run;filename _temp_ clear;
then try <ctrl-v> in your editor, Excel or Word
![Page 13: Chance to make SAS-L History!](https://reader034.vdocument.in/reader034/viewer/2022051620/56812d15550346895d91fc07/html5/thumbnails/13.jpg)
AST Analytics
December 17, 2010
Some of my favorite tips
Did you know that SAS has an undocumented proc for quickly deleting files?
For example, running the following code:
proc delete data=one two three;run;
will delete the files work.one, work.two and work.three
![Page 14: Chance to make SAS-L History!](https://reader034.vdocument.in/reader034/viewer/2022051620/56812d15550346895d91fc07/html5/thumbnails/14.jpg)
AST Analytics
December 17, 2010
Some of my favorite tips
Did you know that when running a proc sort on a data file that already has a sortedby flag set for the sort order of interest, the sort won't work unless you include the FORCE option? ?
![Page 15: Chance to make SAS-L History!](https://reader034.vdocument.in/reader034/viewer/2022051620/56812d15550346895d91fc07/html5/thumbnails/15.jpg)
AST Analytics
December 17, 2010
Some of my favorite tips
Did you know that there are numerous pre-programmed shortcuts you can use in SAS?
There are and they’re documented at: http://xrl.us/2b4g
![Page 16: Chance to make SAS-L History!](https://reader034.vdocument.in/reader034/viewer/2022051620/56812d15550346895d91fc07/html5/thumbnails/16.jpg)
AST Analytics
December 17, 2010
Chance to make SAS-L History Index