Published on :
Macro CREATION_INTERNE

Hello World with Macro Variable

This code is also available in: Deutsch Español Français
This code illustrates the basic use of the SAS© macro language. It defines a macro variable containing a name and uses it to display a greeting phrase in the execution log (log) via the %PUT statement.
Data Analysis

Type : CREATION_INTERNE


The script does not manipulate any SAS data tables. It only uses in-memory variables (macro variables).

1 Code Block
MACRO LANGUAGE
Explanation :
The %LET statement creates the &myName macro variable. The %PUT statement writes the text followed by the resolved value of the variable to the log.
Copied!
1%LET myName = (your name here);
2%PUT Hello World! My name is &myName;
3 
This material is provided "as is" by We Are Cas. There are no warranties, expressed or implied, as to merchantability or fitness for a particular purpose regarding the materials or code contained herein. We Are Cas is not responsible for errors in this material as it now exists or will exist, nor does We Are Cas provide technical support for it.