<?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: skip blank dataline in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/skip-blank-dataline/m-p/74814#M16119</link>
    <description>Can you illustrate this? I can't understand the problem.</description>
    <pubDate>Fri, 27 Feb 2009 14:53:43 GMT</pubDate>
    <dc:creator>deleted_user</dc:creator>
    <dc:date>2009-02-27T14:53:43Z</dc:date>
    <item>
      <title>skip blank dataline</title>
      <link>https://communities.sas.com/t5/SAS-Programming/skip-blank-dataline/m-p/74813#M16118</link>
      <description>I have column formats in the raw data with the same variable going accross four different columns.  I have blank lines in the data where variables statename and age should be.  How do I get SAS to skip these blank lines and move down to the next line within the same column instead of going back to the first column and pulling data from there?  Any help would be appreciated. Thanks</description>
      <pubDate>Thu, 19 Feb 2009 20:51:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/skip-blank-dataline/m-p/74813#M16118</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2009-02-19T20:51:53Z</dc:date>
    </item>
    <item>
      <title>Re: skip blank dataline</title>
      <link>https://communities.sas.com/t5/SAS-Programming/skip-blank-dataline/m-p/74814#M16119</link>
      <description>Can you illustrate this? I can't understand the problem.</description>
      <pubDate>Fri, 27 Feb 2009 14:53:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/skip-blank-dataline/m-p/74814#M16119</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2009-02-27T14:53:43Z</dc:date>
    </item>
    <item>
      <title>Re: skip blank dataline</title>
      <link>https://communities.sas.com/t5/SAS-Programming/skip-blank-dataline/m-p/74815#M16120</link>
      <description>You will need to use a combination of INPUT with column location pointer to read up each of your data records, first reading the leading columns followed by your columnar-oriented data columns.  Then if you decide it is appropriate, only OUTPUT under the appropriate conditions, as you decide while doing your INPUT logic in a DATA step.  With this approach/technique, you will likely need to consider using a RETAIN statement for the variables that are blank, as you have described.  A sample DATA step is shown below using the SAS DATA step programming techniques mentioned above.&lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks, Inc.&lt;BR /&gt;
&lt;BR /&gt;
DATA ;&lt;BR /&gt;
INFILE DATALINES;&lt;BR /&gt;
INPUT @1 VAR1 $CHAR2. @4 VAR2 $CHAR1. @6 VAR3 2. VAR4 2.;&lt;BR /&gt;
IF VAR1 = ' ' THEN VAR1 = LVAR1;&lt;BR /&gt;
IF VAR2 = ' ' THEN VAR2 = LVAR2;&lt;BR /&gt;
PUTLOG '&amp;gt;BEFORE_OUTPUT&amp;gt;' / _ALL_;&lt;BR /&gt;
OUTPUT;&lt;BR /&gt;
LVAR1 = VAR1;&lt;BR /&gt;
LVAR2 = VAR2;&lt;BR /&gt;
RETAIN LVAR1 LVAR2 ' ';&lt;BR /&gt;
DATALINES;&lt;BR /&gt;
AA B 1122&lt;BR /&gt;
     3344&lt;BR /&gt;
BB C 2233&lt;BR /&gt;
     4455&lt;BR /&gt;
RUN;</description>
      <pubDate>Fri, 27 Feb 2009 19:25:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/skip-blank-dataline/m-p/74815#M16120</guid>
      <dc:creator>sbb</dc:creator>
      <dc:date>2009-02-27T19:25:55Z</dc:date>
    </item>
  </channel>
</rss>

