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




Hi John, the java toolbox has certain restrictions for invoking service
programs. One of them is the return value data type, the other is a limit
of 7 parameters. Just be aware a data structure with many fields would
still count as one pararmeter.

Hope this helps

Claus Weiss Visual AD tools, email: weiss@xxxxxxxxxx
Dept XF6 IBM Canada Lab tie 313-3987 Phone(905)413-3987 FAX(905)413-4850
Greetings from Toronto
Rational Software System i - Ecosystem Team



"John Rusling"
<jrusling@johnson
brothers.com> To
Sent by: <web400@xxxxxxxxxxxx>
web400-bounces@mi cc
drange.com
Subject
[WEB400] Srvpgm procedure return
05/08/2009 11:54 value must be type="int" and
AM length="4" when using *PCML.


Please respond to
Web Enabling the
AS400 / iSeries
<web400@midrange.
com>






I'm trying to compile this service program with the 'PCML' info in it
so that I can use the IBM Web Services Wizard to materialize the rpg
srvpgm
as a web service. I have only a single function in it.
(I have already made one (web service) using an RPG ile pgm object.)

The module compiles fine -without- the PGMINFO(*PCML:*MODULE) in the
H-spec.

When I add it to the H-spec, I get a very generic message in the
compiler
listing...

RNF0203 - ERRORS WERE FOUND WHILE GENERATING THE PROGRAM INFORMATION TO
BE PLACED IN THE MODULE

Not very much to go on (to my mind anyway).

I added the infostmf to the compile command (for s & giggles) as per
below...

CRTRPGMOD MODULE(JRPERS/FRKEY_F) SRCFILE(JRPERS/QSRVSRC) SRCMBR(FRKEY_F)
PGMINFO
(*PCML) INFOSTMF('/tmp/pcml/frkey_f.txt')

It still didn't compile, but, when I looked in the stream file it
generated, I found...

************Beginning of data**************

<pcml version="4.0">

<!-- RPG module: FRKEY_F -->

<!-- created: 2009-05-08-08.40.02 -->

<!-- source: JRPERS/QSRVSRC(FRKEY_F) -->

<!-- 23 -->

<program name="GETFOREIGNKEY" entrypoint="GETFOREIGNKEY"
returnvalue=" ">
<!-- Error: return value must have type="int" and length="4". (E)
-->

<data name="ACTION" type="char" length="2" usage="input" />

</program>

</pcml>

************End of Data********************

So, okay, the return value must be integer.

Uuummm why? Why can't the return value be character?

This won't work ---
d getForeignKey...
d pr 20
d Action 2 const

But this will work ---
d getForeignKey...
d pr
d Action 2 const
d Action 20

And so will this ---
d getForeignKey...
d pr 10i 0
d Action 2 const
d Action 20

Is their (ibms) intent- to use the 'return value' as a lot of apis
generally do,
as an indication of success or failure..? ..??

John B
--
This is the Web Enabling the AS400 / iSeries (WEB400) mailing list
To post a message email: WEB400@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/web400
or email: WEB400-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/web400..


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
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.