<?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: pipe delimietd file  with no specific layout in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/pipe-delimietd-file-with-no-specific-layout/m-p/355710#M83316</link>
    <description>&lt;P&gt;Looks like the file is actually delimited with comma. &amp;nbsp;There are 24 fields on each row if you just use comma as the delimiter.&lt;/P&gt;
&lt;P&gt;Perhaps you can read the fields that have pipes into strings and use SCAN() function to parse out the individual pipe delimited values?&lt;/P&gt;</description>
    <pubDate>Wed, 03 May 2017 18:24:04 GMT</pubDate>
    <dc:creator>Tom</dc:creator>
    <dc:date>2017-05-03T18:24:04Z</dc:date>
    <item>
      <title>pipe delimietd file  with no specific layout</title>
      <link>https://communities.sas.com/t5/SAS-Programming/pipe-delimietd-file-with-no-specific-layout/m-p/355696#M83306</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;So i got&amp;nbsp; a&amp;nbsp; wierd file&amp;nbsp; with a lot of comments in it .&lt;/P&gt;
&lt;P&gt;I am sending&amp;nbsp; you a&amp;nbsp; sample.&lt;/P&gt;
&lt;P&gt;They did send me the layout&amp;nbsp; but with comments is it still&amp;nbsp; possible to&amp;nbsp; import&amp;nbsp; a&amp;nbsp; file ?&lt;/P&gt;
&lt;P&gt;I mean&amp;nbsp; i'd understand if the comments are part&amp;nbsp; of the&amp;nbsp; layout but&amp;nbsp; this looks very weird.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Any hints&amp;nbsp; pls?&lt;/P&gt;
&lt;P&gt;or should i ask them to clean&amp;nbsp; it first?&lt;/P&gt;
&lt;P&gt;Thx&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 03 May 2017 17:45:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/pipe-delimietd-file-with-no-specific-layout/m-p/355696#M83306</guid>
      <dc:creator>Tal</dc:creator>
      <dc:date>2017-05-03T17:45:06Z</dc:date>
    </item>
    <item>
      <title>Re: pipe delimietd file  with no specific layout</title>
      <link>https://communities.sas.com/t5/SAS-Programming/pipe-delimietd-file-with-no-specific-layout/m-p/355710#M83316</link>
      <description>&lt;P&gt;Looks like the file is actually delimited with comma. &amp;nbsp;There are 24 fields on each row if you just use comma as the delimiter.&lt;/P&gt;
&lt;P&gt;Perhaps you can read the fields that have pipes into strings and use SCAN() function to parse out the individual pipe delimited values?&lt;/P&gt;</description>
      <pubDate>Wed, 03 May 2017 18:24:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/pipe-delimietd-file-with-no-specific-layout/m-p/355710#M83316</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2017-05-03T18:24:04Z</dc:date>
    </item>
    <item>
      <title>Re: pipe delimietd file  with no specific layout</title>
      <link>https://communities.sas.com/t5/SAS-Programming/pipe-delimietd-file-with-no-specific-layout/m-p/355712#M83318</link>
      <description>&lt;P&gt;Your sample file has a set of lines, each with 23 commas - implying 24 fields.&amp;nbsp;In turn, for some of those records the first comma-separated field has 20 pipe delimiters.&amp;nbsp; All the other records have no pipe symbols at all.&amp;nbsp;&amp;nbsp; I guess the "pipe-less" lines are all comments.&amp;nbsp; If so then this program should give the outline you need.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The first INPUT statement reads no variables put does fill the automatic variable _INFILE_ with the input line contents.&amp;nbsp; Then assign IX to the first column containing a pipe.&amp;nbsp; If ix=0 there are no pipes and the observation should be deleted.&amp;nbsp; But if there are, then re-read the data, starting at column 1 ("INPUT @1") all the variables.&amp;nbsp; Of course, you should use the format you need for the 21 variables to be read.&amp;nbsp; I just used ":$20." as an example.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want (drop=ix);
  infile datalines dlm='|';
  input @;
  ix=indexc(_infile_,'|');
  if ix=0 then delete;
  input @1 (col1-col21) (:$15.);
datalines;
2004-04-15|666623|1000000044|CARP|xxxxxx|Active||||OutPhone|Phone Call|R|25000|1.0|L5J4K4|730697|730698|1979-09-06|M||2017-04-10,,,,,,,,,,,,,,,,,,,,,,,
2004-04-15|123456|6789956756|CARP|xxx|Lapsed|||yyyyyyy|OutPhone|Phone Call|P|100000|5.95|L5L5M1|730703|730704|1976-01-08|M||2017-04-10,,,,,,,,,,,,,,,,,,,,,,,
.................................................,,,,,,,,,,,,,,,,,,,,,,,
? R4 policy created for T10 R3 pending application,,,,,,,,,,,,,,,,,,,,,,,
? Please refer to closed R3 policy for application answers - ABC11014263 ,,,,,,,,,,,,,,,,,,,,,,,
? Any certificate reprint requests are to be sent to the Product Group for ,,,,,,,,,,,,,,,,,,,,,,,
review,,,,,,,,,,,,,,,,,,,,,,,
? Do not request any certificate reprints through Centtric |2017-04-10,,,,,,,,,,,,,,,,,,,,,,,
1996-06-21|36|10000357|AD|vvvv|Lapsed|||yyyy|InPhone|uuuuu|R|400000|0.0||22742|0|||12/22/06 10:06:42 AM(By Tom)Decline as he is in Canada on a student visa but we would be prepared ,,,,,,,,,,,,,,,,,,,,,,,to reconsider when he has obtained his permanent resident status |2017-04-10
,,,,,,,,,,,,,,,,,,,,,,,
1996-06-21|36|10000357|AD|xxxx|Lapsed|||yyyy|InPhone|xxxxx|P|500000|49.85|L8L 5B8|22742|0|1970-04-23|F|12/22/06 10:06:42 AM(By Tom)Decline as he is in Canada on a student visa but we would be prepared ,,,,,,,,,,,,,,,,,,,,,,,to reconsider when he has obtained his permanent resident status |2017-04-10
run;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 03 May 2017 18:32:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/pipe-delimietd-file-with-no-specific-layout/m-p/355712#M83318</guid>
      <dc:creator>mkeintz</dc:creator>
      <dc:date>2017-05-03T18:32:59Z</dc:date>
    </item>
    <item>
      <title>Re: pipe delimietd file  with no specific layout</title>
      <link>https://communities.sas.com/t5/SAS-Programming/pipe-delimietd-file-with-no-specific-layout/m-p/355755#M83331</link>
      <description>&lt;P&gt;thanks ,&lt;/P&gt;
&lt;P&gt;when&amp;nbsp; you say "all the&amp;nbsp; other&amp;nbsp; records&amp;nbsp; have no pipe"&amp;nbsp; are you referring to the comments&amp;nbsp; after the&amp;nbsp; second&amp;nbsp; record?&lt;/P&gt;
&lt;P&gt;And they want the comments imported too which does not make any sense. Yes&amp;nbsp; there are&amp;nbsp; 21&amp;nbsp; fields&amp;nbsp; but&amp;nbsp; how do you&amp;nbsp; see the&amp;nbsp; 23 commas &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&amp;nbsp; just curious&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;this is&amp;nbsp; one&amp;nbsp; of the comments&amp;nbsp; in the&amp;nbsp; huge&amp;nbsp; original file&amp;nbsp; which is&amp;nbsp; right&amp;nbsp; between the&amp;nbsp; 2nd and&amp;nbsp; 3rd&amp;nbsp; record but also&amp;nbsp; i noticed&amp;nbsp; the&amp;nbsp; value of the&amp;nbsp; 20th&amp;nbsp; field which is a&amp;nbsp; string has some&amp;nbsp; wierd&amp;nbsp; data . The 23 commas&amp;nbsp; u showing&amp;nbsp; in&amp;nbsp; your&amp;nbsp; respond&amp;nbsp; are actually part&amp;nbsp; of the&amp;nbsp; 20th field&lt;/P&gt;
&lt;TABLE width="448"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="256" colspan="4"&gt;.................................................&lt;/TD&gt;
&lt;TD width="64"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD width="64"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD width="64"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD colspan="5"&gt;? R4 policy created for T10 R3 pending application&lt;/TD&gt;
&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD colspan="7"&gt;? Please refer to closed R3 policy for application answers - ABC11014263&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD colspan="7"&gt;? Any certificate reprint requests are to be sent to the Product Group for&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;review&lt;/TD&gt;
&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD colspan="7"&gt;? Do not request any certificate reprints through Centtric |2017-04-10&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;</description>
      <pubDate>Wed, 03 May 2017 19:59:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/pipe-delimietd-file-with-no-specific-layout/m-p/355755#M83331</guid>
      <dc:creator>Tal</dc:creator>
      <dc:date>2017-05-03T19:59:35Z</dc:date>
    </item>
    <item>
      <title>Re: pipe delimietd file  with no specific layout</title>
      <link>https://communities.sas.com/t5/SAS-Programming/pipe-delimietd-file-with-no-specific-layout/m-p/355765#M83334</link>
      <description>&lt;P&gt;The commas are in the file you posted. &amp;nbsp;&lt;/P&gt;
&lt;P&gt;If they are not in the file you are looking at then something has happened to make a change. &amp;nbsp;Did you perhaps read it into Excel and save it as a CSV file? &amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;28   data counts;
29     row+1;
30     infile "&amp;amp;path/pipedelim.csv" termstr=crlf;
31     input ;
32     nwords1=countw(_infile_,'|','mq');
33     nwords2=countw(_infile_,',','mq');
34     startq=_infile_=: '?';
35     if _n_ &amp;lt;= 10 then list;
36   run;

NOTE: The infile "...pipedelim.csv" is:
      Filename=...pipedelim.csv,
      RECFM=V,LRECL=32767,File Size (bytes)=1394,
      Last Modified=03May2017:14:16:30,
      Create Time=03May2017:14:16:30

RULE:     ----+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9--
1         2004-04-15|666623|1000000044|CARP|xxxxxx|Active||||OutPhone|Phone Call|R|25000|1.0|L5J4K4|73
      93  0697|730698|1979-09-06|M||2017-04-10,,,,,,,,,,,,,,,,,,,,,,, 151
2         2004-04-15|123456|6789956756|CARP|xxx|Lapsed|||yyyyyyy|OutPhone|Phone Call|P|100000|5.95|L5L
      93  5M1|730703|730704|1976-01-08|M||2017-04-10,,,,,,,,,,,,,,,,,,,,,,, 157
3         .................................................,,,,,,,,,,,,,,,,,,,,,,, 72
4         ? R4 policy created for T10 R3 pending application,,,,,,,,,,,,,,,,,,,,,,, 73
5         ? Please refer to closed R3 policy for application answers - ABC11014263 ,,,,,,,,,,,,,,,,,,,
      93  ,,,, 96
6         ? Any certificate reprint requests are to be sent to the Product Group for ,,,,,,,,,,,,,,,,,
      93  ,,,,,, 98
7         review,,,,,,,,,,,,,,,,,,,,,,, 29
8         ? Do not request any certificate reprints through Centtric |2017-04-10,,,,,,,,,,,,,,,,,,,,,,
      93  , 93
9         1996-06-21|36|10000357|AD|vvvv|Lapsed|||yyyy|InPhone|uuuuu|R|400000|0.0||22742|0|||12/22/06
      93  10:06:42 AM(By Tom)Decline as he is in Canada on a student visa but we would be prepared ,,,
     185  ,,,,,,,,,,,,,,,,,,,,to reconsider when he has obtained his permanent resident status |2017-0
     277  4-10 280
10        ,,,,,,,,,,,,,,,,,,,,,,, 23
NOTE: 11 records were read from the infile "...pipedelim.csv".
      The minimum record length was 23.
      The maximum record length was 300.
&lt;/PRE&gt;
&lt;P&gt;If looks like the comment lines have fewer pipes that then other lines. &amp;nbsp;But at least one of them does have | characters. Is that just part of the comment?&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want (drop=comment) comments(keep=row comment);
   infile "pipedelim.dat" dsd dlm='|' truncover ;
   row+1;
   input @;
   if countw(_infile_,'|','mq') &amp;lt; 21 then do;
     input comment $300.;
     output comments;
   end;
  else do;
     length var1 var2 8;
     informat var1 yymmdd.;
     format var1 yymmdd10.;
     input var1 var2 ;
     output want;
   end;
run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;If you could post all or part of the specifications for the fields? &amp;nbsp;That might help make sense of it.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Do you have any control over the generation of this file? &amp;nbsp;Are lines 3 to 8 intended to be comments on line 2? &amp;nbsp;Can you not have them put onto the same line instead of making new lines?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 03 May 2017 20:22:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/pipe-delimietd-file-with-no-specific-layout/m-p/355765#M83334</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2017-05-03T20:22:37Z</dc:date>
    </item>
    <item>
      <title>Re: pipe delimietd file  with no specific layout</title>
      <link>https://communities.sas.com/t5/SAS-Programming/pipe-delimietd-file-with-no-specific-layout/m-p/355783#M83339</link>
      <description>&lt;P&gt;it was a&amp;nbsp; csv&amp;nbsp; file they&amp;nbsp; gave me and&amp;nbsp; i am&amp;nbsp; reading it in as such but they only gave me the names of the fields,nothing more&amp;nbsp; so&amp;nbsp; we came&amp;nbsp; up with the specifications&amp;nbsp; here &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;input&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt; APPLICATIONDATE :&lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;$10.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt; APPLICATIONNUM :&lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;$10.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt; CERTNUM :&lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;$10.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt; PLANTYPE :&lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;$2.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt; CREATEDBY :&lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;$30.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt; POLICY_STATUS :&lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;$15.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt; POLICY_DETAILED_STATUS :&lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;$15.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt; POLICY_EVENT :&lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;$15.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt; AGENT_ID :&lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;$30.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt; ENROLMENT :&lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;$15.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt; STIMULUS :&lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;$30.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt; OWNER :&lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;$3.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt; PRIMARYFACE :&lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;$10.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt; PREMIUM :&lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;$10.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt; POSTAL_CODE :&lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;$7.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt; CUSTOMERCID :&lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;$15.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt; INSURED2CID :&lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;$15.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt; DOB :&lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;$10.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt; GENDER :&lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;$2.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt; NOTES :&lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;$500.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt; DATE_STAMP :&lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;$10.&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;run&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="3"&gt;; ;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;and&amp;nbsp; here i am attaching a&amp;nbsp; record&amp;nbsp; of this&amp;nbsp; csv&amp;nbsp; file where the&amp;nbsp; 20th field goes into&amp;nbsp; 3&amp;nbsp; rows and SAS&amp;nbsp; reads the data in the second&amp;nbsp; row as a new field(1st field) and&amp;nbsp; the&amp;nbsp; data in the&amp;nbsp; 3rd row as 2nd field of a&amp;nbsp; new&amp;nbsp; record... and&amp;nbsp; the&amp;nbsp; 20th field is pipe delimited&amp;nbsp; just like the others&amp;nbsp; right? &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;So no clue&amp;nbsp; why SAS is treating the value of this 20th field&amp;nbsp; like new&amp;nbsp; fields &lt;/FONT&gt;&lt;/P&gt;&lt;BR /&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/13776i875FFA65A890FE2E/image-size/large?v=1.0&amp;amp;px=600" border="0" alt="Capture1.PNG" title="Capture1.PNG" /&gt;</description>
      <pubDate>Wed, 03 May 2017 20:56:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/pipe-delimietd-file-with-no-specific-layout/m-p/355783#M83339</guid>
      <dc:creator>Tal</dc:creator>
      <dc:date>2017-05-03T20:56:28Z</dc:date>
    </item>
    <item>
      <title>Re: pipe delimietd file  with no specific layout</title>
      <link>https://communities.sas.com/t5/SAS-Programming/pipe-delimietd-file-with-no-specific-layout/m-p/355787#M83341</link>
      <description>&lt;P&gt;yes&amp;nbsp; lines&amp;nbsp;&amp;nbsp; 3-8&amp;nbsp; are a comment and&amp;nbsp; that comment is not&amp;nbsp; a part&amp;nbsp; of any record .&lt;/P&gt;
&lt;P&gt;They&amp;nbsp; have a&amp;nbsp; bunch of different comments&amp;nbsp; throughout this&amp;nbsp; file and&amp;nbsp; now they say&amp;nbsp; they want&amp;nbsp; it&amp;nbsp; imported too???&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;the comments&amp;nbsp; are not even&amp;nbsp; pipe delimited...&lt;/P&gt;</description>
      <pubDate>Wed, 03 May 2017 20:59:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/pipe-delimietd-file-with-no-specific-layout/m-p/355787#M83341</guid>
      <dc:creator>Tal</dc:creator>
      <dc:date>2017-05-03T20:59:29Z</dc:date>
    </item>
    <item>
      <title>Re: pipe delimietd file  with no specific layout</title>
      <link>https://communities.sas.com/t5/SAS-Programming/pipe-delimietd-file-with-no-specific-layout/m-p/355789#M83343</link>
      <description>&lt;P&gt;If you type a CSV file to the screen it would NOT look like the photograph you posted. Did you open the CSV file in Excel? &amp;nbsp;If so then Excel has already potentially changed the file. &amp;nbsp;If you do not have another text editor then just use SAS to read the file and look at what is in it. I posted an example using a DATA step to do this.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If they want to have line breaks within a line of the file then the actual end-of-line for the file needs to be different. For example in Excel you cna enter line breaks into a cell but when you save that as a CSV file the end-of-line is the two character sequence CR+LF ('0D0A'x) and the embedded line breaks are normally just CR ('0D'x). &amp;nbsp;So in that case you can read that with SAS by using the TERMSTR=CRLF option on the INFILE statement.&lt;/P&gt;</description>
      <pubDate>Wed, 03 May 2017 21:02:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/pipe-delimietd-file-with-no-specific-layout/m-p/355789#M83343</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2017-05-03T21:02:12Z</dc:date>
    </item>
    <item>
      <title>Re: pipe delimietd file  with no specific layout</title>
      <link>https://communities.sas.com/t5/SAS-Programming/pipe-delimietd-file-with-no-specific-layout/m-p/355796#M83346</link>
      <description>&lt;P&gt;You need to figure out if those extra commas are really there or not. &amp;nbsp;But if when you look at the real file you still cannot tell the end of lines from the embedded line breaks then you can try using something like this to make a copy of the file with each record on one line.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;filename dat temp ;
data _null_;
  infile "&amp;amp;path/pipedelim.csv" end=eof;
  file dat lrecl=32767;
  input ;
  if _n_&amp;gt;1 then do;
    if countw(_infile_,'|','mq') &amp;gt; 2 then put / @;
    else put '  ' @;
  end;
  put _infile_ @;
  if eof then put;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;But in your example there is some inconsistency in the number of PIPE characters. &amp;nbsp;So for the second record the NOTES column gets shifted one column to the right. &amp;nbsp;So you could try just reading in some extra columns and then trying to figure out which are the notes and which are the DATE_STAMP.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want ;
  infile dat dsd dlm='|' truncover termstr=crlf;
length
  APPLICATIONDATE $10 
  APPLICATIONNUM $10 
  CERTNUM $10 
  PLANTYPE $2 
  CREATEDBY $30 
  POLICY_STATUS $15 
  POLICY_DETAILED_STATUS $15 
  POLICY_EVENT $15 
  AGENT_ID $30 
  ENROLMENT $15 
  STIMULUS $30 
  OWNER $3 
  PRIMARYFACE $10 
  PREMIUM $10 
  POSTAL_CODE $7 
  CUSTOMERCID $15 
  INSURED2CID $15 
  DOB $10 
  GENDER $2 
  X1-X3 $500
  NOTES $500 
  DATE_STAMP $10 
;
  input APPLICATIONDATE -- DATE_STAMP;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 03 May 2017 21:36:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/pipe-delimietd-file-with-no-specific-layout/m-p/355796#M83346</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2017-05-03T21:36:15Z</dc:date>
    </item>
    <item>
      <title>Re: pipe delimietd file  with no specific layout</title>
      <link>https://communities.sas.com/t5/SAS-Programming/pipe-delimietd-file-with-no-specific-layout/m-p/355817#M83351</link>
      <description>Ahh i see what you asking me. Yes, it was opened in excel n then saved as a csv file and given to me like it. I see now the 23 commas. If they want the comment i guess i can assign each line of it to the first variable so a comment of 3 lines would go to 3 separate records but what worries me are some records that have more than 1 column. Original csv file has only one column and the entire record embeded in it right? &lt;BR /&gt;But i see records where some of the value of "notes" is going to another column along with the 21th field so when SAS reads in the file assignes the value of that second column to a new line( into var1 n var2)&lt;BR /&gt;U think termstr=crlf would take care of that issue?&lt;BR /&gt;&lt;BR /&gt;Thx for your insights Tom</description>
      <pubDate>Thu, 04 May 2017 00:53:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/pipe-delimietd-file-with-no-specific-layout/m-p/355817#M83351</guid>
      <dc:creator>Tal</dc:creator>
      <dc:date>2017-05-04T00:53:14Z</dc:date>
    </item>
    <item>
      <title>Re: pipe delimietd file  with no specific layout</title>
      <link>https://communities.sas.com/t5/SAS-Programming/pipe-delimietd-file-with-no-specific-layout/m-p/355821#M83355</link>
      <description>The file is clearly intended to be pipe delimited and not comma delimited. It is the inserted end of lines in the middle of the strings that is causing the trouble. If you had the original file before it was corrupted by Excel you might have a better chance at either being able to read it directly. Or of being able to convert the split lines back into single lines.  For example the original file might have had just CR in the middle of the NOTES field and CRLF at the end of the lines.  Or it might have had quotes around the NOTES field that would make it easier to tell when there are embedded end of lines that need to be removed.&lt;BR /&gt;</description>
      <pubDate>Thu, 04 May 2017 01:25:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/pipe-delimietd-file-with-no-specific-layout/m-p/355821#M83355</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2017-05-04T01:25:09Z</dc:date>
    </item>
    <item>
      <title>Re: pipe delimietd file  with no specific layout</title>
      <link>https://communities.sas.com/t5/SAS-Programming/pipe-delimietd-file-with-no-specific-layout/m-p/355834#M83365</link>
      <description>Thx&lt;BR /&gt;Cant i open the file in text editor and remove the cr or crlf though?</description>
      <pubDate>Thu, 04 May 2017 02:54:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/pipe-delimietd-file-with-no-specific-layout/m-p/355834#M83365</guid>
      <dc:creator>Tal</dc:creator>
      <dc:date>2017-05-04T02:54:47Z</dc:date>
    </item>
    <item>
      <title>Re: pipe delimietd file  with no specific layout</title>
      <link>https://communities.sas.com/t5/SAS-Programming/pipe-delimietd-file-with-no-specific-layout/m-p/355835#M83366</link>
      <description>And how do i find those characters?</description>
      <pubDate>Thu, 04 May 2017 02:56:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/pipe-delimietd-file-with-no-specific-layout/m-p/355835#M83366</guid>
      <dc:creator>Tal</dc:creator>
      <dc:date>2017-05-04T02:56:25Z</dc:date>
    </item>
    <item>
      <title>Re: pipe delimietd file  with no specific layout</title>
      <link>https://communities.sas.com/t5/SAS-Programming/pipe-delimietd-file-with-no-specific-layout/m-p/356017#M83426</link>
      <description>&lt;P&gt;so it is&amp;nbsp; pipe delimited but&amp;nbsp; there is no way i can&amp;nbsp; find&amp;nbsp; that splitter in the&amp;nbsp; 20th field (Notes).&lt;/P&gt;
&lt;P&gt;Any tricks about it? &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 04 May 2017 15:51:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/pipe-delimietd-file-with-no-specific-layout/m-p/356017#M83426</guid>
      <dc:creator>Tal</dc:creator>
      <dc:date>2017-05-04T15:51:52Z</dc:date>
    </item>
    <item>
      <title>Re: pipe delimietd file  with no specific layout</title>
      <link>https://communities.sas.com/t5/SAS-Programming/pipe-delimietd-file-with-no-specific-layout/m-p/356027#M83433</link>
      <description>&lt;P&gt;So that file does not have the extra commas, but it still has the embedded line breaks created using CR+LF and so there is no way to exactly tell that the line break is part of the NOTES field and not the actual end of the record.&lt;/P&gt;
&lt;P&gt;You can see the binary codes for the characters in the file you can try reading the file as FIXED length records.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _null_;
  infile "&amp;amp;path\temp.txt" lrecl=60 recfm=f ;
  input;
  list;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;You could try editing by hand using a text editor, but if you have a large file that can be a pain.&amp;nbsp;To "fix" the file you could first try using the code that I posted before. Basically it looks at the line and if it has a "lot" of pipes then it assumes it is the start of a new record. Otherwise it writes two blanks to replace the existing line break. &amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In the code below I just asked SAS to make a temporary file to write the joined lines into, but you&amp;nbsp;&lt;SPAN&gt;could save the result to a new file on your disk instead.&lt;/SPAN&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;filename dat temp ;
data _null_;
  infile "&amp;amp;path/temp.txt" end=eof;
  file dat lrecl=32767;
  input ;
  if _n_&amp;gt;1 then do;
    if countw(_infile_,'|','mq') &amp;gt; 3 then put / @;
    else put '  ' @;
  end;
  put _infile_ @;
  if eof then put;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Then just read it as a normal pipe delimited file.&lt;/P&gt;</description>
      <pubDate>Thu, 04 May 2017 16:15:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/pipe-delimietd-file-with-no-specific-layout/m-p/356027#M83433</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2017-05-04T16:15:26Z</dc:date>
    </item>
    <item>
      <title>Re: pipe delimietd file  with no specific layout</title>
      <link>https://communities.sas.com/t5/SAS-Programming/pipe-delimietd-file-with-no-specific-layout/m-p/356056#M83439</link>
      <description>&lt;P&gt;this&amp;nbsp; really&amp;nbsp; works like&amp;nbsp; a&amp;nbsp; charm Tom,wow. Thanks a&amp;nbsp; lot!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;One last thing i'd ask&amp;nbsp; is&amp;nbsp; why do you think for a&amp;nbsp; few&amp;nbsp; out of 1000 records&amp;nbsp; the ;last&amp;nbsp; field&amp;nbsp; gets&amp;nbsp; cut off&amp;nbsp; like&amp;nbsp; i ve shown in the&amp;nbsp; pic?&lt;/P&gt;
&lt;P&gt;i checked&amp;nbsp; those&amp;nbsp; 2 particular reocrds&amp;nbsp; in the&amp;nbsp; text&amp;nbsp; file and&amp;nbsp; they&amp;nbsp; have the&amp;nbsp; full dates there.&lt;/P&gt;&lt;BR /&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/13779i2C81777CF3E7DAB4/image-size/large?v=1.0&amp;amp;px=600" border="0" alt="Capture.PNG" title="Capture.PNG" /&gt;</description>
      <pubDate>Thu, 04 May 2017 17:45:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/pipe-delimietd-file-with-no-specific-layout/m-p/356056#M83439</guid>
      <dc:creator>Tal</dc:creator>
      <dc:date>2017-05-04T17:45:36Z</dc:date>
    </item>
    <item>
      <title>Re: pipe delimietd file  with no specific layout</title>
      <link>https://communities.sas.com/t5/SAS-Programming/pipe-delimietd-file-with-no-specific-layout/m-p/356067#M83441</link>
      <description>&lt;P&gt;Check the notes in the log for data steps that read the file. It is possible the lines were truncated.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Also it might be that the code to append the lines added two &amp;nbsp;extra spaces. Make that last column wider to see if the problem is that the data looks like:&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;2014-01-  05&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Or perhaps worse that it looks like there is another whole line stuck on the end of that line.&lt;/P&gt;</description>
      <pubDate>Thu, 04 May 2017 18:29:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/pipe-delimietd-file-with-no-specific-layout/m-p/356067#M83441</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2017-05-04T18:29:41Z</dc:date>
    </item>
    <item>
      <title>Re: pipe delimietd file  with no specific layout</title>
      <link>https://communities.sas.com/t5/SAS-Programming/pipe-delimietd-file-with-no-specific-layout/m-p/356123#M83468</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;i think&amp;nbsp; this code&amp;nbsp; :&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;&lt;STRONG&gt;data&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; _null_&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;infile&lt;/FONT&gt; '/path&lt;FONT color="#800080" face="Courier New" size="3"&gt;/temp.txt"&lt;/FONT&gt;&amp;nbsp; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;end&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;=eof;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;input&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; ;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;if&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; _n_&amp;gt;&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;1&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;then&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;do&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;if&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; countw(_infile_,&lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;'|'&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;,&lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;'mq'&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;) &amp;gt; &lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;3&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;then&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;put&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; / @;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;else&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; put &lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;' '&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; @;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;end&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;put&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;_infile_&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; @;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;if&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; eof &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;then&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;put&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;truncuates the "notes" field at some point but&amp;nbsp; dont&amp;nbsp; undrstand&amp;nbsp; why.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;I have attached&amp;nbsp; a few&amp;nbsp; records and&amp;nbsp; the&amp;nbsp; 1st&amp;nbsp; record&amp;nbsp; is&amp;nbsp; trunctated at the "150%" and&amp;nbsp; along&amp;nbsp; with it&amp;nbsp; the 21th field is assigned a&amp;nbsp; missing value&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;whereas the&amp;nbsp; second record&amp;nbsp; is appended&amp;nbsp; properly.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;Also the&amp;nbsp; 3rd record&amp;nbsp; which is longer than the 1st is read in properly&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 04 May 2017 20:47:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/pipe-delimietd-file-with-no-specific-layout/m-p/356123#M83468</guid>
      <dc:creator>Tal</dc:creator>
      <dc:date>2017-05-04T20:47:09Z</dc:date>
    </item>
    <item>
      <title>Re: pipe delimietd file  with no specific layout</title>
      <link>https://communities.sas.com/t5/SAS-Programming/pipe-delimietd-file-with-no-specific-layout/m-p/356154#M83486</link>
      <description>&lt;P&gt;Seems to me that you are still trying to edit this TEXT file using EXCEL. &amp;nbsp;This time you posted a file with a lot of TAB characters on the ends of the lines instead of COMMAs. &amp;nbsp;Edit the file using a TEXT editor. The SAS program editor will do if you don't have anything else!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To really see what is happening post the LOG which will include very useful information.&lt;/P&gt;
&lt;PRE&gt;102  filename dat temp ;
103  data _null_;
104    infile "&amp;amp;path/temp (2).txt" end=eof lrecl=32767;
105    file dat lrecl=32767;
106    input ;
107    if _n_&amp;gt;1 then do;
108      if countw(_infile_,'|','mq') &amp;gt; 2 then put / @;
109      else put '  ' @;
110    end;
111    put _infile_ @;
112    if eof then put;
113  run;

NOTE: The infile ...
      RECFM=V,LRECL=32767,File Size (bytes)=889,
      Last Modified=04May2017:18:03:35,
      Create Time=04May2017:18:03:34

NOTE: The file DAT is:

      Filename=...
      RECFM=V,LRECL=32767,File Size (bytes)=0,
      Last Modified=04May2017:18:06:00,
      Create Time=04May2017:18:06:00

NOTE: 6 records were read from the infile ".../temp (2).txt".
      The minimum record length was 0.
      The maximum record length was 289.
NOTE: 3 records were written to the file DAT.
      The minimum record length was 278.
      The maximum record length was 303.
&lt;/PRE&gt;
&lt;P&gt;Depending on the version of SAS you are using you might be defaulting to line lengths of only 256. &amp;nbsp;All of the extra tabs could also take up space, especially if they were expanding into 8 spaces each. &amp;nbsp;If I add the EXPANDTABS option to the INFILE statement I get these notes on the line lengths.&lt;/P&gt;
&lt;PRE&gt;NOTE: 6 records were read from the infile ".../temp (2).txt".
      The minimum record length was 0.
      The maximum record length was 289.
NOTE: 3 records were written to the file DAT.
      The minimum record length was 344.
      The maximum record length was 434.
&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 04 May 2017 22:18:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/pipe-delimietd-file-with-no-specific-layout/m-p/356154#M83486</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2017-05-04T22:18:05Z</dc:date>
    </item>
    <item>
      <title>Re: pipe delimietd file  with no specific layout</title>
      <link>https://communities.sas.com/t5/SAS-Programming/pipe-delimietd-file-with-no-specific-layout/m-p/356385#M83573</link>
      <description>&lt;P&gt;the&amp;nbsp; last file i sent&amp;nbsp; was a&amp;nbsp; copy and&amp;nbsp; paste&amp;nbsp; from my original csv&amp;nbsp; to a&amp;nbsp; text editor&amp;nbsp; and maybe&amp;nbsp; that s why it got&amp;nbsp; changed again&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;but&amp;nbsp;&amp;nbsp; you were right&amp;nbsp; i was missing&amp;nbsp; the&amp;nbsp; lrecl=32767&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Works&amp;nbsp; fine now&lt;/P&gt;
&lt;P&gt;Million thanks Tom&lt;/P&gt;
&lt;P&gt;Enjoy the weekend&lt;/P&gt;</description>
      <pubDate>Fri, 05 May 2017 13:48:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/pipe-delimietd-file-with-no-specific-layout/m-p/356385#M83573</guid>
      <dc:creator>Tal</dc:creator>
      <dc:date>2017-05-05T13:48:05Z</dc:date>
    </item>
  </channel>
</rss>

