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

I have the following code to load JASON output in to my SAS project:

filename out TEMP;

filename cacm TEMP;

proc http

url='https://XYZ.STU.com/api/now/table/...policy.contract_state_code&sysparm'

method="GET"

out=out

headerout=cacm

auth_basic webusername="cacm_rest_user" webpassword="XXXXXXXXXXXXXXXXXXXXX";

run;

libname CACM json "%sysfunc(pathname(out))" ;

proc copy inlib=cacm outlib=WORK;

run;

libname CACM JSON "%sysfunc(pathname(out))" fileref=data;

data out;

set CACM.alldata;

run;

data _null_;

rc = jsonpp("data","log");

run;

 

This works fine and gives me an "OUT" table, a "RESULT" table and an "ALLDATA" table.  However, it stops my process flow there unless I manually run the branch.  I want to continue the process flow, which clean up the data and joins with other tables in the SAS project.  I think I am missing a step to be able to use the output in these three tables as an input to other part of my SAS project.  I do get the following error when I run the above code:

ERROR: Physical file does not exist, /config/sas94/Lev1/SASApp/data.

Any ideas?

1 ACCEPTED SOLUTION

Accepted Solutions
ballardw
Super User

Create a permanent library.

Instead of copying to WORK copy to that library.

Clean up that permanent library as needed in the future.

This will require you to reference the data in that permanent library using the library name and not the single level name.

View solution in original post

1 REPLY 1
ballardw
Super User

Create a permanent library.

Instead of copying to WORK copy to that library.

Clean up that permanent library as needed in the future.

This will require you to reference the data in that permanent library using the library name and not the single level name.

hackathon24-white-horiz.png

The 2025 SAS Hackathon Kicks Off on June 11!

Watch the live Hackathon Kickoff to get all the essential information about the SAS Hackathon—including how to join, how to participate, and expert tips for success.

YouTube LinkedIn

Creating Custom Steps in SAS Studio

Check out this tutorial series to learn how to build your own steps in SAS Studio.

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
  • 1 reply
  • 1153 views
  • 1 like
  • 2 in conversation