I want to read an excel file from local machine while my EG is connected to a server box and I cannot use local address like c:\...
I use task/data/copy files menu and copied the file to the server and then read it from there using a proc import. I need to call this step within my ptogram files to make sure that the latest version of the file is uploaded and read. Is there anyway that I call that step (Copy File) in a sas program within EG?
You can't run a server-based process (using SAS or something else) to do your file copy because of the security barrier. Talk to your SAS/IT administrator about setting up a folder location accessible by your SAS server where you can copy the file first before running your code. Preferably this folder location (share) should be accessible from both Linux and Windows.
I don't think this is possible. What operating system is your server and your local machine.
One solution that comes into my mind is synchronizing the files using FTP Scripts. WinSCP is one such tool for transferring files. Check this
No, you can't script the Copy Files task in a SAS program. In SAS, you can use FILENAME FTP (alluded to by @SuryaKiran) or you can reference the file (if possible) from a shared network location.
The Copy Files task does not use SAS code for its work -- it copies the files in an FTP-like manner, but using the SAS session connection in place of the traditional FTP server. Since the action is initiated by EG, you can't cue this up in a SAS program.
You can't run a server-based process (using SAS or something else) to do your file copy because of the security barrier. Talk to your SAS/IT administrator about setting up a folder location accessible by your SAS server where you can copy the file first before running your code. Preferably this folder location (share) should be accessible from both Linux and Windows.
An alternative is to call your Programs in order by using an ordered list which will accept the copy functionality as a step.
This way we ensure that the most recent file gets copied.
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
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.
Ready to level-up your skills? Choose your own adventure.