<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic choose all variables _numeric_ except for variable period in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/choose-all-variables-numeric-except-for-variable-period/m-p/19502#M3029</link>
    <description>Hi All,&lt;BR /&gt;
&lt;BR /&gt;
In my data step my period variable is numeric in format yymmdd8. My question is I want to do a proc summary such that:&lt;BR /&gt;
&lt;BR /&gt;
proc summary data=mydata nvar;&lt;BR /&gt;
class period;&lt;BR /&gt;
&lt;B&gt;var _numeric_ (except for period)&lt;/B&gt;;&lt;BR /&gt;
output out=mysummary sum=;&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
Any thoughts?&lt;BR /&gt;
&lt;BR /&gt;
Thanks,&lt;BR /&gt;
Sachin</description>
    <pubDate>Thu, 23 Jun 2011 03:38:40 GMT</pubDate>
    <dc:creator>SachinRuk</dc:creator>
    <dc:date>2011-06-23T03:38:40Z</dc:date>
    <item>
      <title>choose all variables _numeric_ except for variable period</title>
      <link>https://communities.sas.com/t5/SAS-Programming/choose-all-variables-numeric-except-for-variable-period/m-p/19502#M3029</link>
      <description>Hi All,&lt;BR /&gt;
&lt;BR /&gt;
In my data step my period variable is numeric in format yymmdd8. My question is I want to do a proc summary such that:&lt;BR /&gt;
&lt;BR /&gt;
proc summary data=mydata nvar;&lt;BR /&gt;
class period;&lt;BR /&gt;
&lt;B&gt;var _numeric_ (except for period)&lt;/B&gt;;&lt;BR /&gt;
output out=mysummary sum=;&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
Any thoughts?&lt;BR /&gt;
&lt;BR /&gt;
Thanks,&lt;BR /&gt;
Sachin</description>
      <pubDate>Thu, 23 Jun 2011 03:38:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/choose-all-variables-numeric-except-for-variable-period/m-p/19502#M3029</guid>
      <dc:creator>SachinRuk</dc:creator>
      <dc:date>2011-06-23T03:38:40Z</dc:date>
    </item>
    <item>
      <title>Re: choose all variables _numeric_ except for variable period</title>
      <link>https://communities.sas.com/t5/SAS-Programming/choose-all-variables-numeric-except-for-variable-period/m-p/19503#M3030</link>
      <description>This comes close, although analysis is done on the CLASS variable it is eliminated from the data set.  There is no NVAR option (that I know of).&lt;BR /&gt;
[pre]proc summary data=sashelp.class;* nvar;&lt;BR /&gt;
class age;&lt;BR /&gt;
var _numeric_;&lt;BR /&gt;
output out=mysummary(drop=age_:)&lt;BR /&gt;
       sum=/autoname;&lt;BR /&gt;
run;&lt;BR /&gt;
proc print data=mysummary;&lt;BR /&gt;
   run;[/pre]</description>
      <pubDate>Thu, 23 Jun 2011 04:53:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/choose-all-variables-numeric-except-for-variable-period/m-p/19503#M3030</guid>
      <dc:creator>ArtC</dc:creator>
      <dc:date>2011-06-23T04:53:29Z</dc:date>
    </item>
    <item>
      <title>Re: choose all variables _numeric_ except for variable period</title>
      <link>https://communities.sas.com/t5/SAS-Programming/choose-all-variables-numeric-except-for-variable-period/m-p/19504#M3031</link>
      <description>Appreciate the response.&lt;BR /&gt;
&lt;BR /&gt;
and sorry that was meant to be nway. What does sum=/autoname do?&lt;BR /&gt;
&lt;BR /&gt;
Thanks,&lt;BR /&gt;
Sachin</description>
      <pubDate>Thu, 23 Jun 2011 05:51:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/choose-all-variables-numeric-except-for-variable-period/m-p/19504#M3031</guid>
      <dc:creator>SachinRuk</dc:creator>
      <dc:date>2011-06-23T05:51:41Z</dc:date>
    </item>
    <item>
      <title>Re: choose all variables _numeric_ except for variable period</title>
      <link>https://communities.sas.com/t5/SAS-Programming/choose-all-variables-numeric-except-for-variable-period/m-p/19505#M3032</link>
      <description>and the drop=age_: while Im at it. Not sure what it does specifically.&lt;BR /&gt;
&lt;BR /&gt;
Thanks again</description>
      <pubDate>Thu, 23 Jun 2011 05:53:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/choose-all-variables-numeric-except-for-variable-period/m-p/19505#M3032</guid>
      <dc:creator>SachinRuk</dc:creator>
      <dc:date>2011-06-23T05:53:13Z</dc:date>
    </item>
    <item>
      <title>Re: choose all variables _numeric_ except for variable period</title>
      <link>https://communities.sas.com/t5/SAS-Programming/choose-all-variables-numeric-except-for-variable-period/m-p/19506#M3033</link>
      <description>The autoname option allows MEANS/SUMMARY to name the output variables - very handy for an automated session.  Without it you MUST name the new variables if there is more than one analysis variable.  The resultant naming convention is always analysisvar_statistic (such as AGE_SUM).  In our case we want to drop all statistics (in the example there is only SUM) that are associated with AGE.  This list of variables can be abbreviated by specifying AGE_:  (the colon essentially says all variables that start with AGE_).</description>
      <pubDate>Thu, 23 Jun 2011 06:01:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/choose-all-variables-numeric-except-for-variable-period/m-p/19506#M3033</guid>
      <dc:creator>ArtC</dc:creator>
      <dc:date>2011-06-23T06:01:45Z</dc:date>
    </item>
    <item>
      <title>Re: choose all variables _numeric_ except for variable period</title>
      <link>https://communities.sas.com/t5/SAS-Programming/choose-all-variables-numeric-except-for-variable-period/m-p/19507#M3034</link>
      <description>Then chang to use proc means;&lt;BR /&gt;
[pre]&lt;BR /&gt;
&lt;BR /&gt;
proc format;&lt;BR /&gt;
 value fmt&lt;BR /&gt;
  low-100 = 'thin'&lt;BR /&gt;
  101 - high='fat'&lt;BR /&gt;
  ;&lt;BR /&gt;
run;&lt;BR /&gt;
proc means data=sashelp.class nway noprint;&lt;BR /&gt;
class weight;&lt;BR /&gt;
output out=mysummary sum= /autoname;&lt;BR /&gt;
format weight fmt.;&lt;BR /&gt;
run;&lt;BR /&gt;
[/pre]&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Ksharp

Message was edited by: Ksharp</description>
      <pubDate>Thu, 23 Jun 2011 10:16:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/choose-all-variables-numeric-except-for-variable-period/m-p/19507#M3034</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2011-06-23T10:16:10Z</dc:date>
    </item>
    <item>
      <title>Re: choose all variables _numeric_ except for variable period</title>
      <link>https://communities.sas.com/t5/SAS-Programming/choose-all-variables-numeric-except-for-variable-period/m-p/19508#M3035</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; If your original is doing most of what you want all you actually want to do is ignore the variable then drop it from analysis:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc summary data=mydata (drop=period) nvar;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Jun 2011 16:55:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/choose-all-variables-numeric-except-for-variable-period/m-p/19508#M3035</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2011-06-23T16:55:32Z</dc:date>
    </item>
    <item>
      <title>Re: choose all variables _numeric_ except for variable period</title>
      <link>https://communities.sas.com/t5/SAS-Programming/choose-all-variables-numeric-except-for-variable-period/m-p/19509#M3036</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Actually, since you are using period as your class variable, PROC SUMMARY will essentially ignore "period" as one of the _numeric_ variables and will issue the following:&lt;/P&gt;&lt;P&gt;WARNING: Variable period already exists on file WORK.MYSUMMARY.&lt;/P&gt;&lt;P&gt;WARNING: The duplicate variables will not be included in the output data set of the output statement number 1.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Jun 2011 15:14:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/choose-all-variables-numeric-except-for-variable-period/m-p/19509#M3036</guid>
      <dc:creator>advoss</dc:creator>
      <dc:date>2011-06-24T15:14:38Z</dc:date>
    </item>
  </channel>
</rss>

