Hi All,
We have a custom .Net application that invokes a SAS Stored Process. we use this code attached below to invoke the program attached however it kicks of the program but it does not pass the parameters we are trying to pass. and hence fails. It does create the logs.
string configstoredProcessname = "IYPStoredProcessInvoker.sas";
string environmentDir = "/sasdata/Powersupply/PROD";
string targetLib = "OEFPP";
IWorkspace workspace = (IWorkspace)consumer.Workspace(consumer.AssignedServer); //ProdApp
workspace.LanguageService.Async = false;
workspace.LanguageService.StoredProcessService.Repository = "file:/sasdata/Powersupply/PROD/IYP/Stored_Process/";
string StoredProcessName = "IYPStoredProcessInvoker.sas";
string parameters = "PriceForecastID=" + lstFcstChild[i].MODL_FCST_SYS_ID + " ModelName=" + "\"" + modelName + "\"" + " RunDate=" + "\"" + lstFcstChild[i].MODL_FCST_DT.Value.Date.ToShortDateString() + "\"" + " NoOfDays=" + Convert.ToDecimal(txtDays.Text) + " environmentRootDir=" + environmentDir + " targetLib=" + targetLib;
parameters = "PriceForecastId=" + lstFcstChild[i].MODL_FCST_SYS_ID + " ModelName=" + "" + modelName + "" + " runDate=" + "" + lstFcstChild[i].MODL_FCST_DT.Value.Date.ToShortDateString() + "" + " NoOfDays=" + Convert.ToDecimal(txtDays.Text) + " environmentRootDir=" + environmentDir + " targetLib=" + targetLib;
workspace.LanguageService.StoredProcessService.Execute(StoredProcessName, parameters);
If the logs show errors perhaps it will help to include the log for one or two calls.
Hi ballardw,
Unfortuanetly the logs do not show any error.
How exactly do you know the program isn't passing the parameters you expect?
Don't miss out on SAS Innovate - Register now for the FREE Livestream!
Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.