Hello. I used this macro many times in several programs and always works fine. Actually, this code already ran with no issues just a few days ago. However, I got this error and I don't know how to fix it. The macro tot_c is resolved correctly with value 34. Then I want to use this value in the loop where (%do j=1 %to &tot_c.) and sas returns the error bellow and stops. MPRINT(PREP_OS_STG): data _null_; MPRINT(PREP_OS_STG): set DIM_CLUS_PSE; MPRINT(PREP_OS_STG): call symputx("cluspselist"||trim(left(_n_)),CLUST_PSE_ATRIB); MPRINT(PREP_OS_STG): call symput ("tot_c",_n_); MPRINT(PREP_OS_STG): run; NOTE: Numeric values have been converted to character values at the places given by: (Line):(Column). 257:73 257:118 NOTE: There were 34 observations read from the data set WORK.DIM_CLUS_PSE. NOTE: DATA statement used (Total process time): real time 0.00 seconds cpu time 0.01 seconds MLOGIC(PREP_OS_STG): %PUT &tot_c. SYMBOLGEN: Macro variable TOT_C resolves to 34 34 MLOGIC(PREP_OS_STG): Ending execution. MPRINT(CALC_DIST_KM_STG1): ; MLOGIC(CALC_DIST_KM_STG1): %LOCAL J N NEXT_CLUS_PSE WARNING: Apparent symbolic reference TOT_C not resolved. ERROR: A character operand was found in the %EVAL function or %IF condition where a numeric operand is required. The condition was: &tot_c. ERROR: The %TO value of the %DO J loop is invalid. ERROR: The macro CALC_DIST_KM_STG1 will stop executing. MLOGIC(CALC_DIST_KM_STG1): Ending execution.
... View more