When you say update the json files, do you want to over-write them with a new version? Or are you trying to insert records into an existing JSON file?
Since JSON is a text file, I guess you could try to update it in place like any other text file. But I think if I were doing it, I would probably read the current JSON file into a SAS dataset, do the updates to the SAS dataset, and then export the updated SAS dataset to JSON, over-writing to the original JSON file.
It really doesn't sound like your question is about JSON at all, but just about moving files and scheduling jobs.
Which parts are you having trouble with?
Can you write the file to the place you need it? Is the path on the machine where SAS is running? Are you using VIYA or SAS? Do you have permission to write it there? Can you try writing some other file just to make sure?
Can you schedule a job to run at a particular time of day?
What have you tried? How did it not do what you wanted?
Thanks for shedding some more lights on the topic.
The name of the game is to automate :
Upload daily updated JSON files to /Public/JSON folder.
Below is SAS code to update JSON file everyday - I can schedule to run this job everyday.
data _null_;
set Unq_Circuit end=eof;
file "/../../../././gpatel/JSON/test_Circuit.json" ;
if _n_=1 then put '[';
if not eof then delim=',';
put '{"Value":' Value ' "Text":' Text'}' delim ;
if eof then put ']';
run;
NOTE: 351 records were written to the file "/../../../././JSON/test_Circuit.json".
I am referring @
Thanks again....
Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!