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