BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
darb
Calcite | Level 5
Well I don't know how many drug submissions you have partook in, but for every single one I have been a part of, the FDA has specifically requested from us .TXT files. And this has been consistent for me across multiple companies. So it would be appreciated if rather questioning the reason I need help, to just providing the help needed. Thanks.
Tom
Super User Tom
Super User

You can use the operating system command to copy the files.  Since you have SAS available it can be used to generate the commands for you, but you could use any programming language.

 

Assume that want tom copy all files with extension .sas from one folder to another folder then you might use code like this.

%let indir=c:\saspgms ;
%let outdir= c:\txtpgms;
data _null_;
  length infile outfile $256 extension $20 cmd $500 ;
  infile "&indir\*.sas /b" pipe truncover ;
  input infile $256. ;
  extension = scan(infile,-1,'.');
  if upcase(extension)='SAS';
  outfile=cats(tranwrd(substr(infile,1,length(infile)-3),"&indir\","&outdir\"),'txt');
  cmd=catx(' ','copy',quote(trim(infile)),quote(trim(outfile));
  infile copy pipe filevar=cmd ;
run;

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

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
  • 16 replies
  • 16033 views
  • 9 likes
  • 4 in conversation