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

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?

 

https://documentation.sas.com/?docsetId=etsug&docsetTarget=etsug_sasefred_gettingstarted.htm&docsetV...

 

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

1 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
NOTE: ODS statements in the SAS Studio environment may disable some output features.
73
74 options validvarname= any
75 sslcalistloc="/SASSecurityCertificateFramework/1.1/cacerts/trustedcerts.pem";
76
77 title 'Retrieve Data for the Exports of Goods and Services';
78 libname _all_ clear;
79
80 libname fred
WARNING: The argument to macro function %SYSGET is not defined as a system variable.
80 ! sasefred "%sysget(FRED)"
81 OUTXML = exportgs
WARNING: The argument to macro function %SYSGET is not defined as a system variable.
82 XMLMAP = "%sysget(FRED)exortsgs.map"
83 APIKEY = '527539c8dd5495d3c3c9aff99ecdd96a'
84 IDLIST = 'EXPGS';
ERROR: Invalid physical name for library FRED.
ERROR: Error in the LIBNAME statement.
85
86 data exort_gsa;
87 set fred.exportgs;
ERROR: Libref FRED is not assigned.
88 run;
 
NOTE: The SAS System stopped processing this step because of errors.
WARNING: The data set WORK.EXORT_GSA may be incomplete. When this step was stopped there were 0 observations and 0 variables.
WARNING: Data set WORK.EXORT_GSA was not replaced because this step was stopped.
NOTE: DATA statement used (Total process time):
real time 0.00 seconds
cpu time 0.00 seconds
 
 
89
90 proc contents data = export_gsa;
ERROR: File WORK.EXPORT_GSA.DATA does not exist.
91 set fred.exportgs;
___
180
ERROR 180-322: Statement is not valid or it is used out of proper order.
92 run;
 
NOTE: Statements not processed because of errors noted above.
NOTE: PROCEDURE CONTENTS used (Total process time):
real time 0.00 seconds
cpu time 0.00 seconds
 
NOTE: The SAS System stopped processing this step because of errors.
93
 
 
94 proc contents data=export_gsa;
ERROR: File WORK.EXPORT_GSA.DATA does not exist.
95 run;
 
NOTE: Statements not processed because of errors noted above.
NOTE: PROCEDURE CONTENTS used (Total process time):
real time 0.00 seconds
cpu time 0.00 seconds
 
NOTE: The SAS System stopped processing this step because of errors.
96
 
 
97 proc print data = export_gsa(obs_15);
______
22
ERROR: File WORK.EXPORT_GSA.DATA does not exist.
ERROR 22-7: Invalid option name OBS_15.
98 run;
 
NOTE: The SAS System stopped processing this step because of errors.
NOTE: PROCEDURE PRINT used (Total process time):
real time 0.00 seconds
cpu time 0.00 seconds
 
99
100 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
112

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Vince_SAS
Rhodochrosite | Level 12

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.

https://go.documentation.sas.com/?docsetId=secref&docsetTarget=p0pul4j64w0mg0n1h1k6z8zhfvaf.htm&docs...

 

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

 

 

View solution in original post

3 REPLIES 3
Vince_SAS
Rhodochrosite | Level 12

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.

https://go.documentation.sas.com/?docsetId=secref&docsetTarget=p0pul4j64w0mg0n1h1k6z8zhfvaf.htm&docs...

 

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

 

 

ubshams
Quartz | Level 8
Thanks Vince, it worked now.

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

Multiple Linear Regression in SAS

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.

Discussion stats
  • 3 replies
  • 1220 views
  • 3 likes
  • 2 in conversation