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-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!

Register now

Develop Code with SAS Studio

Get started using SAS Studio to write, run and debug your SAS programs.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 3 replies
  • 2057 views
  • 1 like
  • 3 in conversation