<?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: Flat File Definition and FIRSTOBS - multiple files at once in SAS Data Management</title>
    <link>https://communities.sas.com/t5/SAS-Data-Management/Flat-File-Definition-and-FIRSTOBS-multiple-files-at-once/m-p/450375#M13894</link>
    <description>&lt;P&gt;One other thing that I have done is to use a WHERE clause within the FILE READER transformation. Hopefully, the column header values will not change. After some syntax errors, I determined that this statement:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;columnHeader&amp;nbsp;&lt;/EM&gt;NOT EQ '&lt;EM&gt;literal&lt;/EM&gt;'&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;on the "Table Options - Advanced" tab and submenu will not load the headers to the next step within the job.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks all...&lt;/P&gt;&lt;P&gt;J.J.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 02 Apr 2018 15:22:44 GMT</pubDate>
    <dc:creator>JJ_Murrin</dc:creator>
    <dc:date>2018-04-02T15:22:44Z</dc:date>
    <item>
      <title>Flat File Definition and FIRSTOBS - multiple files at once</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Flat-File-Definition-and-FIRSTOBS-multiple-files-at-once/m-p/449145#M13853</link>
      <description>&lt;P&gt;Hi -&amp;nbsp;&lt;/P&gt;&lt;P&gt;I started to post a thread regarding the FIRSTOBS not working within DI Studio. Then, I realized that when using an ASTERISK in the flat file definition's filename to pickup multiple files in the same folder, the FIRSTOBS&amp;nbsp;&lt;EM&gt;was&amp;nbsp;&lt;/EM&gt;working; but, as the name certainly implies, it only ignores the&amp;nbsp;&lt;EM&gt;first&amp;nbsp;&lt;/EM&gt;header in all of the data as it is combined. Therefore, the headers in the second thru nth files were kept!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Anyone know of a way to ignore each header in &lt;U&gt;each&lt;/U&gt; file ?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;[DI Studio v4.902]&lt;/P&gt;</description>
      <pubDate>Tue, 27 Mar 2018 20:23:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Flat-File-Definition-and-FIRSTOBS-multiple-files-at-once/m-p/449145#M13853</guid>
      <dc:creator>JJ_Murrin</dc:creator>
      <dc:date>2018-03-27T20:23:19Z</dc:date>
    </item>
    <item>
      <title>Re: Flat File Definition and FIRSTOBS - multiple files at once</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Flat-File-Definition-and-FIRSTOBS-multiple-files-at-once/m-p/449155#M13855</link>
      <description>&lt;P&gt;You can use the END option or EOV option in SAS Base.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;See this post for details, if you were using SAS Base, hopefully some will translate to your work but it may not be valid for DI Studio.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://communities.sas.com/t5/SAS-Communities-Library/How-do-I-write-a-macro-to-import-multiple-text-files-that-have/ta-p/223627" target="_blank"&gt;https://communities.sas.com/t5/SAS-Communities-Library/How-do-I-write-a-macro-to-import-multiple-text-files-that-have/ta-p/223627&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 27 Mar 2018 21:09:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Flat-File-Definition-and-FIRSTOBS-multiple-files-at-once/m-p/449155#M13855</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-03-27T21:09:57Z</dc:date>
    </item>
    <item>
      <title>Re: Flat File Definition and FIRSTOBS - multiple files at once</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Flat-File-Definition-and-FIRSTOBS-multiple-files-at-once/m-p/449195#M13856</link>
      <description>&lt;P&gt;You can use the EOV= option, but it is a little tricky.&lt;/P&gt;
&lt;P&gt;I have started using the FILENAME= option and LAG() as it is easier.&lt;/P&gt;
&lt;P&gt;For both one key is to prime the pump with an input statement with a trailing @.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want ;
  length filename $200 ;
  infile "&amp;amp;path/*.txt" filename=filename ;
  input @;
  if filename ne lag(filename) then input;
  ....
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;For the EOV= option you need to reset the flag. Otherwise once it changes to 1 indicating the start of the second file it stays 1.&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want ;
  infile "&amp;amp;path/*.txt" firstobs=2 eov=eov ;
  eov=0;
  input @;
  if eov then input;
  ....
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 28 Mar 2018 03:32:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Flat-File-Definition-and-FIRSTOBS-multiple-files-at-once/m-p/449195#M13856</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2018-03-28T03:32:53Z</dc:date>
    </item>
    <item>
      <title>Re: Flat File Definition and FIRSTOBS - multiple files at once</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Flat-File-Definition-and-FIRSTOBS-multiple-files-at-once/m-p/449209#M13857</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/171246"&gt;@JJ_Murrin&lt;/a&gt;&lt;/P&gt;
&lt;P&gt;Using DIS to generate code as &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/159"&gt;@Tom&lt;/a&gt;&amp;nbsp;proposes you need to amend the External File object by either writing your own INFILE statement ("Override generated INFILE statement....") or by injecting additional code to the generated INFILE statement.&lt;/P&gt;
&lt;P&gt;Below shows how to implement the 2nd option:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.JPG" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/19496iC4C0FE485ECFCB3F/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture.JPG" alt="Capture.JPG" /&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>Wed, 28 Mar 2018 02:55:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Flat-File-Definition-and-FIRSTOBS-multiple-files-at-once/m-p/449209#M13857</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2018-03-28T02:55:55Z</dc:date>
    </item>
    <item>
      <title>Re: Flat File Definition and FIRSTOBS - multiple files at once</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Flat-File-Definition-and-FIRSTOBS-multiple-files-at-once/m-p/450375#M13894</link>
      <description>&lt;P&gt;One other thing that I have done is to use a WHERE clause within the FILE READER transformation. Hopefully, the column header values will not change. After some syntax errors, I determined that this statement:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;columnHeader&amp;nbsp;&lt;/EM&gt;NOT EQ '&lt;EM&gt;literal&lt;/EM&gt;'&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;on the "Table Options - Advanced" tab and submenu will not load the headers to the next step within the job.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks all...&lt;/P&gt;&lt;P&gt;J.J.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 02 Apr 2018 15:22:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Flat-File-Definition-and-FIRSTOBS-multiple-files-at-once/m-p/450375#M13894</guid>
      <dc:creator>JJ_Murrin</dc:creator>
      <dc:date>2018-04-02T15:22:44Z</dc:date>
    </item>
    <item>
      <title>Re: Flat File Definition and FIRSTOBS - multiple files at once</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Flat-File-Definition-and-FIRSTOBS-multiple-files-at-once/m-p/450469#M13898</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/171246"&gt;@JJ_Murrin&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;One other thing that I have done is to use a WHERE clause within the FILE READER transformation. Hopefully, the column header values will not change. After some syntax errors, I determined that this statement:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;columnHeader&amp;nbsp;&lt;/EM&gt;NOT EQ '&lt;EM&gt;literal&lt;/EM&gt;'&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;on the "Table Options - Advanced" tab and submenu will not load the headers to the next step within the job.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks all...&lt;/P&gt;
&lt;P&gt;J.J.&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/171246"&gt;@JJ_Murrin&lt;/a&gt;&amp;nbsp;That doesn't sound right. You need to inspect (and understand) the generated code to determine if settings done in a transformation have the effect you need.&lt;/P&gt;</description>
      <pubDate>Mon, 02 Apr 2018 21:41:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Flat-File-Definition-and-FIRSTOBS-multiple-files-at-once/m-p/450469#M13898</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2018-04-02T21:41:06Z</dc:date>
    </item>
  </channel>
</rss>

