Help using Base SAS procedures

ERROR: SSL error is "The token supplied to the function is invalid (0x80090308)."

Accepted Solution Solved
Reply
Frequent Contributor
Posts: 92
Accepted Solution

ERROR: SSL error is "The token supplied to the function is invalid (0x80090308)."

Hello Everyone,

I'm trying to run the code below using a proxy.  Whenever I run it, I get an SSL error stating that "The token supplied to the function is invalid (0x80090308)."  Note when I remove the proxy the code works fine (thanks again KSharp).  Also, I can view the requested webpage using the proxy in Chrome.  What's the best way to handle this error?  Use CURL or the SAS/SECURE™ SSL Add-in module?  I'm running SAS 9.3.  Thank you for any help or suggestions!

-Bill

DM 'CLEAR LOG';

%let x=&d; %let s=%superq(x);

%let a=&e; %let p=%superq(a);

filename in url "https://query.yahooapis.com/v1/public/yql?q=select%20*%20from%20yahoo.finance.option_contracts%20WHE..."

proxy="my proxySmiley Tongueort"

lrecl=32000;

data temp;

infile in recfm=n dlm='<>';

length symbol expiration $ 20;

retain symbol;

input token : $1000. @@;

if prxmatch('/(^\d{4}-\d{2})|(option\s+symbol=)/o',token) then do;

  if left(token) =: 'option' then  do;symbol=scan(token,2,'"'); delete;end;

  expiration=token;

  output;

end;

drop token;

run;


Accepted Solutions
Solution
‎06-08-2014 06:50 AM
Super User
Posts: 9,671

Re: ERROR: SSL error is "The token supplied to the function is invalid (0x80090308)."

Maybe you should check proc http when you are connecting a httpS website.

View solution in original post


All Replies
Frequent Contributor
Posts: 92

Re: ERROR: SSL error is "The token supplied to the function is invalid (0x80090308)."

Ok, I've determined that CURL is the best way to solve this issue and have installed it on my machine.  Now I'm trying to run some test code.  There are no errors in my log, see below.  However, I can't seem to generate the data that I want.  It appears that curl is working and a text file is created.  Except the text file is blank.   Does anyone have any suggestions on what I'm doing wrong?

Thanks so much,

Bill

87   dm 'clear log';

88

89   %let loc=https://www.yahoo.com/;

90   data _null_;

91      infile %sysfunc(quote(curl -k &loc. > C:\Users\bjones\SAS\Data\data_temp.txt))

91 ! pipe ;

92      input ;

93      put _infile_;

94   run;

NOTE: The infile "curl -k https://www.yahoo.com/ >

      C:\Users\bjones\SAS\Data\data_temp.txt" is:

      Unnamed Pipe Access Device,

      PROCESS=curl -k https://www.yahoo.com/ > C:\Users\bjones\SAS\Data\data_temp.txt,

      RECFM=V,LRECL=256

NOTE: 0 records were read from the infile "curl -k https://www.yahoo.com/ >

      C:\Users\bjones\SAS\Data\data_temp.txt".

NOTE: DATA statement used (Total process time):

      real time           0.16 seconds

      cpu time            0.01 seconds

Solution
‎06-08-2014 06:50 AM
Super User
Posts: 9,671

Re: ERROR: SSL error is "The token supplied to the function is invalid (0x80090308)."

Maybe you should check proc http when you are connecting a httpS website.

Frequent Contributor
Posts: 92

Re: ERROR: SSL error is "The token supplied to the function is invalid (0x80090308)."

Ksharp,

Thanks very much for the suggestion.  PROC HTTP works perfectly.

Regards,

Bill

☑ This topic is SOLVED.

Need further help from the community? Please ask a new question.

Discussion stats
  • 3 replies
  • 3079 views
  • 0 likes
  • 2 in conversation