07-09-2014 02:55 AM
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" ;
COPY IN=SR OUT=TG MOVE MEMTYPE=ALL;
libname SR CLEAR;
libname TG CLEAR;
07-09-2014 03:18 AM
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.
07-09-2014 03:58 AM
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.
07-09-2014 06:51 AM
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.