<?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: Want to Read ONLY column names from a huge text file in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Want-to-Read-ONLY-column-names-from-a-huge-text-file/m-p/580399#M164867</link>
    <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/24206"&gt;@KinjalPatel&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;I have bunch of huge text files in zipped format (.txt.gz). Is it possible to read only column names in SAS from those files.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please guide me if you have any solution.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;Kinjal&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;So if you have file name bigfile.txt.gz the you can use the OBS=1 option on the INFILE statement to just read the first observation.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data headers ;
  infile 'bigfile.txt.gz' zip gzip obs=1 dsd dlm=',' ;
  length name $32 ;
  column+1;
  input name @@;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Sun, 11 Aug 2019 14:28:54 GMT</pubDate>
    <dc:creator>Tom</dc:creator>
    <dc:date>2019-08-11T14:28:54Z</dc:date>
    <item>
      <title>Want to Read ONLY column names from a huge text file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Want-to-Read-ONLY-column-names-from-a-huge-text-file/m-p/580398#M164866</link>
      <description>&lt;P&gt;I have bunch of huge text files in zipped format (.txt.gz). Is it possible to read only column names in SAS from those files.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please guide me if you have any solution.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;Kinjal&lt;/P&gt;</description>
      <pubDate>Sun, 11 Aug 2019 14:24:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Want-to-Read-ONLY-column-names-from-a-huge-text-file/m-p/580398#M164866</guid>
      <dc:creator>KinjalPatel</dc:creator>
      <dc:date>2019-08-11T14:24:56Z</dc:date>
    </item>
    <item>
      <title>Re: Want to Read ONLY column names from a huge text file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Want-to-Read-ONLY-column-names-from-a-huge-text-file/m-p/580399#M164867</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/24206"&gt;@KinjalPatel&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;I have bunch of huge text files in zipped format (.txt.gz). Is it possible to read only column names in SAS from those files.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please guide me if you have any solution.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;Kinjal&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;So if you have file name bigfile.txt.gz the you can use the OBS=1 option on the INFILE statement to just read the first observation.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data headers ;
  infile 'bigfile.txt.gz' zip gzip obs=1 dsd dlm=',' ;
  length name $32 ;
  column+1;
  input name @@;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 11 Aug 2019 14:28:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Want-to-Read-ONLY-column-names-from-a-huge-text-file/m-p/580399#M164867</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2019-08-11T14:28:54Z</dc:date>
    </item>
    <item>
      <title>Re: Want to Read ONLY column names from a huge text file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Want-to-Read-ONLY-column-names-from-a-huge-text-file/m-p/580400#M164868</link>
      <description>Thanks a lot for quick reply!</description>
      <pubDate>Sun, 11 Aug 2019 14:39:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Want-to-Read-ONLY-column-names-from-a-huge-text-file/m-p/580400#M164868</guid>
      <dc:creator>KinjalPatel</dc:creator>
      <dc:date>2019-08-11T14:39:49Z</dc:date>
    </item>
  </channel>
</rss>

