View Full Version : Passing an 'Array' of an JAVA Object using RPG
Guest.Visitor
08-25-2004, 11:06 AM
Jeffrey, You would use DIM(xxxxx) in your prototype. The array object is created for you. I generally use DIM(32767) OPTIONS(*VARSIZE). Then I create the object passed the actual size. If the size is variable say 1-10 you will have to test for null elements on the Java side. Your RPG would just load the elements it needs. Here is an example that calls a main with a String[] (http://www.midrangeserver.com/mgo/mgo082703-story02.html) David Morris
Jeff Saar
08-25-2004, 11:06 AM
Thanks to everyone who has help me thus far. I was able to pass an Object from a RPG program using a JAVA method. The Object that was passed is a JAVA Class that I use to set and/or get three "Double" values. Now I would like to pass the same object defined as an Array and execute my sets/gets on my double values. I would think this is possible but am unsure how to code the RPG syntax. If anyone knows of IBM documentation or examples I could look at please let me know. Thanks Jeff Saar
Powered by vBulletin® Version 4.1.5 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.