Learning SAS? Welcome to the exclusive online community for all SAS learners.

insteam rawdata

Accepted Solution Solved
Reply
Contributor
Posts: 27
Accepted Solution

insteam rawdata

I used this code to create a data set.The output has only 5 obs instead of 6 ,why? Can anyone explain me here.Thanks!!!

data orion.weight_club;

input IdNumber Name $ Team $ StartWeight EndWeight;

datalines;

1023 David red 189 165

1049 Amelia yellow 145 124

1219 Alan red 210 192

1246 Ravi yellow 194 177

1078 Ashley red 127 118

1221 Jim yellow 220  

;

here is the log:

1 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;

42 ;

43 data orion.weight_club;

44 input IdNumber Name $ Team $ StartWeight EndWeight;

45 datalines;

NOTE: LOST CARD.

RULE: ----+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0 

57 ;

IdNumber=1221 Name=Jim Team=yellow StartWeight=220 EndWeight=. _ERROR_=1 _N_=6

NOTE: SAS went to a new line when INPUT statement reached past the end of a line.

NOTE: The data set ORION.WEIGHT_CLUB has 5 observations and 5 variables.

NOTE: DATA statement used (Total process time):

  real time 0.00 seconds

  cpu time 0.01 seconds

  

57 ;

58 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;


Accepted Solutions
Solution
‎03-24-2015 10:49 AM
Super User
Posts: 11,343

Re: insteam rawdata

Posted in reply to NoorulIyn

The last record was incomplete, missing the endweight.

You can add:

infile datalines missover;

before the input

to get the results from incomplete records.

It is a good idea to explicitly put RUN; at the end of datasteps;

View solution in original post


All Replies
Solution
‎03-24-2015 10:49 AM
Super User
Posts: 11,343

Re: insteam rawdata

Posted in reply to NoorulIyn

The last record was incomplete, missing the endweight.

You can add:

infile datalines missover;

before the input

to get the results from incomplete records.

It is a good idea to explicitly put RUN; at the end of datasteps;

Occasional Contributor
Posts: 19

Re: insteam rawdata

Posted in reply to NoorulIyn

Use missover before input.

🔒 This topic is solved and locked.

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

Discussion stats
  • 2 replies
  • 286 views
  • 3 likes
  • 3 in conversation