<?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: Multiple lengths cause truncation of data in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Multiple-lengths-cause-truncation-of-data/m-p/377671#M24566</link>
    <description>&lt;P&gt;First of all, when you have variables of conflicting &lt;EM&gt;type&lt;/EM&gt; (not content!) in your datasets, your data step will fail with an error. So you probably have character variables of differing length that contain numeric and alphanumeric values.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To get the maximum length automatically, use the dataset with the longest variable definition first in the set statement.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The &lt;U&gt;proper&lt;/U&gt; method to handle all this is to make sure from the outset that your variables follow a common definition. Set the correct length upon creation or import from external data sources.&lt;/P&gt;</description>
    <pubDate>Thu, 20 Jul 2017 08:18:53 GMT</pubDate>
    <dc:creator>Kurt_Bremser</dc:creator>
    <dc:date>2017-07-20T08:18:53Z</dc:date>
    <item>
      <title>Multiple lengths cause truncation of data</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Multiple-lengths-cause-truncation-of-data/m-p/377663#M24565</link>
      <description>&lt;P&gt;I tried to use the following code to append tables:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
set have1 have2 have3;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;and then a warning message pops out:&lt;/P&gt;&lt;P&gt;&lt;EM&gt;WARNING: Multiple lengths were specified for the variable FirstName by input data set(s). This can cause truncation of data.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The column which has problems is either number or character. I'm wondering if there is a way to tell SAS to automatically use the larger lengths for that column.&lt;/P&gt;</description>
      <pubDate>Thu, 20 Jul 2017 07:33:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Multiple-lengths-cause-truncation-of-data/m-p/377663#M24565</guid>
      <dc:creator>ayin</dc:creator>
      <dc:date>2017-07-20T07:33:55Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple lengths cause truncation of data</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Multiple-lengths-cause-truncation-of-data/m-p/377671#M24566</link>
      <description>&lt;P&gt;First of all, when you have variables of conflicting &lt;EM&gt;type&lt;/EM&gt; (not content!) in your datasets, your data step will fail with an error. So you probably have character variables of differing length that contain numeric and alphanumeric values.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To get the maximum length automatically, use the dataset with the longest variable definition first in the set statement.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The &lt;U&gt;proper&lt;/U&gt; method to handle all this is to make sure from the outset that your variables follow a common definition. Set the correct length upon creation or import from external data sources.&lt;/P&gt;</description>
      <pubDate>Thu, 20 Jul 2017 08:18:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Multiple-lengths-cause-truncation-of-data/m-p/377671#M24566</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2017-07-20T08:18:53Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple lengths cause truncation of data</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Multiple-lengths-cause-truncation-of-data/m-p/377673#M24567</link>
      <description>&lt;P&gt;As&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/11562"&gt;@Kurt_Bremser&lt;/a&gt;&amp;nbsp;has said, not knowing what structure your data is in comes from not processing it correctly in the first place. &amp;nbsp;What does your surrouding documentation state - i.e. import agreements, data definition documents, standard working practices, data modelling details etc. &amp;nbsp;Always be very explicit about everything, that way you never run into these situations.&lt;/P&gt;</description>
      <pubDate>Thu, 20 Jul 2017 08:31:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Multiple-lengths-cause-truncation-of-data/m-p/377673#M24567</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2017-07-20T08:31:16Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple lengths cause truncation of data</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Multiple-lengths-cause-truncation-of-data/m-p/377744#M24572</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql;
create table want as
 select *
  from have1
outer union  corr
 select *
  from have2
outer union  corr
 select *
  from have3
;
quit;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 20 Jul 2017 13:09:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Multiple-lengths-cause-truncation-of-data/m-p/377744#M24572</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2017-07-20T13:09:04Z</dc:date>
    </item>
  </channel>
</rss>

