I have three numeric variables A, B and C and I want to automatically calculate A = B + C and display a message "the total is A".
it doesn't work, please help!
PROC A
preproc
A = sum(B, C);
errmsg((" the total is : %d"), A );
sum of variables
Re: sum of variables
sum is for calculating the sum of a column in a roster. For what you are you just need to use the "+" operator:
PROC A
preproc
A = B + C;
errmsg(" the total is : %d", A );
preproc
A = B + C;
errmsg(" the total is : %d", A );