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

Can anyone kindly run this coding and see where the error is. I am trying and unable to understand whats wrong. thanks

 

Data en;
infile cards dlm="." dsd truncover;
input Fert Day Time Hfert Hfeed pH DO Temp NH4 NO2 TAN PO4 Fishwt;
cards;
1 8 9 23 22.5 7.8 6.7 29 0.43 0.024 0.454 0.1 75
1 8 9 23 22.5 7.9 7.1 29 0.13 0.009 0.139 0.1 59
1 8 9 23 22.5 7.8 6.8 28 0.16 0.012 0.172 0.1 80
0 8 9 23 22.5 7.9 7.4 29 0.57 0.039 0.609 0.14 76
0.5 8 9 23 22.5 8 7.2 28 0.18 0.016 0.196 0.12 82
0 8 9 23 22.5 7.9 7 28 0.74 0.063 0.803 0.14 90
0.5 8 9 23 22.5 7.8 6.7 28 0.93 0.049 0.979 0.15 68
0 8 9 23 22.5 7.9 7.1 28 0.33 0.048 0.378 0.11 98
0.5 8 9 23 22.5 7.9 7 28 0.15 0.009 0.159 0.12 82
;

proc glm;
class fert;
model pH=fert;

proc glm;
class fert;
model DO=fert;

proc glm;
class fert;
model NH4=fert;

proc glm;
class fert;
model NO2=fert;

proc glm;
class fert;
model PO4=fert;

proc glm;
class fert;
model Fishwt=fert;

run;

1 ACCEPTED SOLUTION

Accepted Solutions
ballardw
Super User

Post the log content with code you run and the error message. I don't get any errors if I remove the infile statement.

View solution in original post

3 REPLIES 3
Astounding
PROC Star

dlm="." is incorrect for your data.  It says to expect a decimal point as a delimiter between data values.  You have a space between data values.  

 

Your code should be using dlm=" " instead.

Sa2
Calcite | Level 5 Sa2
Calcite | Level 5
I am doing every suggestion you are saying but I am still getting new error every time. Is it feasible for you to run this data and see where the error is
ballardw
Super User

Post the log content with code you run and the error message. I don't get any errors if I remove the infile statement.

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
  • 3 replies
  • 1105 views
  • 1 like
  • 3 in conversation