<?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: how to change variable format in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/how-to-change-variable-format/m-p/146524#M297355</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Issue is not format but the actual number of bytes used to store the variable in the two datasets.&lt;/P&gt;&lt;P&gt;If you run proc contents or examine the variables in the Explorer you will see that the LENGTH is different.&lt;/P&gt;&lt;P&gt;Without rebuilding the data sets generally a good approach would be to have the data set with the larger value for length first in a set or merge statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or make a copy of the data set with the smaller value&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data want;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; length cusip 8; /* guessing the set with the larger value of length for cusip is 8 as that is a default for numeric*/&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; set file2; /* guessing this is the set with the smaller length*/&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;and use want instead of file2.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 28 Oct 2014 21:58:50 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2014-10-28T21:58:50Z</dc:date>
    <item>
      <title>how to change variable format</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-change-variable-format/m-p/146523#M297354</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;when i merge 2 files i get:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WARNING: Multiple lengths were specified for the BY variable cusip by input data sets. This&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; might cause unexpected results.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i noticed that the fyear for two files are different.&lt;/P&gt;&lt;P&gt;file1: best12.&lt;/P&gt;&lt;P&gt;file2: 4. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;how do i change one of the following, for ex: file2's 4. to best12.?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Oct 2014 21:50:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-change-variable-format/m-p/146523#M297354</guid>
      <dc:creator>aarony</dc:creator>
      <dc:date>2014-10-28T21:50:05Z</dc:date>
    </item>
    <item>
      <title>Re: how to change variable format</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-change-variable-format/m-p/146524#M297355</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Issue is not format but the actual number of bytes used to store the variable in the two datasets.&lt;/P&gt;&lt;P&gt;If you run proc contents or examine the variables in the Explorer you will see that the LENGTH is different.&lt;/P&gt;&lt;P&gt;Without rebuilding the data sets generally a good approach would be to have the data set with the larger value for length first in a set or merge statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or make a copy of the data set with the smaller value&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data want;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; length cusip 8; /* guessing the set with the larger value of length for cusip is 8 as that is a default for numeric*/&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; set file2; /* guessing this is the set with the smaller length*/&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;and use want instead of file2.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Oct 2014 21:58:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-change-variable-format/m-p/146524#M297355</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2014-10-28T21:58:50Z</dc:date>
    </item>
    <item>
      <title>Re: how to change variable format</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-change-variable-format/m-p/146525#M297356</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you change the order of the datasets this warning will desapear.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also if you change the format before the "set" with format var BEST12. it will be solved too.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Oct 2014 07:29:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-change-variable-format/m-p/146525#M297356</guid>
      <dc:creator>arodriguez</dc:creator>
      <dc:date>2014-10-29T07:29:05Z</dc:date>
    </item>
  </channel>
</rss>

