5月 212010
 
Q: I need information regarding S2K (SAS System 2000).
A: Find it here support.sas.com/documentation/onlinedoc/system2000.

I realize that the person who submitted this comment may never see it here. The comment did not include an e-mail address or contact information so this blog is my only option and I want to try to help. So I hope that somehow this posting finds the appropriate user and he find the information he needs.

Hint: If you want a response, please include contact information in your comment or use the feedback form that requires an e-mail address.
5月 202010
 
Now that my blogging partner Cat Truxillo has identified herself, it's my turn to come out of hiding. I'm Mike Kalt, and I'll be telling you what I know about Base SAS and SAS/GRAPH, and providing more gossip about life on the road and what's going on in Cary. By the way, although Cat and I are both based in Cary, about half of the SAS instructors in the United States are based in our regional offices, so if you are taking a course in San Francisco, your instructor probably didn't fly out from Cary.

You old-timers out there may remember me from SAS Tech Support, where I provided SAS/GRAPH support from 1981 through 2003, before moving across the street to Education. The photo at the right was taken in 1983 at at SUGI (what we used to call SAS Global Forum), and it shows the toll that Tech Support has taken on my hairline over the years.

Although I teach several courses covering Base SAS, I'm still a SAS/GRAPH geek at heart, so you'll be getting a good dose of graphics features, including one in my next post.

If you have any questions about topics relating to Base SAS and SAS/GRAPH, ideas for future postings, or questions about University of Michigan football, just drop me a line.
5月 192010
 

data icd;
infile 'http://within.dhfs.state.wi.us/helpfiles/dlookupbrowse.html' truncover;
input star code $5. description $100.;
if anyalpha(substr(code, 5, 1))=1 then addon=substr(code, 5, 1);
run;

data icd1;
set icd nobs=nobs;
code=compress(code, addon);
description=trim(left(addon)) || trim(left(description));
description=propcase(description);
drop addon star;
if _n_=nobs or _n_= (nobs-1) then delete;
run;



5月 192010
 

1. Data import: input/format/label/keep+array
2. GTL can definitely be reused;

data top12;
input rank company & $20. country & $15. revenue comma12.2 netincome comma12.2 employee;
personearn=(netincome/employee)*1000000;
format revenue dollar12.2 netincome dollar12.2 personearn dollar12.;
label personearn= "Net income per employee" revenue="Revenue($M)" rank="Global rank" netincome="Net income($M)" employee="Employee number" ;
keep rank company personearn statname stat;
array sname{4} rank revenue netincome employee;
do i=1 to dim(sname);
StatName=vlabel(sname{i});
Stat=sname{i};
if i>1 then personearn=.;
output;
end;
datalines;
1 Johnson & Johnson United States 63,747.00 12,949.00 118700
2 Pfizer United States 48,296.00 8,104.00 81800
3 GlaxoSmithKline United Kingdom 44,654.00 8,438.60 99003
4 Roche Switzerland 44,267.50 8,288.10 80080
5 Sanofi-Aventis France 42,179.00 5,636.70 98213
6 Novartis Switzerland 41,459.00 8,195.00 96717
7 AstraZeneca United Kingdom 31,601.00 6,101.00 65000
8 Abbott Laboratories United States 29,527.60 4,880.70 68838
9 Merck United States 23,850.30 7,808.40 55200
10 Wyeth United States 22,833.90 4,417.80 47426
11 Bristol-Myers Squibb United States 21,366.00 5,247.00 35000
12 Eli Lilly United States 20,378.00 -2,071.90 40500
;
run;
proc template;
define statgraph bartable;
begingraph/designwidth=600px designheight=400px;
entrytitle "Top 12 pharms as of July 2009";
entryfootnote halign=right "Sources: http://en.wikipedia.org/wiki/List_of_pharmaceutical_companies" ;
layout lattice/rows=2 rowgutter=0 rowweights=(.75 .25);
layout overlay / xaxisopts=(display=(tickvalues))
yaxisopts=(griddisplay=on linearopts=(tickvalueformat=(extractscale=true)) );
barchart x=company y=personearn / barlabel=true barlabelformat=dollar12. fillattrs=graphdata1
skin=satin outlineattrs=(color=black);
endlayout;
layout overlay / xaxisopts=(type=discrete display=none) walldisplay=(fill);
blockplot x=company block=stat / class=statName display=(outline values label) valuehalign=right repeatedvalues=true labelattrs=(size=7pt);
endlayout;
endlayout;
endgraph;
end;
run;

proc template;
define Style bartablestyle;
parent = styles.blockprint;
style GraphFonts from GraphFonts
"Fonts used in graph styles" /
'GraphTitleFont' = (", ",10pt,bold)
'GraphLabelFont' = (", ",8pt)
'GraphValueFont' = (", ",7pt)
'GraphDataFont' = (", ",7pt);
end;
run;

options nodate nonumber;
title;

ods listing close;
ods html file="bartable.html" style=bartablestyle image_dpi=300;

ods graphics /reset imagename='BarTable' imagefmt=gif;
proc sgrender data=top12 template=bartable;
run;

ods html close;
ods listing;


5月 192010
 


Here is how to direct the SAS LOG file and or SAS Output  to a seperate file. Approach 1: Using Display Manager Statements; filename log 'C:\temp\logfile.log'; filename out 'C:\temp\output.lst'; *Select only male students and age less than 16; proc sql; create table males as select age, height, weight from sashelp.class where sex='M' and age lt 16  order by age; quit; *Get the descriptive statistics for height variable by age; proc means data=males ; by age; var height; output out=htstats mean=mean n=n std=sd median=med min=min max=max; run; DM 'OUT;FILE OUT REP;'; DM 'LOG;FILE LOG REP;'; Information about Display Manager Commands: DEXPORT and DIMPORT: DISPLAY MANAGER commands used to IMPORT and EXPORT the Tab delimited (Excel and .CSV) files; SAS Display Manager Commands Approach 2: Using Proc PRINTTO procedure; Refer:  How to save the log file or what is PROC PRINTTO procedure  ('’)

[[ This is a content summary only. Visit my website for full links, other content, and more! ]]
 Posted by at 12:57 上午
5月 192010
 


Here is how to direct the SAS LOG file and or SAS Output  to a seperate file. Approach 1: Using Display Manager Statements; filename log 'C:\temp\logfile.log'; filename out 'C:\temp\output.lst'; *Select only male students and age less than 16; proc sql; create table males as select age, height, weight from sashelp.class where sex='M' and age lt 16  order by age; quit; *Get the descriptive statistics for height variable by age; proc means data=males ; by age; var height; output out=htstats mean=mean n=n std=sd median=med min=min max=max; run; DM 'OUT;FILE OUT REP;'; DM 'LOG;FILE LOG REP;'; Information about Display Manager Commands: DEXPORT and DIMPORT: DISPLAY MANAGER commands used to IMPORT and EXPORT the Tab delimited (Excel and .CSV) files; SAS Display Manager Commands Approach 2: Using Proc PRINTTO procedure; Refer:  How to save the log file or what is PROC PRINTTO procedure  ('’)

[[ This is a content summary only. Visit my website for full links, other content, and more! ]]
 Posted by at 12:57 上午
5月 192010
 

data two;
infile 'https://www.cms.gov/HCPCSReleaseCodeSets/Downloads/INDEX2009.pdf' truncover;
input @1 code $5.
@7 description $200.;
if code='Page ' then delete;
if code=' ' then delete;
run;

proc sort data=two; by code;run;
proc transpose data=two out=four;
by code;
var description;
run;

data five (keep=description code);
set four;
sp=' ';
description=trim(left(col1)) || sp || trim(left(col2)) || sp || trim(left(col3))|| sp || trim(left(col4))|| sp || trim(left(col5)) ;
run;




5月 172010
 
Larry LaRusso is the Editor of SAS Training Report. His editorial letter from the May issue was so good, I thought I would share it with you. Enjoy!

If you had to choose the Simon Cowell of the mid-1900s, you'd be hard-pressed to pick someone more qualified than James Rae Denny. From 1946 until 1957, Denny was the primary talent evaluator and general manager for the Grand Ole Opry, turning the popular music house from a "dance barn" into a showcase for future musical superstars. Shortly after his death in 1963, Denny was inducted into the Country Music Hall of Fame for his uncanny ability to "discover legends" and his many contributions to the music industry.

You have to imagine, then, that Denny was pretty confident when he shared this brutally honest assessment with a teenager who had just come off the Opry stage to polite applause on Oct. 2, 1954: "You ain't going nowhere, son," Denny told him. "You ought to go back to driving a truck."

Fortunately for the music world, Denny's advice didn't discourage that performer. Vowing never to set foot on the Opry stage again, a young Elvis Presley did return to his home in Memphis - not to resume his job delivering office supplies, but to launch one of the most successful music careers in modern history.

So, how did Denny miss Elvis's rising star? Most seasoned forecasters would argue it was simply proof of a saying often attributed to baseball-player-turned-"philosopher" Yogi Berra: "It's tough to make predictions, especially about the future."

Tough? Yes. But not impossible. To help organizations improve their forecasting endeavors, SAS is hosting the fifth annual business forecasting conference, F2010. This year's gathering, to be held June 7-8 at SAS world headquarters in Cary, NC, will shine a light on getting the right information, and using the best methods, to streamline your forecasts. The conference will feature four keynote addresses and a dozen session talks covering practical applications, methods, tools and successful case studies in business forecasting. Pre (June 6) and post-conference (June 9-11) training extend the opportunities for learning.

If you're doing forecasting of any kind for your organization, you won't want to miss this excellent learning opportunity.

I hope you enjoy this month’s issue of SAS Training Report. And, as the King liked to say, for reading, I…thank you, thank you very much!

Larry LaRusso
Editor, SAS Training Report
5月 152010
 
So here we are trying to put our best feet forward with this group blog and be serious about the topics on the minds of marketers today. As part of that, we thought we should all have pictures for our profile that are somewhat uniform and vaguely professional. We scheduled with one of our photographers and violá! got new profile pictures for Deb, Justin and myself while we were together at SAS Global Forum in Seattle. Our other contributors already had suitable photos, so the three if us needed to get cracking.

And it’s not clear whether it was the thousands of terrific SAS Users and Executives in one place at one time, the cool Twitter wall, the great coffee, the views of Puget Sound, the lush greenery, or just the general je-ne-sais-coolness of Seattle, or what. But it brought out lots of positive emotions, including our silly side – which were caught in a few candid shots. So we thought we’d share them for your enjoyment.





We got a good chuckle imagining using these as our profile pictures, or occasionally swapping them out. Along the way, we have gotten some feedback that we should not be afraid to show our fun side. So take a look and let us know what you think – should we be all serious all the time or should we mix it up?

Enterprise Search Summit

 enterprise search  Enterprise Search Summit已关闭评论
5月 152010
 
My colleagues, Kathy Lange and Cailyn Clark were both at Enterprise Search Summit earlier this week in New York City to attend the conference as well as host our customer, The Tribune Company. The Summit is a highly intense, in-depth, two-day conference that covers how to develop, implement and enhance cutting-edge internal search capabilities, so Kathy and Cailyn were also there to support SAS' recent news on Text Analytics.

This year the emphasis for Enterprise Search Summit 2010 is how enterprise search enables Information Access. Search can no longer be viewed as a stand-alone application. It's so timely because Kathy & Cailyn sponsored the SAS booth at the conference to highlight and share SAS Enterprise Content Categorization, which applies natural language processing and advanced linguistic techniques to automatically categorize multilingual content. It parses and analyzes content for entities, facts and events to create metadata, develop taxonomies, and generate category rules and concept definitions to apply to large volumes of documents to trigger business processes.

We were fortunate to have Keith DeWeese, Taxonomy and Automated Indexing Project Manager at Chicago Tribune join us as well. Keith manages the Tribune Company's controlled vocabularies used for automated news categorization and indexing. Prior to working at the Tribune, he was employed by Dow-Jones, the Federal Reserve, Encyclopedia Britannica, and Columbia College, Chicago. At the conference he spoke on ontology and "controlled vocabularies." Keith also shared some headlines, proving you need to "know" your content. For example, "Obama Earmarks Funding for Pet Causes" is not an article about pets! If you are interested in learning more about the conference you can following the Tweets from the Summit #ESS10. You can also review some of the presentations from the Summit at The Noisy Channel .