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



Thank you, Scott. I love this stuff. but it's not like the old days, when
I could find everything I needed in my trusty IBM manuals.

Arthur J. Marino
Southern Container Corporation
(631) 297 - 2276



Scott Klement <rpg400-l@xxxxxxxxxxxxxxxx>
Sent by: rpg400-l-bounces@xxxxxxxxxxxx
02/22/2008 01:51 PM
Please respond to
RPG programming on the AS400 / iSeries <rpg400-l@xxxxxxxxxxxx>


To
RPG programming on the AS400 / iSeries <rpg400-l@xxxxxxxxxxxx>
cc

Subject
Re: POI/HSSF Question






Hi Arthur,

Excel date expressed as a "jdouble" (days since 01-01-1900) and
returns an RPG Date field. But since I don't know how to define a
"jdouble" field, I'm stuck.

jdouble is just an alias for RPG's 8F (8-byte floating point) data type.
Assuming that you have the HSSF_H copy book in your code, you can
declare your jdouble variable as follows

D myVar s like(jdouble)

That definition is equivalent to coding:

D myVar s 8F

The only reason I chose to use 'jdouble' instead of '8F' is because it
makes it easier to match up the data with Java. In Java the data type
is called 'double', so 'jdouble' is shorthand for "Java double". But...
Java's double data type is identical to RPG's 8F data type, so it
doesn't matter which version you use.

If you look at the JNI copy book provided by IBM in the QSYSINC library
(i.e. QSYSINC/QRPGLESRC member JNI) that's where 'jdouble' is defined.
You'll see this:

D DS BASED(JNItypes_P)
D jbyte 1 1I 0
D jshort 1 2I 0
D jint 1 4I 0
D jlong 1 8I 0
D jlongJNI 8A OVERLAY(jlong)
D jboolean 1 1U 0
D jchar 1 2C
D jfloat 1 4F
D jdouble 1 8F
D jsize 1 4I 0

As you can (hopefully) see... jdouble is defined as an 8F field. So
when you use like(jdouble), it's making your field defined the same as
the one above, from teh copy book. (if you include the HSSF_H copy
book, HSSF_H will, in turn, bring in the JNI one, since HSSF_H needs the
definitions from it...)

Hope that helps.


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.