|
On Jul 16, 2019, at 6:26 PM, Nadir Amra <amra@xxxxxxxxxx> wrote:
Jon, and others,
When dealing with output arrays (e,g, an array being returned as a
response by the web service), the recommended step is to select "detect
length fields" and add a length field PRIOR to the output array. At one
time the length field was limited to integer data types, but that is no
longer the case (depending on how current you are with PTFs).
So in the following example, things look correct:
dcl-pi RestSrv4 ExtPgm;
requestedCat Like(catcod);
result char(20);
productList_LENGTH packed(5);
productList LikeDS(product) Dim(20);
end-pi;
I am assuming that productList_LENGTH and productList are output
parameters,
So, in the RPG code, I would expect productList_LENGTH to be initialized
to zero. Then there would be some sort of loop where the productList
array is filled. And if you filled the array with 5 elements, then you
need to set the productList_LENGTH field to 5. That is it,
"WEB400" <web400-bounces@xxxxxxxxxxxxxxxxxx> wrote on 07/16/2019 03:49:05
PM:
From: Jon Paris <jon.paris@xxxxxxxxxxxxxx><web400@xxxxxxxxxxxxxxxxxx>
To: "Web Enabling the IBM i (AS/400 and iSeries)"
Date: 07/16/2019 03:50 PM
Subject: [EXTERNAL] Re: [WEB400] Weird IWS Bug (?)
Sent by: "WEB400" <web400-bounces@xxxxxxxxxxxxxxxxxx>
That is what I thought I was achieving _by_ selecting the Detect
Length option Anshul. Guess I had it back to front.
It just tried redeploying and deselected the detect length but no
other options appear and PRODUCTLIST_LENGTH still appears in the output.
Can you tell me what the name of the box I'm looking for is and on
what screen it appears.
--
This is the Web Enabling the IBM i (AS/400 and iSeries) (WEB400) mailing list
To post a message email: WEB400@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/web400
or email: WEB400-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/web400.
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.