<?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: Warning multiple lengths were specified in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Warning-multiple-lengths-were-specified/m-p/692319#M210889</link>
    <description>&lt;P&gt;The LOG is clearly and specifically telling you what is wrong.&lt;/P&gt;</description>
    <pubDate>Sat, 17 Oct 2020 22:05:50 GMT</pubDate>
    <dc:creator>PaigeMiller</dc:creator>
    <dc:date>2020-10-17T22:05:50Z</dc:date>
    <item>
      <title>Warning multiple lengths were specified</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Warning-multiple-lengths-were-specified/m-p/692305#M210878</link>
      <description>&lt;P&gt;I am trying to merge a number of datasets with certain information that is missing from the master data by matching their ID numbers. I am suing the merge statement but have a few problems. (I have sorted all my datasets by ID numbers). One of the variables is defined as both a character and a number so I changed that variable with the code below&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data work.dat1;&lt;/P&gt;&lt;P&gt;set work.dat1;&lt;/P&gt;&lt;P&gt;quant=input(quant2, 10.);&lt;/P&gt;&lt;P&gt;drop quant;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Additionally, when I run the merge statement it says that the variable race has multiple lengths in the data sets. So, I tried to specify the length before the merge statement but it doesn't seem to work and my results are basically showing up as blank for both the race and the converted new quant2 variable.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is the code for specifying the length of race variable:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data merged_set;&lt;/P&gt;&lt;P&gt;length race $32;&lt;/P&gt;&lt;P&gt;merge master_data dat1 dat2 dat3 dat4 dat5 dat6 dat7dat8 dat9 dat10;&lt;/P&gt;&lt;P&gt;by ID;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;</description>
      <pubDate>Sat, 17 Oct 2020 17:49:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Warning-multiple-lengths-were-specified/m-p/692305#M210878</guid>
      <dc:creator>Yughaber</dc:creator>
      <dc:date>2020-10-17T17:49:09Z</dc:date>
    </item>
    <item>
      <title>Re: Warning multiple lengths were specified</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Warning-multiple-lengths-were-specified/m-p/692309#M210879</link>
      <description>&lt;P&gt;Hard to say from what you have written. Variables showing up as missing could be caused by a lot of different things. The LENGTH warning has to be fixed by changing the length of variables in the input data sets, not in the output data set; and this may or may not be a cause of the missings.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The first debugging step I would follow is to take one particular ID and look at the values in all of the input data sets to see if you can figure out why the value in the resulting MERGED_SET winds up as missing.&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Also, when you do a match MERGE here, if a variable exists in multiple data sets, you get the value of a variable from the right-most data set in the MERGE statement, in this case DAT10. If the value is missing for a variable in DAT10, it will show up as missing in MERGED_SET.&lt;/P&gt;</description>
      <pubDate>Sat, 17 Oct 2020 19:00:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Warning-multiple-lengths-were-specified/m-p/692309#M210879</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2020-10-17T19:00:24Z</dc:date>
    </item>
    <item>
      <title>Re: Warning multiple lengths were specified</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Warning-multiple-lengths-were-specified/m-p/692311#M210881</link>
      <description>The quant variable shows up as missing only after the error that tells me variable is both character and numeric in the data sets and I attempt to change that with the code above.&lt;BR /&gt;&lt;BR /&gt;Also, I am checking with proc contents and the values are not missing in anything at all. It even says that race has a length of 40 and once I print my results I can see that only certain IDs have a match for race and others are left blank</description>
      <pubDate>Sat, 17 Oct 2020 19:30:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Warning-multiple-lengths-were-specified/m-p/692311#M210881</guid>
      <dc:creator>Yughaber</dc:creator>
      <dc:date>2020-10-17T19:30:07Z</dc:date>
    </item>
    <item>
      <title>Re: Warning multiple lengths were specified</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Warning-multiple-lengths-were-specified/m-p/692314#M210884</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/352895"&gt;@Yughaber&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;The quant variable shows up as missing only after the error that tells me variable is both character and numeric in the data sets and I attempt to change that with the code above.&lt;BR /&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;This is a clue. Perhaps you have changed the code incorrectly.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;Also, I am checking with proc contents and the values are not missing in anything at all. It even says that race has a length of 40 and once I print my results I can see that only certain IDs have a match for race and others are left blank.&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;PROC CONTENTS does not tell you if values are missing. As I said earlier, you have to LOOK at the data sets yourself, with your own eyes, to see if there are missing in there. I'm afraid there's really no other path forward than for you to LOOK at the input data sets and see what is going on for one such ID where you are getting missings.&lt;/P&gt;</description>
      <pubDate>Sat, 17 Oct 2020 19:48:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Warning-multiple-lengths-were-specified/m-p/692314#M210884</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2020-10-17T19:48:19Z</dc:date>
    </item>
    <item>
      <title>Re: Warning multiple lengths were specified</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Warning-multiple-lengths-were-specified/m-p/692315#M210885</link>
      <description>hm this is the code I am using&lt;BR /&gt;data work.dat1;&lt;BR /&gt;set work.dat1;&lt;BR /&gt;quant=input(quant2, 10.);&lt;BR /&gt;drop quant;&lt;BR /&gt;run;&lt;BR /&gt;Is it maybe because I am dropping quant itself? but then it should have quant2 as the new variable&lt;BR /&gt;&lt;BR /&gt;I actually also looked at the data and everything is there!</description>
      <pubDate>Sat, 17 Oct 2020 20:03:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Warning-multiple-lengths-were-specified/m-p/692315#M210885</guid>
      <dc:creator>Yughaber</dc:creator>
      <dc:date>2020-10-17T20:03:45Z</dc:date>
    </item>
    <item>
      <title>Re: Warning multiple lengths were specified</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Warning-multiple-lengths-were-specified/m-p/692316#M210886</link>
      <description>&lt;P&gt;Maxim 2: Read the Log.&lt;/P&gt;
&lt;P&gt;Post the complete log from this step (use the &amp;lt;/&amp;gt; button), and we can explain what goes wrong.&lt;/P&gt;</description>
      <pubDate>Sat, 17 Oct 2020 20:45:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Warning-multiple-lengths-were-specified/m-p/692316#M210886</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2020-10-17T20:45:15Z</dc:date>
    </item>
    <item>
      <title>Re: Warning multiple lengths were specified</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Warning-multiple-lengths-were-specified/m-p/692318#M210888</link>
      <description>the log doesn't throw any type of warning or error for this&lt;BR /&gt;&lt;BR /&gt;NOTE: Numeric values have been converted to character values at the places given by:&lt;BR /&gt;(Line):(Column).&lt;BR /&gt;NOTE: Variable quant is uninitialized.&lt;BR /&gt;NOTE: There were 56350 observations read from the data set work.dat1.&lt;BR /&gt;NOTE: The data set work.dat1 has 56350 observations and 6 variables.</description>
      <pubDate>Sat, 17 Oct 2020 20:52:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Warning-multiple-lengths-were-specified/m-p/692318#M210888</guid>
      <dc:creator>Yughaber</dc:creator>
      <dc:date>2020-10-17T20:52:38Z</dc:date>
    </item>
    <item>
      <title>Re: Warning multiple lengths were specified</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Warning-multiple-lengths-were-specified/m-p/692319#M210889</link>
      <description>&lt;P&gt;The LOG is clearly and specifically telling you what is wrong.&lt;/P&gt;</description>
      <pubDate>Sat, 17 Oct 2020 22:05:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Warning-multiple-lengths-were-specified/m-p/692319#M210889</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2020-10-17T22:05:50Z</dc:date>
    </item>
    <item>
      <title>Re: Warning multiple lengths were specified</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Warning-multiple-lengths-were-specified/m-p/692320#M210890</link>
      <description>&lt;P&gt;Paying attention to details is an absolute prerequisite for successful SASing.&lt;/P&gt;
&lt;P&gt;The&amp;nbsp;&lt;EM&gt;complete log&lt;/EM&gt; includes all code of the step, and you need to post the log &lt;STRONG&gt;using the&lt;/STRONG&gt;&amp;nbsp;&lt;STRONG&gt;&amp;lt;/&amp;gt; button.&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 17 Oct 2020 21:27:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Warning-multiple-lengths-were-specified/m-p/692320#M210890</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2020-10-17T21:27:00Z</dc:date>
    </item>
  </channel>
</rss>

