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

There are 200 observations in a dataset, i want to pull out the observation no's 100, 150,180,190 by using Proc SQL? How you can get it?

5 Answers  


Mention the category in which sas informats are placed?

0 Answers  


What is difference between rename and lable in sas?

10 Answers   Satyam,


What does error:1 mean?

8 Answers   Accenture,


The Lion King is hosting an animal conference. All the animals in the world attend except one. Which animal does not attend?

6 Answers   Oracle,






What is the difference between proportion and average?

0 Answers   KPMG,


Differentiate between format and informat? : sas-grid-administration

0 Answers  


SAS using companies in chennai

1 Answers  


What are the features of base sas system?

0 Answers  


How would you code the criteria to restrict the output to be produced?

6 Answers   Accenture,


We have a string like this "kannafromsalembut" ,from this i want to get only "fromsal" (but one condition with out using substring function)here we can not use scan because in the given string there is no delimeter? so give ans without out using substring ?

5 Answers  


what is fact table and factless table?

1 Answers  


Categories