|
From: Stephen Piland <Stephen@xxxxxxxxxxxxxxxxxxxxxxxxxxxxx>definition.
To: "web400@xxxxxxxxxxxxxxxxxx" <web400@xxxxxxxxxxxxxxxxxx>
Date: 03/13/2019 09:48 AM
Subject: [WEB400] IWS and REST GET returning JSON with 'Header' and
multiple 'Detail'
Sent by: "WEB400" <web400-bounces@xxxxxxxxxxxxxxxxxx>
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
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 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.