Hi everybody
I try to save json data as a table(in-memory/sashdat) in Job. I've tried proc copy, no errors but can't figure it out where the file is.(I have look in folders/libraries/caslibs but not found) I Please let me know if you know the solution.
This is my code in job:
cas mySession sessopts=(caslib=casuser timeout=1800);
libname mycas cas;
* Declare input parameter;
%global myjson;
* Copy the JSON data from input parameter to a file;
filename indata temp;
data _null_;
file indata;
length str $32767;
str = resolve(symget('myjson'));
put str;
run;
* Use the JSON engine to provide read-only sequential access to JSON data;
libname indata json map='user32.map' automap=create ordinalcount=all;
proc copy in=indata out=mycas; run;
proc datasets lib=mycas;
run; quit;
I was looking at one the free Viya books on-line yesterday and I think you might need a second step after the PROC COPY step to physicalize the CAS data form in-memory to an actual physical file.
I'm not sure if there's an in-memory table at the first place. Because I've tried to check at library(mycas) and didn't see anything.
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
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.