It does you no good to edit the PCML.

The limits on what you can/cannot do have nothing to do with RPG - they are limits in the JT400 toolkit (i.e. the Java routines that process the requests).

Since you are on a current release you should consider using the new RTNPARM option on the procedure. Although intended as a performance boost for large return values it has the side-effect of helping to deal with the exact situation you have encountered where the Java links cannot handle anything other than int return value.

More details here: http://www.ibmsystemsmag.com/ibmi/developer/rpg/Big-Changes-for-RPG-in-IBM-i-7-1 and here: http://www.itjungle.com/fhg/fhg111710-story01.html



On 2014-06-23, at 11:26 AM, "Koester, Michael" <mkoester@xxxxxxxxxxxxx> wrote:

Got the RNF0302 on my module compile, when compiled with PGMINFO(*PCML : *MODULE). The real objection appears to be:
"Error: return value must have type="int" and length="4". (E)."

Archives indicates that a return value is restricted to a 4-byte integer. IBM Knowledge Center for i 7.1 shows a number of data-types not supported for return/input parms (char is not one listed as excluded), and also has the following verbiage regarding output-only parms:

<snip> RPG does not have the concept of output-only parameters. Any parameters that do not have CONST or VALUE coded have a usage of "inputoutput". For inputoutput parameters, the ProgramCallDocument class requires the input values for the parameter to be set before the program can be called. If the parameter is truly an output parameter, you should edit the PCML to change "inputoutput" to "output". </snip>

Okay, fine. RPG (at 7.1 TR7) does not allow CONST or VALUE on the return parm (except VALUE for INT 4.0 only). So how might one edit the PCML if a module fails to compile? And just where does one find the PCML to edit?

Or better, how might one set up an acceptable return parm that permits a character string?

I am doing some proof-of-concept work for ultimately creating a web service with IWS to support an Electronic Bill Presentation & Payment application. I was able to create the web service for a procedure that didn't return any values, but as I expand toward real world work, I crash into this. Can't imagine being restricted to not being able to return anything but 4-byte integers.

How do real developers do this?

Many thanks,

Michael Koester
Programmer/Analyst

DataEast

--
This is the Web Enabling the IBM i (AS/400 and 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.


Jon Paris

www.partner400.com
www.SystemiDeveloper.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.