BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
PaulN
Obsidian | Level 7

I am attempting to use SASEFRED to access the FRED database.  I have been going through the examples in the SAS documentation, and I'm having issues. I have my APIKEY from FRED.  Below is my code that I modified from an example located at: http://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/etsug/etsug_sasefred_details11.htm .  I am using SAS on Demand for Academics.

 

Here are my questions/comments:

  1. I do not understand sslcalistloc.   I do not know what to do with it or what it does.  I do not know where to look for certificates.  Any explanation is appreciated.  I do not know what to enter after sslcalistloc.  I have read the product documentation and still don't understand.
  2. Why does the SAS data set fred.gstart have zero (0) observations?
  3. The FRED library is successfully created but I get the spinny wheel of death when I click on it.  See screenshot below.  The wheel doesn't stop spinning.

 

options validvarname=any

/* sslcalistloc="/SASSecurityCertificateFramework/1.1/cacerts/trustedcerts.pem"; */
title 'FRED Data: SP500 Stock Index and Wilshire 5000 Price Index';
LIBNAME FRED sasefred "/home/u49890908/FRED" 
		OUTXML=gstart 
		AUTOMAP=replace 
		MAPREF=FRED 
		XMLMAP="/home/u49890908/FRED/gstart.map" 
		APIKEY='FAKEAPIKEY0123456789012346579801' 
		IDLIST='sp500,will5000pr' 
		START='2011-01-01' 
		END='2012-01-01' 
		FREQ='m' 
		FORMAT=xml;

data stock_price;
	set FRED.gstart;
run;

proc contents data=stock_price;
run;

proc print data=stock_price;
run;

Here's my log.


 1          OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
 72         
 73         options validvarname=any
 74         
 75         /* sslcalistloc="/SASSecurityCertificateFramework/1.1/cacerts/trustedcerts.pem" */;
 76         title 'FRED Data: SP500 Stock Index and Wilshire 5000 Price Index';
 77         LIBNAME FRED sasefred "/home/u49890908/FRED"
 78         OUTXML=gstart
 79         AUTOMAP=replace
 80         MAPREF=FRED
 81         XMLMAP="/home/u49890908/FRED/gstart.map"
 82         APIKEY='FAKEAPIKEY0123456789012346579801'
 83         IDLIST='sp500,will5000pr'
 84         START='2011-01-01'
 85         END='2012-01-01'
 86         FREQ='m'
 87         FORMAT=xml;
 NOTE: The default frequency of this timeseries (SP500) is equal or higher than the requested FREQ (m).
 NOTE: Ran the FILENAME URL assignment to request FRED data.
 NOTE: Ran the DATA Step to get the FRED data for the OUTXML= option.
 NOTE: Ran the XMLV2 data engine with the XMLMAP= option.
 NOTE: The default frequency of this timeseries ( WILL5000PR) is equal or higher than the requested FREQ (m).
 NOTE: Ran the FILENAME URL assignment to request FRED data.
 NOTE: Ran the DATA Step to get the FRED data for the OUTXML= option.
 NOTE: Ran the XMLV2 data engine with the XMLMAP= option.
 NOTE: Libref FRED was successfully assigned as follows: 
       Engine:        SASEFRED 
       Physical Name: /home/u49890908/FRED
 88         
 89         data stock_price;
 90         set FRED.gstart;
 NOTE: Ran the data step to access and save the FRED data.
 ERROR: Database /home/u49890908/FRED/GSTART.sas7bdat could not be opened successfully. The file may not exist or it is currently 
        locked.
 ERROR: Error detected by XOINFO routine: discrepancy in nvars or nobs count.
 91         run;
 
 NOTE: The SAS System stopped processing this step because of errors.
 WARNING: The data set WORK.STOCK_PRICE may be incomplete.  When this step was stopped there were 0 observations and 0 variables.
 WARNING: Data set WORK.STOCK_PRICE was not replaced because this step was stopped.
 NOTE: DATA statement used (Total process time):
       real time           0.23 seconds
       user cpu time       0.12 seconds
       system cpu time     0.01 seconds
       memory              1638.46k
       OS Memory           36276.00k
       Timestamp           06/21/2023 07:06:49 PM
       Step Count                        167  Switch Count  48
       Page Faults                       0
       Page Reclaims                     1119
       Page Swaps                        0
       Voluntary Context Switches        636
       Involuntary Context Switches      0
       Block Input Operations            1472
       Block Output Operations           1688
       
 
 92         
 93         proc contents data=stock_price;
 94         run;
 
 NOTE: PROCEDURE CONTENTS used (Total process time):
       real time           0.03 seconds
       user cpu time       0.04 seconds
       system cpu time     0.00 seconds
       memory              775.50k
       OS Memory           35756.00k
       Timestamp           06/21/2023 07:06:49 PM
       Step Count                        168  Switch Count  0
       Page Faults                       0
       Page Reclaims                     59
       Page Swaps                        0
       Voluntary Context Switches        0
       Involuntary Context Switches      0
       Block Input Operations            0
       Block Output Operations           8
       
 
 95         
 96         proc print data=stock_price;
 97         run;
 
 NOTE: No variables in data set WORK.STOCK_PRICE.
 NOTE: PROCEDURE PRINT used (Total process time):
       real time           0.00 seconds
       user cpu time       0.00 seconds
       system cpu time     0.00 seconds
       memory              364.37k
       OS Memory           35496.00k
       Timestamp           06/21/2023 07:06:49 PM
       Step Count                        169  Switch Count  0
       Page Faults                       0
       Page Reclaims                     16
       Page Swaps                        0
       Voluntary Context Switches        0
       Involuntary Context Switches      0
       Block Input Operations            0
       Block Output Operations           0
       
 
 98         
 99         OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
 111      

PaulN_0-1687375378530.png

 

PaulN_1-1687375398173.png

 

PaulN_2-1687375622441.png

 

1 ACCEPTED SOLUTION

Accepted Solutions
JackieJ_SAS
SAS Employee

Hi Paul,

I think you are referring to this engine in SAS/ETS:

SAS Help Center: Getting Started: SASEFRED Interface Engine

 

While SAS OnDemand for Academics does include access to the ETS procedures, it does not include access to this SASEFRED engine.

 

If interested, you could contact SAS technical support to find out other ways you can access this engine:

Technical Support | SAS

View solution in original post

3 REPLIES 3
tom_grant
SAS Super FREQ
I don't think you can access ANY external database using SAS OnDemand for Academics. Any data you would like to use needs to be uploaded to your Files(Home) or a sub-folder under Files(Home).
JackieJ_SAS
SAS Employee

Hi Paul,

I think you are referring to this engine in SAS/ETS:

SAS Help Center: Getting Started: SASEFRED Interface Engine

 

While SAS OnDemand for Academics does include access to the ETS procedures, it does not include access to this SASEFRED engine.

 

If interested, you could contact SAS technical support to find out other ways you can access this engine:

Technical Support | SAS

PaulN
Obsidian | Level 7

I'll try using SASEFRED on the SAS 9.4 installed on my laptop.  

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 3 replies
  • 558 views
  • 6 likes
  • 3 in conversation