<?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 warning message in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Multiple-lengths-warning-message/m-p/803793#M316508</link>
    <description>&lt;P&gt;To get this result, the length must be longer in T2 than it is in T1.&amp;nbsp; A quick and easy fix would be to switch the order of the data sets in the SET statement:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sort data=t1;by  appIdentity IP ;Run;
proc sort data=t2;by  appIdentity IP ;Run;
Data t3;
SET t2 t1;
by appIdentity IP ;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;However, if this problem exists for other variables as well, this might not fix the entire problem.&lt;/P&gt;</description>
    <pubDate>Thu, 24 Mar 2022 14:04:22 GMT</pubDate>
    <dc:creator>Astounding</dc:creator>
    <dc:date>2022-03-24T14:04:22Z</dc:date>
    <item>
      <title>Multiple lengths warning message</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Multiple-lengths-warning-message/m-p/803750#M316488</link>
      <description>&lt;P&gt;Hello&lt;/P&gt;
&lt;P&gt;I am getting a warning&amp;nbsp;&amp;nbsp;&lt;CODE class=" language-sas"&gt;Multiple lengths were specified for the variable productId &lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;I am adding length statement but it still exists.&lt;/P&gt;
&lt;P&gt;Any idea for solution please?&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sort data=t1;by  appIdentity  IP ;Run;
proc sort data=t2;by  appIdentity IP ;Run;
Data t3;
length productId $30.;
SET t1   t2;
by appIdentity IP ;
RUN;
/*WARNING: Multiple lengths were specified for the variable productId by input data set(s). This can cause truncation of data.*/
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 24 Mar 2022 08:33:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Multiple-lengths-warning-message/m-p/803750#M316488</guid>
      <dc:creator>Ronein</dc:creator>
      <dc:date>2022-03-24T08:33:35Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple lengths warning message</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Multiple-lengths-warning-message/m-p/803753#M316491</link>
      <description>&lt;P&gt;your defined length is too short. remove the dot in your length specification btw., you're defining a length, not a format.&lt;/P&gt;</description>
      <pubDate>Thu, 24 Mar 2022 09:11:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Multiple-lengths-warning-message/m-p/803753#M316491</guid>
      <dc:creator>Oligolas</dc:creator>
      <dc:date>2022-03-24T09:11:06Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple lengths warning message</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Multiple-lengths-warning-message/m-p/803757#M316493</link>
      <description>&lt;P&gt;Ask yourself why you have different lengths in the first place.&lt;/P&gt;
&lt;P&gt;Where is the variable created?&lt;/P&gt;</description>
      <pubDate>Thu, 24 Mar 2022 09:53:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Multiple-lengths-warning-message/m-p/803757#M316493</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2022-03-24T09:53:08Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple lengths warning message</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Multiple-lengths-warning-message/m-p/803772#M316499</link>
      <description>&lt;P&gt;what is the length of productID in both of those datasets? make the length as long as the longer length in the 2 datasets and the warning should go away.&lt;/P&gt;</description>
      <pubDate>Thu, 24 Mar 2022 11:47:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Multiple-lengths-warning-message/m-p/803772#M316499</guid>
      <dc:creator>tarheel13</dc:creator>
      <dc:date>2022-03-24T11:47:46Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple lengths warning message</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Multiple-lengths-warning-message/m-p/803793#M316508</link>
      <description>&lt;P&gt;To get this result, the length must be longer in T2 than it is in T1.&amp;nbsp; A quick and easy fix would be to switch the order of the data sets in the SET statement:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sort data=t1;by  appIdentity IP ;Run;
proc sort data=t2;by  appIdentity IP ;Run;
Data t3;
SET t2 t1;
by appIdentity IP ;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;However, if this problem exists for other variables as well, this might not fix the entire problem.&lt;/P&gt;</description>
      <pubDate>Thu, 24 Mar 2022 14:04:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Multiple-lengths-warning-message/m-p/803793#M316508</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2022-03-24T14:04:22Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple lengths warning message</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Multiple-lengths-warning-message/m-p/803801#M316514</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/159549"&gt;@Ronein&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;Suggest that you do a proc content of t1 and t2 and verify the variable lengths.&lt;/P&gt;</description>
      <pubDate>Thu, 24 Mar 2022 14:35:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Multiple-lengths-warning-message/m-p/803801#M316514</guid>
      <dc:creator>Sajid01</dc:creator>
      <dc:date>2022-03-24T14:35:34Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple lengths warning message</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Multiple-lengths-warning-message/m-p/803803#M316516</link>
      <description>&lt;P&gt;Here is a short working example of &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/4954"&gt;@Astounding&lt;/a&gt; and the change of order that involves two sets everyone can see.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The Length statement alone does not change the warning.&lt;/P&gt;
&lt;PRE&gt;data one;
  x='a';
run;

data two;
  x='bbbbbbbbbbbbbbbbbbbbbbbbbbb';
run;

data example1;
   length x $ 5;
   set one two;
run;

data example2;
   length x $ 25;
   set one two;
run;

data example3;
   set two one ;
run;&lt;/PRE&gt;
&lt;P&gt;Fix the lengths before combining the data sets if you have many variables with different lengths and do not want to see that warning.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 24 Mar 2022 14:43:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Multiple-lengths-warning-message/m-p/803803#M316516</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2022-03-24T14:43:07Z</dc:date>
    </item>
  </channel>
</rss>

