1 / 19

MASUG

MASUG. December 5, 2005. Agenda. Announcements Tips & Tricks Presentation: Working Smarter, Not Harder with DDE: Did I Really Spend All That Time Formatting My Report in Excel? Giveaways Next Meeting. Announcements.

calixte
Download Presentation

MASUG

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. MASUG December 5, 2005

  2. Agenda • Announcements • Tips & Tricks • Presentation: • Working Smarter, Not Harder with DDE: Did I Really Spend All That Time Formatting My Report in Excel? • Giveaways • Next Meeting

  3. Announcements • SAS Training Center at U of M – if interested in registering, need to do so approx. 3 weeks prior to course date. • SUGI 31 – San Francisco March 26-29, 2006

  4. Tips & Tricks • Using Macro Variables for Automation – Michael Bates

  5. When Proc Print Isn’t Enough MASUG Tips & Tricks Dec 5, 2005 Walt Smith FedEx

  6. When you want to send a simple report • Proc print handles simple tables quite well • The simple output is just a bit plain (as it should be) • SAS 9 allows style changes that are easily accessible • No need for proc template and all that scary stuff!

  7. The plain example title1 "Ground History Update"; proc print label; var packages netrev adv adr yld wpp; by notsorted svctxt; id date; run;

  8. The result:

  9. Now add some style: ods html file="Ground_Update.html" style=styles.sasweb; options missing=' '; title1 "Ground History Update"; proc print label style( header ) = { background=cxadbade foreground=black } ; var packages netrev; var adv adr / style( data ) = { background=cxffbb33 foreground=black } ; var yld wpp ; by notsorted svctxt; id date / style( data ) = { background=cxadbade foreground=black } style( header ) = { background=cxadbade foreground=black } ; run; ods html close; filename mail email "wjsmith1@fedex.com" subject="Monthly Update"; data _null_; file mail; put "!EM_ATTACH!('Ground_Update.html')"; run;

  10. The result:

  11. Tips & Tricks • Getting variable names into a macro variable: proc contents data = my_dataset noprint out = my_outset; run; proc sql noprint; select distinct name into :varnames separated by ‘ ‘ from my_outset order by varnum; quit;

  12. Tips & Tricks • Using only some variables: proc sql noprint; select distinct name into :varnames3 separated by ' and ' from my_outset where varnum in (1, 2, 4) order by varnum; quit;

  13. Tips & Tricks • Using only some variables cont’d: %put &varnames3; id and gender and j_class

  14. Tips & Tricks • Creating an index PROC SQL; CREATE INDEX CATEGORY ON libref.MOVIES; QUIT;

  15. Tips & Tricks • Creating a compound index PROC SQL; CREATE INDEX CATRATE ON libref.MOVIES (CATEGORY, RATING); QUIT;

  16. Tips & Tricks • Removing an index * PROC SQL; DROP INDEX CATRATE FROM libref.MOVIES; QUIT; * Previous 3 slides adapted from Sample 1557:Exploring the World of Indexes by Kirk Paul Lafler on support.sas.com

  17. Our Main Presentation

  18. Free Stuff

  19. Next Meeting • Tentative location – FedEx • Would like to invite SAS speaker • Topics of interest? • Will be back to Thursday 3-5pm • Other suggestions?

More Related