Ryan T. Donnelly
Ryan T. Donnelly

Reputation: 153

creating external txt file from an already created dataset

all I want to do is output the data into an external text file but all I get is blanks.

 filename dataout '~/atp_rankings.txt';
 data atpdata;
 file dataout;
 put name pct;
 run;

The dataset 'atpdata' is already created from prior work I did in sas. I just can't figure out what I'm doing wrong. I know this is probably trivial but...

Upvotes: 0

Views: 105

Answers (1)

Reeza
Reeza

Reputation: 21264

You need to specify the input data set, and you're not creating an output data set, so you can use a data _null_ instead.

 filename dataout '~/atp_rankings.txt';
 data _null_;
 Set atpdata;
  file dataout;
  put name pct;
  run;

Upvotes: 1

Related Questions