BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
jakemyers2
Fluorite | Level 6

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;
1 ACCEPTED SOLUTION

Accepted Solutions
ChrisHemedinger
Community Manager

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

View solution in original post

4 REPLIES 4
ChrisHemedinger
Community Manager

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.

jakemyers2
Fluorite | Level 6

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.

jakemyers2
Fluorite | Level 6
When I added the semicolon as replied I gor error 180-322: Statement is not valid or it is used out of proper order.
ChrisHemedinger
Community Manager

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

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!

What is Bayesian Analysis?

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.

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
  • 1580 views
  • 2 likes
  • 2 in conversation