Submitting OS commands from SAS

When dealing with a Pooled Workspace Server, a generic ‘host account’ is normally used.  So you tend not to have individual host accounts to log in with.  Therefore, sometimes the only way to navigate the server is to use EG!  Hence this piece of code (used to grep files but can be easily modified for other commands)..



%macrogrep(loc,string);
filename x pipe “cd &loc; grep -irl &string .”;
data null;
infile x;
input;
put infile;
run;
%mend;
/_ check logs _/
%grep(C:myDirLoc,searchString)