<?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: WHAT IS WRONG? in SAS Studio</title>
    <link>https://communities.sas.com/t5/SAS-Studio/WHAT-IS-WRONG/m-p/637885#M8983</link>
    <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/159"&gt;@Tom&lt;/a&gt;&amp;nbsp;It worked!! Thank you very much!&lt;/P&gt;</description>
    <pubDate>Mon, 06 Apr 2020 16:03:55 GMT</pubDate>
    <dc:creator>costafoh</dc:creator>
    <dc:date>2020-04-06T16:03:55Z</dc:date>
    <item>
      <title>WHAT IS WRONG?</title>
      <link>https://communities.sas.com/t5/SAS-Studio/WHAT-IS-WRONG/m-p/637770#M8981</link>
      <description>&lt;P&gt;DATA PDI_HENRIQUE;&lt;BR /&gt;INPUT TRAT $@ PDI Dm;&lt;BR /&gt;DATALINES;&lt;BR /&gt;P3 0.98 4.83&lt;BR /&gt;P3 0.99 4.76&lt;BR /&gt;P3 0.99 4.77&lt;BR /&gt;P3 0.98 4.78&lt;BR /&gt;P3 0.99 4.8&lt;BR /&gt;P3 0.98 4.73&lt;BR /&gt;P3 0.98 4.79&lt;BR /&gt;P3 0.99 4.78&lt;BR /&gt;P3 0.98 4.75&lt;BR /&gt;P3 0.99 4.75&lt;BR /&gt;P5 0.99 4.84&lt;BR /&gt;P5 0.97 4.77&lt;BR /&gt;P5 0.99 4.77&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And OUTPUT DATA returns with column TRAT OK, but columns PDI and Dm = .&lt;/P&gt;</description>
      <pubDate>Mon, 06 Apr 2020 01:55:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/WHAT-IS-WRONG/m-p/637770#M8981</guid>
      <dc:creator>costafoh</dc:creator>
      <dc:date>2020-04-06T01:55:28Z</dc:date>
    </item>
    <item>
      <title>Re: WHAT IS WRONG?</title>
      <link>https://communities.sas.com/t5/SAS-Studio/WHAT-IS-WRONG/m-p/637773#M8982</link>
      <description>&lt;P&gt;I see two obvious errors. The first is that you don't have an end to your data step. You need a line with a semi-colon to end the lines of data.&amp;nbsp; Probably if you are using SAS/Studio then SAS/Studio appended some post processing code after your code and the first semi-colon in that was used by SAS to end the data step, so that one is not causing any great harm.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The second is that you are trying to use the&amp;nbsp;@ cursor movement command of the INPUT statement to move to a column defined by the value of the PDI variable, but you have not given that variable any value.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It was surprising to me to see that SAS decided that meant you wanted to move the cursor to the first column on the line. So when it tried to read a numeric value into the variable DM starting in column one of the line it didn't like the letter P that all of the lines start with.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I suspect you just need to remove the&amp;nbsp;@ from the INPUT statement.&amp;nbsp; Then it will read three variables. The first character (max length of 8 bytes) and two as numbers.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;DATA PDI_HENRIQUE;
  INPUT TRAT $ PDI Dm;
DATALINES;
P3 0.98 4.83
P3 0.99 4.76
P3 0.99 4.77
P3 0.98 4.78
P3 0.99 4.8
P3 0.98 4.73
P3 0.98 4.79
P3 0.99 4.78
P3 0.98 4.75
P3 0.99 4.75
P5 0.99 4.84
P5 0.97 4.77
P5 0.99 4.77
;
proc print;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Results:&lt;/P&gt;
&lt;PRE&gt;Obs    TRAT     PDI     Dm

  1     P3     0.98    4.83
  2     P3     0.99    4.76
  3     P3     0.99    4.77
  4     P3     0.98    4.78
  5     P3     0.99    4.80
  6     P3     0.98    4.73
  7     P3     0.98    4.79
  8     P3     0.99    4.78
  9     P3     0.98    4.75
 10     P3     0.99    4.75
 11     P5     0.99    4.84
 12     P5     0.97    4.77
 13     P5     0.99    4.77&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 06 Apr 2020 02:47:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/WHAT-IS-WRONG/m-p/637773#M8982</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2020-04-06T02:47:56Z</dc:date>
    </item>
    <item>
      <title>Re: WHAT IS WRONG?</title>
      <link>https://communities.sas.com/t5/SAS-Studio/WHAT-IS-WRONG/m-p/637885#M8983</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/159"&gt;@Tom&lt;/a&gt;&amp;nbsp;It worked!! Thank you very much!&lt;/P&gt;</description>
      <pubDate>Mon, 06 Apr 2020 16:03:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/WHAT-IS-WRONG/m-p/637885#M8983</guid>
      <dc:creator>costafoh</dc:creator>
      <dc:date>2020-04-06T16:03:55Z</dc:date>
    </item>
  </channel>
</rss>

