|
When I used ints in the interface it blew up all the time.
I think we have the answer in the earlier posts - namely that I seem to
have the check/non-check status of the _LENGTH the wrong way round. Must
look at those docs again as they are really confusing.
Jon Paris
www.partner400.com
www.SystemiDeveloper.com
On Jul 16, 2019, at 3:17 AM, Marco Facchinetti <marco.facchinetti@xxxxxxxxx> wrote:
jon.paris@xxxxxxxxxxxxxx <mailto:jon.paris@xxxxxxxxxxxxxx>>
Hi Jon try productList_LENGTH int(10); insted of packed(5)
HTH
--
Marco Facchinetti
Mr S.r.l.
Tel. 035 962885
Cel. 393 9620498
Skype: facchinettimarco
Il giorno mar 16 lug 2019 alle ore 00:36 Jon Paris <
ha scritto:the
Correction to previous response - I was storing it - but incrementing
outputting itwrong dang value!
I have fixed that but obviously I'm not understanding the _LENGTH thing
correctly because it appears to be ignoring it and instead is
web400-bounces@xxxxxxxxxxxxxxxxxx> <mailto:as a field win the result set.
This is the Prototype for the program:
dcl-pi RestSrv4 ExtPgm;
requestedCat Like(catcod);
result char(20);
productList_LENGTH packed(5);
productList LikeDS(product) Dim(20);
end-pi;
This is what I understood the documents to be saying but there is no
example given so I can't be sure. Am I misunderstanding what is needed?
Jon Paris
www.partner400.com
www.SystemiDeveloper.com
On Jul 15, 2019, at 5:40 PM, Nadir Amra <amra@xxxxxxxxxx> wrote:
I do not know the problem but are you initializing the _LENGTH field in
your RPG code?
"WEB400" <web400-bounces@xxxxxxxxxxxxxxxxxx <mailto:
web400-bounces@xxxxxxxxxxxxxxxxxx>>> wrote on 07/15/2019 07:48:35web400-bounces@xxxxxxxxxxxxxxxxxx <mailto:
jon.paris@xxxxxxxxxxxxxx> <mailto:PM:
From: Jon Paris <jon.paris@xxxxxxxxxxxxxx <mailto:
web400@xxxxxxxxxxxxxxxxxx <mailto:web400@xxxxxxxxxxxxxxxxxx>>>jon.paris@xxxxxxxxxxxxxx <mailto:jon.paris@xxxxxxxxxxxxxx>>>
To: "Web Enabling the IBM i (AS/400 and iSeries)"<web400@xxxxxxxxxxxxxxxxxx <mailto:web400@xxxxxxxxxxxxxxxxxx> <mailto:
web400-bounces@xxxxxxxxxxxxxxxxxx> <mailto:Date: 07/15/2019 07:48 PM
Subject: [EXTERNAL] [WEB400] Weird IWS Bug (?)
Sent by: "WEB400" <web400-bounces@xxxxxxxxxxxxxxxxxx <mailto:
web400-bounces@xxxxxxxxxxxxxxxxxx>>>web400-bounces@xxxxxxxxxxxxxxxxxx <mailto:
this:
Anyone seen this before?
I have a working REST/JSON Web Service generated by IWS (for the
curious Booth's challenge to me to find a better way to describe the
process than the current docs made me revisit it this weekend).
The service takes a URL of the form system stuff/sertvicename/cat/02
where cat is the parameter name and 02 is the value.
It works just fine but when there are less than the maximum number
of rows it outputs multiple empty elements.
To deal with this I added an extra parameter with array name_LENGTH
as the name and told the wizard to detect length.
Now here's the weirdness. When I invoke the service I get:
java.lang.RuntimeException: Invocation of program failed.
AS400Message (ID: CEE9901 text: Application error. MCH0603
unmonitored by RESTSRV4 at statement 0000000172, instruction
X'0000'.):com.ibm.as400.access.AS400Message@f9cb28fc
OK - let's debug that - I add a Service Entry Point and try again.
This time it doesn't "fail" it just produces rubbish output - like
mailing{"RESULT":"","PRODUCTLIST_LENGTH":0,"PRODUCTLIST":
[{"PRODCD":"","PRODDS":"","CATCOD":"","STOH":0,"LNDCST":0.
00,"SELLPR":0.00,"DTLCHG":0,"DTLORD":0},
{"PRODCD":"","PRODDS":"","CATCOD":"","STOH":0,"LNDCST":0.
00,"SELLPR":0.00,"DTLCHG":0,"DTLORD":0},
{"PRODCD":"","PRODDS":"","CATCOD":"","STOH":0,"LNDCST":0.
00,"SELLPR":0.00,"DTLCHG":0,"DTLORD":0},
{"PRODCD":"","PRODDS":"","CATCOD":"","STOH":0,"LNDCST":0.
00,"SELLPR":0.00,"DTLCHG":0,"DTLORD":0},
...
{"PRODCD":"","PRODDS":"","CATCOD":"","STOH":0,"LNDCST":0.
00,"SELLPR":0.00,"DTLCHG":0,"DTLORD":0}]}
In other words the skeleton JSON but with no data!
How the hell can I debug something that "works" in debug and only
blows up when not?
Anyone seen this one before?
--
This is the Web Enabling the IBM i (AS/400 and iSeries) (WEB400)
WEB400@xxxxxxxxxxxxxxxxxx> <mailto:list
To post a message email: WEB400@xxxxxxxxxxxxxxxxxx <mailto:
https://lists.midrange.com/mailman/listinfo/web400> <WEB400@xxxxxxxxxxxxxxxxxx <mailto:WEB400@xxxxxxxxxxxxxxxxxx>>
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/web400 <
https://lists.midrange.com/mailman/listinfo/web400>>https://lists.midrange.com/mailman/listinfo/web400 <
WEB400-request@xxxxxxxxxxxxxxxxxx> <mailto:or email: WEB400-request@xxxxxxxxxxxxxxxxxx <mailto:
WEB400-request@xxxxxxxxxxxxxxxxxx>>WEB400-request@xxxxxxxxxxxxxxxxxx <mailto:
https://archive.midrange.com/web400> <Before posting, please take a moment to review the archives
at https://archive.midrange.com/web400 <
https://archive.midrange.com/web400>>.https://archive.midrange.com/web400 <
WEB400@xxxxxxxxxxxxxxxxxx>
--
This is the Web Enabling the IBM i (AS/400 and iSeries) (WEB400) mailing
list
To post a message email: WEB400@xxxxxxxxxxxxxxxxxx <mailto:
https://lists.midrange.com/mailman/listinfo/web400>To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/web400 <
WEB400-request@xxxxxxxxxxxxxxxxxx>or email: WEB400-request@xxxxxxxxxxxxxxxxxx <mailto:
https://archive.midrange.com/web400>.Before posting, please take a moment to review the archives
at https://archive.midrange.com/web400 <
list--
This is the Web Enabling the IBM i (AS/400 and iSeries) (WEB400) mailing
To post a message email: WEB400@xxxxxxxxxxxxxxxxxx <mailto:WEB400@xxxxxxxxxxxxxxxxxx>
To subscribe, unsubscribe, or change list options,https://lists.midrange.com/mailman/listinfo/web400>
visit: https://lists.midrange.com/mailman/listinfo/web400 <
or email: WEB400-request@xxxxxxxxxxxxxxxxxx <mailto:WEB400-request@xxxxxxxxxxxxxxxxxx>
Before posting, please take a moment to review the archiveshttps://archive.midrange.com/web400>.
at https://archive.midrange.com/web400 <
--
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.