BookmarkSubscribeRSS Feed
mattl
Calcite | Level 5

Hi All,

 

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.

 

Matt

7 REPLIES 7
ChrisHemedinger
Community Manager

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.

 

The Copy Files task can easily copy these files for you in one step, if they are all together in the same folder.  

It's time to register for SAS Innovate! Join your SAS user peers in Las Vegas on April 16-19 2024.
Kurt_Bremser
Super User

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.

SASKiwi
PROC Star

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.

mattl
Calcite | Level 5

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.

 

Thanks again,

Matt

SASKiwi
PROC Star

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.

Patrick
Opal | Level 21

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.

 

mattl
Calcite | Level 5

Thanks, Patrick. Completely agree and fingers crossed can get to that stage.

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 7 replies
  • 1959 views
  • 9 likes
  • 5 in conversation