Two popular SAS custom tasks have recently been updated for SAS Enterprise Guide 7.1. Most custom tasks that I've shared will work without modification across releases, but these two required a special rebuild due to some internal product API changes.
The Project Reviewer task allows you to see a detail view of the tasks/programs within your SAS Enterprise Guide process flows. The listing shows the task names and types, when they were added to the project and last modified, and how much time they take to run. You can also create a SAS-based ODS report from the data, which is a great way to use SAS Enterprise Guide to report on your SAS Enterprise Guide project. (Wow, that's so meta!)
Download Project Reviewer: See this blog post for more information and download link
The Copy Files task is used to move files from your local PC to your SAS session, or from your SAS session to your local PC. This allows you to capture these file transfer steps within your process flow so that they are repeatable. The task supports the use of macro variables and wildcards, which gives you lots of flexibility when designing a process in which the file names and quantities are subject to change.
Download Copy Files: See this blog post for more information and download link
If you use these tasks (or other custom tasks) and find them useful, please leave a comment! I love to hear how the tasks are being used. And sometimes useful custom tasks find their way into the actual product in a future release. Your feedback is important to help to make that happen.
38 Comments
Great to hear Chris... please let your followers know Metacoda Custom Tasks have also been updated for SAS Enterprise Guide® 7.1 and SAS Add-In for Microsoft Office 7.1.
The Metadata Table Finder and Metadata Column Finder help users locate the data (tables and columns) they need within SAS metadata and are provided free-of-charge to registered users.
http://www.metacoda.com/en/custom-tasks/
You just did Michelle -- thanks for sharing! Those tasks from Metacoda are really useful to SAS admins and end users alike.
So, is the Project Reviewer now built into SAS EG 7.1?
Angie,
No, the Project Reviewer is not built in. I've built a version that you can download and use with 7.1, as the previous version of the task wouldn't work properly there.
However, the SAS Macro Variable Viewer and SAS System Options Viewer -- two tasks that I've shared on this blog -- are built into 7.1 now.
ok, so I downloaded the project viewer, but it does not seem to be working in EG 7.1\
from http://support.sas.com/documentation/onlinedoc/guide/customtasks/samples/ProjectReviewer.zip
Could not load file or assembly 'SAS.EG.ProjectElements, Version=4.3.0.0, Culture=neutral, PublicKeyToken=be58efc3b934219b' or one of its dependencies. The system cannot find the file specified.
Angie, my apologies! You were somehow working from a link to an old copy (which I must have published somewhere...) I have updated that with the latest, so try again. You'll find a specific DLL that has a "7.1" suffix in the name; that's the one to use.
Ok so, I am following the link above....
Download Project Reviewer: See this blog post for more information and download link
this takes me to the old site for 5.1.
I click at "you could use the Project Reviewer task. This is a custom task (available for download here)" http://support.sas.com/documentation/onlinedoc/guide/customtasks/samples/ProjectReviewer.zip
and that link prompts me to download the .zip file. I do not have the opportunity to download the one with 7.1
am I missing something?
That's the correct link -- I have updated the ZIP file so that it contains the 7.1 DLL in addition to the 4.3/5.1 version. Download the ZIP file again and you should have it!
Chris, in a multi-server EG environment (user has pc-sas installed) are you aware of a way to use Copy Files (or anything else) to move files from the Remote Work library to Local Work library in EG? The PC-SAS example would be to Rsubmit, create a work dataset, then use Proc Download to copy it back to the Work library on local. We are working to eliminate having to do this, but for now it is required in some instances.
Randy, have you tried the Tasks->Data->Download SAS Data Sets task (and the Upload SAS Data Sets task)? Sounds like what you need, and that's built into the application.
Chris, unfortunately, my understanding is that the WORK directory locations are generated new for each SAS session. Unfortunately, I don't see where the any of the file move wizards are able to use macro variables, either for path for for file name. I think I have hit another area of differing functionality. I think this is a good option to add to Copy Files perhaps...(support for libname usage)... :-)
Randy,
I'm not sure I follow you here. The Copy Files task does support macro substitution for file paths, as long as the macro variables are all defined on the target SAS session. See this related blog post for an example.
I am looking for a way to utilize macro variables in files names when upload/downloading between LOCAL and REMOTE in EG. The existing wizards do not support macro variables (in 5.1 at least). A common example is to have a date or user name as part of the file name when it is created, for versioning purposes for instance. One additional note, we cannot use the X command in code to do any O/S commands, ruling out that as an option for file renaming.
Randy,
Okay, now I see your requirements more clearly. You could use the Copy Files task as it supports the macro substitution, but you won't be able to use LIBNAME.MEMBER style syntax. You would need to specify the physical file names and paths on the local and remote file systems.
Chris, it would seem there is a way, I just can not find it. The .work physical paths are stored as macro variavles in local and remote. If I could just get at those from either side, then i could use copy files. I have been researching this but no straight forward way found yet.
You can get the work folders with:
If you are using EG to connect to both a Local SAS and remote SAS, the tricky bit will be to define the macros in just one of those sessions, since the Copy Files task resolves the macros only in one session, and not both. You might need to decide on a known/fixed location as a source or destination so that one path is predetermined while the other is dynamic.
Thanks Chris, I was hoping for an easier way to reference macro variables between remote and local. Of course, in the old pc-sas way, it was very easy as there was functionality built in to sas. This is one of those frustrating missing pieces that make it hard to migrate existing processes to eg. I will keep noodling on it. thanks!
ps - could this be something solved by a custom wizard, can you use the api's to reach into both remote and local environments I wonder?
Randy, yes -- APIs (for custom tasks) would allow this. The SAS.Tasks.Toolkit.SasServer class offers an entry point.
You can still accomplish this in EG "the old way" IF you have SAS/CONNECT and a Local SAS in addition to the Remote SAS. You can SIGNON and RSUBMIT, run PROC DOWNLOAD and such from a code window. But many customers don't have the SAS/CONNECT infrastructure to operate that way.
Yes, I am trying to figure out a solution to the old SAS/CONNECT Proc Download functionality that can be used in EG,without custom coding, writing macro variables to a dataset, uploading, selecting them back out, etc. Just would like to share macro variables between worlds...thanks!
Chris,
Do you have the Download Link for the SAS EG 7.1 Multiple Projects search Tool?
Thanks,
Prashant
Prashant, not yet -- but I'll work on it and post back.
Prashant (and others): I've added a version that should work for EG 7.1 and 7.11. The link for download is the same as for the other versions. Look for the EGPSearcher71.exe and EGPSearcher71_x64.exe.
Thanks Chris
I would recommend in this case to try program Long Path Tool
We installed the 9.4M3 SAS Applications on a Windows 2012 Server for a Citrix implementation. We are using Enterprise Guide 7.1 with the Copy Files Task using the current 7.1 DLL. We are getting the following error and need help try to fix it. Our users love this functionality and we need to get it to work. Please, help!!
One of our users just got this error today with trying to run the COPY FILES task in Validation environment:
ERROR: Could not load file or assembly ‘SASInterop, Version=1.4.0.0, Culture=neutral, PublicKeyToken=be58efc3b934219b’ or one of it’s dependencies. The located assembly’s manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
We need to verify the versions of things you have. You're certain the task is the 7.1 version of the Copy Files task? Any chance that the 6.1 version of the task is in the path somewhere?
You can turn on Application Logging (in the Tools->Options) and the resulting application log will contain information about the various DLLs that are loaded/found. If you do that, you can send me an example log at chris.hemedinger@sas.com and I'll take a look.
Hi Chris
Great to see this task updated for the shiny new version of EG. I was wondering why this one isnt in the base install package as it is so useful? Working on getting a new SAS install which is VDI based I have to convince, plead, beg and hope to get it included.
Cheers
Dougie
Dougie,
Sorry, I'm not aware of a plan to get it included in the package. If you need help making the case in your pleading, let me know and I can supply some facts about the risk (or lack thereof).
Hi Chris. Love your work. Is there a project viewer DLL for 7.12?
Thanks
Simon
Thanks Simon. The 7.11 version that's in the download package should work for 7.12 as well.
Hi,
I downloaded the SAS.Tasks.CopyFiles71 DLL for my SAS Enterprise Guide 7.12
I placed the dll in Custom folder as mentioned in the installation PDF but when I restart the EG, I still can not see the Add in in the Task Add-in Menu.
Please suggest if anyone faced this issue
Thanks
Sonali
You probably need to complete this step to Unblock the DLL.
I do not see the option to 'Unblock' on Properties window.
Okay, I'm happy to help debug this. Turn on Application Logging (Tools->Options), then restart EG, and then send me the most recent log TXT file from %appdata%\SAS\EnterpriseGuide\7.1. (chris.hemedinger@sas.com)
I see this exception in the log.
System.IO.FileLoadException: Could not load file or assembly 'SAS.Tasks.CopyFiles71' or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515)
File name: 'SAS.Tasks.CopyFiles71' ---> System.NotSupportedException: An attempt was made to load an assembly from a network location which would have caused the assembly to be sandboxed in previous versions of the .NET Framework. This release of the .NET Framework does not enable CAS policy by default, so this load may be dangerous. If this load is not intended to sandbox the assembly, please enable the loadFromRemoteSources switch. See http://go.microsoft.com/fwlink/?LinkId=155569 for more information.
That is definitely the same cause: the DLL is blocked from running because it was downloaded from the internet. You have to unblock it.
If you don't see the Unblock button in the Properties window for the DLL, you can try the streams.exe tool, described at the end of this post.
The Project Reviewer task does have a v8.x version in the ZIP I made available for download. The Copy Files task is now part of EG -- no need for the custom task.
Is there a plan to refresh this for SAS EGP 8 or higher?