<?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 Setting TERM environment variable while executing Unix command in EG in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Setting-TERM-environment-variable-while-executing-Unix-command/m-p/273455#M54489</link>
    <description>&lt;P&gt;Hi Gurus,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I was trying to execute some Unix System command's using Enterprise Guide.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Code Snippet is as follows:&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; filename test pipe 'top';&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; data top_result;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; length buffer $1000 ;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; infile test dlm="-";&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; input buffer;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However while executing I am getting as&amp;nbsp;TERM environment variable not set.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The intention of the above code was to fetch the sessions running from Unix end.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you please advice on this.&lt;/P&gt;&lt;BR /&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/12589i3294F7406D977555/image-size/large?v=1.0&amp;amp;px=600" border="0" alt="EG_TERMVARIABLE.JPG" title="EG_TERMVARIABLE.JPG" /&gt;</description>
    <pubDate>Fri, 27 May 2016 00:45:08 GMT</pubDate>
    <dc:creator>sudipta_goswami</dc:creator>
    <dc:date>2016-05-27T00:45:08Z</dc:date>
    <item>
      <title>Setting TERM environment variable while executing Unix command in EG</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Setting-TERM-environment-variable-while-executing-Unix-command/m-p/273455#M54489</link>
      <description>&lt;P&gt;Hi Gurus,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I was trying to execute some Unix System command's using Enterprise Guide.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Code Snippet is as follows:&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; filename test pipe 'top';&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; data top_result;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; length buffer $1000 ;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; infile test dlm="-";&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; input buffer;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However while executing I am getting as&amp;nbsp;TERM environment variable not set.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The intention of the above code was to fetch the sessions running from Unix end.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you please advice on this.&lt;/P&gt;&lt;BR /&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/12589i3294F7406D977555/image-size/large?v=1.0&amp;amp;px=600" border="0" alt="EG_TERMVARIABLE.JPG" title="EG_TERMVARIABLE.JPG" /&gt;</description>
      <pubDate>Fri, 27 May 2016 00:45:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Setting-TERM-environment-variable-while-executing-Unix-command/m-p/273455#M54489</guid>
      <dc:creator>sudipta_goswami</dc:creator>
      <dc:date>2016-05-27T00:45:08Z</dc:date>
    </item>
    <item>
      <title>Re: Setting TERM environment variable while executing Unix command in EG</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Setting-TERM-environment-variable-while-executing-Unix-command/m-p/273518#M54518</link>
      <description>&lt;P&gt;TERM (adressed as $TERM) is a UNIX environment variable that contains the type of the attached terminal for interactive sessions. Programs that create formatted output need that so they can (using a library called curses) create the correct control character sequences for screen position, highlighting, colours etc.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;top does this, as it displays a dynamic view of the system's operation. Therefore it needs to position the cursor for screen updates.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In particular, I think that top is not the correct choice for what you want. It runs indefinitely until it receives the quit ("q") command and updates the screen, so it is a very poor choice for the filename pipe, as that expects a static sequential list as input.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'd rather start with something that creates nice list output, like ps.&lt;/P&gt;</description>
      <pubDate>Fri, 27 May 2016 07:52:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Setting-TERM-environment-variable-while-executing-Unix-command/m-p/273518#M54518</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2016-05-27T07:52:45Z</dc:date>
    </item>
    <item>
      <title>Re: Setting TERM environment variable while executing Unix command in EG</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Setting-TERM-environment-variable-while-executing-Unix-command/m-p/273642#M54547</link>
      <description>&lt;P&gt;Thanks a ton Kurt&lt;/P&gt;</description>
      <pubDate>Fri, 27 May 2016 16:27:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Setting-TERM-environment-variable-while-executing-Unix-command/m-p/273642#M54547</guid>
      <dc:creator>sudipta_goswami</dc:creator>
      <dc:date>2016-05-27T16:27:08Z</dc:date>
    </item>
  </channel>
</rss>

