ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

ILE compared to RPG

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

  • ILE compared to RPG

    I am trying to convince a manger of the benefits of writing future code in ILE and not in RPG.

    Is there any proof that riting in ILE brings performance improvements over writing the same code in RPG.

    I am aware that design is important but at the lowest level is it possible to prove to a cynical manager that the investment in retraining would be beneficial to the company.

    Also are IBM due to stop support or RPG ?

    Thanks

    Gman

  • #2
    Re: ILE compared to RPG

    From Scott Klement:

    RPG IV advantages:

    a) More useful/powerful H-specs.

    b) No limit to the number of files in the F-specs.

    c) All definitions controlled with D-specs instead of some being in I-specs, some being on C-specs, etc.

    d) The ability to use variables with names longer than 6 characters. (In current releases of RPG IV, you can code variables up to 4096 characters long! Not that you'd ever want to make one that long...) The ability to use meaningful variable names by itself, without any other advantages, makes RPG IV a much better choice than RPG III.

    e) The ability to do proper string manipulation. This is another feature that, by itself, is enough to make me use RPG IV instead of RPG III. String manipulation is one of the most basic features of any programming language, and the fact that it was SOOOOOOO unbelievably awkward in RPG III made that language extremely frustrating to work in.

    f) The ability to use numeric expressions. X = (Y * 3) / 100 instead of Y MULT 3 TEMP, TEMP DIV 100 X.

    g) The ability to perform date/time/timestamp calculations.

    h) The ability to directly call subprocedures or methods written in other languages as if they were subroutines inside the same code. This means that you can download an open-source routine written in C or Java, install it on your iSeries, and call it as a piece of your program. This enables all sorts of capabilitites! Such as the ability to create graphs and charts. Create spreadsheets. Access Windows files directly from your RPG program, even across a network. Parse XML. The list goes on and on and on and on...

    i) Activation groups to control the scope of resources and close them all down together.

    j) Increased ability to build modular reusable components instead of monolithic programs.

    k) Easier to read and maintain syntax, both with "extended factor 2" and with free-format code.

    l) The ability to access/work with large objects (LOBs) in databases.

    m) The ability to use data structure features such as OVERLAY and QUALIFIED that can let the system do more of the work for you, and greatly simplify coding efforts.

    n) The ability to best data structures inside each other.

    o) The ability to use prototypes and procedure interfaces that let the system take much of the pain out of calling other programs, Java methods or ILE subprocedures. They protect you against errors. They let the system automatically do variable conversions. The list goes on and on... This alone would be adequate reason to use RPG IV instead of RPG III.

    p) The ability to perform file operations without using indicators. And to put screen i/o indicators into a data structure where they can be given valuable names. This feature alone would be adequate reason to use RPG IV instead of RPG III.

    RPG IV is a superset of RPG III. Everything you can do in RPG III you can also do in RPG IV using almost identical syntax (the columns are a little different, that's the only difference. And the source code editor (SEU or WDSC) will tell you where the columns should be as you're typing them.) So everything you can do in RPG III will also work exactly the same in RPG IV. Plus, RPG IV gives you mountains and mountains of new features that RPG III doesn't have. There's absolutely no reason whatsoever to stick with RPG III today.

    Remember, IBM stopped adding new features to RPG III. The only new feature they've added in the past 15 years has been Y2K compatibility. Every new feature they've added to the RPG language in the past 15 years has been added only to RPG IV. You're REALLY missing out if you continue to use RPG III.


    __________________________________________________ ______

    Comment


    • #3
      Re: ILE compared to RPG

      Continuing on:

      As far as support it depends on what you mean. IBM is not enhancing RPGIII (or RPG/400)
      They have said that they will be removing the compilers at some point in the future but not the environment. They had actually said in the next release the RPGII and RPGIII(RPG/400) compiler would be available only at extra cost, but they have backed off this for now. They say it will still happen though. So the choice is do you take a number of small jumps to get there or wait to be pushed.

      Add to this the fact that if you don't train your current staff in RPGIV you will likely have to train anyone coming into the IT staff in RPIII. Staff will be harder to keep because most people don't want to work for a company that has stagnated developmentally and isn't interested in helping their employees become more knowledgable

      Comment


      • #4
        Re: ILE compared to RPG

        Going to RPG-IV alone (without using ILE features) is worth it alone. I have removed chuncks of code 50-70 lines at a time and replaced it with one line of code. We also have several programs that wouldn't compile in RPG-III because they exceeded the max number of variables - lots of pgms that need more than 15 files. And, my favorite, long field names !
        Another important feature for developers is the editor can give a nice outline of fields, subr, indicators, etc. Only subr for RPG-III.

        Comment


        • #5
          Re: ILE compared to RPG

          Hi,

          I have removed chuncks of code 50-70 lines at a time and replaced it with one line of code.
          I've even procedures/functions that constist of a single row, 2 or three rows. (I'd never do it with a program, but with exported procedures that are stored in service programs.) Remeber the procedure I posted yesterday to check if there are only valid characters in a string.

          I've also procedures that do nothing else than return a "constant" value, that is stored only once in a global variable. For example I have procedures that return Yes/No values, depending on how they are stored in a message file. In this way I manage multi-language environments. The text is only retrieved once and stored somehwere in a global variable. In all subsequent calls only the retrieved value will be returned. If I work with the English version Yes or No is returned, if I work with the German version Ja or Nein is returned and if I work in the french environment Oui or Non is returned. In my code it looks as follows:

          PHP Code:
          /Free
               DspYesNo 
          GetYes();
               
          //More Code

               
          If ChkYesNoInput(DspYesNo);  
                  
          //Yes or No is inserted
               
          EndIf;

               If 
          DspYesNo GetYes();
                  
          //Yes is inserted.
               
          ElseIf DspYesNo GetNo();
                  
          //No is inserted
               
          Else;
                  
          //Nothing is inserted
               
          EndIf;
          /
          End-Free 
          Birgitta

          Comment


          • #6
            Re: ILE compared to RPG

            Thanks for the feedback. Certainly provides some good ammunition.

            Comment

            Working...
            X