BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
alepage
Barite | Level 11

Hello,

 

I would like to know how to eliminate the above mentioned error message after running the following code:

 

data test;

input name $ age @@;

datalines;

John 13 Monica 12 Sue 15 Stephen 10

Marc 22 Lily 17

;

run;

 

Regards,

Alain

1 ACCEPTED SOLUTION

Accepted Solutions
Astounding
PROC Star

It might not be worth the trouble, but here's something you can try. 

 

data want;

infile cards truncover;

input @1  @ ;

nrecs = countw(_infile_) / 2;

do _n_=1 to nrecs;

   input name $ age @ ;

   output;

end;

drop nrecs;

datalines;

John 13 Monica 12 Sue 15 Stephen 10

Marc 22 Lily 17

;

 

View solution in original post

6 REPLIES 6
ChrisHemedinger
Community Manager

What message?  The only message I see is informational:

 

NOTE: SAS went to a new line when INPUT statement reached past the end of a line.
NOTE: The data set WORK.TEST has 6 observations and 2 variables.
It's time to register for SAS Innovate! Join your SAS user peers in Las Vegas on April 16-19 2024.
alepage
Barite | Level 11

Yes you are right.  Then what can i do to eliminate this note:

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

 

Reeza
Super User

You can consider the NONOTES option, but it seems like overkill because it suppresses all notes.

The list of options related to the LOG are in the link below.

 

http://documentation.sas.com/?docsetId=lrcon&docsetTarget=n03qoiyzzrrl4in1pfvbqgj7jan8.htm&docsetVer...

Reeza
Super User

Post your code and log, including the ERROR

Astounding
PROC Star

It might not be worth the trouble, but here's something you can try. 

 

data want;

infile cards truncover;

input @1  @ ;

nrecs = countw(_infile_) / 2;

do _n_=1 to nrecs;

   input name $ age @ ;

   output;

end;

drop nrecs;

datalines;

John 13 Monica 12 Sue 15 Stephen 10

Marc 22 Lily 17

;

 

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 6 replies
  • 3370 views
  • 3 likes
  • 5 in conversation