<?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 Data step Length in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Data-step-Length/m-p/34926#M6900</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Great thanks for your help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 21 Jul 2011 18:46:19 GMT</pubDate>
    <dc:creator>Danglytics</dc:creator>
    <dc:date>2011-07-21T18:46:19Z</dc:date>
    <item>
      <title>Data step Length</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Data-step-Length/m-p/34917#M6891</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think this is a simple solution, but I can't seem to figure it out.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have multiple datasets in the exact same data layout that i'd like to concatenate using the data step.&lt;/P&gt;&lt;P&gt;for example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data merged ;&lt;/P&gt;&lt;P&gt;set table1 table2 table3 table4 ; &lt;/P&gt;&lt;P&gt;run ;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A variable may have different lengths in each of the tables so when I run the code above I get the warning:&lt;/P&gt;&lt;P&gt;"Multiple lengths were specified for the variable Product by input data set(s). This may cause truncation of data."&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried adding the length statement but still got the warning. &lt;/P&gt;&lt;P&gt;How can I set the length so I do not get the warning?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Jul 2011 13:46:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Data-step-Length/m-p/34917#M6891</guid>
      <dc:creator>Danglytics</dc:creator>
      <dc:date>2011-07-21T13:46:13Z</dc:date>
    </item>
    <item>
      <title>Data step Length</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Data-step-Length/m-p/34918#M6892</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I can't test this at the moment, but do you still get the error if the place the length statement(s) before the set statement?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Jul 2011 14:03:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Data-step-Length/m-p/34918#M6892</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2011-07-21T14:03:07Z</dc:date>
    </item>
    <item>
      <title>Data step Length</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Data-step-Length/m-p/34919#M6893</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;yes the warning still shows up if do:&lt;/P&gt;&lt;P&gt;data merged ;&lt;/P&gt;&lt;P&gt;length product $15 ;&lt;/P&gt;&lt;P&gt;set table1 table2 table3 table4 ;&lt;/P&gt;&lt;P&gt;run ;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Jul 2011 14:10:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Data-step-Length/m-p/34919#M6893</guid>
      <dc:creator>Danglytics</dc:creator>
      <dc:date>2011-07-21T14:10:07Z</dc:date>
    </item>
    <item>
      <title>Data step Length</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Data-step-Length/m-p/34920#M6894</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How about if, in your set statement, you put the file with the longest lengths first (leftmost) on the list?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Jul 2011 14:23:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Data-step-Length/m-p/34920#M6894</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2011-07-21T14:23:39Z</dc:date>
    </item>
    <item>
      <title>Data step Length</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Data-step-Length/m-p/34921#M6895</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;My limited testing shows that if you still have the warning it means that one or more of the varables from the input data sets have a length longer than you have defined.&amp;nbsp; You could use PROC CONTENTS and PROC SUMMARY to determine the MAX length of each variable and code gen LENGTH/ATTRIB statements to resolve the issue.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Jul 2011 14:37:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Data-step-Length/m-p/34921#M6895</guid>
      <dc:creator>data_null__</dc:creator>
      <dc:date>2011-07-21T14:37:40Z</dc:date>
    </item>
    <item>
      <title>Data step Length</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Data-step-Length/m-p/34922#M6896</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is their a way to force the length for the new dataset? &lt;/P&gt;&lt;P&gt;for example:&lt;/P&gt;&lt;P&gt;table1: Product $15&lt;/P&gt;&lt;P&gt;table2: Product $15&lt;/P&gt;&lt;P&gt;table3: Product $17&lt;/P&gt;&lt;P&gt;table4: Product $15&lt;/P&gt;&lt;P&gt;for some reason i have some dirty records in table3 that makes the product variable $17, In my merged dataset I want to make product $15, and its fine if its truncated.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Jul 2011 17:28:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Data-step-Length/m-p/34922#M6896</guid>
      <dc:creator>Danglytics</dc:creator>
      <dc:date>2011-07-21T17:28:29Z</dc:date>
    </item>
    <item>
      <title>Data step Length</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Data-step-Length/m-p/34923#M6897</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You are doing that with the length statement or by ensuring that the culprit is not the first file.&amp;nbsp; Or are you asking how to do it without having to confront the warnings?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Jul 2011 17:37:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Data-step-Length/m-p/34923#M6897</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2011-07-21T17:37:37Z</dc:date>
    </item>
    <item>
      <title>Data step Length</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Data-step-Length/m-p/34924#M6898</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;yes exactly, is there a way around the warning?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Jul 2011 18:25:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Data-step-Length/m-p/34924#M6898</guid>
      <dc:creator>Danglytics</dc:creator>
      <dc:date>2011-07-21T18:25:19Z</dc:date>
    </item>
    <item>
      <title>Data step Length</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Data-step-Length/m-p/34925#M6899</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;options varlenchk=nowarn;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Jul 2011 18:29:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Data-step-Length/m-p/34925#M6899</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2011-07-21T18:29:05Z</dc:date>
    </item>
    <item>
      <title>Data step Length</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Data-step-Length/m-p/34926#M6900</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Great thanks for your help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Jul 2011 18:46:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Data-step-Length/m-p/34926#M6900</guid>
      <dc:creator>Danglytics</dc:creator>
      <dc:date>2011-07-21T18:46:19Z</dc:date>
    </item>
  </channel>
</rss>

