<?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: how to exstact data from unix in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/how-to-exstact-data-from-unix/m-p/8797#M392</link>
    <description>odd repetition of msg.,  deleted -  Peter.C</description>
    <pubDate>Sat, 12 Feb 2011 14:38:20 GMT</pubDate>
    <dc:creator>Peter_C</dc:creator>
    <dc:date>2011-02-12T14:38:20Z</dc:date>
    <item>
      <title>how to exstact data from unix</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-exstact-data-from-unix/m-p/8792#M387</link>
      <description>I have 2 data set filea  fileb&lt;BR /&gt;
&lt;BR /&gt;
filea          fileb&lt;BR /&gt;
filename    filename&lt;BR /&gt;
a1                b1&lt;BR /&gt;
a2               b2&lt;BR /&gt;
a3               b3&lt;BR /&gt;
a4               b4&lt;BR /&gt;
a5               b5  &lt;BR /&gt;
a6               b6&lt;BR /&gt;
a7               b7&lt;BR /&gt;
a8               b8&lt;BR /&gt;
&lt;BR /&gt;
I have to exstact data from unix as per filename&lt;BR /&gt;
&lt;BR /&gt;
below mention path&lt;BR /&gt;
&lt;BR /&gt;
x&amp;gt;y&amp;gt;z&amp;gt;a1&amp;gt;l&lt;BR /&gt;
&lt;BR /&gt;
-rwxrwxr-x   1 x binary    173922 Feb  8 07:20 a1_07-02-2011_status.                                             log&lt;BR /&gt;
-rwxrwxr-x   1 x binary    173922 Feb  9 05:18 a1_08-02-2011_status.                                             log&lt;BR /&gt;
-rwxrwxr-x   1 x binary    173922 Feb 10 05:35 a1_09-02-2011_status.                                             log&lt;BR /&gt;
-rwxrwxr-x   1 x binary    173922 Feb 11 05:41 a1_10-02-2011_status.                                             log&lt;BR /&gt;
-rwxrwxr-x   1 x binary    173922 Feb 12 08:31 a1_11-02-2011_status.                                             log&lt;BR /&gt;
&lt;BR /&gt;
x&amp;gt;y&amp;gt;z&amp;gt;a2&amp;gt;l&lt;BR /&gt;
&lt;BR /&gt;
-rwxrwxr-x   1 x binary    173922 Feb  8 07:20 a2_07-02-2011_status.                                             log&lt;BR /&gt;
-rwxrwxr-x   1 x binary    173922 Feb  9 05:18 a2_08-02-2011_status.                                             log&lt;BR /&gt;
-rwxrwxr-x   1 x binary    173922 Feb 10 05:35 a2_09-02-2011_status.                                             log&lt;BR /&gt;
-rwxrwxr-x   1 x binary    173922 Feb 11 05:41 a2_10-02-2011_status.                                             log&lt;BR /&gt;
-rwxrwxr-x   1 x binary    173922 Feb 12 08:31 a2_11-02-2011_status.                                             log&lt;BR /&gt;
&lt;BR /&gt;
x&amp;gt;y&amp;gt;z&amp;gt;b1&amp;gt;l&lt;BR /&gt;
-rwxrwxr-x   1 x binary    173922 Feb  8 07:20 b1_07-02-2011_status.                                             log&lt;BR /&gt;
-rwxrwxr-x   1 x binary    173922 Feb  9 05:18 b1_08-02-2011_status.                                             log&lt;BR /&gt;
-rwxrwxr-x   1 x binary    173922 Feb 10 05:35 b1_09-02-2011_status.                                             log&lt;BR /&gt;
-rwxrwxr-x   1 x binary    173922 Feb 11 05:41 b1_10-02-2011_status.                                             log&lt;BR /&gt;
-rwxrwxr-x   1 x binary    173922 Feb 12 08:31 b1_11-02-2011_status.                                             log&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
I need to create a data set  filec   which is like&lt;BR /&gt;
&lt;BR /&gt;
filec&lt;BR /&gt;
filename&lt;BR /&gt;
a1_07-02-2011_status&lt;BR /&gt;
 a1_08-02-2011_status&lt;BR /&gt;
a1_09-02-2011_status&lt;BR /&gt;
a1_10-02-2011_status&lt;BR /&gt;
a1_11-02-2011_status&lt;BR /&gt;
a2_07-02-2011_status&lt;BR /&gt;
 a2_08-02-2011_status&lt;BR /&gt;
a2_09-02-2011_status&lt;BR /&gt;
a2_10-02-2011_status&lt;BR /&gt;
a2_11-02-2011_status&lt;BR /&gt;
b1_07-02-2011_status&lt;BR /&gt;
 b1_08-02-2011_status&lt;BR /&gt;
b1_09-02-2011_status&lt;BR /&gt;
b1_10-02-2011_status&lt;BR /&gt;
b1_11-02-2011_status&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Please help me</description>
      <pubDate>Sat, 12 Feb 2011 07:52:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-exstact-data-from-unix/m-p/8792#M387</guid>
      <dc:creator>arpit</dc:creator>
      <dc:date>2011-02-12T07:52:59Z</dc:date>
    </item>
    <item>
      <title>Re: how to exstact data from unix</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-exstact-data-from-unix/m-p/8793#M388</link>
      <description>I presume you know what command will list your file system hierarchy as you show in the posting. That is the command whose output a data step can read and parse&lt;BR /&gt;
roam through support.sas.com for examples and samples of &lt;BR /&gt;
filename pipe (see &lt;A href="http://support.sas.com/documentation/cdl/en/hostunx/61879/HTML/default/viewer.htm#pipe.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/hostunx/61879/HTML/default/viewer.htm#pipe.htm&lt;/A&gt; )&lt;BR /&gt;
function scan()&lt;BR /&gt;
(for example &lt;BR /&gt;
filename = scan( data, -2, '. ' ) ;&lt;BR /&gt;
would use delimiters dot and blank, to extract the second last string from string "data" .&lt;BR /&gt;
&lt;BR /&gt;
filename files_l pipe "your command" ;&lt;BR /&gt;
data your_data_with_filenames ;&lt;BR /&gt;
length filename $200 ;&lt;BR /&gt;
infile files_l truncover ;&lt;BR /&gt;
input  ;&lt;BR /&gt;
if scan( _infile_, -1, '. ' ) ='log' ;&lt;BR /&gt;
 * ignoring lines which do not finish "log" ;&lt;BR /&gt;
filename = scan( _infile_, -2, '. ' ) ;&lt;BR /&gt;
run;</description>
      <pubDate>Sat, 12 Feb 2011 09:41:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-exstact-data-from-unix/m-p/8793#M388</guid>
      <dc:creator>Peter_C</dc:creator>
      <dc:date>2011-02-12T09:41:11Z</dc:date>
    </item>
    <item>
      <title>Re: how to exstact data from unix</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-exstact-data-from-unix/m-p/8794#M389</link>
      <description>we are using a macro to connect the unix environment .&lt;BR /&gt;
&lt;BR /&gt;
So please solve my problem</description>
      <pubDate>Sat, 12 Feb 2011 10:26:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-exstact-data-from-unix/m-p/8794#M389</guid>
      <dc:creator>arpit</dc:creator>
      <dc:date>2011-02-12T10:26:20Z</dc:date>
    </item>
    <item>
      <title>Re: how to exstact data from unix</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-exstact-data-from-unix/m-p/8795#M390</link>
      <description>If you want this added to your macro, and you can't see how to do it, and so you want us to do it, then you need to reveal your macro</description>
      <pubDate>Sat, 12 Feb 2011 10:40:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-exstact-data-from-unix/m-p/8795#M390</guid>
      <dc:creator>Peter_C</dc:creator>
      <dc:date>2011-02-12T10:40:51Z</dc:date>
    </item>
    <item>
      <title>Re: how to exstact data from unix</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-exstact-data-from-unix/m-p/8796#M391</link>
      <description>If you want this added to your macro, and you can't see how to do it, and so you want us to do it, then you need to reveal your macro</description>
      <pubDate>Sat, 12 Feb 2011 10:42:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-exstact-data-from-unix/m-p/8796#M391</guid>
      <dc:creator>Peter_C</dc:creator>
      <dc:date>2011-02-12T10:42:06Z</dc:date>
    </item>
    <item>
      <title>Re: how to exstact data from unix</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-exstact-data-from-unix/m-p/8797#M392</link>
      <description>odd repetition of msg.,  deleted -  Peter.C</description>
      <pubDate>Sat, 12 Feb 2011 14:38:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-exstact-data-from-unix/m-p/8797#M392</guid>
      <dc:creator>Peter_C</dc:creator>
      <dc:date>2011-02-12T14:38:20Z</dc:date>
    </item>
  </channel>
</rss>

