LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (July 2005, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Wed, 13 Jul 2005 08:39:48 -0700
Reply-To:     Jairaj Sathyanarayana <jairajs@gmail.com>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Jairaj Sathyanarayana <jairajs@GMAIL.COM>
Subject:      Re: Create an Excel Table in SAS
Comments: To: Xu Libin <Libin.Xu@irs.gov>
In-Reply-To:  <18B617A93E45664485675080816470B807D96A0B@NCT0010MB10>
Content-Type: text/plain; charset=ISO-8859-1

Hi Libin, When you use the out= option in proc freq with more than one table request, the dataset output will correspond ONLY to the last table request in the tables statement. For what you are trying to do, you should consider using the ODS datasets from the proc freq.

proc freq data=in; tables prepcode*(old young)/out=age; ods output crosstabfreqs=xtf1 crosstabfreqs2=xtf2; run;

The datasets xtf1 & xtf2 will have the data you'll want to export (after dropping anything you don't need).

Hope this helps.

Jairaj

On 7/13/05, Xu Libin <Libin.Xu@irs.gov> wrote: > Dear Listers, > I notice the following syntax create an Excel file with only the > frequency distribution of the last variable. In this case, only young is > listed. > > proc freq data=in; > tables prepcode*(old young)/out=age; > run; > proc export outfile="i:\age.csv" dbms=csv data=age replace; > run; > > Do I have to run separate freq on each var and generate one file for each > var? Thanks you in advance for your advice. > > Libin >


Back to: Top of message | Previous page | Main SAS-L page