SAS.Workspace ws = new Workspace();
LanguageService ls = ws.LanguageService;
StoredProcessService sp = ls.StoredProcessService;
sp.Repository = @"file:" + @"x:\temp";
All is well and good. Life is happy, kids are playing, sunshine is everywhere.
Wait! We need to see if the code ran. let's check the log:
string log = ls.FlushLog(1000);
AHHHH!!!! It never comes back. Where is my string!?!?
Turns out that if the FlushLog int amount EXCEEDS the total number of chars in the log, you go to a happy place called infinity. Less than the total chars and all is well.
I decided to test this a few times and was able to get a picture of my CPU utilization:
This does not happen when using the LanguageService directly, only when using the StoredProcessService. Time to wrap up this blog, pull back from the black hole of infinite loops, and go issue a bug report with SAS R&D.
If any SAS R&D folks in this area read this blog, let me know if I missed something. Right now, it seems like I have been bitten twice today by bugs.