Unconfigured Ad Widget

Collapse

Announcement

Collapse
No announcement yet.

Weaving WebSphere: Calling All RPG!

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Weaving WebSphere: Calling All RPG!

    ** This thread discusses the article: Weaving WebSphere: Calling All RPG! **
    ** This thread discusses the Content article: Weaving WebSphere: Calling All RPG! **
    0

  • #2
    Weaving WebSphere: Calling All RPG!

    ** This thread discusses the article: Weaving WebSphere: Calling All RPG! **
    I tried the PCML route a few years and found it painfully slow in performance. I followed some IBM examples I found on the internet. I was calling the programs from Tomcat. I have rewritten all my calls into the SQL stored procedure model and have seen greatly improved performance. Has there been improvement to the way PCML performs?

    Comment


    • #3
      Weaving WebSphere: Calling All RPG!

      ** This thread discusses the article: Weaving WebSphere: Calling All RPG! **
      I don't know about performance improvements. I haven't heard of anything one way or the other. But bad performance can be caused by a number of things. First, were you using serialized PCML documents? Second, were you loading the document for every transaction, or just once and reusing it over and over? Joe P.S. Sorry about the lack of a salutation -- I always find it hard to figure out how to say hello to a handle. Should I say Hello, King? Hello, Salomon? Or maybe just "Your Highness:"?

      Comment


      • #4
        Weaving WebSphere: Calling All RPG!

        ** This thread discusses the article: Weaving WebSphere: Calling All RPG! **
        Joe, Nice article, as always. String name = AS400Text.toObject(plist[2].getOutputData()); Doesn't this need to cast the Object to a String? String name = pcml.getValue("mypgm.custname); This is missing a double quote. Can you tell I'm studying for the SCJP exam? And what is serialized PCML? Isnt' that just the file on disk, where it already is anyway? Thanks. Chris Ringer

        Comment


        • #5
          Weaving WebSphere: Calling All RPG!

          ** This thread discusses the article: Weaving WebSphere: Calling All RPG! **
          This is a very useful article, Joe, and well-written. I have printed out a copy to share with my colleagues. However, rather than justifying the calling of RPG from Java as a way to avoid SQL (after all, the Toolbox also enables Java to execute RLA operations), I would think a stronger justification is that it allows us to preserve our RPG applications while permitting them to service browser UI front-end apps. In fact, if you separate the business logic RPG modules from 5250 mgmt programs, the same set of business logic RPG modules can service both 5250 RPG programs and Java controller classes in a JSP Model II app. Where I work our RPG programs use both native IO and SQL based on what seems to be best under the circumstances, and we find the new SQE SQL engine can be a real powerhouse. I like RPG, and I see the value of RPG lying in a lot more than just access to native IO. I think it is a strong procedural language with which we can write modern modularized applications. You have clearly shown several ways to call RPG from Java. This is very useful for those who want to keep an RPG core but enable it to service a Java MVC presentation layer.

          Comment


          • #6
            Weaving WebSphere: Calling All RPG!

            ** This thread discusses the article: Weaving WebSphere: Calling All RPG! **
            Sorry about the missed double-quote, Chris (and the long delay; the holiday weekend was a long one!). Serialized PCML is written out in "object format"; that means that basically the binary data from the objects is written out and then read in later. It's very fast compared to having to parse through the XML and build the objects individually. Joe

            Comment


            • #7
              Weaving WebSphere: Calling All RPG!

              ** This thread discusses the article: Weaving WebSphere: Calling All RPG! **
              First, I'm not "justifying" calling RPG, because no justification is needed. RPG is the best language for writing business logic, so anybody who does NOT use it needs to justify their position. I also use SQL when it makes sense. No, it is those who insist on using SQL where it is inappropriate who need to justify their position. Since SQL is not independent across platforms and tends to require complex statements that are hard to maintain and debug, there is no compelling reason to ever use it where it underperforms RPG. You say you find the SQE SQL engine to be a real powerhouse, but it doesn't outperform native I/O for single-record reads, updates and writes, so it still isn't a viable replacement for RPG, and that's what I was saying in my last paragraph. "Those who want to keep an RPG core" should be everybody in the iSeries community. There is no reason to not use RPG and native I/O. Joe

              Comment


              • #8
                Weaving WebSphere: Calling All RPG!

                ** This thread discusses the article: Weaving WebSphere: Calling All RPG! **
                "Your Highness" will be fine. Or you could use Vince. Sorry I haven't responded sooner. I remembered a little more about the program I was working on. I think the problem may have been in the IBM example. I don't remember anything about connection pools in them. It may have been signing on with each call.

                Comment


                • #9
                  Weaving WebSphere: Calling All RPG!

                  ** This thread discusses the article: Weaving WebSphere: Calling All RPG! **
                  I have actually developed a framework which allows me to describe any RPG program through an XML file. This XML file is based on a schema I created. Once a program has been described, it can then be uploaded to the framework which runs as a J2EE application on the JBoss application server. The framework registers the program and at that point the program is available to be invoked as a REST web service. This means that these programs can be called from any language that can open a URL connection and handle XML (VB, Java, etc.) or better yet, you can simply create web pages with using HTML that invoke these web services by simply posting a request to the server. The framework allows me to register an infinite number of AS400 systems on which the RPG programs reside. One of the most powerful features of this framework is that it allows me to not only call RPG programs that return a pre-determined number of parameters, but it also allows me to return result sets! That is, an indeterminate number of records. I started developing the framework less than a year ago. It is used in a production environment. I have debating whether to open source it or commercialize it. In case you are wondering, I use the Java ToolBox under the covers but that is it; no PCML, etc. Again the beauty of it is that it does not require writing any Java code and the programs are accessible as web services. Javier Franco Archer Software jkfranco@chartermi.net

                  Comment

                  Working...
                  X