I just copied proc rank from SAS site but I got this basic error message. I'm scratching my head now. Please help
538 * calculate accumulative totals for each year;
539 libname in "e:\Users\mhollifi\Documents\Profs\MCox1-28-14\Net 2018";
NOTE: Libref IN was successfully assigned as follows:
Engine: V9
Physical Name: e:\Users\mhollifi\Documents\Profs\MCox1-28-14\Net 2018
540
541 data in1;
542 merge in.akron1 in.akron2 in.akron3 in.akron4;
543 by metro;
544 array exmpt {*} exmpt_net93 - exmpt_net99 exmpt_net00 - exmpt_net15;
545 array total {*} total_net93 - total_net99 total_net00 - total_net15;
546 do i = 1 to 23;
547 if exmpt(i) = . then exmpt(i) = 0;
548 end;
549
550 do i = 1 to 23;
551 if i = 1 then total (i) = exmpt(i);
552 else total(i) = sum(total(i-1) , exmpt(i));
553 end;
554 run;
NOTE: There were 62 observations read from the data set IN.AKRON1.
NOTE: There were 45 observations read from the data set IN.AKRON2.
NOTE: There were 56 observations read from the data set IN.AKRON3.
NOTE: There were 60 observations read from the data set IN.AKRON4.
NOTE: The data set WORK.IN1 has 66 observations and 49 variables.
NOTE: DATA statement used (Total process time):
real time 0.01 seconds
cpu time 0.01 seconds
555 proc rank data=in1 out=order descending ties=low;
556
-
180
ERROR 180-322: Statement is not valid or it is used out of proper order.
557 var total_net15;
558 ranks total_Rank;
559 run;
NOTE: The SAS System stopped processing this step because of errors.
WARNING: The data set WORK.ORDER may be incomplete. When this step was stopped there were 0
observations and 0 variables.
WARNING: Data set WORK.ORDER was not replaced because this step was stopped.
NOTE: PROCEDURE RANK used (Total process time):
real time 0.00 seconds
cpu time 0.00 seconds
You most likely imported a non-printing character. Try retyping the code (don't cut and paste!)
You most likely imported a non-printing character. Try retyping the code (don't cut and paste!)
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.