How long can a macro variable be? A token?Ī component of SAS known as the word scanner breaks the program text into fundamental units called tokens. % Local is a macro variable defined inside a macro.%Global is a macro variable defined in open code (outside the macro or can use anywhere).Ĩ. What is the difference between %LOCAL and % GLOBAL ? Macros in SAS make a small change in the program and have SAS echo that change thought that program.ħ. Parameters passed to the macro program customize the results without having to change the code within the macro program. A macro program can be reused many times. We can accomplish repetitive tasks quickly and efficiently. If we want use a program step for executing to execute the same Proc step on multiple data sets. For what purposes have you used SAS macros? The end of the macro is defined by %Mend StatementĦ. How would you identify a macro variable?ĥ. How can you create a macro variable with in data step?Ĥ. Yes I have, I used macros in creating analysis datasets and tables where it is necessary to make a small change through out the program and where it is necessary to use the code again and again.Īfter I have defined a macro I can invoke it by adding the percent sign prefix to its name like this: % macro name a semicolon is not required when invoking a macro, though adding one generally does no harm.ģ. Have you used macros? For what purpose you have used? SAS Macros Interview Questions and Answers::ġ.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |