BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Karthick
Fluorite | Level 6

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.

 

Question -

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?

 

1 ACCEPTED SOLUTION
12 REPLIES 12
RW9
Diamond | Level 26 RW9
Diamond | Level 26

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:

call system()

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:

http://the.earth.li/~sgtatham/putty/0.53b/htmldoc/Chapter3.html

http://etherealmind.com/putty-command-line/

 

If none of the above makes any sense to you then I strongly advise you let your IT group handle this.

JuanS_OCS
Amethyst | Level 16

Hi,

 

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].

 

Besides:

You might prefer to use plink.exe  (from the PuTTY web page) and not putty.exe

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

Karthick
Fluorite | Level 6

Thanks for the inputs. Let me try and will get back to you.

 

 

TomKari
Onyx | Level 15

Can you use the Tasks | Data | Upload Data Files to Server task to use EG to transfer your data?

 

Tom

Karthick
Fluorite | Level 6
upload data file - can be able to load only the sas data file not other external files like (csv, txt and excel)
Karthick
Fluorite | Level 6
i also have a question, do we need to have local and remote server connection established in the SAS EG to transfer the file from local machine to remote. Right now i have only remote server connection to execute my program. Please let me know your thoughts
Karthick
Fluorite | Level 6
I have also gone through this blog. I dont know how to invoke copy file pop-up window. Could you please help me with that? I also have a question, do we need to have both local and remote server connection established for upload and download the data.
ChrisHemedinger
Community Manager

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.

Learn from the Experts! Check out the huge catalog of free sessions in the Ask the Expert webinar series.
Karthick
Fluorite | Level 6

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()'.

ChrisHemedinger
Community Manager

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.

Learn from the Experts! Check out the huge catalog of free sessions in the Ask the Expert webinar series.
Karthick
Fluorite | Level 6
Thanks. Its working fine. Will be possible to add different remote server
which is not connected by SAS EG. For an example, I have load some external
file from local server to different server which is not connected with SAS
EG. And also one more question, is it possible to convert this menu driven
to SAS code.

Thank you so much again.

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 12 replies
  • 7622 views
  • 3 likes
  • 6 in conversation