<?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 What is the problem with my data here ? in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/What-is-the-problem-with-my-data-here/m-p/767598#M30772</link>
    <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data dmv;
input 
	ID      3-5 @    
	Score   13-14 @
	Age    6-7 @
	Code   8-12 @
	State 1-2 @;

datalines;
AR373535867443
CO884198099142
CO844117922301
CT892260212694
GA544146397264
FL116356242135
FL012766334163
IA284575080076
MO201819486741
MN333660025825
NC521620806587
NC391625607716
NY242148623172
OH498277408248
TX334618334735

;
run;

TITLE "input data";
PROC PRINT DATA=dmv;
RUN;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="error .png" style="width: 730px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/63552i96164C6720B79E40/image-size/large?v=v2&amp;amp;px=999" role="button" title="error .png" alt="error .png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 14 Sep 2021 01:36:08 GMT</pubDate>
    <dc:creator>Godzilla_Hat</dc:creator>
    <dc:date>2021-09-14T01:36:08Z</dc:date>
    <item>
      <title>What is the problem with my data here ?</title>
      <link>https://communities.sas.com/t5/New-SAS-User/What-is-the-problem-with-my-data-here/m-p/767598#M30772</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data dmv;
input 
	ID      3-5 @    
	Score   13-14 @
	Age    6-7 @
	Code   8-12 @
	State 1-2 @;

datalines;
AR373535867443
CO884198099142
CO844117922301
CT892260212694
GA544146397264
FL116356242135
FL012766334163
IA284575080076
MO201819486741
MN333660025825
NC521620806587
NC391625607716
NY242148623172
OH498277408248
TX334618334735

;
run;

TITLE "input data";
PROC PRINT DATA=dmv;
RUN;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="error .png" style="width: 730px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/63552i96164C6720B79E40/image-size/large?v=v2&amp;amp;px=999" role="button" title="error .png" alt="error .png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 14 Sep 2021 01:36:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/What-is-the-problem-with-my-data-here/m-p/767598#M30772</guid>
      <dc:creator>Godzilla_Hat</dc:creator>
      <dc:date>2021-09-14T01:36:08Z</dc:date>
    </item>
    <item>
      <title>Re: What is the problem with my data here ?</title>
      <link>https://communities.sas.com/t5/New-SAS-User/What-is-the-problem-with-my-data-here/m-p/767600#M30773</link>
      <description>&lt;P&gt;What do you thing those&amp;nbsp;@ in the INPUT statement are for?&lt;BR /&gt;To SAS it looks like you started with:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;input id 3-5  @SCORE ....&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;So the&amp;nbsp;@ score means move to the column number of the value of SCORE.&amp;nbsp; Just like&amp;nbsp;@ 10 means move to column 10.&lt;/P&gt;
&lt;P&gt;So it is expecting the name of the variable you want to read from columns 13 to 14 to appear between the variable that the&amp;nbsp;@ pointer motion is using and the 13.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Remove the&amp;nbsp;@ 's .&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;  input 
    ID      3- 5    
    Score  13-14 
    Age     6- 7 
    Code    8-12 
    State   1- 2 
  ;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Note it is probably easier if you have some reason for wanting ID to be the first variable instead of the second to just tell SAS that directly and then have the INPUT statement read the variables in the order they actually appear on the line.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data dmv;
  length ID Score Age Code State 8;
  input 
    State   1- 2 
    ID      3- 5    
    Age     6- 7 
    Code    8-12 
    Score  13-14 
  ;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Or&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data dmv;
  length ID Score Age Code State 8;
  input 
    State   2.
    ID      3.
    Age     2.
    Code    5.
    Score   2.
  ;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 14 Sep 2021 01:54:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/What-is-the-problem-with-my-data-here/m-p/767600#M30773</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2021-09-14T01:54:26Z</dc:date>
    </item>
    <item>
      <title>Re: What is the problem with my data here ?</title>
      <link>https://communities.sas.com/t5/New-SAS-User/What-is-the-problem-with-my-data-here/m-p/767628#M30777</link>
      <description>&lt;P&gt;Note that State &lt;U&gt;is&lt;/U&gt; a string, and ID and Code should probably also be handled as character, so use this:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data dmv;
input 
  @3 ID $3.
  @13 Score 2.
  @6 Age 2.
  @8 Code $5.
  @1 State $2.
;
datalines;
AR373535867443
CO884198099142
CO844117922301
CT892260212694
GA544146397264
FL116356242135
FL012766334163
IA284575080076
MO201819486741
MN333660025825
NC521620806587
NC391625607716
NY242148623172
OH498277408248
TX334618334735
;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 14 Sep 2021 08:06:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/What-is-the-problem-with-my-data-here/m-p/767628#M30777</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2021-09-14T08:06:58Z</dc:date>
    </item>
    <item>
      <title>Re: What is the problem with my data here ?</title>
      <link>https://communities.sas.com/t5/New-SAS-User/What-is-the-problem-with-my-data-here/m-p/767677#M30779</link>
      <description>&lt;P&gt;"STAT" is character variable ,therefore you need $ to define it .&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data dmv;
input ID      3-5  
	Score   13-14
	Age    6-7
	Code   8-12
	State  $ 1-2 ;

datalines;
AR373535867443
CO884198099142
CO844117922301
CT892260212694
GA544146397264
FL116356242135
FL012766334163
IA284575080076
MO201819486741
MN333660025825
NC521620806587
NC391625607716
NY242148623172
OH498277408248
TX334618334735
;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 14 Sep 2021 12:17:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/What-is-the-problem-with-my-data-here/m-p/767677#M30779</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2021-09-14T12:17:40Z</dc:date>
    </item>
  </channel>
</rss>

