<?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 Re: PROC SUMMARY not creating new variable names in OUTPUT statement in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/PROC-SUMMARY-not-creating-new-variable-names-in-OUTPUT-statement/m-p/101415#M28470</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I tried with your code and it is working fine....just check the log if it giving any error or can you post some sample data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data DQ_SET;&lt;/P&gt;&lt;P&gt;input deal_name $ asof_date :date9. field_val;&lt;/P&gt;&lt;P&gt;format asof_date date9.;&lt;/P&gt;&lt;P&gt;cards;&lt;/P&gt;&lt;P&gt;sss 20Mar2010 34&lt;/P&gt;&lt;P&gt;sss 21mar2010 44&lt;/P&gt;&lt;P&gt;rrr 21jun2010 55&lt;/P&gt;&lt;P&gt;rrr 22jun2010 66&lt;/P&gt;&lt;P&gt;sss 20Mar2010 34&lt;/P&gt;&lt;P&gt;sss 21mar2010 44&lt;/P&gt;&lt;P&gt;rrr 21jun2010 55&lt;/P&gt;&lt;P&gt;rrr 22jun2010 66&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;proc sort data=dq_set;by deal_name asof_date;run;&lt;/P&gt;&lt;P&gt;PROC SUMMARY DATA = DQ_SET;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; BY deal_name asof_date;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; VAR field_val;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; OUTPUT OUT = DQ&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SUM(field_val) = dq90p&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; N(field_val) = check;&lt;/P&gt;&lt;P&gt;RUN;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Shiva&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 22 Aug 2012 09:21:31 GMT</pubDate>
    <dc:creator>shivas</dc:creator>
    <dc:date>2012-08-22T09:21:31Z</dc:date>
    <item>
      <title>PROC SUMMARY not creating new variable names in OUTPUT statement</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/PROC-SUMMARY-not-creating-new-variable-names-in-OUTPUT-statement/m-p/101410#M28465</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I am using&amp;nbsp; PROC SUMMARY to add up some fields and check the number of fields that have been added as follows&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PROC SUMMARY DATA = DQ_SET;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; BY deal_name asof_date;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; VAR field_val;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; OUTPUT OUT = DQ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SUM(field_val) = dq90p&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; N(field_val) = check;&lt;/P&gt;&lt;P&gt;RUN;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As far as I understand this should create two new variables (dq90p and check) containing the summary statistics - however, in the DQ dataset (the outfile) - the summary stats have the name field_val.&lt;/P&gt;&lt;P&gt;Any idea what I have got wrong here?&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Aug 2012 08:42:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/PROC-SUMMARY-not-creating-new-variable-names-in-OUTPUT-statement/m-p/101410#M28465</guid>
      <dc:creator>NDS</dc:creator>
      <dc:date>2012-08-22T08:42:16Z</dc:date>
    </item>
    <item>
      <title>Re: PROC SUMMARY not creating new variable names in OUTPUT statement</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/PROC-SUMMARY-not-creating-new-variable-names-in-OUTPUT-statement/m-p/101411#M28466</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Try this..&lt;/P&gt;&lt;P&gt;PROC SUMMARY DATA = sashelp.class;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; class sex;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; VAR age;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; OUTPUT OUT = DQ&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SUM = dq90p&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; N = check;&lt;/P&gt;&lt;P&gt;RUN;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Shiva&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Aug 2012 08:48:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/PROC-SUMMARY-not-creating-new-variable-names-in-OUTPUT-statement/m-p/101411#M28466</guid>
      <dc:creator>shivas</dc:creator>
      <dc:date>2012-08-22T08:48:05Z</dc:date>
    </item>
    <item>
      <title>Re: PROC SUMMARY not creating new variable names in OUTPUT statement</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/PROC-SUMMARY-not-creating-new-variable-names-in-OUTPUT-statement/m-p/101412#M28467</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There is a redundancy ';'&amp;nbsp; in the output statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OUTPUT OUT =&lt;STRONG&gt; DQ;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Aug 2012 08:48:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/PROC-SUMMARY-not-creating-new-variable-names-in-OUTPUT-statement/m-p/101412#M28467</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2012-08-22T08:48:34Z</dc:date>
    </item>
    <item>
      <title>Re: PROC SUMMARY not creating new variable names in OUTPUT statement</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/PROC-SUMMARY-not-creating-new-variable-names-in-OUTPUT-statement/m-p/101413#M28468</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry - the redundant ';' is a typo in the post. it is not in the actual code.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Aug 2012 08:59:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/PROC-SUMMARY-not-creating-new-variable-names-in-OUTPUT-statement/m-p/101413#M28468</guid>
      <dc:creator>NDS</dc:creator>
      <dc:date>2012-08-22T08:59:26Z</dc:date>
    </item>
    <item>
      <title>Re: PROC SUMMARY not creating new variable names in OUTPUT statement</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/PROC-SUMMARY-not-creating-new-variable-names-in-OUTPUT-statement/m-p/101414#M28469</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Shivas,&lt;/P&gt;&lt;P&gt;Thanks for your response. I tried removing the field_val in the brackets, but it still gives me the same problem.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Aug 2012 09:05:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/PROC-SUMMARY-not-creating-new-variable-names-in-OUTPUT-statement/m-p/101414#M28469</guid>
      <dc:creator>NDS</dc:creator>
      <dc:date>2012-08-22T09:05:51Z</dc:date>
    </item>
    <item>
      <title>Re: PROC SUMMARY not creating new variable names in OUTPUT statement</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/PROC-SUMMARY-not-creating-new-variable-names-in-OUTPUT-statement/m-p/101415#M28470</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I tried with your code and it is working fine....just check the log if it giving any error or can you post some sample data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data DQ_SET;&lt;/P&gt;&lt;P&gt;input deal_name $ asof_date :date9. field_val;&lt;/P&gt;&lt;P&gt;format asof_date date9.;&lt;/P&gt;&lt;P&gt;cards;&lt;/P&gt;&lt;P&gt;sss 20Mar2010 34&lt;/P&gt;&lt;P&gt;sss 21mar2010 44&lt;/P&gt;&lt;P&gt;rrr 21jun2010 55&lt;/P&gt;&lt;P&gt;rrr 22jun2010 66&lt;/P&gt;&lt;P&gt;sss 20Mar2010 34&lt;/P&gt;&lt;P&gt;sss 21mar2010 44&lt;/P&gt;&lt;P&gt;rrr 21jun2010 55&lt;/P&gt;&lt;P&gt;rrr 22jun2010 66&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;proc sort data=dq_set;by deal_name asof_date;run;&lt;/P&gt;&lt;P&gt;PROC SUMMARY DATA = DQ_SET;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; BY deal_name asof_date;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; VAR field_val;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; OUTPUT OUT = DQ&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SUM(field_val) = dq90p&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; N(field_val) = check;&lt;/P&gt;&lt;P&gt;RUN;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Shiva&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Aug 2012 09:21:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/PROC-SUMMARY-not-creating-new-variable-names-in-OUTPUT-statement/m-p/101415#M28470</guid>
      <dc:creator>shivas</dc:creator>
      <dc:date>2012-08-22T09:21:31Z</dc:date>
    </item>
    <item>
      <title>Re: PROC SUMMARY not creating new variable names in OUTPUT statement</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/PROC-SUMMARY-not-creating-new-variable-names-in-OUTPUT-statement/m-p/101416#M28471</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Shivas,&lt;/P&gt;&lt;P&gt;No error in the logs - I am running this inside a macro, could that make a difference? I am using MPRINT to look at the line by line execution of the macro and the PROC SUMMARY step runs fine.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Aug 2012 09:25:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/PROC-SUMMARY-not-creating-new-variable-names-in-OUTPUT-statement/m-p/101416#M28471</guid>
      <dc:creator>NDS</dc:creator>
      <dc:date>2012-08-22T09:25:34Z</dc:date>
    </item>
    <item>
      <title>Re: PROC SUMMARY not creating new variable names in OUTPUT statement</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/PROC-SUMMARY-not-creating-new-variable-names-in-OUTPUT-statement/m-p/101417#M28472</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Are you sure you are not looking at the LABEL on the variable instead of its NAME?&lt;/P&gt;&lt;P&gt;Try this code with and without the label statement. And notice the difference in the label assigned to the new AGESUM variable.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc summary data=sashelp.class;&lt;/P&gt;&lt;P&gt;&amp;nbsp; var age;&lt;/P&gt;&lt;P&gt;&amp;nbsp; label age='AGE';&lt;/P&gt;&lt;P&gt;&amp;nbsp; output out=want sum(age)=agesum;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;proc contents data=want; run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Aug 2012 14:13:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/PROC-SUMMARY-not-creating-new-variable-names-in-OUTPUT-statement/m-p/101417#M28472</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2012-08-22T14:13:48Z</dc:date>
    </item>
  </channel>
</rss>

