<?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 Append data to the end of each row in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Append-data-to-the-end-of-each-row/m-p/43096#M11256</link>
    <description>Hello all,&lt;BR /&gt;
&lt;BR /&gt;
I have a delimited input file with close to 100 fields.  i would like to append data to the end of each row.  But i don't want to define each of the 100 fields in the input section.  in addition, since it's a delimited file, each row has different length.  Is there a way to skip to the end of each row from an input file when reading it?&lt;BR /&gt;
&lt;BR /&gt;
Thanks for any input!&lt;BR /&gt;
kevin</description>
    <pubDate>Wed, 10 Jun 2009 17:06:40 GMT</pubDate>
    <dc:creator>KevinC_</dc:creator>
    <dc:date>2009-06-10T17:06:40Z</dc:date>
    <item>
      <title>Append data to the end of each row</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Append-data-to-the-end-of-each-row/m-p/43096#M11256</link>
      <description>Hello all,&lt;BR /&gt;
&lt;BR /&gt;
I have a delimited input file with close to 100 fields.  i would like to append data to the end of each row.  But i don't want to define each of the 100 fields in the input section.  in addition, since it's a delimited file, each row has different length.  Is there a way to skip to the end of each row from an input file when reading it?&lt;BR /&gt;
&lt;BR /&gt;
Thanks for any input!&lt;BR /&gt;
kevin</description>
      <pubDate>Wed, 10 Jun 2009 17:06:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Append-data-to-the-end-of-each-row/m-p/43096#M11256</guid>
      <dc:creator>KevinC_</dc:creator>
      <dc:date>2009-06-10T17:06:40Z</dc:date>
    </item>
    <item>
      <title>Re: Append data to the end of each row</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Append-data-to-the-end-of-each-row/m-p/43097#M11257</link>
      <description>Using a DATA step, it is possible to read up the current data record using an INFILE and INPUT statement, and then address it with the SAS reserved variable _INFILE_ for whatever purpose you might require.  A very simple SAS DATA step is listed below for your review/consideration.&lt;BR /&gt;
&lt;BR /&gt;
Also, the INFILE statement has parameters you can code to identify the record length, current column pointer location -- review the SAS Language INFILE discussion for details.&lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks, Inc.&lt;BR /&gt;
&lt;BR /&gt;
data _null_;&lt;BR /&gt;
infile datalines dsd truncover dlm=',';&lt;BR /&gt;
input @;&lt;BR /&gt;
putlog _all_ / _infile_;&lt;BR /&gt;
cards;&lt;BR /&gt;
a,b,c,d&lt;BR /&gt;
e,f,g,h&lt;BR /&gt;
run;</description>
      <pubDate>Wed, 10 Jun 2009 17:35:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Append-data-to-the-end-of-each-row/m-p/43097#M11257</guid>
      <dc:creator>sbb</dc:creator>
      <dc:date>2009-06-10T17:35:10Z</dc:date>
    </item>
    <item>
      <title>Re: Append data to the end of each row</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Append-data-to-the-end-of-each-row/m-p/43098#M11258</link>
      <description>Or you could skip &lt;I&gt;n&lt;/I&gt; fields by reading past them:&lt;BR /&gt;
[pre]&lt;BR /&gt;
input var1-var&lt;I&gt;n&lt;/I&gt; $ @;&lt;BR /&gt;
drop var:;</description>
      <pubDate>Mon, 15 Jun 2009 23:58:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Append-data-to-the-end-of-each-row/m-p/43098#M11258</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2009-06-15T23:58:59Z</dc:date>
    </item>
  </channel>
</rss>

