<?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: How should I write the code for this delimiter problem? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-should-I-write-the-code-for-this-delimiter-problem/m-p/405736#M98734</link>
    <description>&lt;P&gt;The DLMSTR should be :: and then you need to parse GENRE out separately after, because the number of entries there are not consistent, some have 1, some have 3 genres.&amp;nbsp; Make sure to parse out the year as well. For either you can use the SCAN function.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There are some other data issues throughout.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There's actually code on here somewhere on how to read the file properly, someone else asked this already.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 19 Oct 2017 21:12:24 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2017-10-19T21:12:24Z</dc:date>
    <item>
      <title>How should I write the code for this delimiter problem?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-should-I-write-the-code-for-this-delimiter-problem/m-p/405716#M98730</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="1.PNG" style="width: 449px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/16031i6A3FC856AD52D5F8/image-size/large?v=v2&amp;amp;px=999" role="button" title="1.PNG" alt="1.PNG" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2.PNG" style="width: 479px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/16032i2BE4588CD2704007/image-size/large?v=v2&amp;amp;px=999" role="button" title="2.PNG" alt="2.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;As you can see, at observation 12, the value should be "Dracula:Dead and Loving It (1995)" for the title. However, I got what's shown in the picture above. This is my code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;libname perm '/home/cheok19970/Assignment';&lt;BR /&gt;data perm.movies;&lt;BR /&gt;informat MovieID 4. Title $60. Genre $50.;&lt;BR /&gt;infile '/home/cheok19970/Assignment/movies.dat' dlm=':|';&lt;BR /&gt;input MovieID Title $ Genre $;&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Since I put colon and vertical pipe as the delimiter, the code is eliminating all the ":" and "|" in the data set. Besides, the output genre only shows one genre. How do i fix it?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 19 Oct 2017 19:59:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-should-I-write-the-code-for-this-delimiter-problem/m-p/405716#M98730</guid>
      <dc:creator>Shrade</dc:creator>
      <dc:date>2017-10-19T19:59:17Z</dc:date>
    </item>
    <item>
      <title>Re: How should I write the code for this delimiter problem?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-should-I-write-the-code-for-this-delimiter-problem/m-p/405727#M98731</link>
      <description>&lt;P&gt;DLMSTR in the infile statement. Look it up under the INFILE documentation.&lt;/P&gt;</description>
      <pubDate>Thu, 19 Oct 2017 20:36:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-should-I-write-the-code-for-this-delimiter-problem/m-p/405727#M98731</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-10-19T20:36:38Z</dc:date>
    </item>
    <item>
      <title>Re: How should I write the code for this delimiter problem?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-should-I-write-the-code-for-this-delimiter-problem/m-p/405731#M98732</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/16041iA1AF1AD01FB4CD01/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;libname perm '/home/cheok19970/Assignment';
data perm.movies;
	informat MovieID 4. Title $60. Genre $50.;
	infile '/home/cheok19970/Assignment/movies.dat' dlmstr=':|';
	input MovieID Title $ Genre $;
run;

proc print data=perm.movies noobs;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;I'm getting weird output &lt;span class="lia-unicode-emoji" title=":confused_face:"&gt;😕&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 19 Oct 2017 20:45:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-should-I-write-the-code-for-this-delimiter-problem/m-p/405731#M98732</guid>
      <dc:creator>Shrade</dc:creator>
      <dc:date>2017-10-19T20:45:14Z</dc:date>
    </item>
    <item>
      <title>Re: How should I write the code for this delimiter problem?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-should-I-write-the-code-for-this-delimiter-problem/m-p/405736#M98734</link>
      <description>&lt;P&gt;The DLMSTR should be :: and then you need to parse GENRE out separately after, because the number of entries there are not consistent, some have 1, some have 3 genres.&amp;nbsp; Make sure to parse out the year as well. For either you can use the SCAN function.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There are some other data issues throughout.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There's actually code on here somewhere on how to read the file properly, someone else asked this already.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 19 Oct 2017 21:12:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-should-I-write-the-code-for-this-delimiter-problem/m-p/405736#M98734</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-10-19T21:12:24Z</dc:date>
    </item>
  </channel>
</rss>

