Unconfigured Ad Widget

Collapse

Announcement

Collapse
No announcement yet.

RPGLE calling OPM RPG

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

  • RPGLE calling OPM RPG

    Have you considered "running" these opm lookup programs through the cvtrpgsrc command(to 'change' the opm source to ile source). Same code, just ile'ed! then you could compile these ile programs using crtbndrpg command and all should be well. give that a shot. please post a response good or bad. This may be your best choice, considering you have limited resources.

  • #2
    RPGLE calling OPM RPG

    You should be able to get this to work. Are there such things as RCLRSC or RCLACTGRP being done? What is the error you are getting. Depending on what is the underlying cause you may have to change your programs to fix it which may be more work than just converting the lookup programs. Scott Mildenberger

    Comment


    • #3
      RPGLE calling OPM RPG

      We compile all our ILE programs with DFTACTGRP(*NO) ACTGRP(*CALLER). Previously, the programs would not behave properly in a mixed ILE/OPM environment.

      Comment


      • #4
        RPGLE calling OPM RPG

        I went through this a while back. After a bit of analysis, it was discovered that only a handful of RPG III programs would benefit from ILE, but all would benefit from the use of RPG IV. All the source code was converted, and compiles were only done when a program was modified. The use of ILE is limited. There is still a good deal of S/36 code (both RPG II and COBOL) in this shop, and the interaction among the environments works just fine. Any new development for the past few years has been in RPG IV exclusively. Dave

        Comment


        • #5
          RPGLE calling OPM RPG

          Thanks for all of the responses. The RCLRSC one seems to be the best "immediate" solution. When I get back out to a command line and do RCLRSC the OPM lookup programs work fine. I will also attempt to compile DFTACTGRP(*NO) ACTGRP(*CALLER) We definitely want to move forward when we can and have the benefits of ILE like prototyping, using procedures, bound programs, etc. But, at the same time commit resources to converting everything at this time. Some (many) programs are still old S36 code that cannot simply be "modernized" with CVTRPGSRC.

          Comment


          • #6
            RPGLE calling OPM RPG

            Richard Rothe wrote: > > Thanks for all of the responses. The RCLRSC one seems to be the best "immediate" solution. When I get back out to a command line and do RCLRSC the OPM lookup programs work fine. > > I will also attempt to compile DFTACTGRP(*NO) ACTGRP(*CALLER) > Using RCLRSC might cause new problems. If RCLRSC makes an OPM program rerun correctly, setting on LR in the program should also make it rerun correctly. If you change your lookup programs to seton-LR-and-return when passed a special parameter (or when pass no parameter), then you should be able to shut them down at the end of your application by calling them a special way.

            Comment


            • #7
              RPGLE calling OPM RPG

              Barbara is correct, it is LR that is probably causing your problem. When the OPM program is dynamically called by the RPGLE caller program, be careful about setting on LR in the OPM program. That indicator may very well carry back to the caller. Instead, change any called OPM program to include a RETURN op code in place of setting on LR. And do study up on activation groups - they can either do wonders for you or drive you crazy, depending on your level of understanding how they work. Bob Mizner

              Comment


              • #8
                RPGLE calling OPM RPG

                I've read all about mixing ILE and OPM and the pitfalls. But, we simply don't have the resources to convert everything to ILE and we do want to do new development using ILE. So, I'd like to know if there is a solid solution to mixing ILE and OPM other than "Don't do it !" We have dozens of lookup programs written in OPM RPG. Obviously, they run in the default activation group. When I call one of these lookup programs from an RPGLE it works the first time the lookup is CALLed. However, on subsequent attempts to call the lookup program it does not. The RPGLE program runs in QILE AG. I'm sure many other shops don't have the resources to convert all of their old OPM to ILE and have the same dillema. Is there a viable workaround ?

                Comment

                Working...
                X