Hi,
I have two datasets which im writing it into two diiferent external files which is initially being created on the mainframe.After that i FTP those files into CSV formatted files on to Windows. The above scenario works pretty much fine but the issue im facing here is only when i want to write those 2 datasets into a single file(rathr than 2 diffrent files) and FTP it into a CSV file, shockingly im able to see only the contents of the second dataset overwritting the first dataset contents.
data tst1;
input name$;
cards;
joy
anne
;
run;
data tst2;
input id;
101
103
105
;
run;
data _null_;
set tst1;
file ex1 dlm=',';
put name;
run;
data _null_;
set tst2;
file ex1 dlm=',';
put #10 id;
run;
/*ftp step */
Even when i specify the tst2 dataset contents to be printed from 10th row num position, im able to see only the
tst2 contents in the final created CSV file.!!...
Anybody has got a solution to this?
thanks in advance
You need to add the MOD option to the FILE statement in the last data step.
Try adding the option MOD onto the 2nd file statement. Otherwise, you are overwriting the file.
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.