Back to Blog
![]() Where make = "&make_" and type = "&type_" The below program decalres a group of SAT staemnets under a macro named 'show_result' This Macro is being called by other SAS statements. SAS has many MACRO statements which are in-built in the SAS programming language. ![]() They are used by other SAS programs without explicitly declaring them.Common examples are - terminating a program when some condition is met or capturing the runtime value of a variable in the program log. This macro statement writes text or macro variable information to the SAS log. In the below example the value of the variable 'today' is written to the program log. Macro %RETURNĮxecution of this macro causes normal termination of the currently executing macro when certain condition evaluates to be true. In the below examplewhen the value of the variable "val" becomes 10, the macro terminates else it contnues. When the above code is run we get the following output. ![]() GETTING REPORT IN SAS UNIVERSITY EDITION CODE This macro definition contains a %DO %WHILE loop that ends, as required, with a %END statement. In the below example the macro named test takes a user input and runs the DO loop using this input value. ![]() GETTING REPORT IN SAS UNIVERSITY EDITION CODE. ![]()
0 Comments
Read More
Leave a Reply. |