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
Unconfigured Ad Widget
Collapse
Announcement
Collapse
No announcement yet.
Passing an 'Array' of an JAVA Object using RPG
Collapse
X
-
Passing an 'Array' of an JAVA Object using RPG
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[] David Morris
Comment