2

I know how to code in JAVA and also RPGLE. The problem I am having is connecting the two. I want to be able to use a JAVA GUI as input and pass the parms as values to an RPGLE module that then saves these to a file. Like I had stated I know how to do the process separatly, but I am having problems figuring out how to pass from ECLIPSE to the iSeries.

Thanks,

Hunter Zolomon
  • 97
  • 1
  • 2
  • 9
  • Do you have access to write to the db on your AS400? – Rabbit Guy Aug 10 '16 at 20:02
  • Yes i do have access to that – Hunter Zolomon Aug 10 '16 at 20:03
  • 1
    Why not just write it directly there w/Java? Maybe I'm not understanding what you're trying to do, but I would think you'd write directly to the db using the java app to do what the module does... – Rabbit Guy Aug 10 '16 at 20:05
  • That would also be fine too, but we already have modules with logic for calculations already written. I don't want redundant code. – Hunter Zolomon Aug 10 '16 at 20:09
  • The JAVA GUI would pass values to RPGLE, calculations would take place, then this would write to the database file – Hunter Zolomon Aug 10 '16 at 20:09
  • I suggest looking at these SO questions for some help/samples: http://stackoverflow.com/questions/2104859/invoking-as400-rpg-from-java/ http://stackoverflow.com/questions/184864/accessing-rpg-on-iseries-from-java/ – Tracy Probst Aug 11 '16 at 13:23

1 Answers1

3

You can't "pass values to an RPGLE module"

*MODULE objects are non-executable. They must be bound into either a a *PGM object or a *SRVPGM object in order for the procedures contained in them to be executed.

It'd be helpful if your question included the code you've tried.

I assume you're using JTOpen, "a library of Java classes supporting the client/server and internet programming models to a system running IBM i."

That being the case, you have two direct options..

Charles
  • 21,637
  • 1
  • 20
  • 44
  • That is very helpful thank you! Yes I am using JTOpen. The two options you linked answers my question. – Hunter Zolomon Aug 10 '16 at 20:19
  • If you could do me a solid please go to IBM and flame JTOPEN about not being setup for MAVEN because its too much work. – danny117 Aug 12 '16 at 19:21
  • 1
    @danny117 Why would anyone want to `flame' the JTOpen project for not including certain features? That suggests a serious misunderstanding of a couple major points of "open source", i.e., (1) it's "open source" and (2) it's developed mostly by others for you to use for free. – user2338816 Aug 25 '16 at 10:04
  • We flame IBM on JTOPEN Because we are in.jar hell having to take the time to manage the correct jar files are downloaded and in place when maven could be doing that automatically. – danny117 Aug 25 '16 at 16:48
  • 1
    @danny117, have you looked here? https://mvnrepository.com/artifact/net.sf.jt400/jt400 or here? https://maven-repository.com/artifact/net.sf.jt400/jt400 Both have the latest 9.1 version... – Charles Aug 26 '16 at 14:39
  • iOfcourse maven pulls that in like magic but jt400 is not the latest release of jtopen. – danny117 Aug 26 '16 at 15:32
  • @danny117, jtopen is the current name for what used to be called jt400. But the .JAR itself is still called jt400. The links I provides both have the latest version 9.1 – Charles Aug 28 '16 at 18:59
  • When IBM promotes the JTopen maven on their website then I'll be satisified. – danny117 Sep 01 '16 at 14:23