Answer Posted / nani
%macro add(a,b);
%if (%datatyp(&a)=NUMERIC and %datatyp(&b)=NUMERIC) %then %
do;
%put The result is %sysevalf(&a+&b).;
%end;
%else %do;
%put Error: Addition requires numbers.;
%end;
%mend add;
You can invoke the ADD macro as:
%add(5.1E2,225)
| Is This Answer Correct ? | 1 Yes | 1 No |
Post New Answer View All Answers
How do you control the number of observations and/or variables read or written? Approximately what date is represented by the SAS date value of 730?
Explain proc univariate?
Approximately what date is represented by the SAS date value of 730?
Mention the validation tools used in SAS?
How necessary is it to be creative in your work?
Describe what are the different levels of administrative users in sas? : sas-grid-administration
what is sas application server? : Sas-di
what is the limit of the number of the rows and columns available in the worksheet? : Sas-bi
What is the difference between proportion and average?
explain what is factor analysis? : Sas-administrator
Name and describe few sas character functions that are used for data cleaning in brief.
For what purposes have you used sas macros? : sas-macro
If a variable contains letters or special characters, can it be numeric data type?
What is the difference between %put and symbolgen? : sas-macro
what techniques and/or procs do you use for tables? : Sas programming