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.

sas-innovate-2024.png

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.

 

Register now!

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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