BookmarkSubscribeRSS Feed
rg
Fluorite | Level 6 rg
Fluorite | Level 6

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);

4 REPLIES 4
ballardw
Super User

If the logs show errors perhaps it will help to include the log for one or two calls.

rg
Fluorite | Level 6 rg
Fluorite | Level 6

 Hi ballardw,

 

Unfortuanetly the logs do not show any error. 

ballardw
Super User

How exactly do you know the program isn't passing the parameters you expect?

rg
Fluorite | Level 6 rg
Fluorite | Level 6
I have added put statements at the start of thr code. I can check it from the logs that the variables are not being resolved

SAS INNOVATE 2024

Innovate_SAS_Blue.png

Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.

If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website. 

Register now!

How to Concatenate Values

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.

Get the $99 certification deal.jpg

 

 

Back in the Classroom!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 4 replies
  • 658 views
  • 0 likes
  • 2 in conversation