BookmarkSubscribeRSS Feed
ahk1225
Calcite | Level 5

I executed the following SAS program (using The SASEFRED Interface Engine) to extract the data from FRED (St Louis Fed website)

 

options validvarname=any;

title 'Retrieve Data for the Exports of Goods and Services';

libname _all_ clear; libname fred sasefred "%sysget(FRED)"

OUTXML=exportgs

XMLMAP="%sysget(FRED)exportgs.map"

APIKEY='XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'

IDLIST='bopxgsa';

 

data export_gsa;

set fred.exportgs ;

run;

 

proc contents data=export_gsa;

run; proc print data=export_gsa(obs=15); run

 

then I have the following error messages:

 

Error: Invalid physical name library name FRED

Error: Error in the LIBNAME statement.

Error: Libref FRED is not assigned.

 

How can I fix these problems?

 

6 REPLIES 6
ballardw
Super User

Do you have your own FRED API key? are you sure it was set up correctly?

ahk1225
Calcite | Level 5

yes, I have my own FRED API key. I just did not put it there.

 

SASKiwi
PROC Star

In addition to @ballardw'd comment, check that the environment variable FRED is defined by adding:

 

%put FRED = &FRED;

to your program. By the look of it FRED is a directory where your XML mapping file is stored.

ahk1225
Calcite | Level 5

Where do i insert this program? Can you show me here?

 

 

SASKiwi
PROC Star

At the end is fine.

_SUPERQ__
Calcite | Level 5

Did you ever get this working?  I'm facing a similar problem with sasefred on SAS Studio.

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

Find more tutorials on the SAS Users YouTube channel.

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
  • 6 replies
  • 1052 views
  • 0 likes
  • 4 in conversation