<?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: Read Pipe Delimited File in ODS and Base Reporting</title>
    <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Read-Pipe-Delimited-File/m-p/312854#M17379</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I did the same steps (code) for a pipe delimted text file. The variables are being read, but the observations are not. It is showing as observations =0, variables=3.&lt;/P&gt;&lt;P&gt;The contenst of my file:&lt;/P&gt;&lt;P&gt;lastName|firstName|Age|&lt;/P&gt;&lt;P&gt;abc|def|20|&lt;/P&gt;&lt;P&gt;hij|lmn|24|&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please help me resolve this issue.&lt;/P&gt;</description>
    <pubDate>Sun, 20 Nov 2016 01:57:12 GMT</pubDate>
    <dc:creator>Maheema</dc:creator>
    <dc:date>2016-11-20T01:57:12Z</dc:date>
    <item>
      <title>Read Pipe Delimited File</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Read-Pipe-Delimited-File/m-p/11789#M3090</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I previously created a output file that is pipe delimied file using the following code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; ods csv file="p:\sas\reports\tabname.txt" options(delimiter='|');&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; proc print label noobs data=work01;&lt;/P&gt;&lt;P&gt;&amp;nbsp; run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; ods csv close;&lt;/P&gt;&lt;P&gt;&amp;nbsp; run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am using a new ODS CSV tagset that I also recently downloaded from the SAS interwebnet site.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now I would like to read this file back into a subsequent SAS program.&amp;nbsp; Can I do it the same as I would for an Excel spreadsheet?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I don't know the number of columns in the table but the first row does contain the variable names.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would like to use a PROC IMPORT because I have a large number of tables to read and each one is different.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Feb 2012 19:26:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Read-Pipe-Delimited-File/m-p/11789#M3090</guid>
      <dc:creator>OS2Rules</dc:creator>
      <dc:date>2012-02-23T19:26:02Z</dc:date>
    </item>
    <item>
      <title>Re: Read Pipe Delimited File</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Read-Pipe-Delimited-File/m-p/11790#M3091</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Couldn't you just use?:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PROC IMPORT OUT= WORK.WANT &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DATAFILE= "&lt;SPAN style="background-color: #eef4f9;"&gt;p:\sas\reports\tabname.txt"&lt;/SPAN&gt; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DBMS=DLM REPLACE;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DELIMITER='|'; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; GETNAMES=YES;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DATAROW=2; &lt;/P&gt;&lt;P&gt;RUN;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Feb 2012 19:31:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Read-Pipe-Delimited-File/m-p/11790#M3091</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2012-02-23T19:31:37Z</dc:date>
    </item>
    <item>
      <title>Read Pipe Delimited File</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Read-Pipe-Delimited-File/m-p/11791#M3092</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Art:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Once again making it look simple ! &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks - and see you at TASS! &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Feb 2012 19:48:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Read-Pipe-Delimited-File/m-p/11791#M3092</guid>
      <dc:creator>OS2Rules</dc:creator>
      <dc:date>2012-02-23T19:48:05Z</dc:date>
    </item>
    <item>
      <title>Read Pipe Delimited File</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Read-Pipe-Delimited-File/m-p/11792#M3093</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Since you mention TASS, I should point out for anyone who will be in or near Toronto on March 2nd, 2012 (next Friday), that we've got a fantastic agenda planned (see: &lt;A href="http://www.sas.com/offices/NA/canada/downloads/UserGroups/TASS-" style="color: #0000ff; font-family: courier, monospace; font-size: 14px; text-align: -webkit-auto; white-space: pre; background-color: #ffffff;"&gt;http://www.sas.com/offices/NA/canada/downloads/UserGroups/TASS-&lt;/A&gt;&lt;SPAN style="color: #000000; font-family: courier, monospace; font-size: 14px; text-align: -webkit-auto; white-space: pre; background-color: #ffffff;"&gt;Agenda/TASS_Agendas_March_2012.pdf )&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And, what isn't mentioned in the agenda, is that:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. The Statistics' breakout session is going to have a special presentation on:&lt;SPAN lang="EN-CA" style="font-size: 10pt;"&gt;&amp;nbsp; Predictive modelling (response and categorical models) for non-continuous and continuous – Applying Bayesian (proc discrim) and classical (proc logistic) statistics to improve model performance&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-CA" style="font-size: 10pt;"&gt;and&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-CA" style="font-size: 10pt;"&gt;2. The Coder's Corner breakout session is going to get an advanced look at the April 2012 SGF paper by FriedEgg, KSharp and myself, titled "Sometimes One Needs an Option with Unusual Dates"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-CA" style="font-size: 10pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;P&gt;Looking forward to seeing/meeting you there.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Feb 2012 00:01:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Read-Pipe-Delimited-File/m-p/11792#M3093</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2012-02-24T00:01:52Z</dc:date>
    </item>
    <item>
      <title>Read Pipe Delimited File</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Read-Pipe-Delimited-File/m-p/11793#M3094</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Art:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I shouldn't have been so quick ...&amp;nbsp; there is still something that needs to be worked out.... &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After the file have been read, the SAS table contains a number or 'blank' records at the bottom.&amp;nbsp; I know that this is caused by the PROC IMPORT.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Since I don't know the variable names of any of the tables that I read, is there a simple way to delete these blank records so they don't corrupt my data?&amp;nbsp; Normally I would just use a WHERE varname ne: ''; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Feb 2012 16:04:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Read-Pipe-Delimited-File/m-p/11793#M3094</guid>
      <dc:creator>OS2Rules</dc:creator>
      <dc:date>2012-02-24T16:04:33Z</dc:date>
    </item>
    <item>
      <title>Read Pipe Delimited File</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Read-Pipe-Delimited-File/m-p/11794#M3095</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I would be concerned regarding exactly where the blank lines are coming from.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would guess that there is something wrong with the file you are trying to import, e.g., not having complete records.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What I usually do in such situations is click on F4 to see what proc import actually ran.&amp;nbsp; It may just be a matter of adding or changing one of the options, such as using truncover rather than missover.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you just get rid of blank lines you might end up with garbage, pretty looking garbage, but garbage nonetheless.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Feb 2012 16:12:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Read-Pipe-Delimited-File/m-p/11794#M3095</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2012-02-24T16:12:49Z</dc:date>
    </item>
    <item>
      <title>Read Pipe Delimited File</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Read-Pipe-Delimited-File/m-p/11795#M3096</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Conversely, I just replicated your process and the original ods commands resulted in adding an extra blank record at the end.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The following is my test and the code I used to get rid of the last record:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data work01;&lt;/P&gt;&lt;P&gt;&amp;nbsp; set sashelp.class;&lt;/P&gt;&lt;P&gt;&amp;nbsp; if _n_ in (5,6,7) then do;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; call missing(weight);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; call missing(height);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if _n_ eq 5 then do;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; call missing(age);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; call missing(name);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; end;&lt;/P&gt;&lt;P&gt;&amp;nbsp; end;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ods csv file="c:\art\tabname2.txt" options(delimiter='|');&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc print label noobs data=work01;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ods csv close;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PROC IMPORT OUT= WORK.WANT&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DATAFILE= "c:\art\tabname2.txt"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DBMS=DLM REPLACE;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DELIMITER='|';&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; GETNAMES=YES;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DATAROW=2;&lt;/P&gt;&lt;P&gt;RUN;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data want (drop=x);&lt;/P&gt;&lt;P&gt;&amp;nbsp; set want;&lt;/P&gt;&lt;P&gt;&amp;nbsp; x=cmiss(of _all_);&lt;/P&gt;&lt;P&gt;&amp;nbsp; if x ne 6; /*num vars +1*/&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Feb 2012 17:51:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Read-Pipe-Delimited-File/m-p/11795#M3096</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2012-02-24T17:51:19Z</dc:date>
    </item>
    <item>
      <title>Read Pipe Delimited File</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Read-Pipe-Delimited-File/m-p/11796#M3097</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Considering that every PROC that generates print output puts one or more blank lines after the table in RTF, PDF or other formats I'd say the culprit is PROC PRINT.&lt;/P&gt;&lt;P&gt;When I tried to get rid of the blanks in other output the answer was no joy.&lt;/P&gt;&lt;P&gt;You may need to investigae either EXPORT or if the issue is formatted values, the create text with the formatted values and then Export.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Feb 2012 19:03:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Read-Pipe-Delimited-File/m-p/11796#M3097</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2012-02-24T19:03:09Z</dc:date>
    </item>
    <item>
      <title>Read Pipe Delimited File</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Read-Pipe-Delimited-File/m-p/11797#M3098</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I suspect it is caused by PROC PRINT.&amp;nbsp; Why not generate the output file using PROC EXPORT instead?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Feb 2012 20:11:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Read-Pipe-Delimited-File/m-p/11797#M3098</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2012-02-24T20:11:37Z</dc:date>
    </item>
    <item>
      <title>Read Pipe Delimited File</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Read-Pipe-Delimited-File/m-p/11798#M3099</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Were you finally able to resolve this?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Feb 2012 16:55:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Read-Pipe-Delimited-File/m-p/11798#M3099</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2012-02-27T16:55:27Z</dc:date>
    </item>
    <item>
      <title>Re: Read Pipe Delimited File</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Read-Pipe-Delimited-File/m-p/312854#M17379</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I did the same steps (code) for a pipe delimted text file. The variables are being read, but the observations are not. It is showing as observations =0, variables=3.&lt;/P&gt;&lt;P&gt;The contenst of my file:&lt;/P&gt;&lt;P&gt;lastName|firstName|Age|&lt;/P&gt;&lt;P&gt;abc|def|20|&lt;/P&gt;&lt;P&gt;hij|lmn|24|&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please help me resolve this issue.&lt;/P&gt;</description>
      <pubDate>Sun, 20 Nov 2016 01:57:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Read-Pipe-Delimited-File/m-p/312854#M17379</guid>
      <dc:creator>Maheema</dc:creator>
      <dc:date>2016-11-20T01:57:12Z</dc:date>
    </item>
  </channel>
</rss>

