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
Which command is used to perform sorting in sas program?
I am preparing SAS Certified Advanced Programmer for SAS 9 in 2014. If anybody has the latest dumps for this exam, please mail me at dhiman.mukherjee@gmail.com
If you could design your ideal job, what would it look like?
what are informats in sas? : Sas-administrator
what are some good sas programming practices for processing very large data sets? : Sas programming
what is intially documentation in sas?
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?
Give some ways by which you can define the variables to produce the summary report (using proc report)?
Differentiate between ceil and floor functions.
What are SAS/ACCESS and SAS/CONNECT?
What is program data vector (pdv)?
Do you need to rearrange the order of the data for the report?
what r the job openings SAS for fresher graduates !
What can you learn from the SAS log when debugging?
please can you tell me that in companies sas work are doing by through sas coding or sas wizard ??