<?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: Reading Pipe delimited txt file with embadded space in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Reading-Pipe-delimited-txt-file-with-embadded-space/m-p/58236#M12649</link>
    <description>Hi,AmitKB &lt;BR /&gt;
&lt;BR /&gt;
Please ask you self all of this fields numeric or character??&lt;BR /&gt;
RULE: ----+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0&lt;BR /&gt;
2 0 |5291080012009493|230294509 |40065491377|15233204 |&lt;B&gt;1989-09-06&lt;/B&gt; |1|455 SE EXCEL ST&lt;BR /&gt;
&lt;BR /&gt;
1989-09-06 you push into &lt;B&gt;numeric&lt;/B&gt; AddressLine1....&lt;BR /&gt;
&lt;BR /&gt;
Regards,&lt;BR /&gt;
&lt;BR /&gt;
lu</description>
    <pubDate>Thu, 23 Jul 2009 21:16:23 GMT</pubDate>
    <dc:creator>lu</dc:creator>
    <dc:date>2009-07-23T21:16:23Z</dc:date>
    <item>
      <title>Reading Pipe delimited txt file with embadded space</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reading-Pipe-delimited-txt-file-with-embadded-space/m-p/58230#M12643</link>
      <description>Hi all,&lt;BR /&gt;
          I have a pipe delimited txt file with embadded space for the address variable. I get the following error.&lt;BR /&gt;
 &lt;BR /&gt;
         Data:        |455 SE EXCEL ST   |&lt;BR /&gt;
&lt;BR /&gt;
          Error:     NOTE: Invalid data for AddressLine1 in line 2 79-128&lt;BR /&gt;
&lt;BR /&gt;
      Thanks for all your help.&lt;BR /&gt;
&lt;BR /&gt;
Regards,&lt;BR /&gt;
Amit</description>
      <pubDate>Thu, 23 Jul 2009 20:15:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reading-Pipe-delimited-txt-file-with-embadded-space/m-p/58230#M12643</guid>
      <dc:creator>AmitKB</dc:creator>
      <dc:date>2009-07-23T20:15:12Z</dc:date>
    </item>
    <item>
      <title>Re: Reading Pipe delimited txt file with embadded space</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reading-Pipe-delimited-txt-file-with-embadded-space/m-p/58231#M12644</link>
      <description>Reply to your post and paste in it your SAS code, preferably the SAS log with the coded executed so the exact error and location is revealed.  This suggestion will definitely help narrow the possibilities of your problem source.&lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks, Inc.</description>
      <pubDate>Thu, 23 Jul 2009 20:25:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reading-Pipe-delimited-txt-file-with-embadded-space/m-p/58231#M12644</guid>
      <dc:creator>sbb</dc:creator>
      <dc:date>2009-07-23T20:25:04Z</dc:date>
    </item>
    <item>
      <title>Re: Reading Pipe delimited txt file with embadded space</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reading-Pipe-delimited-txt-file-with-embadded-space/m-p/58232#M12645</link>
      <description>Like sbb, I'll have to say that without the rest of your program and log, we are just guessing.  I suspect it is not the space.</description>
      <pubDate>Thu, 23 Jul 2009 20:25:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reading-Pipe-delimited-txt-file-with-embadded-space/m-p/58232#M12645</guid>
      <dc:creator>Doc_Duke</dc:creator>
      <dc:date>2009-07-23T20:25:41Z</dc:date>
    </item>
    <item>
      <title>Re: Reading Pipe delimited txt file with embadded space</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reading-Pipe-delimited-txt-file-with-embadded-space/m-p/58233#M12646</link>
      <description>Here is the log code.&lt;BR /&gt;
Thanks for all your help.&lt;BR /&gt;
&lt;BR /&gt;
Amit&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
 9479  DATA temp;&lt;BR /&gt;
9480    INFILE '/test/data.txt'&lt;BR /&gt;
9481     lrecl=32767 dlm = '|'  missover firstobs=2 obs=5 ;&lt;BR /&gt;
9482      attrib DteOfBirth  informat=IS8601DA. format=date9.;&lt;BR /&gt;
9483     input  AppNbr AcctNbr ProductNbr PartyId CustomerNbr DteOfBirth RoleTypNbr AddressLine1 AddressLine2&lt;BR /&gt;
9484       City State Zip Country SSN Gender DriverIdNbr DriverIdState DriverLicenseExpiration WorkPhone&lt;BR /&gt;
9485       HomePhone StatementNm TranferAccessMedNbr ReissueDte StatusCd AcctOpenDte CreateDte ;&lt;BR /&gt;
9486    run;&lt;BR /&gt;
&lt;BR /&gt;
NOTE: No encoding was specified for the fileref "#LN00099" (for the file "/test/temp.txt").  A byte order mark&lt;BR /&gt;
      in the file indicates that the data is encoded in "utf-16le".  This encoding will be used to process the file.&lt;BR /&gt;
NOTE: The infile '/test/temp.txt' is:&lt;BR /&gt;
      Filename=/'test/temp.txt,&lt;BR /&gt;
      Owner Name=DataTrsfr,Group Name=sasdata,&lt;BR /&gt;
      Access Permission=rw-rw----,&lt;BR /&gt;
      Last Modified=Wed Jul 22 15:04:09 2009,&lt;BR /&gt;
      File Size (bytes)=227300162&lt;BR /&gt;
&lt;BR /&gt;
NOTE: Invalid data for AddressLine1 in line 2 79-128.&lt;BR /&gt;
NOTE: Invalid data for City in line 2 181-210.&lt;BR /&gt;
NOTE: Invalid data for State in line 2 212-214.&lt;BR /&gt;
NOTE: Invalid data for Gender in line 2 246-246.&lt;BR /&gt;
NOTE: Invalid data for StatementNm in line 2 314-363.&lt;BR /&gt;
NOTE: Invalid data for ReissueDte in line 2 385-407.&lt;BR /&gt;
NOTE: Invalid data for StatusCd in line 2 409-409.&lt;BR /&gt;
NOTE: Invalid data for AcctOpenDte in line 2 411-433.&lt;BR /&gt;
NOTE: Invalid data for CreateDte in line 2 435-458.&lt;BR /&gt;
RULE:     ----+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0&lt;BR /&gt;
2         0          |5291080012009493|230294509 |40065491377|15233204  |1989-09-06  |1|455 SE EXCEL ST&lt;BR /&gt;
     101                              |                                                  |SHERIDAN&lt;BR /&gt;
     201            |OR |973781962558   |840|541313427|F|0        |0 |0                 |                |9712&lt;BR /&gt;
     301  411459      |EMILY CROCKER                                     |5291080015467516   |2008-09-03 00:00&lt;BR /&gt;
&lt;BR /&gt;
     401  :00.000|S|2008-09-03 00:00:00.000|2009-07-17 00:00:00.000. 458&lt;BR /&gt;
    ZONE  3332333757333323323323333333323337333323323323333333323330&lt;BR /&gt;
    NUMR  A00E000C3C2008D09D03000A00A00E000C2009D07D17000A00A00E000D&lt;BR /&gt;
DteOfBirth=06SEP1989 AppNbr=0 AcctNbr=5.29108E15 ProductNbr=230294509 PartyId=40065491377 CustomerNbr=15233204 RoleTypNbr=1 AddressLine1=.&lt;BR /&gt;
AddressLine2=. City=. State=. Zip=973781962558 Country=840 SSN=541313427 Gender=. DriverIdNbr=0 DriverIdState=0 DriverLicenseExpiration=0&lt;BR /&gt;
WorkPhone=. HomePhone=9712411459 StatementNm=. TranferAccessMedNbr=5.29108E15 ReissueDte=. StatusCd=. AcctOpenDte=. CreateDte=. _ERROR_=1 _N_=1</description>
      <pubDate>Thu, 23 Jul 2009 20:30:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reading-Pipe-delimited-txt-file-with-embadded-space/m-p/58233#M12646</guid>
      <dc:creator>AmitKB</dc:creator>
      <dc:date>2009-07-23T20:30:55Z</dc:date>
    </item>
    <item>
      <title>Re: Reading Pipe delimited txt file with embadded space</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reading-Pipe-delimited-txt-file-with-embadded-space/m-p/58234#M12647</link>
      <description>AmitKB,you missed formats for input fields.&lt;BR /&gt;
lu</description>
      <pubDate>Thu, 23 Jul 2009 20:52:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reading-Pipe-delimited-txt-file-with-embadded-space/m-p/58234#M12647</guid>
      <dc:creator>lu</dc:creator>
      <dc:date>2009-07-23T20:52:39Z</dc:date>
    </item>
    <item>
      <title>Re: Reading Pipe delimited txt file with embadded space</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reading-Pipe-delimited-txt-file-with-embadded-space/m-p/58235#M12648</link>
      <description>Hi Lu,&lt;BR /&gt;
          I was just trying to get a feel of the data before wring the entrie code. However I noticed the embedded space and I dont know how to handle the in pipe delimited file.&lt;BR /&gt;
&lt;BR /&gt;
 Thanks for all your help.&lt;BR /&gt;
&lt;BR /&gt;
Regards,&lt;BR /&gt;
&lt;BR /&gt;
Amit</description>
      <pubDate>Thu, 23 Jul 2009 20:59:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reading-Pipe-delimited-txt-file-with-embadded-space/m-p/58235#M12648</guid>
      <dc:creator>AmitKB</dc:creator>
      <dc:date>2009-07-23T20:59:32Z</dc:date>
    </item>
    <item>
      <title>Re: Reading Pipe delimited txt file with embadded space</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reading-Pipe-delimited-txt-file-with-embadded-space/m-p/58236#M12649</link>
      <description>Hi,AmitKB &lt;BR /&gt;
&lt;BR /&gt;
Please ask you self all of this fields numeric or character??&lt;BR /&gt;
RULE: ----+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0&lt;BR /&gt;
2 0 |5291080012009493|230294509 |40065491377|15233204 |&lt;B&gt;1989-09-06&lt;/B&gt; |1|455 SE EXCEL ST&lt;BR /&gt;
&lt;BR /&gt;
1989-09-06 you push into &lt;B&gt;numeric&lt;/B&gt; AddressLine1....&lt;BR /&gt;
&lt;BR /&gt;
Regards,&lt;BR /&gt;
&lt;BR /&gt;
lu</description>
      <pubDate>Thu, 23 Jul 2009 21:16:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reading-Pipe-delimited-txt-file-with-embadded-space/m-p/58236#M12649</guid>
      <dc:creator>lu</dc:creator>
      <dc:date>2009-07-23T21:16:23Z</dc:date>
    </item>
    <item>
      <title>Re: Reading Pipe delimited txt file with embadded space</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reading-Pipe-delimited-txt-file-with-embadded-space/m-p/58237#M12650</link>
      <description>Hi Lu,&lt;BR /&gt;
          The log pasting has moved the ruler.&lt;BR /&gt;
&lt;BR /&gt;
      For Adressline1  SAS reads the following:&lt;BR /&gt;
        |455 SE EXCEL ST |&lt;BR /&gt;
&lt;BR /&gt;
 Due to the The embedded space it is not able to read.&lt;BR /&gt;
&lt;BR /&gt;
Regards,&lt;BR /&gt;
&lt;BR /&gt;
Amit</description>
      <pubDate>Thu, 23 Jul 2009 21:24:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reading-Pipe-delimited-txt-file-with-embadded-space/m-p/58237#M12650</guid>
      <dc:creator>AmitKB</dc:creator>
      <dc:date>2009-07-23T21:24:03Z</dc:date>
    </item>
    <item>
      <title>Re: Reading Pipe delimited txt file with embadded space</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reading-Pipe-delimited-txt-file-with-embadded-space/m-p/58238#M12651</link>
      <description>Hi &lt;BR /&gt;
&lt;BR /&gt;
AddressLine1 is numeric??&lt;BR /&gt;
&lt;BR /&gt;
DteOfBirth=06SEP1989 AppNbr=0 AcctNbr=5.29108E15 ProductNbr=230294509 PartyId=40065491377 CustomerNbr=15233204 RoleTypNbr=1 &lt;B&gt;&lt;U&gt;AddressLine1&lt;/U&gt;=.&lt;/B&gt;&lt;BR /&gt;
AddressLine2=. City=. State=. Zip=973781962558 Country=840 SSN=541313427 Gender=. DriverIdNbr=0 DriverIdState=0</description>
      <pubDate>Thu, 23 Jul 2009 21:33:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reading-Pipe-delimited-txt-file-with-embadded-space/m-p/58238#M12651</guid>
      <dc:creator>lu</dc:creator>
      <dc:date>2009-07-23T21:33:08Z</dc:date>
    </item>
    <item>
      <title>Re: Reading Pipe delimited txt file with embadded space</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reading-Pipe-delimited-txt-file-with-embadded-space/m-p/58239#M12652</link>
      <description>Also, in case you have an empty field, you will want to explore coding the DSD INFILE statement parameter.  Honestly, what were you expecting to hear back from your original post, especially when no SAS code or diagnostics output was submitted with your post?  &lt;BR /&gt;
&lt;BR /&gt;
You may want to consider "trying to get a feel for the data" by using DATALINES;  and coding a small set of instream input or build a 2 to 10 line input file with a data sample -- at least setup your INPUT statement to decode your input file structure and add some PUTLOG _ALL_;   commands after your INPUT or near the end of your DATA step, for self-diagnosis and a bit of learning about your data.&lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks, Inc.</description>
      <pubDate>Thu, 23 Jul 2009 21:44:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reading-Pipe-delimited-txt-file-with-embadded-space/m-p/58239#M12652</guid>
      <dc:creator>sbb</dc:creator>
      <dc:date>2009-07-23T21:44:05Z</dc:date>
    </item>
    <item>
      <title>Re: Reading Pipe delimited txt file with embadded space</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reading-Pipe-delimited-txt-file-with-embadded-space/m-p/58240#M12653</link>
      <description>to convert the pipe delimited content to view in columns, is not complex. Try[pre]&lt;BR /&gt;
data ;&lt;BR /&gt;
      infile 'your data' dsd dlm='|' lrel= 10000  truncover;&lt;BR /&gt;
      length col1-col30 $20 ;&lt;BR /&gt;
      input col1-col30 ;&lt;BR /&gt;
run;&lt;BR /&gt;
proc print ;&lt;BR /&gt;
run ;[/pre]&lt;BR /&gt;
That should give an idea of shape and informats required.</description>
      <pubDate>Thu, 23 Jul 2009 22:00:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reading-Pipe-delimited-txt-file-with-embadded-space/m-p/58240#M12653</guid>
      <dc:creator>Peter_C</dc:creator>
      <dc:date>2009-07-23T22:00:31Z</dc:date>
    </item>
    <item>
      <title>Re: Reading Pipe delimited txt file with embadded space</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reading-Pipe-delimited-txt-file-with-embadded-space/m-p/58241#M12654</link>
      <description>Hi all,&lt;BR /&gt;
           Thanks for all your replies. I will try it tomorrow. &lt;BR /&gt;
&lt;BR /&gt;
             Also I apologies for not providing the log and code in the original post, next time I will be more descriptive.&lt;BR /&gt;
&lt;BR /&gt;
 Regards,&lt;BR /&gt;
&lt;BR /&gt;
Amit</description>
      <pubDate>Thu, 23 Jul 2009 23:20:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reading-Pipe-delimited-txt-file-with-embadded-space/m-p/58241#M12654</guid>
      <dc:creator>AmitKB</dc:creator>
      <dc:date>2009-07-23T23:20:09Z</dc:date>
    </item>
  </channel>
</rss>

