<?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: mixted data types for the same variable in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/mixted-data-types-for-the-same-variable/m-p/41748#M8566</link>
    <description>the variable name is _2001 _2002</description>
    <pubDate>Thu, 31 Mar 2011 15:32:57 GMT</pubDate>
    <dc:creator>jdk123</dc:creator>
    <dc:date>2011-03-31T15:32:57Z</dc:date>
    <item>
      <title>mixted data types for the same variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/mixted-data-types-for-the-same-variable/m-p/41746#M8564</link>
      <description>dataset1:&lt;BR /&gt;
&lt;BR /&gt;
2001    $500    $400     200   300&lt;BR /&gt;
2002    $600    $300     100    200&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
After transpose:&lt;BR /&gt;
&lt;BR /&gt;
dataset2:&lt;BR /&gt;
&lt;BR /&gt;
_name_           2001        2002&lt;BR /&gt;
&lt;BR /&gt;
acct1               $500        $600&lt;BR /&gt;
acct2               $400        $300&lt;BR /&gt;
acct3                 200        100&lt;BR /&gt;
acct4                300         200&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
as you can see from dataset2 two different data types asscociated to the year variables. &lt;BR /&gt;
&lt;BR /&gt;
I would like to perform some calculations for instance: acct1 $600-$500=$100;&lt;BR /&gt;
acct3  100-200 =100. is this possible, if yes, how to handle this situation?&lt;BR /&gt;
&lt;BR /&gt;
Thanks,</description>
      <pubDate>Thu, 31 Mar 2011 14:06:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/mixted-data-types-for-the-same-variable/m-p/41746#M8564</guid>
      <dc:creator>jdk123</dc:creator>
      <dc:date>2011-03-31T14:06:05Z</dc:date>
    </item>
    <item>
      <title>Re: mixted data types for the same variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/mixted-data-types-for-the-same-variable/m-p/41747#M8565</link>
      <description>Hi:&lt;BR /&gt;
  If you do a PROC CONTENTS on dataset2:&lt;BR /&gt;
[pre]&lt;BR /&gt;
proc contents data=dataset2;&lt;BR /&gt;
run;&lt;BR /&gt;
[/pre]&lt;BR /&gt;
              &lt;BR /&gt;
and then look at the list of variables, what is the type and format for the "year" variables???? SAS variable names cannot start with a number, they generally start with an underscore from transpose, such as _2001 and _2002. Can you paste the variable information to the forum???&lt;BR /&gt;
&lt;BR /&gt;
cynthia</description>
      <pubDate>Thu, 31 Mar 2011 14:47:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/mixted-data-types-for-the-same-variable/m-p/41747#M8565</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2011-03-31T14:47:03Z</dc:date>
    </item>
    <item>
      <title>Re: mixted data types for the same variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/mixted-data-types-for-the-same-variable/m-p/41748#M8566</link>
      <description>the variable name is _2001 _2002</description>
      <pubDate>Thu, 31 Mar 2011 15:32:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/mixted-data-types-for-the-same-variable/m-p/41748#M8566</guid>
      <dc:creator>jdk123</dc:creator>
      <dc:date>2011-03-31T15:32:57Z</dc:date>
    </item>
    <item>
      <title>Re: mixted data types for the same variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/mixted-data-types-for-the-same-variable/m-p/41749#M8567</link>
      <description>and the PROC CONTENTS???</description>
      <pubDate>Thu, 31 Mar 2011 15:41:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/mixted-data-types-for-the-same-variable/m-p/41749#M8567</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2011-03-31T15:41:04Z</dc:date>
    </item>
    <item>
      <title>Re: mixted data types for the same variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/mixted-data-types-for-the-same-variable/m-p/41750#M8568</link>
      <description>It is possible. $w.d is only the cloth of variable ,in sas it is numeric.&lt;BR /&gt;
if you want different cloth for the same variable ,you can create another variable to contain the format then use function putn() or putc() to get it.&lt;BR /&gt;
&lt;BR /&gt;
[pre]&lt;BR /&gt;
_name_ 2001 2002  formate&lt;BR /&gt;
&lt;BR /&gt;
acct1 $500 $600     dollar8.&lt;BR /&gt;
acct2 $400 $300      dollar8.&lt;BR /&gt;
acct3 200 100            8.&lt;BR /&gt;
acct4 300 200           8.&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
[/pre]&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Ksharp</description>
      <pubDate>Wed, 06 Apr 2011 09:25:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/mixted-data-types-for-the-same-variable/m-p/41750#M8568</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2011-04-06T09:25:25Z</dc:date>
    </item>
  </channel>
</rss>

