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:
Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.
Register today!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.
Select SAS Training centers are offering in-person courses. View upcoming courses for: