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



www.mcpressonline.com

----- Original Message ----- 
From: "John King" <jking@xxxxxxxxxxx>
To: <rpg400-l@xxxxxxxxxxxx>
Sent: Thursday, November 06, 2003 8:42 PM
Subject: Help needed with RPG prototypes and POI


> Hello, all:
>
> I need to create Excel workbooks in batch from RPG, and am just *this* far
> away from getting Geert Van Landeghem's tutorial on calling POI methods in
> RPG running. Two items have me completely stumped, though. Can someone
> please point me in the correct direction? See
> http://www.jasservices.com/articles/as400/001_genexcel.htm.
>
> 1) Using the example RPG at the bottom of his page, my compiler spits-up
on
> the "writeWB(wb:outFile);" statement, issuing a "*RNF7030 The name or
> indicator WRITEWB is not defined." error message. If I understand
correctly
> (and that is a big leap) it appears that "writeWB" is actually a Java
method
> and must be prototyped for RPG to call it. It seems like
> "writeWB(wb:outFile);" has two parms, so I prepared the following PR. Now
> the compiler complains about "*RNF5406 The call passed fewer parameters
than
> the prototype indicates are required." What am I misunderstanding about
Java
> prototypes?
>
>  * // WorkBook.write()
> D writeWB         PR                  EXTPROC(*JAVA
> D                                     :'org.apache.poi.hssf.usermodel-
> D                                     .HSSFWorkbook'
> D                                     :'write')
> D parm                            O   CLASS(*JAVA
> D                                     :'org.apache.poi.hssf.usermodel-
> D                                     .HSSFWorkbook')
> D parm                            O   CLASS(*JAVA
> D                                     :'java.io.FileOutputStream')
>
> 2) The program actually runs if all the POI-related lines are commented
out.
> An empty "foo.xls" file is created in the output directory so I know the
> java.lang.* and java.io.* functions work, but I receive the following
> runtime error when the program is run with the "wb = createWB()"
> uncommented.
> "Java exception "java.lang.NoClassDefFoundError:                         "
> "org/apache/commons/logging/LogFactory" when calling method "<init>" with"
> "signature "()V" in class "org.apache.poi.hssf.usermodel.HSSFWorkbook".  "
>
> The iSeries has JDK1.3 and runs V5R1 with recent PTFs. *SYS CLASSPATH is
set
> to ".:/JavaUtil/POI/POI.jar", and I can see that exact item (spelling and
> caps are correct) is present when I peek into POI.jar with WinZip.
Actually,
> I receive the same runtime message when the CLASSPATH is "Foo" or *NONE,
so
> it appears that RPG is ignoring the CLASSPATH entirely. Since the JVM is
> being started inside of RPG, is there some parameter that controls where
RPG
> resolves the CLASSPATH? Does anyone know of a way (example code would be
> greatly appreciated) to see what the CLASSPATH is during debug? Is there
> anything suspicious about the "signature ()" statement? Why do I have so
> many questions?
>
> Many thanks
> JK
>
>
> _______________________________________________
> This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list
> To post a message email: RPG400-L@xxxxxxxxxxxx
> To subscribe, unsubscribe, or change list options,
> visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
> or email: RPG400-L-request@xxxxxxxxxxxx
> Before posting, please take a moment to review the archives
> at http://archive.midrange.com/rpg400-l.


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.