All, Ok, I think this might be doable but I am drawing a blank. Suppose I have this code: %macro xyz; data temp.temp4; .do some sas stuff. run; %mend; Is there a way to write the macro statements out to a file? I can run them but I would also like to save them outside of SAS. Thanks, Alan Alan Churchill Savian <http://www.savian.net/> www.savian.net