Hello,
I am trying to use the FRED database using SAS Studio (University Edition) at home. Is that even possible? I am reading this documentation, is this even relevant anymore?
I am confused about this part:
The specification shown as SSLCALISTLOC= "/SASSecurityCertificateFramework/1.1/cacerts/trustedcerts.pem" is for demonstration purposes only. Specify your own location of your trusted certificates inside the double quotes.
My code so far:
options validvarname= any
sslcalistloc="/SASSecurityCertificateFramework/1.1/cacerts/trustedcerts.pem";
title 'Retrieve Data for the Exports of Goods and Services';
libname _all_ clear;
libname fred sasefred "%sysget(FRED)"
OUTXML = exportgs
XMLMAP = "%sysget(FRED)exortsgs.map"
APIKEY = '527539c8dd5495d3c3c9aff99ecdd96a'
IDLIST = 'EXPGS';
data exort_gsa;
set fred.exportgs;
run;
proc contents data = export_gsa;
set fred.exportgs;
run;
proc contents data=export_gsa;
run;
proc print data = export_gsa(obs_15);
run;
--------------LIST OF ERRORS----------
I have not used this but have some suggestions.
This documentation states that you should not specify the SSLCALISTLOC option:
CAUTION
Do not change the SSLCALISTLOC= system option. Starting SAS 9.4M3, the SSLCALISTLOC= system option should not be overridden or changed unless directed by technical support or PSD.
The LIBNAME statement is in error because the FRED enviroment variable is not defined, causing the path specified to be invalid. You might be able to specify any valid path in the LIBNAME statement.
For example, in SAS University Edition I have a mapped folder My Folders > Data referring to the /folders/myfolders/Data location (view the properties of the folder to see the location). This LIBNAME statement should work if you specify the correct location for the PATH variable and your API key:
options validvarname=any;
%let PATH=/folders/myfolders/Data;
libname fred sasefred "&PATH"
OUTXML=exportgs
XMLMAP="&PATH/exportgs.map"
APIKEY='XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
IDLIST='bopxgsa';
After you get the LIBNAME statement working, then try submitting the DATA step code to read the data:
data work.export_gsa;
set fred.exportgs ;
run;
Vince DelGobbo
SAS R&D
I have not used this but have some suggestions.
This documentation states that you should not specify the SSLCALISTLOC option:
CAUTION
Do not change the SSLCALISTLOC= system option. Starting SAS 9.4M3, the SSLCALISTLOC= system option should not be overridden or changed unless directed by technical support or PSD.
The LIBNAME statement is in error because the FRED enviroment variable is not defined, causing the path specified to be invalid. You might be able to specify any valid path in the LIBNAME statement.
For example, in SAS University Edition I have a mapped folder My Folders > Data referring to the /folders/myfolders/Data location (view the properties of the folder to see the location). This LIBNAME statement should work if you specify the correct location for the PATH variable and your API key:
options validvarname=any;
%let PATH=/folders/myfolders/Data;
libname fred sasefred "&PATH"
OUTXML=exportgs
XMLMAP="&PATH/exportgs.map"
APIKEY='XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
IDLIST='bopxgsa';
After you get the LIBNAME statement working, then try submitting the DATA step code to read the data:
data work.export_gsa;
set fred.exportgs ;
run;
Vince DelGobbo
SAS R&D
Related information:
Vince DelGobbo
SAS R&D
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
Learn how to run multiple linear regression models with and without interactions, presented by SAS user Alex Chaplin.
Find more tutorials on the SAS Users YouTube channel.