ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

Overlay function --> RPG 400

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

  • #16
    Re: Overlay function --> RPG 400

    I think many people use the terms "RPG III" and "RPG/400" interchangeably.

    Anyway, as others have indicated, even if the company has lots of older RPG code in use, it can co-exist with newer RPGIV programs. Both where I work now and my last job had this scenario. Sometimes I have to maintain old RPG code. If it's an in-house program and I have time, I will often convert an old RPG program to RPGIV while I'm at it. Slowly but surely things get modernized that way. Any new development is of course in free-format RPG, utilizing newer techniques such as embedded SQL, service programs, etc.

    So, to the OP: I don't think anyone here is criticizing the reality that you have some old code in use. But to convert RPGIV to old RPG III...?? That is lunacy and there's no reason for it that I can imagine.

    Comment


    • #17
      Re: Overlay function --> RPG 400

      DeadMan, LOL! That's a great way to filter/weed-out programmers who won't add value... I like it! :-)

      Comment


      • #18
        Re: Overlay function --> RPG 400

        Originally posted by jtaylor___ View Post
        "RPGIII" and "RPG/400" are often used interchangeably, although I think technically they are different. I say that because they have different compilers.
        In general, "RPG III" refers to the grammer/syntax of the language as it evolved. So, RPG/400 refers to using and compiling a source member that is structured using the RPG III formats while in the native "AS/400" environment. A couple examples would be that neither "RPG/400" nor "RPG III" has D-specs and both have C-specs that allow three conditioning indicators per line plus a level indicator.

        A technical difference is noted in the RPG/400 User Guide in Appendix E. System/38 Environment Option of the RPG Compiler:
        This appendix describes how the System/38 environment option of the RPG compiler supports the same RPG syntax as the System/38 RPG III compiler, and the System/38 object naming conventions. The remainder of the appendix discusses differences between the System/38 RPG and the System/38 environment option of the RPG compiler, differences between the System/38 environment option of the RPG compiler, and the AS/400 system RPG/400 compiler, and the file types supported by each compiler.
        (Emphasis added.)

        In short, "RPG/400" is essentially just the "AS/400" version of "RPG III" that was from the S/38. Those two compilers are practically identical with a few detail differences that are listed in that appendix. For the most part, source can be successfully compiled without change by either compiler. It's almost guaranteed that a S/38 RPG III member can be compiled as RPG/400, but a very few RPG/400 added items (e.g., the CLEAR op-code) need to be addressed in order to use the S/38 compiler.

        All of that is separate from the ILE RPG compiler that uses the RPG IV (or later) versions of the language. (And I'll ignore even earlier RPG and RPG II.)

        There is no good way to go from RPG IV back to anything earlier. It's primarily a manual process with a number of things that will simply have to be figured out. If any ILE features are used, it may require creating additional programs to implement those features. (In some cases, it may take more code in the added programs than in the original program.)

        If the RPG IV is simply a converted RPG III to begin with, it might be fairly easy. A column-oriented text editor would be helpful in rearranging the columns. The SEU windowing feature can be helpful in shifting blocks of code left/right. If all the op-codes like MOVE/MOVEL are still used, it'll be fairly easy.

        But it'll be real "fun" if extended factor 2 expressions are used or if higher precision decimal-data definitions are needed or if any %FUNCTION() shows up or if even a single ILE-compatible API is referenced. And if a non-default activation group is involved...?

        Lots of things can push the effort beyond anything reasonable.

        But you might be lucky and have a member that doesn't actually use anything that isn't part of RPG III.
        Tom

        There are only two hard things in Computer Science: cache invalidation, naming things and off-by-one errors.

        Why is it that all of the instruments seeking intelligent life in the universe are pointed away from Earth?

        Comment


        • #19
          Re: Overlay function --> RPG 400

          Originally posted by hasj_gogo412
          Hello everyone,

          Can someone explain to me how does this function work? overlay()

          Also, my internship subject is to translate a RPG ILE source to RPG 400...
          I know it's a pain in the a**...
          Any advise on how should it works?

          thanks a lot,


          hasj_gogo412
          Interesting - why take RPG IV code to RPG/400 is totally counter productive. Your employer has to be taking the hard stance that there will be absolutely no RPGIV code in the shop - any RPG IV will be converted to RPG/400... depending on how many of these programs exist they may be spending a lot of money on "busywork" that can expose application to unnecessary bugs.

          You have to do what your boss tells you to do - I get that... I would be sooooo frustrated.

          You do the same thing as OVERLAY by specifying the appropriate from/to values to match what you are overlaying.

          Comment

          Working...
          X