<?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: ERROR: Invalid reference value in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/ERROR-Invalid-reference-value/m-p/900562#M40132</link>
    <description>&lt;P&gt;thank you so much. That worked!&lt;/P&gt;</description>
    <pubDate>Mon, 30 Oct 2023 02:42:24 GMT</pubDate>
    <dc:creator>Iamcassandra02</dc:creator>
    <dc:date>2023-10-30T02:42:24Z</dc:date>
    <item>
      <title>ERROR: Invalid reference value</title>
      <link>https://communities.sas.com/t5/New-SAS-User/ERROR-Invalid-reference-value/m-p/900556#M40129</link>
      <description>&lt;P&gt;I can not figure out what I'm doing wrong. I got an error for location. I posted my log and the code I used. What did I do wrong?&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;proc glm;&lt;BR /&gt;class location(ref="inner suburbs");&lt;BR /&gt;model y=x1 location X1*location/solution;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2023-10-29 211625.png" style="width: 993px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/89214i99132FB86095AA4C/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot 2023-10-29 211625.png" alt="Screenshot 2023-10-29 211625.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 30 Oct 2023 01:21:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/ERROR-Invalid-reference-value/m-p/900556#M40129</guid>
      <dc:creator>Iamcassandra02</dc:creator>
      <dc:date>2023-10-30T01:21:03Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR: Invalid reference value</title>
      <link>https://communities.sas.com/t5/New-SAS-User/ERROR-Invalid-reference-value/m-p/900558#M40130</link>
      <description>&lt;P&gt;Run proc contents on your input data set. Run proc freq on your location variable. Is "inner suburbs" really a value? Don't trust what you think or what you see in your instream data. Look at the data set.&lt;/P&gt;</description>
      <pubDate>Mon, 30 Oct 2023 01:41:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/ERROR-Invalid-reference-value/m-p/900558#M40130</guid>
      <dc:creator>WarrenKuhfeld</dc:creator>
      <dc:date>2023-10-30T01:41:59Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR: Invalid reference value</title>
      <link>https://communities.sas.com/t5/New-SAS-User/ERROR-Invalid-reference-value/m-p/900559#M40131</link>
      <description>&lt;P&gt;Read in the file properly and the GLM code will properly work.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Main thing is define LOCATION to be long enough to actually hold a value that is that long.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You are currently telling SAS that LOCATION should be defined as character variable of length 8.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also you really should use the DSD option when reading a delimiter file.&amp;nbsp; Otherwise missing values can cause the INPUT statement to read from the wrong field on the line.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Either define the variables with a LENGTH statement before the INPUT statement (in which case you don't need the $ in the INPUT statement since the variable's type will already be set).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Or include an informat in the INPUT statement. But make sure to precede the informat specification with the colon modifier so that it still just reads the next field from the line.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Structure your data step like this:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data hw7;
  length house y x1-x4 8 location $20;
  infile "...filename..." dsd dlm='09'x truncover firstobs=2;
  input house -- location;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 30 Oct 2023 01:55:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/ERROR-Invalid-reference-value/m-p/900559#M40131</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2023-10-30T01:55:24Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR: Invalid reference value</title>
      <link>https://communities.sas.com/t5/New-SAS-User/ERROR-Invalid-reference-value/m-p/900562#M40132</link>
      <description>&lt;P&gt;thank you so much. That worked!&lt;/P&gt;</description>
      <pubDate>Mon, 30 Oct 2023 02:42:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/ERROR-Invalid-reference-value/m-p/900562#M40132</guid>
      <dc:creator>Iamcassandra02</dc:creator>
      <dc:date>2023-10-30T02:42:24Z</dc:date>
    </item>
  </channel>
</rss>

