SAS Procedures

Help using Base SAS procedures
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 ... ;
Register for SAS Innovate 2025!! The premier event for SAS users, May 6-9 in Orlando FL. Sign up now for the best deals!

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.

Register for SAS Innovate 2025!! The premier event for SAS users, May 6-9 in Orlando FL. Sign up now for the best deals!
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 ... ;
Register for SAS Innovate 2025!! The premier event for SAS users, May 6-9 in Orlando FL. Sign up now for the best deals!

SAS Innovate 2025: Register Today!

 

Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.


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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 4 replies
  • 3442 views
  • 2 likes
  • 2 in conversation