<?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: Datalines error in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Datalines-error/m-p/430710#M106475</link>
    <description>&lt;P&gt;Thank you so much, Novinosrin.&amp;nbsp;&amp;nbsp; That works too!&lt;/P&gt;</description>
    <pubDate>Wed, 24 Jan 2018 22:46:02 GMT</pubDate>
    <dc:creator>ybz12003</dc:creator>
    <dc:date>2018-01-24T22:46:02Z</dc:date>
    <item>
      <title>Datalines error</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Datalines-error/m-p/430604#M106442</link>
      <description>&lt;P&gt;Hello:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I found a problem when I try to create SAS dataset.&amp;nbsp;&amp;nbsp; I would like to add "TOF +/- PA, DORV -TGA" into column Analysis.&amp;nbsp; But the result only shows "TOF +/- PA", please advice how to fix it.&amp;nbsp; Thanks.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;STRONG&gt;data&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; test1; &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;infile&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; datalines &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;dsd&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;; &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;input&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; Author : &lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;$20.&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; Analysis : &lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;$100.&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; Product : &lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;$100.&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;; &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;datalines&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;; &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Alissa, Cleft Lip +/- Palate, LABETOLOL,&lt;/P&gt;
&lt;P&gt;Marilyn, TOF +/- PA, DORV -TGA, BUTALBITAL,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;;&lt;/P&gt;
&lt;P&gt;&lt;LI-WRAPPER&gt;&lt;/LI-WRAPPER&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 24 Jan 2018 19:19:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Datalines-error/m-p/430604#M106442</guid>
      <dc:creator>ybz12003</dc:creator>
      <dc:date>2018-01-24T19:19:43Z</dc:date>
    </item>
    <item>
      <title>Re: Datalines error</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Datalines-error/m-p/430625#M106445</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;did it in a hurry, but you can organize it better or you would at-least get the idea


 data test1;
infile datalines dsd truncover col=d;
input Author : $20. @;
_k=length(strip(scan(_infile_ ,-2,',','M' )));
_fwidth=length(strip(_infile_))-_k-d-1;
input  @(d+1) Analysis  $varying25. _fwidth product : $100.;
drop _:;
datalines;
Alissa, Cleft Lip +/- Palate, LABETOLOL,
Marilyn, TOF +/- PA, DORV -TGA, BUTALBITAL,
;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 24 Jan 2018 19:45:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Datalines-error/m-p/430625#M106445</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2018-01-24T19:45:09Z</dc:date>
    </item>
    <item>
      <title>Re: Datalines error</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Datalines-error/m-p/430627#M106446</link>
      <description>&lt;P&gt;Using DSD tells SAS to use commas as a delimiter.&amp;nbsp; Commas mark the end of a variable.&amp;nbsp; You can't have it both ways and expect that commas sometimes are taken to be text.&amp;nbsp; They either mark the end of a variable or they don't.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you want commas to be text, you can change the commas between fields to something else such as | and replace dsd with dlm='|'&lt;/P&gt;</description>
      <pubDate>Wed, 24 Jan 2018 19:46:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Datalines-error/m-p/430627#M106446</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2018-01-24T19:46:42Z</dc:date>
    </item>
    <item>
      <title>Re: Datalines error</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Datalines-error/m-p/430628#M106447</link>
      <description>&lt;P&gt;You better define a dofferent delimiter between the variables, such as '#' assuming is not in any variable data:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data test1;

infile datalines dlm='#';

input Author : $20. Analysis : $100. Product : $100.;

datalines;

 

Alissa # Cleft Lip +/- Palate # LABETOLOL,

Marilyn # TOF +/- PA, DORV -TGA # BUTALBITAL,

 

;


 &lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 24 Jan 2018 19:50:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Datalines-error/m-p/430628#M106447</guid>
      <dc:creator>Shmuel</dc:creator>
      <dc:date>2018-01-24T19:50:09Z</dc:date>
    </item>
    <item>
      <title>Re: Datalines error</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Datalines-error/m-p/430633#M106448</link>
      <description>&lt;P&gt;Thanks for everyone's quick response.&amp;nbsp;&amp;nbsp; I picked the easiest way. &lt;img id="womanhappy" class="emoticon emoticon-womanhappy" src="https://communities.sas.com/i/smilies/16x16_woman-happy.png" alt="Woman Happy" title="Woman Happy" /&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 24 Jan 2018 19:52:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Datalines-error/m-p/430633#M106448</guid>
      <dc:creator>ybz12003</dc:creator>
      <dc:date>2018-01-24T19:52:08Z</dc:date>
    </item>
    <item>
      <title>Re: Datalines error</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Datalines-error/m-p/430650#M106453</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/67134"&gt;@ybz12003&lt;/a&gt;, i wonder whether changing the raw file structure the most easy or convenient thing to do.&amp;nbsp; I thought you were after how to deal with embedded delimiter ',' in a comma separated file which gives rise to the challenge of using infile options and play with input buffer columns.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Anyway, If you are so comfortable with the former, all you need to do is wrap your values with quotes&amp;nbsp; to make the code you wrote to work&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;/*so no changes in your code, just the&lt;STRONG&gt; quotes "&lt;/STRONG&gt; around values */&amp;nbsp;&lt;BR /&gt;data test1;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;infile datalines dsd;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;input Author : $20. Analysis : $100. Product : $100.;&lt;/P&gt;&lt;P&gt;datalines;&lt;BR /&gt;&lt;STRONG&gt;"Alissa", "Cleft Lip +/- Palate", "LABETOLOL",&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;"Marilyn", "TOF +/- PA, DORV -TGA", "BUTALBITAL",&lt;/STRONG&gt;&lt;BR /&gt;;&lt;/P&gt;</description>
      <pubDate>Wed, 24 Jan 2018 20:10:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Datalines-error/m-p/430650#M106453</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2018-01-24T20:10:04Z</dc:date>
    </item>
    <item>
      <title>Re: Datalines error</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Datalines-error/m-p/430710#M106475</link>
      <description>&lt;P&gt;Thank you so much, Novinosrin.&amp;nbsp;&amp;nbsp; That works too!&lt;/P&gt;</description>
      <pubDate>Wed, 24 Jan 2018 22:46:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Datalines-error/m-p/430710#M106475</guid>
      <dc:creator>ybz12003</dc:creator>
      <dc:date>2018-01-24T22:46:02Z</dc:date>
    </item>
    <item>
      <title>Re: Datalines error</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Datalines-error/m-p/430711#M106476</link>
      <description>&lt;P&gt;Thanks, Shmuel.&amp;nbsp;&amp;nbsp; Your codes works too!&lt;/P&gt;</description>
      <pubDate>Wed, 24 Jan 2018 22:47:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Datalines-error/m-p/430711#M106476</guid>
      <dc:creator>ybz12003</dc:creator>
      <dc:date>2018-01-24T22:47:33Z</dc:date>
    </item>
  </channel>
</rss>

