How do you add a number to a macro variable?

Answers were Sorted based on User's Feedback



How do you add a number to a macro variable?..

Answer / 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

How do you add a number to a macro variable?..

Answer / ravi

%let=1;

Is This Answer Correct ?    3 Yes 1 No

Post New Answer

More SAS Interview Questions

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

0 Answers  


Baseline definition in your study

3 Answers   Accenture, Quintiles,


what is slowly changing dimension? : Sas-di

0 Answers  


What is the difference between input and infile statement?

0 Answers  


"What is the difference between proc sort nodup and proc sort nodupkey?"

2 Answers  


What is auto call macro and how to create a auto call macro? What is the use of it? How to use it in sas with macros? : sas-macro

0 Answers  


how does sas handle missing values in sort order? : Sas programming

0 Answers  


what are the advantages of using SAS in clinical data mangement? why should not we use other software products in managing clinical data?

2 Answers   Wockhardt,


What is the purpose of the trailing @? The @@? How would you use them?

10 Answers   Accenture,


In SAS how to read the variable values having different formats. eg:mar99,mar1999 (in a single variable)

8 Answers   GSK GlaxoSmithKline,


What is the difference between the proc sql and data step?

0 Answers  


Where do you use proc means over proc freq?

0 Answers  


Categories