Unconfigured Ad Widget

Collapse

Announcement

Collapse
No announcement yet.

Long Live RPG IV!

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

  • Long Live RPG IV!

    Ralph Dougherty asked: Because IBM said we needed to learn Java, and why did they do that? To justify their "hamburger" ads. BTW the backlash from those ads was evident in virtually every user group across America. IBM quickly pulled the ads. Dave

  • #2
    Long Live RPG IV!

    I haven't seen anybody say we don't need to learn new languages. Well, I have. For instance, I've seen people argue that since RPG IV has things like pointers, you don't need to learn C. Unfortunately, RPG's pointers are untyped, which makes using pointers much less easy than in C. But in general, while many iSeries programmers seem willing to learn new things like HTML and CGI (just to name two), for some reason, there seems to be a major reluctance to learn new programming languages. (Ooops, gotta get back to my course!) Cheers! Hans

    Comment


    • #3
      Long Live RPG IV!

      I've used a pointer one time, in a trigger because the sample code had a based pointer. I've seen a couple of techniques presented here using them but can't remember what they were. I don't know, it seems like if the use was that compelling then I'd see one once in awhile. Same thing with all these API things. I don't know, who needs to learn another language when we've got a load of stuff to figure out on the AS/400 yet. There is a fundamental conflict with this "things change, learn a new language to preserve your opportunities" thing. One is that the talk comes from IBM, but they also manufacture the things that will for some reason "change". And they want to charge a toll for everyone using a computer to go through Websphere instead of making a living making AS/400's and mainframes as they have in the past. That I think they have clearly indicated they don't believe has a future. On the other hand, if indeed things "change", it won't be running on the AS/400. Only someone who is easily made giddy by happy talk would believe that. So in essence we're being told prepare for your technical architecture to "change", by the people who make it and have a vested interest in ensuring the future of their new product while recategorizing our technical architecture as merely one of every kind of computer that can run it. It would be off message for IBM to talk about all the corporations running their business on OS/400 and RPG, wouldn't it? Nope, the message is things are going to "change", to Websphere. The message is steady, but the underlying logic is conflicting. By the way, people will learn what they need to learn that they will actually use in employment, and if IBM destroys the RPG programming market I wouldn't be surprised if most end up learning something other than Java and Websphere. rd

      Comment


      • #4
        Long Live RPG IV!

        To begin with, I'd just like to point out that I'm speaking my own opinions here, not the opinions of my employer. (I thought that should have been clear already. I hate to state the obvious.) There are some invariants here, that cover the entire field of programming, not just RPG or iSeries programming. First, change is a fact of life in this business. Pretty much all programming jobs are transient. Products ship, defects are removed, programmer productivity improves, and requirements diminish. Projects are always ramping up and staffing down. Perhaps you can stay in the same company for 20 years, but you won't be working on the same project for all that time. (I can list ~10 projects worked on over my 24 professional years.) Second, the only person responsible for your career development is you. You can't always count on your current employer. If your employer is willing to pay for education, it's almost always specific to your current assignment, and not to any possible future work. Third, RPG may well be the absolute best programming language in the world and the iSeries may well be the best piece of computing machinery, but if there are no RPG or iSeries jobs near your home, you still have to ensure that your immediate family is properly housed and fed. It is for these reasons that I (for one) advocate continual re-education. I'm not advocating learning any technology in particular. (Although I think there are some very good reasons for learning certain specific tools, like Python!) But practically any kind of programming-related learning is beneficial, if only to show a prospective employer that you can learn new things. You may not like Java. (I'm certainly not a fan myself!) You might not like WebSphere. You might feel that some particular company is ramming these things down your throat. OK, don't bother with them, and learn some other things. In another article, Barry Kline talked about Perl. That's certainly a tool worth learning. It's pretty much ubiquitous in the programming world (at least in the Unix/Linux world). And if you're interested in CGI, most of the best CGI experience can be found in the Perl community. Or if you want to learn OO, start by learning Python which has (arguably) the easiest to learn object model of any OO language. Those are just two examples of useful things you can learn. To put my point in other words: Complaining won't do any good. Take charge of your own career development, and don't depend on your employer (or worse, your employers suppliers) for your career development. Cheers! Hans

        Comment


        • #5
          Long Live RPG IV!

          I was told the %ELEM worked differently for free format. In the non free it would loop the DIM number, in Free format it would only use the number that was used. I was wondering if anyone could clear this up. Thanks

          Comment


          • #6
            Long Live RPG IV!

            ** This thread discusses the article: Long Live RPG IV! **
            ** This thread discusses the Content article: Long Live RPG IV! **
            0

            Comment


            • #7
              Long Live RPG IV!

              ** This thread discusses the article: Long Live RPG IV! **
              I think one reason programmers are not replacing their subroutines with subprocedures is that they are still cumbersome to code, especially for those of us who try to write modular code. I use subprocedures, but I still use more subroutines. Maybe I'm lazy, but I would be more apt to abandon subroutines in favor of subprocedures if: - IBM got rid of /free and /end-free. I don't like having to /end-free just to code a P-spec. If column 6 is blank, it is free format. - In fact, get rid of the P-spec and replace it with begproc and endproc op-codes. This will also work even better once D-Specs are free-formatted. - If the procedure is coded in the same module, remove the requirement to prototype it. Use the interface as the prototype. Can't the compiler do that? Now, if the procedure is not in the same module, but is external, then yes, obviously prototypes make sense. But if I'm just replacing subroutines with subprocedures in my module, it takes time to code the prototype (even just copying the interfaces), especially with the number of subroutines I'm replacing. Like I said, maybe I'm just being lazy, and maybe I should just do it with what we got.

              Comment


              • #8
                Long Live RPG IV!

                ** This thread discusses the article: Long Live RPG IV! **
                If you use WDSc to develop, adding a subprocedure is about as easy as it can get. Right click in your RPG source member and from the pop-up menu, select New, Procedure - then follow the prompts. When you complete the wizard, the procedure and the procedure prototype will be added to your source member. Comment blocks get included and you're all set to add your procedure logic.

                Comment


                • #9
                  Long Live RPG IV!

                  ** This thread discusses the article: Long Live RPG IV! **
                  This is not really about RPG IV itself, but the article had some sample code that I have often wondered about. I started using For loops as soon as they became available, and I code many just as was shown in the sample. What I've wondered about is the performance penalty, if any, for doing so; i.e. is the %elem(MyArr) determination done once to set the limit which is then checked on each iteration, or must %elem(MyArr) be determined on each iteration, or does it really matter. Occasionally, when working with a large array I will do something like Eval Limit = %elem(MyArr) and then For i= 1 to limit. Anyone have any thoughts or comments on this.

                  Comment


                  • #10
                    Long Live RPG IV!

                    ** This thread discusses the article: Long Live RPG IV! **
                    I've always hated RPG-III. I came from a free-format background (PL/I, Pascal, Fortran, etc) and the columnarity of RPG-III and the way too-short field names reminded me of BAL and it seemed just as difficult to decipher. For a time I was writing more programs in "C" than RPG, so when RPG-IV (especially free formatting) came out it was a god-send. You'd think that I'd be on the subprocedure bandwagon, and I am, but only to a point. The main problem I have with procedures is not the time it takes to code them; it's the time it takes to execute them. Procedures are severe CPU cycle burners whereas subroutines are much lighter. I always start out using a subroutine and when I find myself adjusting global variables prior to calling the subroutine I move the code into a subprocedure and pass parameters. Another good reason to use subprocedures is if you want to move your code to an external object like a service program so that other programs can benefit from your code. Don't get wrong, I love subprocedure and I always use them when they're appropriate (there are many good reaons too numerous to list here), but subroutines are still the fastest way to re-use bits of internal code so that you have a single point of maintenance. (I even use subroutines within subprocedures.) There is no reason you can't mix the two in the same program.

                    Comment


                    • #11
                      Long Live RPG IV!

                      ** This thread discusses the article: Long Live RPG IV! **
                      I believe that the %ELEM built-in is a compile-time function and is resolved to a constant at compile-time. (As opposed to built-ins like %LEN and %DECPOS which are strictly run-time functions.) Therefore it won't be executed when your program runs because the value was determined when the module was created. If IBM ever institutes dynamic arrays (like the C++ Vector class) then this behavior may change.

                      Comment


                      • #12
                        Long Live RPG IV!

                        ** This thread discusses the article: Long Live RPG IV! **
                        If they can change the name of the computer from AS/400 to eServer iSeries, why can't they change the name of the language from RPG to VSP, Visual Structured Programming language? It shouldn't be a new marketing concept for IBM. Toyota came out with the Lexus, not the Toyota ILE. It says something. This product is left with a name coined in the era of the 360 and the 4300. The name RPG doesn't have the same cache' as Coke or Chevy.

                        Comment


                        • #13
                          Long Live RPG IV!

                          ** This thread discusses the article: Long Live RPG IV! **
                          Hi Doug, I agree with most (all?) of what you said. However, since I've been using CodeStudio for nearly 10 years and had added a Procedure Wizard to it some 7 years ago, I find coding subprocedures easier than subroutines. The Wizard IBM has finally included with WDSc is okay if you can figure it out--not bad but not great either.

                          Comment


                          • #14
                            Long Live RPG IV!

                            ** This thread discusses the article: Long Live RPG IV! **
                            The FOR loop and specifically the %ELEM() built-in function does not re-interpret the value on each iteration. That would be crazy. %ELEM is calculated at compile time (as are many built-in functions) so the static value is embedded in the compiled program.

                            Comment


                            • #15
                              Long Live RPG IV!

                              ** This thread discusses the article: Long Live RPG IV! **
                              Java's got it, as well as PHP, Apache, mySQL ...you would think by now RPG would have its own logo...

                              Comment

                              Working...
                              X