160 likes | 279 Views
Chance to make SAS-L History!. Chance to make SAS-L history (CTMSLH). what it is. where it is some of my favorite tips. 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. What CTMSLH is. Where you can find CTMSLH.
E N D
Chance to make SAS-L history (CTMSLH) what it is where it is some of my favorite tips
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
Where you can find CTMSLH www.torsas.ca http://www.sascommunity.org/wiki/Index_to_SAS-L_Chance_to_Make_SAS-L_History_Posts
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;
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
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
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?
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 . . . ;
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 12 8189 660 740 13
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
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
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??
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