03-22-2016 04:21 AM
My situation is -
I have SAS EG installed and have only remote server connected to execute any program. I need to set-up a process on data upload in SAS EG. Currently, I use putty to transfer the data from local server to remote server.
Is it possible to open and write putty commands in SAS EG (which has only remote server connection)? If yes, how to do it? Will you please share some sample code for it?
03-22-2016 04:53 AM
Right, well I don't use EG, so I don't know the restrictions behind that, nor do I know your setup/priviledges etc. This should really be discussed with your IT group, so as everything has the access it needs, and things are setup in a good and validated method.
Now in Base SAS, you can send commands out the the Operating system, either by using file:
filename mypipe pipe 'dir "c:\tmp"';
When read into SAS the dir c:\tmp is sent to the OS, and the contents returned. There is also:
Which does a similar thing. Now, so long as you have this "Putty" installed, and you have access to the main executable file, and the paths associated with the transfers, then all you need to do is construct the command line, and send it out to the system.
This shows how to use the command line:
If none of the above makes any sense to you then I strongly advise you let your IT group handle this.
03-22-2016 06:10 AM
asyou have been advised, first you need to have permissions to run x commands (XCMD option), but I don't believe that was your question.
To simplify my answer, what you will need is to create an external file with all the ssh commands (which can be created with SAS or be just an static file), then call:
putty.exe -ssh [domain name] -l [username] -pw [password] -m [the directory of the .txt file you created which contains the codes you want to be executed].
You might prefer to use
plink.exe (from the PuTTY web page) and not
Without plink, the only way is to use the
-log <logfile> options and then print its content and delete it.
The problem with this option is that it will print the username and password in the logs. Probably there is an option to use a secured profile instead
03-22-2016 07:59 AM
03-22-2016 07:58 AM
03-22-2016 08:32 AM
The Data Upload/Download tasks don't need a local SAS to work. And neither does the Copy Files task (which you have to download and install from my blog).
I think the Copy Files task is what you want to use -- that's a widely used task that thousands of users (my estimate!) have found to fit the need for copying files between a local PC and the remote SAS server.
If you're having trouble getting the task to show in your Tools->Add-In menu, you might be missing the "unblock DLL" step.
03-22-2016 11:17 AM - last edited on 03-22-2016 11:36 AM by ChrisHemedinger
After placing all the DLL files in the specified folder and also unblocked
the DLL files. I'm able to see the add-in File transfer task but getting an
error msg while i try to open it.
The error msg is Method not found: 'void SAS.EG.SDS.Model.Broker..ctor()'.
03-22-2016 11:36 AM
You need to put only one of the DLL files into the Custom folder. Select the version that matches your SAS Enterprise Guide version, and delete the others. I think right now you have conflicting versions of this custom task installed.
03-22-2016 01:24 PM
Need further help from the community? Please ask a new question.