So I have read Scott's blog on using this new feature (https://www.common.org/scotts-iland-...son-data-into/) . I installed/applied the PTFs recommended and compiled a simple program see how things work with a JSON document. I set the environment variable as suggested for debug. I can see the document parsing, but my data structure is empty. Scott specifically said that problems can usually be attributed to programmers variables not matching the JSON... but for the life of me I can't see it.
If I remove the allowmissing=yes from the options, I get an error that "the document for data-into does not match the RPG variable". I'm nearly certain that I'm doing something stupid.
FWIW - I have tried adding "path=orders" to the OPTIONS
Here is my simple code:
Here is a snippet of the beginning of the JSON document
If I remove the allowmissing=yes from the options, I get an error that "the document for data-into does not match the RPG variable". I'm nearly certain that I'm doing something stupid.
FWIW - I have tried adding "path=orders" to the OPTIONS
Here is my simple code:
Code:
dcl-c OPTIONS const('doc=file case=any allowextra=yes + allowmissing=yes'); dcl-ds Orders qualified dim(50); orderId char(40); legacyOrderId char(40); creationDate char(25); lastModifiedDate char(25); orderFulfillmentStatus char(10); orderPaymentStatus char(10); // sellerId char(20); // pricingSummary likeds(subtotal_t); // lineItems likeds(lineItems_t) dim(10); end-ds; Stmf = '/ebay_163.json'; Data-Into Orders %data(stmf:OPTIONS) %parser('YAJLINTO');
Code:
{ "href": "https://api.sandbox.ebay.com/sell/fulfillment/v1/order?limit=50&offset=0", "total": 2, "limit": 50, "offset": 0, "orders": [{ "orderId": "110350130580-28978360001!949987000", "legacyOrderId": "110350130580-28978360001", "creationDate": "2018-08-06T14:28:50.000Z", "lastModifiedDate": "2018-08-06T14:29:45.000Z", "orderFulfillmentStatus": "NOT_STARTED", "orderPaymentStatus": "PAID", .....
Comment