BookmarkSubscribeRSS Feed
arpitagarwal512
Calcite | Level 5

Hello Guys,

 

I am running the below process where i am getting error:

 

filename resp temp;

/* Neat service from Open Notify project */
proc http
url="http://api.open-notify.org/astros.json"
method= "GET"
out=resp;
run;

/* Assign a JSON library to the HTTP response */
libname space JSON fileref=resp;

/* Print result, dropping automatic ordinal metadata */
title "Who is in space right now? (as of &sysdate)";
proc print data=space.people (drop=ordinal:);
run;

 

 here is below error message i am getting:

 

32 /* Assign a JSON library to the HTTP response */
33 libname space JSON fileref=resp;
ERROR: The JSON engine cannot be found.
ERROR: Error in the LIBNAME statement.

5 REPLIES 5
Reeza
Super User

JSON libname is available as of SAS 9.4 TS1M4

 

Whicj version do you have installed?

arpitagarwal512
Calcite | Level 5

I have run the below code on my sas EG

 

proc setinit noalias;
run;

 

Here is the information:

 

Original site validation data
Current version: 9.04.01M3P062415

 

 

Reeza
Super User

That's M3 unfortunately, not M4. 

arpitagarwal512
Calcite | Level 5

Hi Reeza,

 

Is there any workarround to do this task in current machine

Reeza
Super User

Not easily. You can get the JSON file but need to manually parse it. 

I believe PROC GROOVY can help with this. 

Or there's a new package in DS2. 

 

The options are illustrated here:

http://blogs.sas.com/content/sasdummy/2015/09/28/parse-json-from-sas/

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!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 5 replies
  • 1906 views
  • 0 likes
  • 2 in conversation