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

Please write codes to merge two datasets and keep every record in the first dataset.

1 Answers  


how to import XTP files into SAS datasets?

1 Answers   Barclays, Institute For Plasma Research,


what is option year cuttoff in sas

2 Answers   L&T,


how can you improve the performance of a query, If it is excuting very slowly?

2 Answers   Zensar,


how many types prompting framework can be broken down to? : Sas-bi

0 Answers  






Can you execute a macro within a macro? Describe. : sas-macro

0 Answers  


Give some examples where proc report’s defaults are different than proc print’s defaults?

0 Answers  


If reading a variable length file with fixed input, how would you prevent SAS from reading the next record if the last variable didn?t have a value?

6 Answers  


Why Info School? BUILD YOUR CAREER WITH RIGHT GUIDANCE AND SUPPORT

0 Answers  


What are some problems you might encounter in processing missing values? In Data steps? Arithmetic? Comparisons? Functions? Classifying data?

1 Answers   Quintiles,


How would you define the end of a macro?

0 Answers  


Which date functions advances a date time or date/time value by agiven interval?

3 Answers  


Categories