/* Using a %LET statement to create a MACRO variable */ %LET studentname = Tom; %LET favcolor = blue; %LET favnumber = 3; DATA favorites; DO i = 1 to &favnumber; student = "&studentname"; color = "&favcolor"; OUTPUT; END; PROC PRINT STYLE(DATA) = {BACKGROUND = &favcolor}; title color = &favcolor "The favorite color of &studentname is &favcolor"; title2 color = &favcolor "The favorite number of &studentname is &favnumber"; *Note that Double quotes are needed above; footnote color = &favcolor "&studentname.'s information is listed above in the color &favcolor"; * Note the need for the extra period after the macro variable reference above; run; * An example of a FILE statement with the need for an extra period: * FILE 'c:\MyData\&studentname..txt' PRINT;