Help using Base SAS procedures

Reading input

Accepted Solution Solved
Reply
Contributor
Posts: 50
Accepted Solution

Reading input


Hi ,

I am using code:

data test;

infile datalines missover dsd;    

input a : 1. @

   b : $200.;

datalines;

0 I am going to college

1 I am interested in SAS

2 I am looking for more statistics

3 I want to see good results

;

proc print;run;

But this doesnt read the values correctly. The values are seperated by dlm = ' ' so I have used dsd option. I have used missiver to read any blank values as blanks. Please advise.

SK


Accepted Solutions
Solution
‎08-15-2013 03:52 PM
Super User
Posts: 3,111

Re: Reading input

Try this:

data test;

infile datalines missover dsd;    

input @1 a 1. 

      @3 b : $200.;

datalines;

0 I am going to college

1 I am interested in SAS

2 I am looking for more statistics

3 I want to see good results

;

proc print;run;

View solution in original post


All Replies
Solution
‎08-15-2013 03:52 PM
Super User
Posts: 3,111

Re: Reading input

Try this:

data test;

infile datalines missover dsd;    

input @1 a 1. 

      @3 b : $200.;

datalines;

0 I am going to college

1 I am interested in SAS

2 I am looking for more statistics

3 I want to see good results

;

proc print;run;

☑ This topic is SOLVED.

Need further help from the community? Please ask a new question.

Discussion stats
  • 1 reply
  • 127 views
  • 0 likes
  • 2 in conversation