I'm trying to write a custom task that allows users to enter attributes into a form that builds a Proc Datasets to modify a copy of a dataset. I can get the proc datasets to run correctly with a button event handler that looks like: SAS.Tasks.Toolkit.SasSubmitter submitter = new SAS.Tasks.Toolkit.SasSubmitter(ActiveServer); // holds SAS log output string log; // submit program and wait for completion submitter.SubmitSasProgramAndWait(FinalSasCode, out log); where FinalSasCode has the program I want to run. I have a property in the Model also called FinalSasCode and I can set it with the program text (and see in the log that it is set, but when GetSASCode() is invoked the property returns an empty string (as can be seen in the log). Is this come kind of timing or thread issue? When does GetSasCode() get invoked? public override string GetSasCode() { try { dlg.logger.InfoFormat(" /* From GetSasCode FinalSasCode: */ \n proc contents data = {0}.{1}; run;\n {2} \n /* */", Consumer.ActiveData.Library, Consumer.ActiveData.Member, FinalSasCode); return string.Format(" /* task complete */ \n proc contents data = {0}.{1}; run;\n {2} \n /* */", Consumer.ActiveData.Library, Consumer.ActiveData.Member, FinalSasCode); } catch (Exception ex) { dlg.logger.InfoFormat(" Exception caught in GetSASCode {0}", ex.Message); return string.Format(" /* Exception generated in GetSasCode */"); } } From the logger: 2013-10-07 19:18:56,229 [Main] INFO DataLogger [(null)] - /* From GetSasCode FinalSasCode: */ proc contents data = EXTEST.SALES; run; /* */ This is what is submitted with the OK button: /* task complete */ proc contents data = EXTEST.SALES; run; /* */
... View more