Monday, April 18, 2011

3-fer on StoredProcessService

Ok, well the major issues have been tackled except 1. How do you handle spaces in your NameValuePairs? Well, without the single quotes below, it kept splitting the values between the Sample and the Data. The single quotes hold it together.

Check this out:

string[] parms = new string[2]
@"datalib='X:\Data\Prognos\DemandForecasting\Sample Data'",

Notice the single quotes around the value? It took a long time to track that one down (thanks ThotWave).

Now it is simple to submit to SAS:

string newParms = string.Empty;
if (parms != null)
newParms = String.Join(" ", parms);
StoredProcessService sp = Common.SasLanguageService.StoredProcessService;
sp.Repository = storedProcLibrary;
sp.Execute(storedProcedureName, newParms);

I would ask R&D a simple question which is why isn't there an option on the SPS to specify the delimiter or am I missing a flag somewhere?

No comments:

CTRL+Z does not generate EOF in Windows 10

In Windows 10, when I was trying to generate an EOF for a Java program, the CTRL+Z did not work. After doing some research (and help from f...