I am getting following Log in my SAS can any one explain what's wrong in my data set?
Hello @Balasooriya
The issue is with your data. It is tab separated.
I have added a line after the data statement. as follows.
With this change your code works.
DATA onerep;
infile datalines dlm='09'x DSD missover;
INPUT plot Entry Name$ Block AFW ;
datalines;
Thank you Reeza for your reply. I used '--' just to show the continuity of my data set for you. Could you please explain me how to convert the variables in to numeric variables?
Hello @Balasooriya
In order to reproduce your error one would need to rerun it as you have run it.
You have provided the code as word document.
Now to use it have to retype everything and may miss the error you have.
Can you please give it as plain ASCII text file such as .txt or your .sas file.
Thank you for your reply and here is my SAS programme as a SAS document.
DATA onerep;
INPUT plot Entry Name$ Block AFW;
datalines;
1 306 SA 1 43.2
2 1 P1 1 41
3 2 P2 1 46
4 3 P3 1 40
5 4 P4 1 49
6 5 P5 1 49
7 6 P6 1 47
8 7 P7 1 47
9 8 P8 1 52
10 9 P9 1 41
11 10 P10 1 46
12 11 P11 1 34
13 12 P12 1 40
14 13 P13 1 47
15 14 P14 1 45
17 15 P15 1 46
18 16 P16 1 42
19 17 P17 1 52
20 18 P18 1 43
21 19 P19 1 46
22 20 P20 1 35
23 21 P21 1 41
24 22 P22 1 50
25 23 P23 1 49
26 24 P24 1 50
27 25 P25 1 45
28 26 P26 1 41
29 27 P27 1 45
30 28 P28 1 39
31 29 P29 1 46
32 30 P30 1 42
33 31 P31 1 45
34 32 P32 1 50
35 33 P33 1 50
36 34 P34 1 60
37 35 P35 1 49
38 36 P36 1 52
39 37 P37 1 46
40 307 Rosana 1 44.8
41 38 P38 1 45
42 39 P39 1 44
43 40 P40 1 41
44 41 P41 1 41
45 42 P42 1 47
46 43 P43 1 44
47 44 P44 1 40
49 306 SA 2 47.8
50 45 P45 2 40
51 46 P46 2 48
52 47 P47 2 44
53 48 P48 2 47
54 49 P49 2 43
55 50 P50 2 53
56 51 P51 2 50
57 52 P52 2 41
58 53 P53 2 44
59 54 P54 2 41
60 55 P55 2 44
61 56 P56 2 47
62 57 P57 2 52
63 58 P58 2 44
64 59 P59 2 49
65 60 P60 2 57
67 61 P61 2 41
68 62 P62 2 53
69 63 P63 2 41
70 64 P64 2 53
71 65 P65 2 56
72 66 P66 2 60
73 67 P67 2 43
74 68 P68 2 41
75 69 P69 2 54
76 70 P70 2 45
77 71 P71 2 43
78 72 P72 2 58
79 73 P73 2 45
80 74 P74 2 61
81 75 P75 2 52
82 76 P76 2 42
83 307 Rosana 2 43.75
84 77 P77 2 50
85 78 P78 2 51
86 79 P79 2 51
87 80 P80 2 50
88 81 P81 2 64
89 82 P82 2 56
90 83 P83 2 64
91 84 P84 2 61
92 85 P85 2 57
93 86 P86 2 43
94 87 P87 2 38
95 88 P88 2 47
96 89 P89 2 54
97 90 P90 2 52
98 91 P91 2 52
99 92 P92 2 49
100 93 P93 2 53
101 94 P94 2 45
102 95 P95 2 50
104 306 SA 3 48.25
105 96 P96 3 47
106 97 P97 3 46
107 98 P98 3 44
108 99 P99 3 45
109 100 P100 3 45
110 101 P101 3 47
111 102 P102 3 45
112 103 P103 3 49
113 104 P104 3 47
114 105 P105 3 43
115 106 P106 3 50
116 107 P107 3 52
117 108 P108 3 45
118 109 P109 3 50
120 110 P110 3 35
121 111 P111 3 50
122 112 P112 3 48
123 113 P113 3 45
124 114 P114 3 53
125 115 P115 3 47
126 116 P116 3 40
127 117 P117 3 53
128 118 P118 3 44
129 119 P119 3 48
130 120 P120 3 41
131 121 P121 3 43
132 122 P122 3 46
133 123 P123 3 45
134 124 P124 3 40
135 125 P125 3 46
136 126 P126 3 37
137 127 P127 3 47
138 128 P128 3 42
139 307 Rosana 3 45
140 129 P129 3 43
141 130 P130 3 47
142 131 P131 3 42
143 132 P132 3 48
144 133 P133 3 48
145 134 P134 3 45
146 135 P135 3 39
147 136 P136 3 47
148 137 P137 3 50
149 138 P138 3 49
150 139 P139 3 41
151 140 P140 3 41
152 141 P141 3 62
153 142 P142 3 46
154 143 P143 3 52
155 144 P144 3 39
156 145 P145 3 35
157 146 P146 3 53
;
PROC PRINT;
RUN;/*prepare the dataset to run a mixed model analysis with new entries random*/
DATA arcbd;
set onerep;
if(entry>305) then new=0;
else new=1;
if(new) then entryc=999;
else entryc=entry;
RUN;
PROC GLM data=arcbd;
TITLE 'ANOVA for mixed model using GLM';
CLASS block entry entryc;
MODEL AFW=block entryc entry*new/solution;
RANDOM block/test;
LSMEANS entryc/stderr;
RUN;
I edited your post so people do not need to download the attachment.
Hello @Balasooriya
The issue is with your data. It is tab separated.
I have added a line after the data statement. as follows.
With this change your code works.
DATA onerep;
infile datalines dlm='09'x DSD missover;
INPUT plot Entry Name$ Block AFW ;
datalines;
Thank you very much Sir..
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.