Shubhankar Paul
Shubhankar Paul

Reputation: 1

SAS append different file type

I have 2 file first csv and second txt like

text.txt     text.csv
1 eee        1,b1,c1
2 rff        2,b2,c2
3 r3r        3,b3,c3
4 344

Output dataset

1 eee        
2 rff        
3 r3r        
4 344
1 b1 c1
3 b3 c3

Can we do it in single data step in sas?

Upvotes: 0

Views: 36

Answers (1)

G.Arima
G.Arima

Reputation: 1171

Is this you are looking for:

proc import datafile="text.txt" out=txt dbms=tab replace;
   getnames=no;
run;

proc import datafile="your_path/text.csv" out=csv dbms=csv replace;
    getnames=no;
run;

data want;
set txt csv;
run;

Upvotes: 0

Related Questions