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.
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
Still thinking about your presentation idea? The submission deadline has been extended to Friday, Nov. 14, at 11:59 p.m. ET.
Get started using SAS Studio to write, run and debug your SAS programs.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.