03-02-2018 10:17 AM
We have a need to transfer/copy a large text file from our SAS Unix SAMBA folder to a Windows network folder. I know there has to be a way to programmatically do this using SAS code -- possibly call a Python script. Not having done this before makes it a mystery. I appreciate any help in regards to doing this.
Hope I am not asking a question that has been recently answered, but I have researched through prior questions, but only getting bits and pieces of info but not a complete picture.
SAS Version is 9.04.01M3P062415
Operating System is AIX 64 (AIX)
03-02-2018 03:44 PM
03-02-2018 11:32 AM
Here's what it looks like to me; please correct any incorrect assumptions
If your SAS server is running Unix, your Windows network folder isn't available to that server. So I can't see how SAS, or any software running on that server, could do the copy. I think you'd need to run a copy process on a Windows machine that can see both folders.
03-02-2018 01:38 PM
Thank you, TomKari,
We are using SAS EG (version 7.10) in a Unix environment. The SAMBA setup allows us to be able to see into our Unix folders like it is a Windows environment. I am trying to eliminate any manual steps with moving a text file over from a SAMBA folder to a Windows network folder. I would think (hope) there is a way to do that programmatically from SAS EG whether it is calling some type of script or use an X command (we do have available X command).
03-02-2018 03:32 PM
Unless you also have access to a Windows SAS server, I think that you will need to do the copying outside of the SAS environment.
If you need to make the file copy at the beginning or end of an EGuide session, you could create a Windows batch file that does the copy and then calls eGuide (or vice versa).
If you have access to a Windows SAS server, you can switch servers within EGuide and run your X-command from the Windows Server, and then go back to your *nix server.
03-02-2018 03:44 PM
03-02-2018 05:07 PM
As the others have said, because you can't see the Windows folder from your Unix SAS server, there's no way to copy your file, using SAS or any other facility. If you can find a way to do it outside of SAS, let us know, and we'll try to figure out how to do the same thing from inside SAS.
03-05-2018 12:49 AM
Unless I'm missing something, then forgive me....
But it seems like Samba is running on the AIX server, which means you can then see the Windows file share, right ? I had this setup going on Solaris years ago, so I'm pretty sure sure it's the same.
If yes, then the Windows file share shows up like any other NFS share when you use df -g. If yes, then the Windows directory is merely a another directory on AIX, which means you can copy/move/delete files like you would normally do. Yes ? cp /aix_path/myfile.txt /windows_path
@alandool, you mentioned a big file. How big ? In what format ? Generally NFS is not preferred for big data volumes. For archiving purposes, it's probably ok, but definitely not to process data. The moment when your AIX server has visibility on SAS datasets sitting on Windows, all and sundry is going to want to access their Windows data. Be very, very careful...
03-06-2018 04:15 PM
03-06-2018 04:25 PM
Thank you EVERYONE for your input and help !
@ChrisHemedinger -- your "Copy Files" solution works quite well (after having EG 7.13 installed). Very useful.
Also, I created a Python script that will move the file either way since I can map a drive to our SAS Grid Unix folder from a Windows environment. The script sits on my desktop. I'd prefer to have SAS EG run it, but that's another challenge (is it even possible?), and for now I am content.
03-07-2018 07:37 AM
03-07-2018 03:17 PM
03-07-2018 03:47 PM
For a single user, drop it into:
%appdata%\SAS\EnterpriseGuide\7.1\Custom (create that folder if needed)
Do not use the Add-In Manager -- ironically, it's not that helpful for some tasks.
You must also unblock the DLL first.
Need further help from the community? Please ask a new question.