

What is the maximum length of the macro variable?ġ8. Macro parameters allow you to pass information into a macro.ġ7. How are parameters passed to a macro?ĪNS: A macro variable defined in parentheses in a %MACRO statement is a macro parameter. If you use a SYMPUT in a DATA step, when and where can you use the macro variable?ĪNS: Macro variable is used inside the Call Symput statement and is enclosed in quotes.ġ6. How would you identify a macro variable?ġ4. %Global is a macro variable defined in open code.ġ3.

What is the difference between %LOCAL and %GLOBAL?ĪNS: % Local is a macro variable defined inside a macro. Tokens are passed on demand to the compiler.ġ2.
#Advance sas interview questions code
What do you code to create a macro? End one?ĪNS: We create a macro with %MACRO statement and end a macro with %MEND statement.ĪNS: A component of SAS known as the word scanner breaks the program text into fundamental units called tokens. Every macro’s beginning is identified the keyword %macro and end with %mend.ġ0. Can we execute macro within another macro? If so, how would SAS know where the current macro ended and the new one began?ĪNS: Yes, we can execute macro within a macro, we call it as nesting of macros, which is allowed. How we can call macros with in data step?ĪNS: We can call the macro with CALL SYMPUT, Proc SQL, %LET statement and macro parameters.ĩ. The auto call macro facility allows users to access the same macro code from multiple SAS programs.ĪNS: Every time we invoke SAS, the macro processor automatically creates certain macro var.
#Advance sas interview questions how to
What is auto call macro and how to create a auto call macro?ĪNS: SAS enables the user to call macros that have been stored as SAS programs. How we can call macros with in data step?ĪNS: We can call the macro with CALLSYMPUTĦ. What is the maximum length of the macro variable?ĥ. Macro language can be used to save more time and work for programming.ĪNS: by adding the percent sign prefix to its name like % macro name a semicolon is not required when invoking a macro, though adding one generally does no harm.Ĥ. We can develop Reuseble applications this applications we can use unlimited times. It is developed to avoid the calling of that function again and again.ĪNS: SAS macros stores in auto call library. ANS: SAS Macro is a user defined function.
