<?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 how to input the different length name ? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/how-to-input-the-different-length-name/m-p/760171#M240346</link>
    <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data work.homework;
infile datalines dsd;
input    name  $  
         age 
         height;

datalines;
John McCloskey 35 71
June Rosesette 10 43
TinekeJones 9 37
;
proc print data = work.homework;
&lt;/CODE&gt;run;&lt;/PRE&gt;</description>
    <pubDate>Sat, 07 Aug 2021 17:48:11 GMT</pubDate>
    <dc:creator>tianerhu</dc:creator>
    <dc:date>2021-08-07T17:48:11Z</dc:date>
    <item>
      <title>how to input the different length name ?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-input-the-different-length-name/m-p/760171#M240346</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data work.homework;
infile datalines dsd;
input    name  $  
         age 
         height;

datalines;
John McCloskey 35 71
June Rosesette 10 43
TinekeJones 9 37
;
proc print data = work.homework;
&lt;/CODE&gt;run;&lt;/PRE&gt;</description>
      <pubDate>Sat, 07 Aug 2021 17:48:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-input-the-different-length-name/m-p/760171#M240346</guid>
      <dc:creator>tianerhu</dc:creator>
      <dc:date>2021-08-07T17:48:11Z</dc:date>
    </item>
    <item>
      <title>Re: how to input the different length name ?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-input-the-different-length-name/m-p/760173#M240347</link>
      <description>&lt;P&gt;this program above does not work. Please give me a help.&lt;/P&gt;</description>
      <pubDate>Sat, 07 Aug 2021 17:52:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-input-the-different-length-name/m-p/760173#M240347</guid>
      <dc:creator>tianerhu</dc:creator>
      <dc:date>2021-08-07T17:52:57Z</dc:date>
    </item>
    <item>
      <title>Re: how to input the different length name ?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-input-the-different-length-name/m-p/760175#M240349</link>
      <description>&lt;P&gt;If you have two spaces after the name, and you use the &amp;amp; to read in the names, then everything will work.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://www.geeksforgeeks.org/sas-how-to-read-character-using-ampersand/" target="_blank"&gt;https://www.geeksforgeeks.org/sas-how-to-read-character-using-ampersand/&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 07 Aug 2021 18:11:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-input-the-different-length-name/m-p/760175#M240349</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2021-08-07T18:11:09Z</dc:date>
    </item>
    <item>
      <title>Re: how to input the different length name ?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-input-the-different-length-name/m-p/760176#M240350</link>
      <description>&lt;P&gt;The main thing is you need to fix the data so that it can be parsed.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Either use a delimiter other than space between the values on the lines.&amp;nbsp; Your current code is expecting a comma as the delimiter as that is the default when the DSD option is used.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data homework;
  infile datalines dsd;
  input name :$30. age height;
datalines;
John McCloskey,35,71
June Rosesette,10,43
TinekeJones,9,37
;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Or insure there are at least two spaces after the name (and no more than one space in a row in the name) so you can use the &amp;amp; modifier.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data homework;
  input name &amp;amp;:$30. age height;
datalines;
John McCloskey  35 71
June Rosesette  10 43
TinekeJones      9 37
;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 07 Aug 2021 18:11:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-input-the-different-length-name/m-p/760176#M240350</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2021-08-07T18:11:32Z</dc:date>
    </item>
    <item>
      <title>Re: how to input the different length name ?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-input-the-different-length-name/m-p/760187#M240357</link>
      <description>Thank you  for your help.</description>
      <pubDate>Sat, 07 Aug 2021 19:52:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-input-the-different-length-name/m-p/760187#M240357</guid>
      <dc:creator>tianerhu</dc:creator>
      <dc:date>2021-08-07T19:52:00Z</dc:date>
    </item>
    <item>
      <title>Re: how to input the different length name ?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-input-the-different-length-name/m-p/760188#M240358</link>
      <description>Thanks a lot.</description>
      <pubDate>Sat, 07 Aug 2021 19:52:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-input-the-different-length-name/m-p/760188#M240358</guid>
      <dc:creator>tianerhu</dc:creator>
      <dc:date>2021-08-07T19:52:20Z</dc:date>
    </item>
  </channel>
</rss>

