BookmarkSubscribeRSS Feed
Mayt
Obsidian | Level 7

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;

 

2 REPLIES 2
Tom
Super User Tom
Super User

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.

Mayt
Obsidian | Level 7

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.

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

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
  • 2 replies
  • 437 views
  • 0 likes
  • 2 in conversation