Hi, I have issue with Base SAS(R) 9.3 Procedures Guide, Second Edition example (fixed to run without syntax error). I'm using sas 9.3. Code: options cmplib=work.funcs; proc fcmp outlib=work.funcs.temp; function summation (b ) varargs; total = 0; do i = 1 to dim(b); total = total + b; end; return(total); endsub; quit; options cmplib=(work.funcs); data _null_; sum=summation(1,2,3,4,5); put sum=; run; Log: 1 options cmplib=work.funcs; 2 3 proc fcmp outlib=work.funcs.temp; WARNING: No CMP or C functions found in library work.funcs. 4 function summation (b ) varargs; 5 total = 0; 6 do i = 1 to dim(b); 7 total = total + b; 8 end; 9 return(total); 10 endsub; 11 quit; NOTE: Function summation saved to work.funcs.temp. NOTE: PROCEDURE FCMP used (Total process time): real time 0.03 seconds user cpu time 0.00 seconds system cpu time 0.03 seconds memory 3787.98k OS Memory 10436.00k Timestamp 01/28/2014 04:59:42 PM 12 13 options cmplib=(work.funcs); 14 15 data _null_; 16 sum=summation(1,2,3,4,5); 16 sum=summation(1,2,3,4,5); --------- 72 ERROR 72-185: The summation function call has too many arguments. 16 sum=summation(1,2,3,4,5); --------- 707 ERROR 707-185: Expecting array for argument 1 of the summation subroutine call. 17 put sum=; 18 run; NOTE: The SAS System stopped processing this step because of errors. NOTE: DATA statement used (Total process time): real time 0.01 seconds user cpu time 0.00 seconds system cpu time 0.01 seconds memory 2104.40k OS Memory 10436.00k Timestamp 01/28/2014 04:59:42 PM Anyone seen this before? Anyone has a working function example with variable number of arguments? Thanks
... View more