Hello,

The error you're receiving (parameter 2 doesn't match) is not related to Java at all. It it saying that the spot where you call the routine is passing a parameter that does not match the RPG prototype that you've coded.

You'll need to look at the code and figure out what the discrepancy is. Remember, also, that the first parameter (which is never on the prototype) must be the Java object to act on.

If you were having an error interfacing between RPG and Java, the error would not occur at compile-time, it would occur at run-time. Of course, it's very possible that you will have this sort of problem once you fix the RPG error -- but, at this point, you aren't getting that far yet.

I have not prototyped this myself (I haven't used POI in years) otherwise, I'd just give you the prototype.

-SK



On 11/6/17 3:31 PM, RWillis@xxxxxxxxxxxxxxxxxxxxxxxx wrote:
Can anyone suggest how I can change the prototype and call to
ssCellStyle_setAlignment in Scott's HSSFR4 service program to work with
POI HSSF version 3.17? Seems the parm has changed from a short data type
to an enum. I can't figure out how to define the prototype to get the call
to work.

I've been successfully using POI HSSF version 3.6, but now trying to
convert to release 3.17.

In version 3.6 the setAlignment definition was;
void setAlignment(short align)

In version 3.17;
void setAlignment(HorizontalAlignment align)

This is in class org.apache.poi.ss.usermodel.CellStyle.
The prototype as defined in HSSF_H for version 3.6 is;
D HSSFCellStyle_setAlignment...
D PR EXTPROC(*JAVA
D : HSSF_CELLSTYLE_CLASS
D : 'setAlignment')
D align like(jshort) value

I've tried various data types and keep getting a compile error;

The type of parameter 2 specified for the call does not match the
prototype.

______________________________________________________________________
This e-mail and any files transmitted with it may be privileged and
confidential and intended solely for the use of the individual or
entity to which it is addressed. If the reader of this message is
not the intended recipient, or an employee or agent responsible for
delivering this message to the intended recipient, you are hereby
notified that any dissemination, distribution or copying of this
communication is strictly prohibited. If you have received this
e-mail in error, please notify the sender immediately by replying
to this e-mail and deleting it from your computer.
______________________________________________________________________



This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2020 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].