The code below will let you write a SAS-program in SAS.
/* This dummy macro-variable will be used later as input for the SAS program. */
%let HelloWorld = Hello world;
put ‘%let Hello='” &HelloWorld. “‘;’;
put ‘%put &Hello;’;
filename cdrive “C:\SASPrograms”;
filename cdrive clear;
You now have a SAS-program called ‘HelloWorld.sas‘ in the folder ‘C:\SASPrograms\‘.
The program will look like this.
%let Hello= Hello World;
And it will write ‘Hello World‘ to the log in SAS.