masug
Download
Skip this Video
Download Presentation
MASUG

Loading in 2 Seconds...

play fullscreen
1 / 19

MASUG - PowerPoint PPT Presentation


  • 161 Views
  • Uploaded on

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.

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about 'MASUG' - calixte


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.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
masug

MASUG

December 5, 2005

agenda
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
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
tips tricks
Tips & Tricks
  • Using Macro Variables for Automation – Michael Bates
when proc print isn t enough

When Proc Print Isn’t Enough

MASUG Tips & Tricks

Dec 5, 2005

Walt Smith

FedEx

when you want to send a simple report
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!
the plain example
The plain example

title1 "Ground History Update";

proc print label;

var packages netrev adv adr yld wpp;

by notsorted svctxt;

id date;

run;

now add some style
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 "[email protected]" subject="Monthly Update";

data _null_;

file mail;

put "!EM_ATTACH!(\'Ground_Update.html\')";

run;

tips tricks11
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;

tips tricks12
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;

tips tricks13
Tips & Tricks
  • Using only some variables cont’d:

%put &varnames3;

id and gender and j_class

tips tricks14
Tips & Tricks
  • Creating an index

PROC SQL;

CREATE INDEX CATEGORY ON libref.MOVIES;

QUIT;

tips tricks15
Tips & Tricks
  • Creating a compound index

PROC SQL;

CREATE INDEX CATRATE

ON libref.MOVIES (CATEGORY, RATING);

QUIT;

tips tricks16
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

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