× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Thanks Nadir! That seems to have worked.

From: Stephen Piland
Sent: Wednesday, March 13, 2019 9:48 AM
To: 'web400@xxxxxxxxxxxxxxxxxx' <web400@xxxxxxxxxxxxxxxxxx>
Subject: IWS and REST GET returning JSON with 'Header' and multiple 'Detail'

As currently coded, without options(*varsize) on orderEntries, the GET is returning the correct Header-type info and all 100 detail-type elements. I'd like to only return the number of detail rows that I actually have in the table. My attempt to address this is below, but I'm getting a RNF3701-Keyword not allowed for subfield definition.

Any thoughts? Thanks!

===========================
dcl-pr retrieve;
OrderNo char(20) const;
order likeds(orderInfo);
httpStatus int(10);
httpHeaders char(100) dim(10);
End-Pr;

===========================
dcl-ds orderInfo qualified template;
OrderNo char(20);
orderCreationTime char(20);
orderEntries_LENGTH int(10);
orderEntries likeds(orderEntriesInfo) Dim(100) options(*varsize);
end-ds;

Desired Output
==================
{
"OrderNo":"ABC123",
"orderCreationTime":"2019-01-01T23:28:56Z",
"source":"ECOMM" ,
"orderEntries":[
{
"ean":"123456789012345678",
"quantity":2,
"pickUpLocation":1,
"fulfillingLocation":2
},
{
"ean":"876543210987654321",
"quantity":1,
"pickUpLocation":1,
"fulfillingLocation":3
}
]
}




As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.