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



What's the actual error? What does %status show? See anything in the job
log?

> -------- Original Message --------
> Subject: RE: Jakarta POI HSSF question...
> From: Shane_Cessna@xxxxxxx
> Date: Thu, May 26, 2005 9:35 am
> To: Java Programming on and around the iSeries / AS400
> <java400-l@xxxxxxxxxxxx>
> 
> sorry guys, I tried that in the CL...still get the same results...if it 
> helps, here's my source...the hssf_h & HSSF binding direcotry is the stuff 
> that Scott Klement put in a few Club Tech newsletters for 
> iSeriesNetwork.com...http://www.iseriesnetwork.com/noderesources/code/clubtechcode/ExcelCrtDemo.zip
> 
> JPTESTC2 - CLP
> PGM
> CHGCURDIR  DIR('/')
> ADDENVVAR  ENVVAR(CLASSPATH) +
>              VALUE('.:QIBM/UserData/Java400/ext/poi-2.5.+
>              1-final-20040804.jar') REPLACE(*YES)
> CALL       PGM(JPTEST2)
> ENDPGM
> 
> JPTEST2 - RPGLE
> h dftactgrp(*no) bnddir('HSSF') thread(*serialize) 
> h option(*srcstmt:*nodebugio:*noshowcpy) bnddir('QC2LE')
>  /copy qsysinc/qrpglesrc,jni
>  /copy qrpglesrc,hssf_h 
>  //---------------------------------------------
>  // Data Structures 
>  //---------------------------------------------
> d                 ds 
> dmonthsshort                    48a   Inz('Jan +
> d                                          Feb +
> d                                          Mar +
> d                                          Apr +
> d                                          May +
> d                                          Jun +
> d                                          Jul +
> d                                          Aug + 
> d                                          Sep + 
> d                                          Oct + 
> d                                          Nov + 
> d                                          Dec ') 
> dmonthshort                      4a   dim(12) overlay(monthsshort)
> d                 ds 
> d year4                   1      4  0 
> d year2a                         2a   overlay(year4:3) 
>  //---------------------------------------------------------------
>  // Standalones & Constants 
>  //---------------------------------------------------------------
> d book            s                   like(HSSFWorkbook) 
> d spreadsheet     s                   like(HSSFSheet) 
> d enddate         s               d 
> d endday          s              2p 0 
> d dayname2        s              6a   varying 
> d attachment      s             50a 
>  //------------------------------------------------------------
>  // Mainline 
>  //------------------------------------------------------------
>  /free 
>   enddate = %date() - %days(1); 
>   endday = %subdt(enddate:*days); 
>   year4 = %subdt(enddate:*years); 
>   hssf_begin_object_group(100); 
>   attachment = '/home/scessna/excel/' + 
>                %trim(monthshort(%subdt(enddate:*months))) + 
>                %trim(year2a) + 'DailyLaborHours2.xls'; 
>   dayname2 = %trim(monthshort(%subdt(enddate:*months))) + ' ' +
>              %char(endday); 
>   monitor; 
>     book = hssf_open(%trim(attachment));    <-- this never gets found & 
> jumps to the on-error
>     monitor; 
>       spreadsheet = hssf_getSheet(book:%trim(dayname2)); 
>       if spreadsheet = *null; 
>         spreadsheet = HSSF_newSheet(book:%trim(dayname2));
>       endif; 
>     on-error; 
>       spreadsheet = HSSF_newSheet(book:%trim(dayname2)); 
>     endmon; 
>   on-error; 
>     book = new_HSSFWorkbook();                            <-- here is 
> where it jumps to...
>     spreadsheet = HSSF_newSheet(book:%trim(dayname2)); 
>   endmon; 
>   HSSF_save(book:%trim(attachment)); 
>   hssf_end_object_group(); 
>   *inlr = *on; 
>  /end-free
> 
> if you guys can find anything wrong with my code, please let me 
> know...thanks again...
> 
> Shane
> 
> 
> Hi,
> 
> here is what I do in a CL before I call the RPGLE (with 
> Jakarta POI):
> 
> CHGCURDIR  DIR('/jakartapoi') 
> ADDENVVAR  ENVVAR(CLASSPATH) + 
> VALUE('.:/jakartapoi:/jakartapoi/jakartapoi151.jar') + 
>              REPLACE(*YES) 
> 
> Regards,
> Magne
> 
> 
> Date: Wed, 25 May 2005 10:55:39 -0500
> From: Shane_Cessna@xxxxxxx Add To Address Book 
> Subject: RE: Jakarta POI HSSF question... 
> To: Java Programming on and around the iSeries / AS400 
> <java400-l@xxxxxxxxxxxx> 
> 
> 
> 
> Michael,
> 
> Where can I find this CLASSPATH parameter?...
> 
> Shane Cessna 
> iSeries Programmer
> iSeries WAS Administrator
> North American Lighting, Inc.
> (618) 662-4483 x2776
> shane_cessna@xxxxxxx 
> -- 
> This is the Java Programming on and around the iSeries / AS400 (JAVA400-L) 
> mailing list
> To post a message email: JAVA400-L@xxxxxxxxxxxx
> To subscribe, unsubscribe, or change list options,
> visit: http://lists.midrange.com/mailman/listinfo/java400-l
> or email: JAVA400-L-request@xxxxxxxxxxxx
> Before posting, please take a moment to review the archives
> at http://archive.midrange.com/java400-l.
> 
> 
> -- 
> This is the Java Programming on and around the iSeries / AS400 (JAVA400-L) 
> mailing list
> To post a message email: JAVA400-L@xxxxxxxxxxxx
> To subscribe, unsubscribe, or change list options,
> visit: http://lists.midrange.com/mailman/listinfo/java400-l
> or email: JAVA400-L-request@xxxxxxxxxxxx
> Before posting, please take a moment to review the archives
> at http://archive.midrange.com/java400-l.


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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.