Hi,
I have a simple problem (I hope). I am using file and put to write text to a different sas program. For example
data _null_;
file "filepath.sas";
put "x=1";
run;
Please can you tell me how I make it so the code writes the text to the first blank line of "filepath.sas". This is so when I run this again but with different text e.g. put "y=2", it doesn't overwrite the x=1, but adds to it underneath.
Thank you
You need to use the FILE statement option MOD.
You need to use the FILE statement option MOD.
It would be very hard to locate and overwrite the first blank line. But as @data_null__ says it is very easy to just append to a file by adding the MOD option to the FILE statement.
It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.
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.
Ready to level-up your skills? Choose your own adventure.