<?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: Modified List Input in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Modified-List-Input/m-p/361304#M85185</link>
    <description>&lt;P&gt;Because you used the DSD option.&lt;/P&gt;
&lt;P&gt;The quotes in a CSV file are just there to allow consumers of the file to know that the embedded delimiter is part of the field value and NOT an indicaiton of the beginning of a new value. &amp;nbsp;So SAS removes the quotes around values.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you want actual quotes in the data field then you will need to quote the whole value.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;Ty Cobb,"""Narrows, Georgia""",The Georgia Peach&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 24 May 2017 18:18:57 GMT</pubDate>
    <dc:creator>Tom</dc:creator>
    <dc:date>2017-05-24T18:18:57Z</dc:date>
    <item>
      <title>Modified List Input</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Modified-List-Input/m-p/361281#M85179</link>
      <description>&lt;P&gt;I have a file called&amp;nbsp; BASEBALL.TXT&lt;/P&gt;&lt;P&gt;Here is one of the observation:&lt;/P&gt;&lt;P&gt;Ty Cobb, "Narrows, Georgia", The Georgia Peach&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You submit this program&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data scores;&lt;/P&gt;&lt;P&gt;&amp;nbsp;infile BASEBALL.TXT dsd dlm=','&lt;/P&gt;&lt;P&gt;input Name :$20. Birthplace :$30. Nickname :$25.;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The solution says for this particular observation the correct output is:&lt;/P&gt;&lt;P&gt;Ty Cobb, Narrows, Georgia, The Georgia Peach&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My question is why did it remove the&amp;nbsp; double quotes around Narrow, Georgia?&amp;nbsp; Why is correct?&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>Wed, 24 May 2017 17:33:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Modified-List-Input/m-p/361281#M85179</guid>
      <dc:creator>adennis8872</dc:creator>
      <dc:date>2017-05-24T17:33:04Z</dc:date>
    </item>
    <item>
      <title>Re: Modified List Input</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Modified-List-Input/m-p/361288#M85181</link>
      <description>&lt;P&gt;Look up the section "modified list input" for the input statement.&amp;nbsp;&amp;nbsp; Especially use of the tilde (~) modifier.&amp;nbsp; It's in &lt;A href="http://manualzz.com/doc/14088028/sas-9.4-statements-reference-%C2%AE" target="_self"&gt;SAS 9.4 Statements Reference&lt;/A&gt;&amp;nbsp; book.&lt;/P&gt;</description>
      <pubDate>Wed, 24 May 2017 17:47:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Modified-List-Input/m-p/361288#M85181</guid>
      <dc:creator>mkeintz</dc:creator>
      <dc:date>2017-05-24T17:47:29Z</dc:date>
    </item>
    <item>
      <title>Re: Modified List Input</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Modified-List-Input/m-p/361304#M85185</link>
      <description>&lt;P&gt;Because you used the DSD option.&lt;/P&gt;
&lt;P&gt;The quotes in a CSV file are just there to allow consumers of the file to know that the embedded delimiter is part of the field value and NOT an indicaiton of the beginning of a new value. &amp;nbsp;So SAS removes the quotes around values.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you want actual quotes in the data field then you will need to quote the whole value.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;Ty Cobb,"""Narrows, Georgia""",The Georgia Peach&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 24 May 2017 18:18:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Modified-List-Input/m-p/361304#M85185</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2017-05-24T18:18:57Z</dc:date>
    </item>
    <item>
      <title>Re: Modified List Input</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Modified-List-Input/m-p/361343#M85194</link>
      <description>&lt;P&gt;It is because of the annoying need to &lt;STRONG&gt;triple&lt;/STRONG&gt; the quotes wanted that I suggest learning about ~.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data scores;
 infile datalines   dlm=',' dsd;
 input Name :~$20. Birthplace :~$30. Nickname :~$25.;
 put (_all_) (/ =);
datalines;
Ty Cobb, "Narrows, Georgia", The Georgia Peach&lt;BR /&gt;Ty Cobb, 'Narrows, Georgia', The Georgia Peach&lt;BR /&gt;run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The tilde format modifier is documented as&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; "reads delimiters within quoted character values as characters &lt;EM&gt;&lt;U&gt;&lt;STRONG&gt;and retains the quotation marks&lt;/STRONG&gt;&lt;/U&gt;&lt;/EM&gt;".&lt;/P&gt;</description>
      <pubDate>Wed, 24 May 2017 19:19:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Modified-List-Input/m-p/361343#M85194</guid>
      <dc:creator>mkeintz</dc:creator>
      <dc:date>2017-05-24T19:19:42Z</dc:date>
    </item>
  </channel>
</rss>

