BookmarkSubscribeRSS Feed
RobM2
Calcite | Level 5

Hi all - my first post here.

[I have searched for this so sorry if it's a well known solution]

I have a couple of questions in using SASEG8.2 (connecting to SASCompute) to copy data files to a local destination.   FWIW this is for "local" processing before they're migrated to SASApp.   Sadly we don't have command-line level access so I can't just mount the network drive and scp them etc.

1) I'm using the Copy Files task for this but I'm finding it a bit awkward.   If it fails, I'm not getting any log / feedback as to why.   I just get the node with a red "cross" symbol and there's no log.   Right-clicking on it and selecting Extract Code brings up a code window with 4 blank lines.   Is there a setting somewhere to tell me why the task has failed?   I have made it work some times but it's not always clear why it's failed.

2) Is there a way to run the Copy Files task with code?   I have quite a few very big tables in separate libraries to copy so not easy to move to one place and use a wildcard.   Would be better if I could wrap it up in a loop and just give it a list of tables to copy.

 

Thanks

3 REPLIES 3
RobM2
Calcite | Level 5

Forgive me replying to my own post.   At least I've got the answer to the first question.   For those in the same position, the log from "Copy Task" can be found by clicking on the "Copy Task" tab.   It's not called "Log" presumably because it's a task as opposed to a piece of code.   

Question 2) (automating copy files tasks) still remains.

 

Thanks

ChrisHemedinger
Community Manager

Since this task isn't generating SAS code -- it just uses behind-the-scenes APIs to do the work -- there is not a way to automate outside of the task. It supports wildcards to cover multiple files, but not recursive subfolders actions or multiple sets of files in one go.

 

To accomplish that, you would need to use something like FTP -- which this task emulates but using the SAS APIs, not actual FTP.

Learn from the Experts! Check out the huge catalog of free sessions in the Ask the Expert webinar series.
Kurt_Bremser
Super User

Copy Files is an action initiated on the client side. Everything in EG is run from EG to the server. There is no means to initiate an action in EG (like receiving a file) from the server side.

To automate data transfers from the SAS server to "external" destinations, you need a means for the transfer on the SAS server; you can use FILENAME SFTP, or have a mount established in the server filesystem to every intended final destination. Or, if system option XCMD is enabled, use scp/sftp.

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

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
  • 3 replies
  • 411 views
  • 0 likes
  • 3 in conversation