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

What are the data types in sas?

0 Answers  


Mention what is PROC in SAS?

0 Answers  


How can you put a "trace" in your program?

2 Answers   Quintiles,


Does SAS ‘Translate’ (compile) or does it ‘Interpret’? Explain.

4 Answers   Accenture,


what are all the default values getting in PROC MEANS...???

2 Answers  






Is the physical structure of the data set in the same orientation as the report? Do you need to reshape the data sets? What method should you use to reshape the data–DATA steps,PROC TRANSPOSE,output data set from a procedure?

0 Answers  


How do you read in the variables that you need?

9 Answers   Accenture,


How can a SAS WEB REPORT STUDIO USER identify which report tabs they have been permitted without entering the SAS WEB REPORT STUDIO

2 Answers   TCS,


What are the 3 components in sas programming?

0 Answers  


6) Explain about below automatic variables a) _N_ b) _ERROR_ c) _CHAR_ d) _NUMERIC_ e) _ALL_ f) FIRST.BY VARIABLE g) LAST.BY VARIABLE h) _NAME_ i) _TYPE_ j) _FREQ_ k) _STAT_ l) _BREAK

1 Answers   IBM, SAS,


In which format does Date stores in sas..? What is the use of DATE in SAS.?

3 Answers   TCS,


how does sas handle missing values in an update? : Sas programming

1 Answers  


Categories