Date: Wed, 21 Jul 2010 15:07:48 -0500
Reply-To: "Data _null_;" <iebupdte@GMAIL.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: "Data _null_;" <iebupdte@GMAIL.COM>
Subject: Re: summary statistics of all variables
Content-Type: text/plain; charset=ISO-8859-1
Can "we", or someone who knows more that I do about it than I do,
write some PROC TEMPLATE code to "hook-up" to PROC MEANS and ODS
OUTPUT to get the data set want?
I've seen example were the output is modified for other destinations.
On 7/21/10, Ya Huang <firstname.lastname@example.org> wrote:
> "The only issue is that the data set is as linear as any made-for-TV movie."
> that is exactly why _null_, another Mike and me are trying to avoid.
> We all trying to work out a solution that a vertical dataset can be
> created without doing many other steps, such as transpose etc.
> On Wed, 21 Jul 2010 14:45:46 -0400, Michael Raithel
> <michaelraithel@WESTAT.COM> wrote:
> >Dear SAS-L-ers,
> >Ya posted the following:
> >> I'e been thinking similarly. But instead of parsing the text file,
> >> why don't out a file that can be read by SAS directly? So, I tried
> >> ods xml:
> >> options nodate nonumber;
> >> ods xml file="c:\temp\junk.xml" style=minimal;
> >> proc means data=sashelp.class nmiss n mean median max min;
> >> var _numeric_;
> >> title;
> >> run;
> >> ods xml close;
> >> libname stat xml "c:\temp\junk.xml";
> >> data stat;
> >> set xx.junk
> >> run;
> >> Unfortunately, the xml file is a bit too complicate to be read
> >> by xml engine directly without using XMLMAP thingy.
> >> I also tried tagsets.excelxp, hoping to get the excel file so I can
> >> read in with proc import or excel libname engine. BUT, to my surprise,
> >> the layout is different! It's the output dataset layout.
> >Ya, if all you are trying to do is to capture the output of PROC MEANS in
> a neat, clean, easy-to-use SAS data set, consider leaning on the Output
> Delivery System and having it do all of the work:
> >ods output "Summary statistics" = freqdata;
> >proc means data=sashelp.class nmiss n mean median max min; var _numeric_;
> title; run;
> >ods output close;
> >The code, above, will create the FREQDATA SAS data set in your work SAS
> data library with information from the execution of PROC MEANS. The only
> issue is that the data set is as linear as any made-for-TV movie. But, at
> least the information is in a SAS data set, and can likely be parsed into a
> form that can be worked with... and you don't have to worry about using the
> SAS XML Mapper.
> >Ya, best of luck in all your SAS endeavors!
> >I hope that this suggestion proves helpful now, and in the future!
> >Of course, all of these opinions and insights are my own, and do not
> reflect those of my organization or my associates. All SAS code and/or
> methodologies specified in this posting are for illustrative purposes only
> and no warranty is stated or implied as to their accuracy or applicability.
> People deciding to use information in this posting do so at their own risk.
> >Michael A. Raithel
> >"The man who wrote the book on performance"
> >E-mail: MichaelRaithel@westat.com
> >Author: Tuning SAS Applications in the MVS Environment
> >Author: Tuning SAS Applications in the OS/390 and z/OS Environments,
> Second Edition
> >Author: The Complete Guide to SAS Indexes
> >In theory there is no difference between theory and practice. In practice
> there is. - Yogi Berra