<?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: Problem with exporting in pipe delimiter in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Problem-with-exporting-in-pipe-delimiter/m-p/190936#M48112</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How are you exporting? Proc Export, data step or something else.&lt;/P&gt;&lt;P&gt;If using Proc export you could restrict the data fields exported to just the ones you want insted of the entire dataset if that is what you have been doing.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Proc Export data=mydataset (keep=var1 var2 var 3)&lt;/P&gt;&lt;P&gt;&amp;lt;rest of code here&amp;gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 28 Feb 2014 22:43:10 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2014-02-28T22:43:10Z</dc:date>
    <item>
      <title>Problem with exporting in pipe delimiter</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Problem-with-exporting-in-pipe-delimiter/m-p/190930#M48106</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Firstly, thanks for the helps.&lt;/P&gt;&lt;P&gt;I have a problem to export a file in pipe delimiter, I explan.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would like to export a file with pipe delimiter like this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;834.728.000-20|MARLI RAMOS DOS SANTOS|RUA JASMIM, 640|CENTRO|CORBELIA|PR|85420000|640||60-092626/10310&lt;/P&gt;&lt;P&gt;834.734.000-91|SONIA MARIA FERREIRA DOS SANTOS|RUA DA LARANJEIRA, SN|BAIXA GRANDE|INAMBUPE|BA|48490000|SN|CASA|52-474573/11310&lt;/P&gt;&lt;P&gt;834.735.000-91|MARIA JOSE DA SILVA|RUA DANIEL DA CRUZ, 60|CHA DA TABUA|SAO LOURENCO DA MATA|PE|54745145|60|CASA|22-681662/12310&lt;/P&gt;&lt;P&gt;834.736.000-04|SEVERINA MARIA DOS SANTOS DA SILVA|RUA: 21 DE JUNHO, 220|DOIS&amp;nbsp; UNIDOS|RECIFE|PE|52140000|220|CASA|61-098854/10002&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but my result is:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;000.000.847-86|DIK FARNEY SIQUEIRA|RUA TTE NILDO BATISTA, 62|S PAULO|NAVEGANTES|SC|88375000|62||57-212858/09310|||||||||||||||||||||||| &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;SPAN lang="PT-BR"&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;000.001.515-64|IRENE MARIA DA SILVA|LOT 5 SAO GERALDO, 05|QD B COND M DAS ARVORES|JUAZEIRO|BA|48905650|05|A|57-325064/10310|22-725705/13310|88-262129/12310|57-474799/11310|22-640519/12310|||||||||||||||||||| &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;SPAN lang="PT-BR"&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;000.001.627-60|IARA TANIA GONCALVES|AVE RUI BARBOSA, 295|SAO FRANCISCO|NITEROI|RJ|24000000|295|?P201|36-110900/12314|36-114929/13314|36-117092/13314|||||||||||||||||||||| &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;SPAN lang="PT-BR"&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;000.002.007-94|SOLANGE DE AZEVEDO MARINHO|ESTRADA AUSTRIA, 240|RIO DO OURO|SAO GONCALO|RJ|24753470|240||57-532026/12310|||||||||||||||||||||||| &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So would like to not export pipes for missing values.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can anyone help me?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;SPAN lang="PT-BR"&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Feb 2014 18:11:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Problem-with-exporting-in-pipe-delimiter/m-p/190930#M48106</guid>
      <dc:creator>Augusto</dc:creator>
      <dc:date>2014-02-28T18:11:49Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with exporting in pipe delimiter</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Problem-with-exporting-in-pipe-delimiter/m-p/190931#M48107</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How will the person reading the data know that data is missing?&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Feb 2014 18:17:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Problem-with-exporting-in-pipe-delimiter/m-p/190931#M48107</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2014-02-28T18:17:52Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with exporting in pipe delimiter</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Problem-with-exporting-in-pipe-delimiter/m-p/190932#M48108</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Reeza for taking time to help me. Welll, i think i had not explan my problem clearly,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I my table there are datas filled and not filled.&lt;/P&gt;&lt;P&gt;ex.&lt;/P&gt;&lt;P&gt;a b c d&lt;/P&gt;&lt;P&gt;.&amp;nbsp; .&amp;nbsp; .&amp;nbsp; 2&lt;/P&gt;&lt;P&gt;0 1 2 3&lt;/P&gt;&lt;P&gt;1 .&amp;nbsp; .&amp;nbsp; .&lt;/P&gt;&lt;P&gt;.&amp;nbsp; 1.&amp;nbsp;&amp;nbsp; 2&lt;/P&gt;&lt;P&gt;when i export using pipe i get this result.&lt;/P&gt;&lt;P&gt;|||2&lt;/P&gt;&lt;P&gt;0|1|2|3&lt;/P&gt;&lt;P&gt;1|||&lt;/P&gt;&lt;P&gt;|1||2&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but i would like this result.&lt;/P&gt;&lt;P&gt;2&lt;/P&gt;&lt;P&gt;0|1|2|3&lt;/P&gt;&lt;P&gt;1|&lt;/P&gt;&lt;P&gt;1|2&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So i do not need the blanks (missing) values exported with pipe.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Feb 2014 18:27:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Problem-with-exporting-in-pipe-delimiter/m-p/190932#M48108</guid>
      <dc:creator>Augusto</dc:creator>
      <dc:date>2014-02-28T18:27:36Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with exporting in pipe delimiter</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Problem-with-exporting-in-pipe-delimiter/m-p/190933#M48109</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if you want to eliminate &lt;SPAN style="text-decoration: underline;"&gt;all&lt;/SPAN&gt; missing values from your output file, then you could do:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;data _null_;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;set myDataset;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;length myStr $256;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;myStr = catx("|", of _all_);&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;file "myPath\myFile.csv";&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;put myStr;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;run;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PG&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Feb 2014 18:28:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Problem-with-exporting-in-pipe-delimiter/m-p/190933#M48109</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2014-02-28T18:28:02Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with exporting in pipe delimiter</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Problem-with-exporting-in-pipe-delimiter/m-p/190934#M48110</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;But how would someone reading the data in, know that 2 belongs to variable D and not A,B, or C?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Feb 2014 18:36:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Problem-with-exporting-in-pipe-delimiter/m-p/190934#M48110</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2014-02-28T18:36:18Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with exporting in pipe delimiter</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Problem-with-exporting-in-pipe-delimiter/m-p/190935#M48111</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That format is going to be unreadable.&lt;/P&gt;&lt;P&gt;One way is to generate a series of statements like:&lt;/P&gt;&lt;P&gt;if not missing(&lt;STRONG&gt;XXX&lt;/STRONG&gt;) then put &lt;STRONG&gt;XXX&lt;/STRONG&gt; @ ;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So here is an example using SASHELP.CLASS of one way to generate that series using PROC SQL to put the if statements into a variable.&amp;nbsp; Will only work for a small number of variables because there is a limit to how many characters you can put into a single macro variable.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;proc contents data=sashelp.class noprint out=contents ;run;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;proc sql noprint ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;select catx(' ','if not missing(',name,') then put',name, '@')&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp; into :code separated by ';'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;from contents&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;order by varnum&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;quit;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So here is an example data step where I use these generated put statements to write what you want and then also write below it what SAS would normally write.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;data _null_;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;file log dsd dlm='|' ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;set sashelp.class (obs=2);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;if _n_=1 then age=.;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;if _n_=2 then call missing(name,age,sex);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;put _n_=1 ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;amp;code ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;put ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;put (_all_) (:);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em; font-family: 'courier new', courier;"&gt;run;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;_N_=1&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;Alfred|M|69|112.5&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;Alfred|M||69|112.5&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;_N_=2&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;56.5|84&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;|||56.5|84&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Feb 2014 21:28:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Problem-with-exporting-in-pipe-delimiter/m-p/190935#M48111</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2014-02-28T21:28:40Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with exporting in pipe delimiter</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Problem-with-exporting-in-pipe-delimiter/m-p/190936#M48112</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How are you exporting? Proc Export, data step or something else.&lt;/P&gt;&lt;P&gt;If using Proc export you could restrict the data fields exported to just the ones you want insted of the entire dataset if that is what you have been doing.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Proc Export data=mydataset (keep=var1 var2 var 3)&lt;/P&gt;&lt;P&gt;&amp;lt;rest of code here&amp;gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Feb 2014 22:43:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Problem-with-exporting-in-pipe-delimiter/m-p/190936#M48112</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2014-02-28T22:43:10Z</dc:date>
    </item>
  </channel>
</rss>

