04-18-2018 09:26 AM
04-18-2018 09:00 AM
I have hundreds of programs - and the only way I knew how to do it was to open each one and do SAVE AS.
I am not really following the code you provided - if you could provide example paths that'd be helpful...thanks!
04-18-2018 09:04 AM
It's just the basic copy command of Windows. Use the commandline for it.
If your programs are stored on a non-Windows server, and you want to move/copy them there, you need to tell us more about your setup.
Why do you want to change the extension to .txt?
04-18-2018 09:10 AM
I am trying to do something like this - but the below code won't work:
libname rna "C:\data";
%macro export_data (file=);
proc export data=rna.&file.
dbms= tab replace;
%export_data (file= t-14-1-1a-ds);
04-18-2018 09:13 AM
So you are not converting programs, but datasets!
Your code won't work because t-14-1-1a-ds is not a valid SAS dataset name. SAS names can only contain letters (of the 26 character alphabet), digits and underlines, and must not start with a digit.
04-18-2018 09:17 AM
04-18-2018 09:20 AM
Oh crap - I thought what I was looking at was someone trying to do the same. I now realize they were converting datasets. Womp. Ok thank you. So I should use command to copy from .sas to .txt?
Let's get back to square one and make some things clear:
04-18-2018 09:22 AM
04-18-2018 09:26 AM
04-18-2018 09:34 AM
I am sorry, where did you get the idea that .sas programs need to be called .txt? It does not make sense, and is counter-productive. Examine the guidance for industry:
In particular page 5 of 12, which states:
Any requested programs (scripts) generated by an analysis tool should be provided as ASCII text files and should include sufficient documentation to allow a reviewer to understand the submitted programs. If the programs created by the analysis tool use a file extension for ASCII text files other than .txt, the file name should include the native file extension generated by the analysis tool for ASCII text program files, e.g. myRcode.r, mySAScode.sas, etc. If the analysis tool does not save programs in ASCII format, a PDF rendition of the program file should be provided in addition to the program file
SAS programs should be sent as they are with the file extension .sas. They are plain text files, and are associated with the SAS software.
04-18-2018 09:36 AM
Need further help from the community? Please ask a new question.