Hello, I am a python guy who has to connect an api with SAS. In python I am able to just do verify = false as the end of the request post to avoid the SSL Certificate check. I am trying to do it in SAS in relation with the documentation but it is not working. I am using SAS Enterprise Studio 7.1 and any help is appreciated, it seems to not recognize the call SSLREQCERT. Without the SSLREQCERT it runs without errors but the api wont actually do anything. When the SSLREQCERT is put in there is a syntax error 22-322 expecting. Any help or advice is appreciated!
filename json_in temp;
data _null_;
file json_in;
input;
put _infile_;
datalines;
{"data": { "var 1" : "identifier"
"var 2" : "identifier2"
"var 3" : "identifier3"}
run;
filename resp temp;
proc http
method="POST"
url="http://blahblah"
ct="blah/json"
in=json_in
SSLREQCERT= "ALLOW"
out=resp;
run;
libname posts JSON fileref=resp;
The SSLPARMS statement was added in SAS 9.4 Maint 6. Your version of EG doesn't matter, but you can check your SAS version by running proc product_status; run;
Prior to 9.4m6, you can set the SSLREQCERT option in an environment variable at SAS startup or before running PROC HTTP. See this documentation. You can set an environment variable with the OPTIONS statement. Try:
options set=SSLREQCERT="allow";
proc http ... ;
Use the SSLPARMS statement to set this like so:
proc http
method="POST"
url="http://blahblah"
ct="blah/json"
in=json_in
out=resp;
SSLPARMS "SSLREQCERT"="ALLOW";
run;
See documentation on this here.
Hello Chris,
Thanks for the help it is much appreciated! I'm getting this error on the SSLPARMS statement, i dont know if it is because I am running SAS Enterprise Guide 7.15, but it doesn't seem to be working.
ERROR 22-322: Syntax error, expecting one of the following: ;, AUTH_ANY, AUTH_BASIC, AUTH_NEGOTIATE, AUTH_NONE, AUTH_NTLM,
CLEAR_CACHE, CLEAR_CONN_CACHE, CLEAR_COOKIES, CT, EXPECT_100_CONTINUE, FOLLOWLOC, HEADERIN, HEADEROUT,
HEADEROUT_OVERWRITE, HTTP_TOKENAUTH, IN, METHOD, NOFOLLOW, NOFOLLOWLOC, NO_CONN_CACHE, NO_COOKIES, OAUTH_BEARER, OUT,
PASSWORD, PROXYHOST, PROXYPASSWORD, PROXYPORT, PROXYUSERNAME, PROXY_AUTH_BASIC, PROXY_AUTH_NEGOTIATE,
PROXY_AUTH_NONE, PROXY_AUTH_NTLM, TIMEOUT, URL, USERNAME, VERBOSE, WEBAUTHDOMAIN, WEBPASSWORD, WEBUSERNAME.
ERROR 76-322: Syntax error, statement will be ignored.
The SSLPARMS statement was added in SAS 9.4 Maint 6. Your version of EG doesn't matter, but you can check your SAS version by running proc product_status; run;
Prior to 9.4m6, you can set the SSLREQCERT option in an environment variable at SAS startup or before running PROC HTTP. See this documentation. You can set an environment variable with the OPTIONS statement. Try:
options set=SSLREQCERT="allow";
proc http ... ;
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 16. Read more here about why you should contribute and what is in it for you!
Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.
Find more tutorials on the SAS Users YouTube channel.