BookmarkSubscribeRSS Feed
chirumalla
Calcite | Level 5

Hi,

I need to move txt and excel and sas datasets from one location to another location. I can't use X command an Systask commands due to certain server limitations. am using proc datasets move. but am able to move only sas data sets. pls advise me how to move all type of files.

libname SR "C:\source";

libname TG "D:\Target" ;

PROC DATASETS;

COPY IN=SR OUT=TG MOVE MEMTYPE=ALL;

RUN; quit;

libname SR CLEAR;

libname TG CLEAR;

3 REPLIES 3
Kurt_Bremser
Super User

SAS only works with SAS files, naturally. If you have the according modules licensed/installed, this also includes file types like .xls, .mdb, .csv and so on. In order to create/move/delete other files, you need the fitting tools, usually those supplied by the OS.

So you either need to have access to the commandline and do it with a script, or you need the X capability.

In most cases there is no real need to block that capability in SAS; properly set up server environments will always keep the user from doing (unwanted) damage.

RW9
Diamond | Level 26 RW9
Diamond | Level 26

Just to add to KurtBremser, you could read the files and then write them out to your preferred output location assuming you have write permissions to the destination.  Otherwise, do it outside of SAS.

jakarman
Barite | Level 11

Agree with Kurt, this one  is every time coming back. You are struck by some misalignment on requirements.

When an OS command is the best solution for your question, you should be able to use that.
Suppose the were a lot SAS functions bypassing the limitations of not using the OS commands. Would that help....no.

The issue is one or a combination of the following:

a/ you it-staff is not trusting you handling your own data

b/ your it-staff is not wanting to help you doing your work  

c/ your it-staff is not understanding SAS. 

    Asking the wrong questions to SAS institute, expectations of environments not conform your business policies. 

d/ SAS institute did not investigate well on the requirements by regulations and standards.

Whatever the cause of these options may be, you have to climb that mountain.  

---->-- ja karman --<-----

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

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
  • 1046 views
  • 1 like
  • 4 in conversation