<?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: sas programming in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/sas-programming/m-p/370233#M19402</link>
    <description>&lt;P&gt;The error occurs because in ds, the variable name is character and in ds1 it is numeric due to the count calculation in your sql step.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What exactly do you want your ds2 to look like? &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Sat, 24 Jun 2017 07:39:57 GMT</pubDate>
    <dc:creator>PeterClemmensen</dc:creator>
    <dc:date>2017-06-24T07:39:57Z</dc:date>
    <item>
      <title>sas programming</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/sas-programming/m-p/370231#M19401</link>
      <description>&lt;P&gt;data ds;&lt;BR /&gt;infile datalines;&lt;BR /&gt;input id$ name$ age sex$;&lt;BR /&gt;datalines;&lt;BR /&gt;101 vinod 22 m&lt;BR /&gt;102 kumar 23 m&lt;BR /&gt;103 suresh 24 m&lt;BR /&gt;104 kalesh 25 m&lt;BR /&gt;105 firek 26 f&lt;BR /&gt;109 haiek 24 f&lt;BR /&gt;;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;proc sql;&lt;BR /&gt;create table work.ds1 as SELECT 'Total' AS id,count(name) AS name, count(age) as age, count(sex) as sex FROM work.ds&lt;/P&gt;&lt;P&gt;GROUP BY age;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;data ds2;&lt;BR /&gt;set ds ds1;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;223 data ds;&lt;BR /&gt;224 infile datalines;&lt;BR /&gt;225 input id$ name$ age sex$;&lt;BR /&gt;226 datalines;&lt;/P&gt;&lt;P&gt;NOTE: The data set WORK.DS has 6 observations and 4 variables.&lt;BR /&gt;NOTE: DATA statement used (Total process time):&lt;BR /&gt;real time 0.00 seconds&lt;BR /&gt;cpu time 0.00 seconds&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;233 ;&lt;BR /&gt;234 run;&lt;BR /&gt;235&lt;BR /&gt;236 proc sql;&lt;BR /&gt;237 create table work.ds1 as SELECT 'Total' AS id,count(name) AS name, count(age) as age, count(sex)&lt;BR /&gt;237! as sex FROM work.ds&lt;BR /&gt;238&lt;BR /&gt;239 GROUP BY age;&lt;BR /&gt;NOTE: Table WORK.DS1 created, with 5 rows and 4 columns.&lt;/P&gt;&lt;P&gt;240 run;&lt;BR /&gt;NOTE: PROC SQL statements are executed immediately; The RUN statement has no effect.&lt;BR /&gt;241&lt;BR /&gt;NOTE: PROCEDURE SQL used (Total process time):&lt;BR /&gt;real time 0.01 seconds&lt;BR /&gt;cpu time 0.01 seconds&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;242 data ds2;&lt;BR /&gt;243 set ds ds1;&lt;BR /&gt;ERROR: Variable name has been defined as both character and numeric.&lt;BR /&gt;ERROR: Variable sex has been defined as both character and numeric.&lt;BR /&gt;244 run;&lt;/P&gt;&lt;P&gt;NOTE: The SAS System stopped processing this step because of errors.&lt;BR /&gt;WARNING: The data set WORK.DS2 may be incomplete. When this step was stopped there were 0&lt;BR /&gt;observations and 4 variables.&lt;BR /&gt;WARNING: Data set WORK.DS2 was not replaced because this step was stopped.&lt;BR /&gt;NOTE: DATA statement used (Total process time):&lt;BR /&gt;real time 0.00 seconds&lt;BR /&gt;cpu time 0.00 seconds&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i want to addup the two datasets of subgroups and grand total also&lt;/P&gt;&lt;P&gt;plz rectify&lt;/P&gt;</description>
      <pubDate>Sat, 24 Jun 2017 07:19:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/sas-programming/m-p/370231#M19401</guid>
      <dc:creator>vinod4842</dc:creator>
      <dc:date>2017-06-24T07:19:26Z</dc:date>
    </item>
    <item>
      <title>Re: sas programming</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/sas-programming/m-p/370233#M19402</link>
      <description>&lt;P&gt;The error occurs because in ds, the variable name is character and in ds1 it is numeric due to the count calculation in your sql step.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What exactly do you want your ds2 to look like? &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 24 Jun 2017 07:39:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/sas-programming/m-p/370233#M19402</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2017-06-24T07:39:57Z</dc:date>
    </item>
  </channel>
</rss>

