<?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: Why the following DATA step doesn't create the correct output? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Why-the-following-DATA-step-doesn-t-create-the-correct-output/m-p/370404#M275749</link>
    <description>&lt;P&gt;It works, thank you so much!&lt;/P&gt;</description>
    <pubDate>Sun, 25 Jun 2017 23:41:31 GMT</pubDate>
    <dc:creator>Zhanxiong</dc:creator>
    <dc:date>2017-06-25T23:41:31Z</dc:date>
    <item>
      <title>Why the following DATA step doesn't create the correct output?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Why-the-following-DATA-step-doesn-t-create-the-correct-output/m-p/370390#M275747</link>
      <description>&lt;P&gt;I want to create a data set as shown below:&lt;/P&gt;&lt;P&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/9836i2D741E70ADC45D7C/image-size/original?v=1.0&amp;amp;px=-1" border="0" alt="data set.png" title="data set.png" /&gt;&lt;/P&gt;&lt;P&gt;I used the following (column input)&amp;nbsp;code:&lt;/P&gt;&lt;PRE&gt;data GYM_UPDATE;
    infile datalines pad;
    input @1 ID @3 Gender $ Age 5-6 Vault 8-10 Floor 12-14 P_BAR 16-18;
    datalines;&lt;BR /&gt;3              6.7&lt;BR /&gt;5   15 8.1 7.2&lt;BR /&gt;7 F&lt;BR /&gt;;&lt;BR /&gt;run;&lt;/PRE&gt;&lt;P&gt;The output is strange:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/9835iC909E2955DBFF81E/image-size/original?v=1.0&amp;amp;px=-1" border="0" alt="wrongdataset.png" title="wrongdataset.png" /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am able to create the correct data set by using the listing input with comma as the delimiter. However, I still want to figure out what goes wrong in the above column input code. Thanks in advance.&lt;/P&gt;</description>
      <pubDate>Sun, 25 Jun 2017 21:25:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Why-the-following-DATA-step-doesn-t-create-the-correct-output/m-p/370390#M275747</guid>
      <dc:creator>Zhanxiong</dc:creator>
      <dc:date>2017-06-25T21:25:19Z</dc:date>
    </item>
    <item>
      <title>Re: Why the following DATA step doesn't create the correct output?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Why-the-following-DATA-step-doesn-t-create-the-correct-output/m-p/370396#M275748</link>
      <description>&lt;P&gt;You miss gender length - how many characters to input.&lt;/P&gt;
&lt;P&gt;Try next code:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data GYM_UPDATE;
    infile datalines pad;
    input @1 ID @3 Gender $1. 
                  Age 5-6 Vault 8-10 Floor 12-14 P_BAR 16-18;
    datalines;
3              6.7
5   15 8.1 7.2
7 F
;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 25 Jun 2017 22:48:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Why-the-following-DATA-step-doesn-t-create-the-correct-output/m-p/370396#M275748</guid>
      <dc:creator>Shmuel</dc:creator>
      <dc:date>2017-06-25T22:48:21Z</dc:date>
    </item>
    <item>
      <title>Re: Why the following DATA step doesn't create the correct output?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Why-the-following-DATA-step-doesn-t-create-the-correct-output/m-p/370404#M275749</link>
      <description>&lt;P&gt;It works, thank you so much!&lt;/P&gt;</description>
      <pubDate>Sun, 25 Jun 2017 23:41:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Why-the-following-DATA-step-doesn-t-create-the-correct-output/m-p/370404#M275749</guid>
      <dc:creator>Zhanxiong</dc:creator>
      <dc:date>2017-06-25T23:41:31Z</dc:date>
    </item>
  </channel>
</rss>

