Hi Experts,
I have created a stored process with input and output parameters that I'm trying to call using SAS BI Web Services. My endpoint is JSON.
*ProcessBody;
%global BANK
CALCULATIONTYPE
COMPANYID
CUSTOMERID
MODELCODE
PREVIOUSCALCULATIONDATE
PREVIOUSEXPECTEDLOSS
PREVIOUSLOSSGIVENDEFAULT
PREVIOUSPROBABILITYOFDEFAULT
QUESTIONNAIREGRADE;
%STPBEGIN;
* End EG generated code (do not edit this line);
proc printto log=" D:\RiskModels\RestLogs\web_service_test_%sysfunc(today(),yymmdd10.)-%sysfunc(compress(%sysfunc(time( ),time.),":")).log";
run;
libname srcdata "D:\RiskModels\SourceData";
proc sql noprint;
select distinct Client_LGD format=16.8 into :lgd from srcdata.lgd_table where
ID =&customerID;
quit;
%let probabilityOfDefault=0.5;
%let lossGivenDefault = &lgd;
%let expectedLoss = %sysevalf(&lgd. * &probabilityOfDefault.);
* Begin EG generated code (do not edit this line);
;*';*";*/;quit;
%STPEND;
* End EG generated code (do not edit this line);
My output parameters were defined as DOUBLE, but in the response in my API tester tool (POSTMAN for example),
they all show as STRING.
{
"outputParameters": {
"expectedLoss": "0.22068032",
"probabilityOfDefault": "0.5",
"lossGivenDefault": "0.44136064"
}
}
When I looked in SAS documentation the example shows a response with string variables only.
Does anyone succeed transfer numeric parameters?
https://documentation.sas.com/doc/en/itechcdc/9.4/wbsvcdg/n1wblekhip1yrln1fv2s5b6a2d9f.htm

Thank you very much,
Nufar.