<?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 Removing extra pipes from the file in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/Removing-extra-pipes-from-the-file/m-p/581031#M13624</link>
    <description>&lt;P&gt;Hi team,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am extracted the data and exporting into .dat format with pipe delimiter after exporting i am getting some extra pipes in the file.Please let me know how to remove that extra pipes while doing export.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Example :PIUM_FC |MS|PIUM_MRSC|CO|PIUM_LBC|HCT|PIUM_ATC|PM|MC_CNT1|13||||&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Harish&lt;/P&gt;</description>
    <pubDate>Wed, 14 Aug 2019 09:37:58 GMT</pubDate>
    <dc:creator>Harish2</dc:creator>
    <dc:date>2019-08-14T09:37:58Z</dc:date>
    <item>
      <title>Removing extra pipes from the file</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Removing-extra-pipes-from-the-file/m-p/581031#M13624</link>
      <description>&lt;P&gt;Hi team,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am extracted the data and exporting into .dat format with pipe delimiter after exporting i am getting some extra pipes in the file.Please let me know how to remove that extra pipes while doing export.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Example :PIUM_FC |MS|PIUM_MRSC|CO|PIUM_LBC|HCT|PIUM_ATC|PM|MC_CNT1|13||||&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Harish&lt;/P&gt;</description>
      <pubDate>Wed, 14 Aug 2019 09:37:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Removing-extra-pipes-from-the-file/m-p/581031#M13624</guid>
      <dc:creator>Harish2</dc:creator>
      <dc:date>2019-08-14T09:37:58Z</dc:date>
    </item>
    <item>
      <title>Re: Removing extra pipes from the file</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Removing-extra-pipes-from-the-file/m-p/581044#M13628</link>
      <description>&lt;P&gt;please post the code used to export and and excerpt of the data. Are there variables with missing value at the end of the observation?&lt;/P&gt;</description>
      <pubDate>Wed, 14 Aug 2019 10:30:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Removing-extra-pipes-from-the-file/m-p/581044#M13628</guid>
      <dc:creator>andreas_lds</dc:creator>
      <dc:date>2019-08-14T10:30:58Z</dc:date>
    </item>
    <item>
      <title>Re: Removing extra pipes from the file</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Removing-extra-pipes-from-the-file/m-p/581214#M13648</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/106917"&gt;@Harish2&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hi team,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am extracted the data and exporting into .dat format with pipe delimiter after exporting i am getting some extra pipes in the file.Please let me know how to remove that extra pipes while doing export.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Example :PIUM_FC |MS|PIUM_MRSC|CO|PIUM_LBC|HCT|PIUM_ATC|PM|MC_CNT1|13||||&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;Harish&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Those "extra pipes" are likely not extra but are related to the last 4 variables exported having missing values.&lt;/P&gt;
&lt;P&gt;If they represent variables you do not actually want in the output then DROP them from the export step, if using proc export. If using a data step then don't write them.&lt;/P&gt;
&lt;P&gt;Example:&lt;/P&gt;
&lt;PRE&gt;data example;
   x= 'something';
   y=.;
   z=.;
run;

proc export data=example outfile='x:\data\example.txt'
   dbms=dlm replace;
   delimiter='|';
   putnames=yes;
run;&lt;/PRE&gt;
&lt;P&gt;results in&lt;/P&gt;
&lt;PRE&gt;x|y|z
something||
&lt;/PRE&gt;
&lt;P&gt;the first "extra" pipe is between X and Y, the second between Y and Z variables.&lt;/P&gt;
&lt;P&gt;If later rows of the data set have values for Y and Z they would appear.&lt;/P&gt;
&lt;P&gt;More entertaining would be what you would do with "extra" pipes if the X value is missing but Y and Z aren't. If you removed the "extra" leading pipe the value of Y would be treated as that for X in whatever happens next.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;With probability approaching unity you likely want to keep those pipes.&lt;/P&gt;
&lt;P&gt;If not you will need to explain exactly what gets broken when they are present with missing values.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 14 Aug 2019 16:49:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Removing-extra-pipes-from-the-file/m-p/581214#M13648</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2019-08-14T16:49:42Z</dc:date>
    </item>
  </channel>
</rss>

