<?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: SAS EG and the TaskList Pipe in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/SAS-EG-and-the-TaskList-Pipe/m-p/228402#M308127</link>
    <description>&lt;P&gt;One pitfall could be te maximum record length als of conventions often limited to 255 &lt;A href="https://support.sas.com/documentation/cdl/en/hostwin/63285/HTML/default/viewer.htm#chfoptfmain.htm&amp;nbsp;" target="_blank"&gt;https://support.sas.com/documentation/cdl/en/hostwin/63285/HTML/default/viewer.htm#chfoptfmain.htm&amp;nbsp;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Wiht a mode con &amp;nbsp;cols=255 you can make the dos-box as wide as that.&amp;nbsp; Your command will show the window name (can be set as filename). This one seems not be the problem.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;The input statement seems logical understandablem but it is list input &lt;A href="http://support.sas.com/documentation/cdl/en/lestmtsref/68024/HTML/default/viewer.htm#n0lrz3gb7m9e4rn137op544ddg0v.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/lestmtsref/68024/HTML/default/viewer.htm#n0lrz3gb7m9e4rn137op544ddg0v.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;List input doesn't process lengths like column input&amp;nbsp;instead&amp;nbsp; it spearates by using conventions like spaces.&lt;BR /&gt;You instruction is to read the first blank&amp;nbsp;delimited string. That is what has been executed and what you are seeing.&lt;/P&gt;&lt;P&gt;Using the automatic variable _infile_ you will have the complete record&amp;nbsp; (length by lrecl).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 05 Oct 2015 11:45:26 GMT</pubDate>
    <dc:creator>jakarman</dc:creator>
    <dc:date>2015-10-05T11:45:26Z</dc:date>
    <item>
      <title>SAS EG and the TaskList Pipe</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-EG-and-the-TaskList-Pipe/m-p/228396#M308126</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So I came accros the ability to run commands in SAS EG, I need to do this to check for open EXCEL files, specifcally by looking for the files name. So I came across so code, which is very helpful, which I&amp;nbsp;tweaked a bit.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;filename tasks pipe "tasklist /v /fo table";

data process;
	infile tasks;
	input tasklist $500.; 

	if count(upcase(tasklist), "EXCEL") &amp;gt; 0 then output;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;This code runs fine, however, the data set doesnt hold the EXCEL files name, but just the EXCEL.EXE bit. Now if i run the CMD with tasklist /v /fo table, I can see the EXCEL files name, any idea why I do not see this in SAS?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;any help would be great&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 05 Oct 2015 09:57:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-EG-and-the-TaskList-Pipe/m-p/228396#M308126</guid>
      <dc:creator>craig159753</dc:creator>
      <dc:date>2015-10-05T09:57:07Z</dc:date>
    </item>
    <item>
      <title>Re: SAS EG and the TaskList Pipe</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-EG-and-the-TaskList-Pipe/m-p/228402#M308127</link>
      <description>&lt;P&gt;One pitfall could be te maximum record length als of conventions often limited to 255 &lt;A href="https://support.sas.com/documentation/cdl/en/hostwin/63285/HTML/default/viewer.htm#chfoptfmain.htm&amp;nbsp;" target="_blank"&gt;https://support.sas.com/documentation/cdl/en/hostwin/63285/HTML/default/viewer.htm#chfoptfmain.htm&amp;nbsp;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Wiht a mode con &amp;nbsp;cols=255 you can make the dos-box as wide as that.&amp;nbsp; Your command will show the window name (can be set as filename). This one seems not be the problem.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;The input statement seems logical understandablem but it is list input &lt;A href="http://support.sas.com/documentation/cdl/en/lestmtsref/68024/HTML/default/viewer.htm#n0lrz3gb7m9e4rn137op544ddg0v.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/lestmtsref/68024/HTML/default/viewer.htm#n0lrz3gb7m9e4rn137op544ddg0v.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;List input doesn't process lengths like column input&amp;nbsp;instead&amp;nbsp; it spearates by using conventions like spaces.&lt;BR /&gt;You instruction is to read the first blank&amp;nbsp;delimited string. That is what has been executed and what you are seeing.&lt;/P&gt;&lt;P&gt;Using the automatic variable _infile_ you will have the complete record&amp;nbsp; (length by lrecl).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 05 Oct 2015 11:45:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-EG-and-the-TaskList-Pipe/m-p/228402#M308127</guid>
      <dc:creator>jakarman</dc:creator>
      <dc:date>2015-10-05T11:45:26Z</dc:date>
    </item>
    <item>
      <title>Re: SAS EG and the TaskList Pipe</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-EG-and-the-TaskList-Pipe/m-p/228413#M308128</link>
      <description>&lt;P&gt;Hi thanks for the response,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I changesd my code based on your suggestion&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;filename tasks pipe "tasklist /v /fo table";

options noxwait lrecl = 500;

data process;
	infile tasks;
	input tasklist $500.; 
	put _infile_;

	if count(upcase(tasklist), "EXCEL") &amp;gt; 0 then output;
run;

options lrecl = 256;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;And still no luck, once run the log displays the EXCEL.exe applications like so&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;EXCEL.EXE                     4844                            0    101,288 K Unknown         N/A              
                                       0:04:11 N/A                                                            

EXCEL.EXE                     5956                            0     42,072 K Unknown         N/A              
                                       0:00:16 N/A                                                            
&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 05 Oct 2015 13:10:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-EG-and-the-TaskList-Pipe/m-p/228413#M308128</guid>
      <dc:creator>craig159753</dc:creator>
      <dc:date>2015-10-05T13:10:25Z</dc:date>
    </item>
    <item>
      <title>Re: SAS EG and the TaskList Pipe</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-EG-and-the-TaskList-Pipe/m-p/228423#M308129</link>
      <description>&lt;P&gt;That is weird, did you check this full&amp;nbsp;line print with the posted command in a dos-box?&lt;BR /&gt;the N/A after unknown should be the running user on the System te last N/A should be the window name.&lt;BR /&gt;You did not describe your environment it is running in. Eguide to SAS-local should run under your credentials but I never checked the changes that are technical hidden from the interactive (console) usage to a batch usage (No Windows).&lt;/P&gt;&lt;P&gt;Wiht a spawner usage on a remote Windows SAS server it the local system account getting some role introducing more differences.&lt;BR /&gt;&lt;BR /&gt;Any way, your command&amp;nbsp;execution&amp;nbsp;did work. The information on the Windows names is not as wanted.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://technet.microsoft.com/en-us/library/cc730909.aspx" target="_blank"&gt;https://technet.microsoft.com/en-us/library/cc730909.aspx&lt;/A&gt; see the remark on the remote system not having the windowtitle available.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 05 Oct 2015 13:44:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-EG-and-the-TaskList-Pipe/m-p/228423#M308129</guid>
      <dc:creator>jakarman</dc:creator>
      <dc:date>2015-10-05T13:44:04Z</dc:date>
    </item>
  </channel>
</rss>

