The runMacro Stored Process
From sasCommunity
The complete source code for the runMacro Stored Process as discussed on the blog entries
- A simple Stored Process to run any Macro
- Where, oh where, do my Macros live?
- A Home for my runMacro Stored Process
- Useful parameters/extensions for the runMacro Stored Process
on Jurassic SASĀ© in the BI/EBI World
*ProcessBody; options sasautos=("/Projects/&Project/Macros" "/Projects/Tools/Macros" sasautos); /*ODS PATH statement pointing to the template store*/ %let _odsDest = %upcase(&_odsdest); data _null_; if "&_odsdest" = 'EXCEL' then do; rc = stpsrv_header('Content-type','application/vnd.ms-excel'); call symput('_odsDest','HTML'); end; else if "&_odsdest" = 'TAGSETS.EXCELXP' then do; rc = stpsrv_header('Content-type','application/vnd.ms-excel'); rc = stpsrv_header('Content-disposition','attachment; filename="_.xml"'); end; else if "&_odsdest" = 'TAGSETS.TABLEEDITOR' then call symput('_odsOptions', "options(" || strip(symget('_odsOptions') || " pageheight='&pageheight'" || " pagewidth='&pagewidth'" || " sort='&sort'" || " frozen_rowheaders='&frozen_rowheaders'" || " frozen_headers='&frozen_headers')")); run; %stpBegin; %put NOTE: Execute macro ¯oToRun..; %¯oToRun %stpEnd;
