BookmarkSubscribeRSS Feed
newbie
Calcite | Level 5

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

2 REPLIES 2
Tom
Super User Tom
Super User

You need to add the MOD option to the FILE statement in the last data step.

art297
Opal | Level 21

Try adding the option MOD onto the 2nd file statement.  Otherwise, you are overwriting the file.

CFC_SAS_Communities_400x225.jpg

Call for content now open!

It's your turn to help shape SAS Innovate 2027. Share your expertise and inspire the SAS community.

Submit your proposal →

What is Bayesian Analysis?

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 2 replies
  • 2081 views
  • 6 likes
  • 3 in conversation