<?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: linux command from sas eg in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/linux-command-from-sas-eg/m-p/414175#M26643</link>
    <description>&lt;P&gt;Thanks Reeza, it worked fine,,,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 16 Nov 2017 22:47:14 GMT</pubDate>
    <dc:creator>woo</dc:creator>
    <dc:date>2017-11-16T22:47:14Z</dc:date>
    <item>
      <title>linux command from sas eg</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/linux-command-from-sas-eg/m-p/414158#M26637</link>
      <description>&lt;P&gt;hello, I have sas 9.4 on linux and trying to run some linux command to get specific list of files,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;if run this command "&lt;STRONG&gt;du -hs * | sort -hr | head -3&lt;/STRONG&gt;" in linux it give me output like,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;200G&amp;nbsp;&amp;nbsp;&amp;nbsp; filename_1&lt;/P&gt;
&lt;P&gt;100G&amp;nbsp;&amp;nbsp;&amp;nbsp; filename_2&lt;/P&gt;
&lt;P&gt;50G&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;filename_3&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;trying to get this in sas datasets using below statement but not giving what I want, any suggestion?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#3366ff"&gt;data test;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#3366ff"&gt;length file_size $20 file_name $ 200;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#3366ff"&gt;infile "cd /home/userid; du -hs * | sort -hr | head -3;" pipe;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#3366ff"&gt;input file_size $ file_name $;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#3366ff"&gt;run;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 16 Nov 2017 21:51:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/linux-command-from-sas-eg/m-p/414158#M26637</guid>
      <dc:creator>woo</dc:creator>
      <dc:date>2017-11-16T21:51:45Z</dc:date>
    </item>
    <item>
      <title>Re: linux command from sas eg</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/linux-command-from-sas-eg/m-p/414160#M26638</link>
      <description>&lt;P&gt;Please describe how it is "not giving what I want".&lt;/P&gt;
&lt;P&gt;If you get errors or no output post the code and the log into a code box using the forum {I} menu icon.&lt;/P&gt;
&lt;P&gt;If you get unexpected values then show what you did get.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Since you did not specify an actual length for the file_size and file_name variables they likely defaulted to 8 characters and truncated some of your file_name values.&lt;/P&gt;</description>
      <pubDate>Thu, 16 Nov 2017 21:59:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/linux-command-from-sas-eg/m-p/414160#M26638</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2017-11-16T21:59:20Z</dc:date>
    </item>
    <item>
      <title>Re: linux command from sas eg</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/linux-command-from-sas-eg/m-p/414163#M26640</link>
      <description>&lt;P&gt;Make sure you first have X command enabled, otherwise pipe command are not allowed.&lt;/P&gt;</description>
      <pubDate>Thu, 16 Nov 2017 22:05:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/linux-command-from-sas-eg/m-p/414163#M26640</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-11-16T22:05:31Z</dc:date>
    </item>
    <item>
      <title>Re: linux command from sas eg</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/linux-command-from-sas-eg/m-p/414169#M26641</link>
      <description>&lt;P&gt;no error&lt;/P&gt;
&lt;P&gt;x cmd is enabled&lt;/P&gt;
&lt;P&gt;may be length issue&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;log looks like,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;28 data test;&lt;/P&gt;
&lt;P&gt;29 length file_size $20 file_name $ 200;&lt;/P&gt;
&lt;P&gt;30 infile "cd /home/userid; du -hs * | sort -hr | head -3;" pipe;&lt;/P&gt;
&lt;P&gt;31 input file_size $ file_name $;&lt;/P&gt;
&lt;P&gt;32 run;&lt;/P&gt;
&lt;P&gt;NOTE: The infile "cd /home/userid; du -hs * | sort -hr | head -3;" is:&lt;/P&gt;
&lt;P&gt;Pipe command="cd /home/userid; du -hs * | sort -hr | head -3;"&lt;/P&gt;
&lt;P&gt;NOTE: LOST CARD.&lt;/P&gt;
&lt;P&gt;file_size=516K XYZ_work1B7B000 file_name= _ERROR_=1 _N_=364&lt;/P&gt;
&lt;P&gt;NOTE: 365 records were read from the infile "cd /home/userid; du -hs * | sort -hr | head -3;".&lt;/P&gt;
&lt;P&gt;The minimum record length was 56.&lt;/P&gt;
&lt;P&gt;The maximum record length was 99.&lt;/P&gt;
&lt;P&gt;NOTE: SAS went to a new line when INPUT statement reached past the end of a line.&lt;/P&gt;
&lt;P&gt;NOTE: The data set WORK.TEST has 363 observations and 2 variables.&lt;/P&gt;
&lt;P&gt;NOTE: DATA statement used (Total process time):&lt;/P&gt;
&lt;P&gt;real time 1.10 seconds&lt;/P&gt;
&lt;P&gt;cpu time 0.01 seconds&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;LI-WRAPPER&gt;&lt;/LI-WRAPPER&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 16 Nov 2017 22:29:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/linux-command-from-sas-eg/m-p/414169#M26641</guid>
      <dc:creator>woo</dc:creator>
      <dc:date>2017-11-16T22:29:53Z</dc:date>
    </item>
    <item>
      <title>Re: linux command from sas eg</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/linux-command-from-sas-eg/m-p/414172#M26642</link>
      <description>&lt;P&gt;Pass an empty input and see what you get.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;length record $300.;
input ;
record = _infile_;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 16 Nov 2017 22:40:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/linux-command-from-sas-eg/m-p/414172#M26642</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-11-16T22:40:31Z</dc:date>
    </item>
    <item>
      <title>Re: linux command from sas eg</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/linux-command-from-sas-eg/m-p/414175#M26643</link>
      <description>&lt;P&gt;Thanks Reeza, it worked fine,,,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 16 Nov 2017 22:47:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/linux-command-from-sas-eg/m-p/414175#M26643</guid>
      <dc:creator>woo</dc:creator>
      <dc:date>2017-11-16T22:47:14Z</dc:date>
    </item>
    <item>
      <title>Re: linux command from sas eg</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/linux-command-from-sas-eg/m-p/414256#M26646</link>
      <description>&lt;P&gt;Try the option&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;dlm='09'x&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;in the infile statement. UNIX utilities usually separate column output by tabs.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 17 Nov 2017 05:12:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/linux-command-from-sas-eg/m-p/414256#M26646</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2017-11-17T05:12:38Z</dc:date>
    </item>
  </channel>
</rss>

