<?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: EG: custom task in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/EG-custom-task/m-p/253159#M17789</link>
    <description>&lt;P&gt;Thanks SASKiwi,&lt;/P&gt;&lt;P&gt;I don't think I stated my problem well enough.&lt;/P&gt;&lt;P&gt;I have configured the File Navigation option correctly - to point to SAS User root.&lt;/P&gt;&lt;P&gt;The part that I cannot yet solve is:&lt;/P&gt;&lt;P&gt;Once the user has used the File portion of the SAS Server tree for navigation - ie made a selection in that tree,&lt;/P&gt;&lt;P&gt;is it possible to get that selection to my custom task?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If not, then I would need to write a sas program returns the directory structure and loads that into a treeview.&lt;/P&gt;&lt;P&gt;(I think)&lt;/P&gt;</description>
    <pubDate>Mon, 29 Feb 2016 11:45:22 GMT</pubDate>
    <dc:creator>abbieagocs</dc:creator>
    <dc:date>2016-02-29T11:45:22Z</dc:date>
    <item>
      <title>EG: custom task</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/EG-custom-task/m-p/253092#M17782</link>
      <description>&lt;P&gt;I am working on a custom task for EG 5.1 -- Linux SAS 9.4.&lt;/P&gt;&lt;P&gt;I would like to either present a tree displaying the user's home directory (folders/subfolders) - to allow the user to select a location -- or&lt;/P&gt;&lt;P&gt;to capture the selection under the SASServer-&amp;gt;Files-.. &amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have seen examples of capturing the selected library -- but cannot find any doc on getting the selected File.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any suggestions on how to accomplish either task would be greatly appreciated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Abbie&lt;/P&gt;</description>
      <pubDate>Mon, 29 Feb 2016 00:08:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/EG-custom-task/m-p/253092#M17782</guid>
      <dc:creator>abbieagocs</dc:creator>
      <dc:date>2016-02-29T00:08:40Z</dc:date>
    </item>
    <item>
      <title>Re: EG: custom task</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/EG-custom-task/m-p/253114#M17783</link>
      <description>&lt;P&gt;Have you checked out the configuarion options in SAS Management Console?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In Server Manager - SASApp - SASApp Logical Workspace Server - &lt;SPAN&gt;SASApp Workspace Server -&amp;nbsp;&lt;/SPAN&gt;Properties - Options - Advanced Options you should see the following where you can specify a file path. It seems to work for me under Windows. Not sure about Unix.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/2088i17DA048F4CFEB3CA/image-size/original?v=mpbl-1&amp;amp;px=-1" border="0" alt="screenshot10.jpg" title="screenshot10.jpg" /&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 29 Feb 2016 02:04:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/EG-custom-task/m-p/253114#M17783</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2016-02-29T02:04:25Z</dc:date>
    </item>
    <item>
      <title>Re: EG: custom task</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/EG-custom-task/m-p/253115#M17784</link>
      <description>&lt;P&gt;File isn't an option in a prompt?&lt;/P&gt;</description>
      <pubDate>Mon, 29 Feb 2016 02:24:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/EG-custom-task/m-p/253115#M17784</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-02-29T02:24:19Z</dc:date>
    </item>
    <item>
      <title>Re: EG: custom task</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/EG-custom-task/m-p/253159#M17789</link>
      <description>&lt;P&gt;Thanks SASKiwi,&lt;/P&gt;&lt;P&gt;I don't think I stated my problem well enough.&lt;/P&gt;&lt;P&gt;I have configured the File Navigation option correctly - to point to SAS User root.&lt;/P&gt;&lt;P&gt;The part that I cannot yet solve is:&lt;/P&gt;&lt;P&gt;Once the user has used the File portion of the SAS Server tree for navigation - ie made a selection in that tree,&lt;/P&gt;&lt;P&gt;is it possible to get that selection to my custom task?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If not, then I would need to write a sas program returns the directory structure and loads that into a treeview.&lt;/P&gt;&lt;P&gt;(I think)&lt;/P&gt;</description>
      <pubDate>Mon, 29 Feb 2016 11:45:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/EG-custom-task/m-p/253159#M17789</guid>
      <dc:creator>abbieagocs</dc:creator>
      <dc:date>2016-02-29T11:45:22Z</dc:date>
    </item>
    <item>
      <title>Re: EG: custom task</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/EG-custom-task/m-p/253177#M17795</link>
      <description>&lt;P&gt;The task APIs don't offer a way to show the file structure on the SAS session, so you would need to create that part yourself.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Rather than use a SAS program to figure out the structure, you can use the IOM FileService-&amp;gt;ListFiles API to accomplish this. &amp;nbsp;You can get this from the SAS workspace, which you can obtain from the&amp;nbsp;&lt;STRONG&gt;Consumer&lt;/STRONG&gt; property.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You'll need to add some more assembly references to your project: SASInterop, SASIOMCommonInterop, and SASOManInterop. &amp;nbsp;These are all in the EG application folder as well as in the SAS Integration Technologies client folder.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Sample code to get you started:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;string ListedPath;
Array Names;
Array TypeNames;
Array TypeCategories;
Array Sizes;
Array ModTimes;
Array Engines;
Array Mask;

SAS.Workspace ws = Consumer.Workspace(Consumer.AssignedServer) as SAS.Workspace;
SAS.FileService fs = ws.FileService;
Mask = Array.CreateInstance(typeof(bool), 6);
for (int i = 0; i &amp;lt; 5; i++)
    Mask.SetValue(true, i);
Mask.SetValue(false, 5);	// skip engines field
fs.ListFiles("", SAS.FileServiceListFilesMode.FileServiceListFilesModePath, ref Mask,	
	out ListedPath,	out Names,	
	out TypeNames,	out TypeCategories,	
	out Sizes, out ModTimes,		
	out Engines);
&lt;/PRE&gt;
&lt;P&gt;Your work: parsing the array output here, then presenting files versus directories (folders). &amp;nbsp;You can then build a UI that allows the user to drill in and pass the starting path (first argument to ListFiles) to find the contents of subfolders.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'll be the first to admit this is cumbersome -- these array-based APIs were built for use with COM-based standards in mind and aren't very "object oriented". &amp;nbsp;But they work!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 29 Feb 2016 13:44:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/EG-custom-task/m-p/253177#M17795</guid>
      <dc:creator>ChrisHemedinger</dc:creator>
      <dc:date>2016-02-29T13:44:31Z</dc:date>
    </item>
    <item>
      <title>Re: EG: custom task</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/EG-custom-task/m-p/254514#M17859</link>
      <description>&lt;P&gt;Chris,&lt;/P&gt;&lt;P&gt;Thanks so much - that was exactly what was needed.&lt;/P&gt;&lt;P&gt;I've unwrapped the directory entries - traversed and can now display the tree.&lt;/P&gt;</description>
      <pubDate>Fri, 04 Mar 2016 16:25:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/EG-custom-task/m-p/254514#M17859</guid>
      <dc:creator>abbieagocs</dc:creator>
      <dc:date>2016-03-04T16:25:35Z</dc:date>
    </item>
  </channel>
</rss>

