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.
Don't miss out on SAS Innovate - Register now for the FREE Livestream!
Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.
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.