BookmarkSubscribeRSS Feed
tekish
Quartz | Level 8

Hi Experts,

I have a program which connects SAS to AWS. How do I read the json file. I any suggestion would be appreciated.

 

here is my json file sample code:

 

data temp;
length attribute body $800;
infile datalines;
input @;
if _infile_ ne: '{' and _infile_ ne: '}';
input attribute: $quote. x $ body: $quote.;

datalines;
{"data":{"Read":{"success":true,"body":"[
{qr=34, db=test, usertest=test1234,
exid=0880-1, queid=1, chid=2,
openans=null, updateddt=2020-09-03T16:30:43.125Z,
qrnid=t09990-12020-09-03 16:3},
{qr=265, db=test, usertest=usertoken, xid=60, qid=1, chid=1, openans=null, updateddt=2020-09-08T17:24:48.927Z, qrnid=t06042020},
{qr=266, db=test, usertest=usertoken, xid=64, qid=2, chid=1, openans=null, updateddt=2020-09-08T17:24:48.927Z, qrnid=t06042020 },
{qr=267, db=test, usertest=usertoken, xid=64, qid=3, chid=2, openans=null, updateddt=2020-09-08T17:24:48.927Z, qrnid=t06042020 },
{qr=268, db=test, usertest=usertoken, xid=65, qid=5, chid=3, openans=null, updateddt=2020-09-08T17:24:48.927Z, qrnid=t06042020 },
{qr=269, db=test, usertest=usertoken, xid=66, qid=5, chid=4, openans=null, updateddt=2020-09-08T17:24:48.927Z, qrnid=t06042020 },
{qr=270, db=test, usertest=usertoken, xid=66, qid=6, chid=1, openans=null, updateddt=2020-09-08T17:24:48.927Z, qrnid=t06042020 },
{qr=271, db=test, usertest=usertoken, xid=65, qid=7, chid=1, openans=error, updateddt=2020-09-08T17:24:48.927Z, qrnid=t06042020},
{qr=272, db=test, usertest=usertoken, xid=65, qid=1, chid=2, openans=null, updateddt=2020-09-08T17:25:57.096Z, qrnid=t06042020 },

;
run;

 

1 REPLY 1
ChrisNZ
Tourmaline | Level 20

sas-innovate-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

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!

Register now

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

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