@rroy wrote:
Thanks for the response.
I have posted my code and attached my data file. Why i should do it again?
Thanks
Cyril
1) you did not post a useable SAS data set. If I have to turn an XLSX into a data set I may make choices that mean the data I create is not the same as yours.
2) Posting the LOG results of code plus messages lets us see any diagnostics provided by SAS.
"Doesn't run properly" is awful vague. Are there errors in the log?: Post the code and log in a code box opened with the {i} to maintain formatting of error messages. No output? Post any log in a code box. Unexpected output? We need input data, what the unexpected result is and why you think it is unexpected.
For example: data
data example;
input x $ y z;
datalines;
1 2 3
4 5 6
;
run;
Log:
661
662 proc means data=example mean sum;
663 var x y z;
ERROR: Variable x in list does not match type prescribed for this list.
664 run;
NOTE: The SAS System stopped processing this step because of errors.
And solution: Don't attempt to ask for the mean or sum of a character variable. Either read the data value for x as numeric, which would work in this case, or don't include X on the var statement in proc means.
You can easily get values form Excel files that you think should be numeric but end up as character (or vice versa) depending on how you read them into SAS. Problems with Excel data is one of the most common questions on this forum.
... View more