× 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.



Yes I do advocate that Scott. On this point you and I clearly disagree.

I don't understand your logic here. If it is OK to use RTNPARM between RPG subprocs I don't see how having it also used to effectively automatically create a wrapper is in any way arcane.

I see zero benefit to manually coding a wrapper, thereby adding an additional layer, when there is no need to.



Jon Paris

www.partner400.com
www.SystemiDeveloper.com

On Dec 11, 2018, at 1:41 PM, Scott Klement <midrange-l@xxxxxxxxxxxxxxxx> wrote:

Jon,

Are you saying that you advocate using RTNPARM when calling a subprocedure from IWS?!

I would only use RTNPARM when making direct subprocedure calls from RPG. Otherwise things get a bit too arcane.

I would strongly recommend simply coding your procedure to use parameters, and eliminate return values. If you need to call an existing procedure that you can't change, use a wrapper procedure. That would make things a whole lot simpler to understand and maintain.

-SK

On 12/11/2018 12:31 PM, Jon Paris wrote:
Probably because without it a conventional RPG subprocedure can rarely be used because the IWS interface only allows for a 4 byte integer. By coding RTNPARM on any subproc that may be deployed as a web service you save having to add any additional wrappering.



Jon Paris

www.partner400.com
www.SystemiDeveloper.com

On Dec 11, 2018, at 1:13 PM, Scott Klement <midrange-l@xxxxxxxxxxxxxxxx> wrote:

Alan,

Can you explain RTNPARAM? I'm having a hard time getting my head around how that fits into this context.

-SK


On 12/11/2018 11:23 AM, Alan Shore wrote:
Hi everyone
Before I forget - we are on V7r3

I have been asked to investigate whether IWS (Integrated Web Services) is feasible to pass data from the iSeries to another system/software

I have done some googling and there is quite a lot of information out there - but of course - NOTHING that fits EXACTLY what you want

Anyway - I have found both of these very helpful
Creating Web Services With Integrated Web Services
http://ibmsystemsmag.com/ibmi/developer/general/using_iws/
Providing RPG Web Services on IBM i
https://scottklement.com/presentations/Providing%20RPG%20Web%20Services%20on%20IBM%20i.pdf

I decided to create a simple proof of concept service program
Using the code
RTNPARAM
And
PgmInfo(*PCML:*MODULE)

One procedure to return a string, for the customer name and address
2 input parameters
Division number - packed(2:0)
Customer number - packed(9:0)

I have tested the service program on the iSeries - and it works, giving me the expected results
I am now attempting to deploy this as a new REST service
On step 3, where I specify the URI path template, I have written
/{incstdiv:\d+}/{incstnbr:\d+}
Showing 2 parameters as part of the path name
Its on Step 5 that I am having a problem
The 2 parameters are specified and when I choose *PATH_PARAM as the input source (both of them) and choosing the applicable identifier
INCSTDIV
INCSTNBR
I press Next
And the second parameter identifier changes to INCSTDIV with the error
Error: ZUI_53159: Value incstdiv is not valid.
Being displayed at the bottom of the screen

I have gone back to step 3 and changed the identifiers name
CUSTDIV
CUSTNBR

Same problem happens

I have googled ZUI_53159 but nothis is displayed

I am hoping that someone will recognize what I am doing wrong
As always - ALL replies gratefully accepted



Alan Shore
E-mail : ASHORE@xxxxxxxx
Phone [O] : (631) 200-5019
Phone [C] : (631) 880-8640
'If you're going through hell, keep going.'
Winston Churchill

--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/midrange-l.

Please contact support@xxxxxxxxxxxx for any subscription related questions.

Help support midrange.com by shopping at amazon.com with our affiliate link: https://amazon.midrange.com

--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/midrange-l.

Please contact support@xxxxxxxxxxxx for any subscription related questions.

Help support midrange.com by shopping at amazon.com with our affiliate link: https://amazon.midrange.com


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.