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



Okay, Kevin, that worked. Now, “inquiring minds want to know” inside me says, “huh?” 😊



If I read that correctly, what I’ve told the compiler is don’t bother including that program interface information in the *PCML since it’s not for external use. Only expose the PI that the web service needs to know about.



Yes?





From: Kevin Bucknum <Kevin@xxxxxxxxxxxxxxxxxxx>
Sent: Thursday, April 16, 2020 08:39
To: rpg400-l@xxxxxxxxxxxxxxxxxx
Cc: txpenguin1@xxxxxxxxxxx
Subject: Re: RPG Web Service Program



On the PI for newstring try adding PGMINFO(*NO)



On Thu, 2020-04-16 at 08:35 -0500, Steve M via RPG400-L wrote:

I found an older thread (2015) with someone having my same issue and they
said, "Thank goodness for Jon Paris and Barbara Morris for their write-up on
this" but of course, the links are broken now.

Here is the error, maybe someone will remember an article on this or can
guide me to what correction I need to make to the code. Here is the
information from the stream file on the module create and the source in my
program.

<pcml version="6.0">
<!-- RPG module: BBBB -->
<!-- created: 2020-04-16-09.06.42 -->
<!-- source: MEISINS/QRPGLESRC(BBB) -->
<!-- 487 -->
<program name="NEWSTRING" entrypoint="NEWSTRING" returnvalue=" ">
<!-- Error: return value must have type="int" and length="4". (E) -->
<data name="PSTRING" type="char" length="32767" usage="input" />
</program>
<!-- 64 -->
<program name="SLLIMWFWSR" entrypoint="SLLIMWFWSR">
<data name="INSUNDAYDATE" type="char" length="8" usage="input" />
<data name="INSATURDAYDATE" type="char" length="8" usage="input" />
<data name="INFINALFLAG" type="char" length="1" usage="input" />
<data name="OUTRESULTS" type="char" length="1000" usage="inputoutput"
/>
</program>
</pcml>

My source declares the procedure as such:
D newString PR O Class(*java:jStrConst)
D pString 32767A Const

Here is the procedure itself and the actual two lines of code it executes:
Dcl-Proc newString Export;
D newString PI O Class(*java: jStrConst)
D pString 32767A Const

D string S O Class(*java: jStrConst)

D newJavaString PR O ExtProc(*java: jStrConst:
D *Constructor)
D Class(*java: jStrConst)
D parm 32767A Const

D trimString PR O ExtProc(*java: jStrConst: 'trim')
D Class(*java: jStrConst)

Monitor;
string = newJavaString(%Trim(pString));
Return trimString(string);

Again, this works fine compiled as a regular RPG program, it's only when I
try to change to *PCML that it errors out.

To be honest, I'm not even sure what the "fix" is to make this work, based
upon the error above.


Steve




-----Original Message-----
From: RPG400-L <

<mailto:rpg400-l-bounces@xxxxxxxxxxxxxxxxxx>

rpg400-l-bounces@xxxxxxxxxxxxxxxxxx <mailto:rpg400-l-bounces@xxxxxxxxxxxxxxxxxx>



On Behalf Of Jon Paris
Sent: Wednesday, April 15, 2020 15:28
To: RPG programming on IBM i <

<mailto:rpg400-l@xxxxxxxxxxxxxxxxxx>

rpg400-l@xxxxxxxxxxxxxxxxxx <mailto:rpg400-l@xxxxxxxxxxxxxxxxxx>




Subject: Re: RPG Web Service Program

Steve - are you sure this program is not using any parameter types that are
not supported by PCML?

I can't see how the JNI stuff could have any impact as the PCML is only
generated for the program's call interface.




On Apr 15, 2020, at 4:21 PM, Steve M via RPG400-L

<

<mailto:rpg400-l@xxxxxxxxxxxxxxxxxx>

rpg400-l@xxxxxxxxxxxxxxxxxx <mailto:rpg400-l@xxxxxxxxxxxxxxxxxx>



wrote:


All,

I write RPG (and SQLRPGLE) programs all of the time that I then attach to

be used as Web Services. No issues there.


However, I now have a need for the web service program to call a Java

process. When I compile the program as a "regular" program I receive no
errors. However, when I change the Ctl-Opt to read PgmInfo(*PCML:*Module),
as I do for all of my other web service's programs, I receive a RNF0302,
Errors were found while generating the program information to be placed in
the module.


That's the entire extent of the information. No more. Unlike my previous

RPG service programs that were "pure RPG", this does have prototypes for the
Java, Java class declarations, creation of Java objects, and such, but that
is all needed for RPG to make the call to the Java class.


Has anyone successfully created an RPG program, as a web service, where

that web service then directly calls a Java class in the IFS? This must be
possible, right? I feel like I am missing something very obvious inside of
my RPG program but can't figure out what.


Any and all thoughts and ideas, as always, are very welcomed. I really

don't want to have to add another layer: an RPG program as a web service,
calling another RPG program that call the Java process - that seems really
silly, but at this point it also seems like the only possible way to succeed
in this process.


Hope that everyone is staying safe and healthy.

Thanks,

Steve Meisinger


--
This is the RPG programming on IBM i (RPG400-L) mailing list To post a
message email:

<mailto:RPG400-L@xxxxxxxxxxxxxxxxxx>

RPG400-L@xxxxxxxxxxxxxxxxxx <mailto:RPG400-L@xxxxxxxxxxxxxxxxxx>



To subscribe, unsubscribe,
or change list options,
visit:

<https://lists.midrange.com/mailman/listinfo/rpg400-l>

https://lists.midrange.com/mailman/listinfo/rpg400-l




or email:

<mailto:RPG400-L-request@xxxxxxxxxxxxxxxxxx>

RPG400-L-request@xxxxxxxxxxxxxxxxxx <mailto:RPG400-L-request@xxxxxxxxxxxxxxxxxx>




Before posting, please take a moment to review the archives at

<https://archive.midrange.com/rpg400-l>

https://archive.midrange.com/rpg400-l



.

Please contact

<mailto:support@xxxxxxxxxxxxxxxxxxxx>

support@xxxxxxxxxxxxxxxxxxxx <mailto:support@xxxxxxxxxxxxxxxxxxxx>



for any subscription related

questions.


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

<https://amazon.midrange.com>

https://amazon.midrange.com






--
This is the RPG programming on IBM i (RPG400-L) mailing list To post a
message email:

<mailto:RPG400-L@xxxxxxxxxxxxxxxxxx>

RPG400-L@xxxxxxxxxxxxxxxxxx <mailto:RPG400-L@xxxxxxxxxxxxxxxxxx>



To subscribe, unsubscribe, or
change list options,
visit:

<https://lists.midrange.com/mailman/listinfo/rpg400-l>

https://lists.midrange.com/mailman/listinfo/rpg400-l




or email:

<mailto:RPG400-L-request@xxxxxxxxxxxxxxxxxx>

RPG400-L-request@xxxxxxxxxxxxxxxxxx <mailto:RPG400-L-request@xxxxxxxxxxxxxxxxxx>




Before posting, please take a moment to review the archives at

<https://archive.midrange.com/rpg400-l>

https://archive.midrange.com/rpg400-l



.

Please contact

<mailto:support@xxxxxxxxxxxxxxxxxxxx>

support@xxxxxxxxxxxxxxxxxxxx <mailto:support@xxxxxxxxxxxxxxxxxxxx>



for any subscription related
questions.

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

<https://amazon.midrange.com>

https://amazon.midrange.com








<https://www.medtronsoftware.com/img/MedtronMinilogo.bmp> Kevin Bucknum
Senior Programmer Analyst
MEDDATA / MEDTRON
120 Innwood Drive
Covington LA 70433
Local: 985-893-2550
Toll Free: 877-893-2550
https://www.medtronsoftware.com



CONFIDENTIALITY NOTICE



This document and any accompanying this email transmission contain confidential information, belonging to the sender that is legally privileged. This information is intended only for the use of the individual or entity named above. The authorized recipient of this information is prohibited from disclosing this information to any other party and is required to destroy the information after its stated need has been fulfilled. If you are not the intended recipient, or the employee of agent responsible to deliver it to the intended recipient, you are hereby notified that any disclosure, copying, distribution or action taken in reliance on the contents of these documents is STRICTLY PROHIBITED. If you have received this email in error, please notify the sender immediately to arrange for return or destruction of these documents.


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.