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 --<-----

hackathon24-white-horiz.png

The 2025 SAS Hackathon Kicks Off on June 11!

Watch the live Hackathon Kickoff to get all the essential information about the SAS Hackathon—including how to join, how to participate, and expert tips for success.

YouTube LinkedIn

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 3 replies
  • 1520 views
  • 1 like
  • 4 in conversation