08-12-2016 07:54 AM - edited 08-12-2016 07:55 AM
I'm trying to upload around 600 csv files, with differing content, from Windows to a SAS Server to use in DI. Can't import via DI as the facility is switched off due to security limitations. I've come up with a workaround which is using EGs Import Data task but I don't fancy setting a task up for 600 tables as I'd rapidly lose the will to live....
This is in the code for the import task...
Note: In preparation for running the following code, the Import
Data wizard has used internal routines to transfer the source data
file from the local file system to SASApp-CPB. There is no SAS code
available to represent this action.
This suggests that there is a magic way of moving files from Windows to a SAS Server. Does anyone know what SAS does behind the scenes here? Or if there is another solution? Even if I could just get some libnames it would be a great help.
Thanks and have a great day.
08-12-2016 07:58 AM
EG uses some SAS APIs to do this work, not SAS program code. There isn't SAS code that can move files from your local desktop to a SAS session unless you have a shared network location that you can reference, such as a UNC path or mapped drive.
08-12-2016 08:18 AM
In order to use a SAS workspace server, an operating system account is needed. Servers usually have SSH daemons running, so you could try a SSH capable file transfer utility using your SAS account to get the files to the SAS server.
08-12-2016 08:11 PM
If your SAS server is Windows-based then a simple solution is to get your SAS admin to create a file share for the server folder. Then you can simply go into Windows Explorer on your PC and select all 600 files then do a copy and paste to the server file share. We do this all the time and it is fast and easy.
08-17-2016 06:17 AM
Thanks! And yes this is the temporary workaround I'm using but for a daily refresh which begins late evening it's not a great long term solution.
08-17-2016 03:33 PM
I certainly wouldn't recommend it as a long term solution either. Regular production processes should be server-based and not involve PCs as @Patrick has already suggested.
08-12-2016 11:09 PM
If your end goal is the implementation of DI jobs for an ongoing production worthy job then having some manual EG steps in this process is imho not acceptable.
You will need to find a storage location for your source .csv files which is accessible for the SAS Server on which your SAS code is running (like a share as suggested by others).
If these are source .csv files then eventually you can also ask yourself who's actually responsible to provide these .csv files in a location easily accessible to you. Make sure you have such things clearly defined and agreed upon as part of an interface contract.