|
<snip> For example, a CHAIN in RPG is easy. Setting up an input stream, reading bytes of data from a file, etc...piece by piece, the way you have to do it in other languages such as Java, is so much more complex by comparison. </snip> You are talking reading from a stream file in Java compared to a DB file in RPG. If you are reading from a stream file in RPG you still have to read it in "byte by byte" so to speak. If you want more simplified DB calls from Java check out Joe Pluta's tool at zappie.net (I can never find it, or it takes me 20 minutes). Much more simplified than using the Java Toolkit from IBM (or is it Toolbox?). RPG still wins hands down on DB access though. One of the few champions left in the RPG language over other languages ;-) Aaron Bartell -----Original Message----- From: Shannon O'Donnell [mailto:sodonnell@xxxxxxxxxxxxxxx] Sent: Wednesday, July 09, 2003 11:22 PM To: Java Programming on and around the iSeries / AS400 Subject: Re: Calling Java from RPG - CLASSPATH Problem? Thanks to all! I changed the Java to return a Byte array instead of a String and it all worked great. I have to say that I learn something new every time I delve into Java. And I also feel, again, that IBM didn't do AS/400 programmers any favor by hiding the complexity of the nitty gritty of programming behind so much in RPG. For example, a CHAIN in RPG is easy. Setting up an input stream, reading bytes of data from a file, etc...piece by piece, the way you have to do it in other languages such as Java, is so much more complex by comparison. AS/400 programmers have not had to deal with that complexity, they simply execute a CHAIN. And because of that, when they want to move to/try a new language, there's a tremendous learning curve. It would have been easier to learn it all from the beginning. Ah well....if it was easy, any one could do it. :-) Thanks again! Shannon O'Donnell ----- Original Message ----- From: "Mark Phippard" <MarkP@xxxxxxxxxxxxxxx> To: "Java Programming on and around the iSeries / AS400" <java400-l@xxxxxxxxxxxx> Sent: Wednesday, July 09, 2003 6:37 PM Subject: RE: Calling Java from RPG - CLASSPATH Problem? > > Based on what Paul said, and your example, I would say the problem is that > your prototype was defining a return variable as 2000 A, which Java > interprets as a Byte[] array. You either need to change your method to > return a Byte array, or you need to change the prototype to be returning a > Java String object. You then will need to call a method on that object to > get it into an RPG character variable. Probably getBytes(). > > Mark > > > _______________________________________________ > 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 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.