In the below code, is there an easy way to append to the last line of the file without using the @ symbol? I want to do this all in a single data step.
data _null_;
file "%sysfunc(pathname(work))\test.txt" lrecl=1000;
do cnt=1 to 10;
put cnt;
end;
put #10 "append to last line";
run;
For some reason my code is advancing the line pointer by 10 lines instead of going to line 10. Am I misinterpreting the help doc ? And even if it did go to line 10, how would I move the column pointer to the end of the line?
Desired result:
1
2
3
4
5
6
7
8
9
10append to last line