I have inherited the code but I am not an experienced SAS Coder. I have never seen arrays in any code before. I am getting error when running a section with the MAX and Array loop within it. Please assist. The code is:- data final_ccf_fca; set all_data_fca; array amt_arrs{1:&m.} amt_arrears_1 - amt_arrears_&m.; array ltr_arrs{1:&m.} amt_ltr_fee_1 - amt_ltr_fee_&m.; array arrs_bal{1:&m.} arrs_bal_1 - arrs_bal_&m.; array arrs_bal_inc{1:&m.} arrs_bal_inc_2 - arrs_bal_inc_&m.; array arrs_inst{1:&m.} arrs_inst_2 - arrs_inst_&m.; do i=1 to &m.; arrs_bal{i} = amt_arrs{i} - ltr_arrs{i}; j=i-1; if i>1 then do; arrs_bal_inc{i} = arrs_bal{i} - arrs_bal{j}; arrs_inst{i} = arrs_bal_inc{i} / amt_inst; end; end; max_value = max(of arrs_inst{*}); if round(max_value,0.00001)>=1 then whole_payment=1; else whole_payment=0; run; With the error message:- 35932 data final_ccf_fca; 35933 set all_data_fca; 35934 35935 array amt_arrs{1:&m.} amt_arrears_1 - amt_arrears_&m.; 35936 array ltr_arrs{1:&m.} amt_ltr_fee_1 - amt_ltr_fee_&m.; 35937 array arrs_bal{1:&m.} arrs_bal_1 - arrs_bal_&m.; 35938 array arrs_bal_inc{1:&m.} arrs_bal_inc_2 - arrs_bal_inc_&m.; ERROR: Too few variables defined for the dimension(s) specified for the array arrs_bal_inc. 35939 array arrs_inst{1:&m.} arrs_inst_2 - arrs_inst_&m.; ERROR: Too few variables defined for the dimension(s) specified for the array arrs_inst. 35940 35941 do i=1 to &m.; 35942 arrs_bal{i} = amt_arrs{i} - ltr_arrs{i}; 35943 j=i-1; 35944 if i>1 then do; 35945 arrs_bal_inc{i} = arrs_bal{i} - arrs_bal{j}; 35946 arrs_inst{i} = arrs_bal_inc{i} / amt_inst; 35947 end; 35948 end; 35949 35950 max_value = max(of arrs_inst{*}); --- 71 ERROR 71-185: The MAX function call does not have enough arguments. 35951 35952 if round(max_value,0.00001)>=1 then whole_payment=1; else whole_payment=0; 35953 35954 run; NOTE: Character values have been converted to numeric values at the places given by: (Line):(Column). 35946:24 NOTE: The SAS System stopped processing this step because of errors. WARNING: The data set WORK.FINAL_CCF_FCA may be incomplete. When this step was stopped there were 0 observations and 12 variables. WARNING: Data set WORK.FINAL_CCF_FCA was not replaced because this step was stopped. NOTE: DATA statement used (Total process time): real time 0.02 seconds cpu time 0.00 seconds
... View more