Hi,
I have one external text file that i like to append to another but i dont like to read them in into a dataset as the files have many variables. And they both have the same layout. How do i do that?
Use your OS commands - in Unix its cat, may be in powershell as well.
Do you have headers you need to deal with or is it straight appending of the two text files.
Use your OS commands - in Unix its cat, may be in powershell as well.
Do you have headers you need to deal with or is it straight appending of the two text files.
Thx guys. The cat command works perfectly
filename infile ("path_to_file_a","path_to_file_b") options;
if you want to read them in one step.
Otherwise, use the X statement or call system to do it with a suiting OS command, as Reeza suggested.
You can make use of the MOD option of the FILE statement, this will allow you to add new records to an existing external file.
see this sample code, that illustrates this:
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
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.