How do you add a number to a macro variable?

Answer Posted / hsong001

Use %eval to do simple calculation for macro variables.
e.g.,
data _null_;
%let a = 1;
%let b = %eval(&a+1);
%put a=&a b=&b;
run;

Is This Answer Correct ?    9 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

how does sas handle missing values in procs? : Sas programming

910


What do you know about symput and symget?

970


what are the scrubbing procedures in sas? : Sas programming

1075


Briefly explain input and put function?

865


what is information maps?

1853


Why double trailing @@ is used in input statement?

950


Mention the validation tools used in SAS?

892


Explain what Proc glm does?

862


what is sas data set?

885


where to use sas business intelligence? : Sas-bi

800


Explain the purpose of substr functions in sas programming.

828


Name and describe few sas character functions that are used for data cleaning in brief.

903


please can you tell me that in companies sas work are doing by through sas coding or sas wizard ??

1913


what is the difference between floor and ceil functions in sas? : Sas-administrator

962


Explain bmdp procedure?

822