<?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: List Input or Modified List Input in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/List-Input-or-Modified-List-Input/m-p/440100#M109884</link>
    <description>&lt;P&gt;Thanks for your reply.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need to get out as eg, Murray, W in the output.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 26 Feb 2018 01:57:02 GMT</pubDate>
    <dc:creator>sas_td2016</dc:creator>
    <dc:date>2018-02-26T01:57:02Z</dc:date>
    <item>
      <title>List Input or Modified List Input</title>
      <link>https://communities.sas.com/t5/SAS-Programming/List-Input-or-Modified-List-Input/m-p/440096#M109881</link>
      <description>&lt;P&gt;Hello Friends&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you please help me on this query?&lt;/P&gt;&lt;P&gt;I want to get out put for the following file using list or modified list input.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2458 Murray, W 72 185 128 12 38 D&lt;BR /&gt;2462 Almers, C 68 171 133 10 5 I&lt;BR /&gt;2501 Bonaventure, T 78 177 139 11 13 I&lt;BR /&gt;2523 Johnson, R 69 162 114 9 42 S&lt;BR /&gt;2539 LaMance, K 75 168 141 11 46 D&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 26 Feb 2018 00:05:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/List-Input-or-Modified-List-Input/m-p/440096#M109881</guid>
      <dc:creator>sas_td2016</dc:creator>
      <dc:date>2018-02-26T00:05:36Z</dc:date>
    </item>
    <item>
      <title>Re: List Input or Modified List Input</title>
      <link>https://communities.sas.com/t5/SAS-Programming/List-Input-or-Modified-List-Input/m-p/440099#M109883</link>
      <description>&lt;P&gt;Not sure what you're asking, but the following might be close to what you're looking for:&lt;/P&gt;
&lt;PRE&gt;data want (drop=x);
  infile cards truncover;
  informat name $20.;
  input @;
  x=anydigit(substr(_infile_,5))+4;
  _infile_=substr(_infile_,1, x-1)||'  '||substr(_infile_,x);
  input id name &amp;amp; x1-x5 z $;
  cards;
2458 Murray, W 72 185 128 12 38 D
2462 Almers, C 68 171 133 10 5 I
2501 Bonaventure, T 78 177 139 11 13 I
2523 Johnson, R 69 162 114 9 42 S
2539 LaMance, K 75 168 141 11 46 D
;
&lt;/PRE&gt;
&lt;P&gt;Art, CEO, AnalystFinder.com&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 26 Feb 2018 01:38:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/List-Input-or-Modified-List-Input/m-p/440099#M109883</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2018-02-26T01:38:26Z</dc:date>
    </item>
    <item>
      <title>Re: List Input or Modified List Input</title>
      <link>https://communities.sas.com/t5/SAS-Programming/List-Input-or-Modified-List-Input/m-p/440100#M109884</link>
      <description>&lt;P&gt;Thanks for your reply.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need to get out as eg, Murray, W in the output.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 26 Feb 2018 01:57:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/List-Input-or-Modified-List-Input/m-p/440100#M109884</guid>
      <dc:creator>sas_td2016</dc:creator>
      <dc:date>2018-02-26T01:57:02Z</dc:date>
    </item>
    <item>
      <title>Re: List Input or Modified List Input</title>
      <link>https://communities.sas.com/t5/SAS-Programming/List-Input-or-Modified-List-Input/m-p/440103#M109886</link>
      <description>&lt;P&gt;That's what the code I suggested does.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Art, CEO, AnalystFinder.com&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 26 Feb 2018 02:37:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/List-Input-or-Modified-List-Input/m-p/440103#M109886</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2018-02-26T02:37:04Z</dc:date>
    </item>
    <item>
      <title>Re: List Input or Modified List Input</title>
      <link>https://communities.sas.com/t5/SAS-Programming/List-Input-or-Modified-List-Input/m-p/440104#M109887</link>
      <description>&lt;P&gt;Thanks Art for your help and appreciate that, let me try how it work.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 26 Feb 2018 02:39:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/List-Input-or-Modified-List-Input/m-p/440104#M109887</guid>
      <dc:creator>sas_td2016</dc:creator>
      <dc:date>2018-02-26T02:39:00Z</dc:date>
    </item>
    <item>
      <title>Re: List Input or Modified List Input</title>
      <link>https://communities.sas.com/t5/SAS-Programming/List-Input-or-Modified-List-Input/m-p/440105#M109888</link>
      <description>&lt;P&gt;Simplest might be to read in the first initial as a separate variable, then tack it on to the last name.&amp;nbsp; For example:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data want;&lt;/P&gt;
&lt;P&gt;length lastname $ 15;&lt;/P&gt;
&lt;P&gt;input id lastname initial $ n1 n2 n3 n4 n5 c1 $;&lt;/P&gt;
&lt;P&gt;name = catx(' ', lastname, initial);&lt;/P&gt;
&lt;P&gt;drop lastname initial;&lt;/P&gt;
&lt;P&gt;cards;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;2458 Murray, W 72 185 128 12 38 D&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;2462 Almers, C 68 171 133 10 5 I&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;2501 Bonaventure, T 78 177 139 11 13 I&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;2523 Johnson, R 69 162 114 9 42 S&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;2539 LaMance, K 75 168 141 11 46 D&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;;&lt;/P&gt;</description>
      <pubDate>Mon, 26 Feb 2018 02:58:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/List-Input-or-Modified-List-Input/m-p/440105#M109888</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2018-02-26T02:58:10Z</dc:date>
    </item>
    <item>
      <title>Re: List Input or Modified List Input</title>
      <link>https://communities.sas.com/t5/SAS-Programming/List-Input-or-Modified-List-Input/m-p/440290#M109956</link>
      <description>&lt;P&gt;Thanks and appreciated for your help.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is what I get.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My code:&lt;/P&gt;&lt;P&gt;data want;&lt;BR /&gt;length lastname $15.;&lt;BR /&gt;input&lt;BR /&gt;id lastname initial $ RestHR MaxHR RecHR TimeMin TimeSec Tolerance $;&lt;BR /&gt;name = catx('',lastname, initial);&lt;BR /&gt;drop lastname initial;&lt;BR /&gt;cards;&lt;BR /&gt;&lt;BR /&gt;2458 Murray, W 72 185 128 12 38 D&lt;BR /&gt;2462 Almers, C 68 171 133 10 5 I&lt;BR /&gt;2501 Bonaventure, T 78 177 139 11 13 I&lt;BR /&gt;2523 Johnson, R 69 162 114 9 42 S&lt;BR /&gt;2539 LaMance, K 75 168 141 11 46 D&lt;BR /&gt;;&lt;BR /&gt;run;&lt;BR /&gt;proc print;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is the output:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="list_output.PNG" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/18820iB3B61D6BD49E90D5/image-size/large?v=v2&amp;amp;px=999" role="button" title="list_output.PNG" alt="list_output.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;How can I get name in the first column after obs?&lt;/P&gt;&lt;P&gt;What is the importance of this line&lt;/P&gt;&lt;P&gt;drop lastname initial;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 26 Feb 2018 18:14:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/List-Input-or-Modified-List-Input/m-p/440290#M109956</guid>
      <dc:creator>sas_td2016</dc:creator>
      <dc:date>2018-02-26T18:14:24Z</dc:date>
    </item>
    <item>
      <title>Re: List Input or Modified List Input</title>
      <link>https://communities.sas.com/t5/SAS-Programming/List-Input-or-Modified-List-Input/m-p/440294#M109957</link>
      <description>&lt;P&gt;To get NAME in the first column, add it to the LENGTH statement.&amp;nbsp; For example:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;length name $ 20 lastname $ 15;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;A DROP statement you will need to learn, as part of the basics.&amp;nbsp; It means that the variables LASTNAME and INITIAL should not become part of the final data set.&amp;nbsp; They are computed along the way, but should be removed.&lt;/P&gt;</description>
      <pubDate>Mon, 26 Feb 2018 18:27:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/List-Input-or-Modified-List-Input/m-p/440294#M109957</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2018-02-26T18:27:29Z</dc:date>
    </item>
    <item>
      <title>Re: List Input or Modified List Input</title>
      <link>https://communities.sas.com/t5/SAS-Programming/List-Input-or-Modified-List-Input/m-p/440299#M109958</link>
      <description>&lt;P&gt;Great.&amp;nbsp; It works fine.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks lot.&lt;/P&gt;</description>
      <pubDate>Mon, 26 Feb 2018 18:45:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/List-Input-or-Modified-List-Input/m-p/440299#M109958</guid>
      <dc:creator>sas_td2016</dc:creator>
      <dc:date>2018-02-26T18:45:35Z</dc:date>
    </item>
  </channel>
</rss>

