Help using Base SAS procedures

ftp

Reply
Occasional Contributor
Posts: 11

ftp

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

Super User
Super User
Posts: 6,495

ftp

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

PROC Star
Posts: 7,356

ftp

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

Ask a Question
Discussion stats
  • 2 replies
  • 122 views
  • 6 likes
  • 3 in conversation