how we can create optional or required parameters in SAS
macro...

Answers were Sorted based on User's Feedback



how we can create optional or required parameters in SAS macro.....

Answer / ak

%macro Mtest (mvar);
here its required parameter.
----------------------------------------------

%macro Mtest(mvar1=abc);
.....
sas statements using macro variable mvar1
here mvar1 can be optional while calling macro Mtest
if parameter value is not send then it takes default value
as abc
.....
%mend;

Is This Answer Correct ?    18 Yes 1 No

how we can create optional or required parameters in SAS macro.....

Answer / shiri

using keyword and positional parameters.

Is This Answer Correct ?    9 Yes 3 No

how we can create optional or required parameters in SAS macro.....

Answer / sheetal

In macro definition you can create required parameters and
using %let or call symput you can create optional
parameters in sas macro

Is This Answer Correct ?    2 Yes 9 No

how we can create optional or required parameters in SAS macro.....

Answer / rajeev

using %let statement

Is This Answer Correct ?    4 Yes 14 No

how we can create optional or required parameters in SAS macro.....

Answer / ravid

By using macros we can crate optional or required parameters

Is This Answer Correct ?    4 Yes 14 No

Post New Answer

More SAS Interview Questions

how the sas basic syntax style described? : Sas-administrator

0 Answers  


What is the difference between INPUT and INFILE ?

0 Answers  


what is data governance? : Sas-di

0 Answers  


What are the difficulties u faced while doing vital signs table or dataset?

0 Answers  


what versions of sas have you used (on which platforms)? : Sas programming

0 Answers  






If you have a data set that contains 100 variables, but you need only five of those, what is the code to force SAS to use only those variable?

10 Answers   Accenture,


Explain the purpose of retain statement.

0 Answers  


How many versions came upto now in SAS?

3 Answers   CTS, TCS,


how to delete the duplicates by using proc sql?

3 Answers   Genpact,


Give some examples where proc report’s defaults are same as proc print’s defaults?

0 Answers  


What is the difference between %local and %global?

1 Answers  


How do you read in the variables that you need?

5 Answers  


Categories