Unconfigured Ad Widget

Collapse

Announcement

Collapse
No announcement yet.

IMHO: Is RPG Free-Form a Cat in Tiger's Clothes?

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

  • #31
    IMHO: Is RPG Free-Form a Cat in Tiger's Clothes?

    Hassan, just because I took no offense doesn't mean I want to continue arguing the points, especially since many of these points are made by people other than me. Let me just make it clear tyhat the lack of a direct conversion capability means many shops will not convert to /free because there is a risk involved and no real benefit. It's that simple. And for those that ARE my own, I also won't argue. The %editc('X') is my own personal bugaboo, and there's no way you can convince me the "eval CharField = %editc(NumField:'X')" makes sense to anybody in the world besides an RPG programmer. Since it requires RPG knowledge to understand %editc, it is no better than a %move. That's my opinion, and I'm sticking with it . Joe

    Comment


    • #32
      IMHO: Is RPG Free-Form a Cat in Tiger's Clothes?

      Thank you Ralph. I would also point out, that most shops (particularly in these times) are extremely tight on budgetary concerns. Taking the time to rewrite code, which at best would leave the end results identical to the status prior to starting the project, is the business equivalent of running in place. Adding to reasons why RPG/400 to RPG IV does work business-wise, is the fact that converting the code does not obligate the need to compile it. That could be done the next time program maintenance is needed. In this manner, all of the programs could be converted in one swell foop, but testing would be done, when it would be done as a normal matter of business practice. Dave

      Comment


      • #33
        IMHO: Is RPG Free-Form a Cat in Tiger's Clothes?

        "it is incomprehensible to me that a working program would be converted unless it is all but assured to continue working the same." Allow me to comment on two of your phrases. "Working program" and "continue working the same". First, there is a difference between "working program" and "program working right". In one of previous shop we had this debate until the management changed. The old management was happy for all the bugs the system had, the patches it had to make it work, and the insensible time it took for execution. "Just patch it where it is broken" was the motto. The decision was finally made by the CEO to dump the entire shop and move to Oracle or SAP. Then the CIO made the decision to bring in new management who saw that targeted rewrite of code made number of fires go down. It also increased the speed. After one year of observation, CEO decided to not switch. Unfortunately the other division did not survive. Second, "continue to work the same" is also a problem. In my current shop my first assignment was to help the senior programmer in maintaining some tools. The manager was happy with the fact that one of the tool took 4-8 hours to update a couple of thousand records. The director was not so sure. He came from Oracle and said, "Okay I dont know anything about AS/400 but I know this much, if this tool was written in Oracle, it should have taken 8 minutes, not 8 hours, and I am told again and again that AS/400 is much faster". He made me rewrite the tool. It took me one day to rewrite it and and another to get it tested. It ran in 3 1/2 minutes. I then took another day to add some functionality that was "unaddable". The result was that I was made independant and given the task to rewrite all the tools and automate whatever I can. See, the conversion was not to "continue to work the same" but "work better". In the end, it is a matter of cost-justification. We have to convince the CFO that everypenny thrown in conversion will save a dime. That is the only language CFO understands.

        Comment


        • #34
          IMHO: Is RPG Free-Form a Cat in Tiger's Clothes?

          I agree with your comment that there is a difference between a working program, and a program working right. There may be a few differences in semantics, but the jist is the same. OTOH, in your example you site a system that was constantly needing patches. I was not refering to such a system. OTOOH, a system requiring patches may have those patches done in free form if so desired. OTOOOH If the system were written in RPG III it would cost nothing in time or effort to convert the entire source code to RPG IV. Once that has been done, the patches could be applied using the latest techniques. I would be interested to know the bottom line effect of the new management. In other words what was the total cost of the conversion verses the ongoing cost of the patches. In some companies like the one you have sited, a cost justification was accomplished, but for other companies where profit margins vary between slim and none, any cost cannot be contemplated. Dave

          Comment


          • #35
            IMHO: Is RPG Free-Form a Cat in Tiger's Clothes?

            Well, my carefully crafted code fragment got chewed up and reformatted into 3 identical lines! I'll try again, using the code window (like I should have done the first time). My goal is always clarity, ease of maintenance, and prevention of mistakes. I tend to like the last sample as I think it goes the farthest towards achieving these goals.
            Code

            Comment


            • #36
              IMHO: Is RPG Free-Form a Cat in Tiger's Clothes?

              Hmm. Let me see. My one year salary which they paid anyway as I worked on those patched up programs. I converted them from RPGIII to RPGIV on the fly. I also combed thru the sphaghetti logic removing GOTOs, putting page long IF/ENDIF into subroutines etc. Yes, using tool to "beautify" it was the time I started hating MOVE/MOVEL as even my enhanced utility often failed. So "beautification" was sadly dropped. The real cost was engaging a QA to have specially careful testing of my program. Trust me, it was not easy to ask for the help. The ongoing cost of the patches was the salary of Product Support manager who was later given the additional job of Data Bases Manager. The cost of reliability ... PRICELESS "for other companies where profit margins vary between slim and none, any cost cannot be contemplated". I am yet to see such stable shops. Probably because they dont hire people like me Stable companies rarely need consultants. It is only when the CEO is disgusted with a legacy shop breaking down every now and then, that he hires consultants before kicking legacy management out. Frankly stable companies bore me (do you smell soar grapes?). I like shops where the system is so patched up that even the legacy I.T. manager, who survives by means of "security thru obscruity", does not know anything anymore. That shop I mentioned, had over 200 calls in their sales analysis CL. Ofcourse those calls had calls in the programs they called. Whenever there was a problem and they fail to find, they added another program down the stream to fix it. No this was not the only shop that I had seen doing it. Even in the present shop the consulting firm's program is full of patches that even they do not understand/remember. Long live legacy!!!

              Comment


              • #37
                IMHO: Is RPG Free-Form a Cat in Tiger's Clothes?

                "there's no way you can convince me the "eval CharField = %editc(NumField:'X')" makes sense to anybody in the world besides an RPG programmer" Well I used %editc equivalent thing called FORMAT in Fortran as back as 1979. So I guess it will make sense to some guys other than RPG programmers Okay, okay, end of discussion

                Comment


                • #38
                  IMHO: Is RPG Free-Form a Cat in Tiger's Clothes?

                  I don't understand why the semi-colon is required on EVERY line as opposed to ending a logical construct or statement. Putting it after a DO, IF, ELSE just drives me nuts. Just curious..... I seem to recall (years ago)an IBMer saying that the MI coders would just begin every line with a semi-colon. That way, they'd never forget to end a line. Anyone doing that with /free RPG? Is that a reasonable option?

                  Comment


                  • #39
                    IMHO: Is RPG Free-Form a Cat in Tiger's Clothes?

                    We see the dang semi-colon in C and the dang period (full-stop) in Cobol because these languages are free format and allow lines to continue over one line. They also allow more than one statement per line. This way these dangs tell the compiler where exactly did the statement ends. So why dang semi-colon and not dang period? Cuz the RPG compiler writers are C programmers! Personallly I hated dang period because it was not as eye catching as semi-colon. It caused great grief and pain in my initial days of programming

                    Comment


                    • #40
                      IMHO: Is RPG Free-Form a Cat in Tiger's Clothes?

                      He's talking about block open statements where an open brace should go, and I agree with him. That brings me to my annual flailing a deceased equine post, "If you want everybody to go to Java, why don't you use Java syntax?" The semi-colons on the end of every line blew me away. Ugliest syntax I ever saw. The compiler should allow Java type syntax in the form of open braces in lieu of semicolons on block open statements and a closing brace on the matching ENDxx, and the Java == and != compare operators. No need to reinvent the wheel badly. rd

                      Comment


                      • #41
                        IMHO: Is RPG Free-Form a Cat in Tiger's Clothes?

                        The manager was happy with the fact that one of the tool took 4-8 hours to update a couple of thousand records. I meant a working RPG program, not SQL. rd

                        Comment


                        • #42
                          IMHO: Is RPG Free-Form a Cat in Tiger's Clothes?

                          I don't mind it where it makes sense. Years ago I wrote COBOL in addition to RPG and C. A period at the end of a COBOL "sentence" or a semi-colon at the end of a C statement is OK by me. Putting them at the end of IF, ELSE, DO, etc. seems like overkill. This may start a new war but I wouldn't mind a bit if the syntax were more C-like. Curly braces would be great. This one toe in the water approach to syntax is making it rough. Jump in head first.

                          Comment


                          • #43
                            IMHO: Is RPG Free-Form a Cat in Tiger's Clothes?

                            You are absolutely right that Semi-Colon is somewhat ugly compared to braces. However braces needs a shift key and semi-colons do not So I guess guys with a sensitive eye would go for braces whereas lazy guys would go for a semi-colon

                            Comment


                            • #44
                              IMHO: Is RPG Free-Form a Cat in Tiger's Clothes?

                              Jon. What alternate do you suggest for MOVEA? Ofcourse the following syntax is incorrect.
                              Code

                              Comment


                              • #45
                                IMHO: Is RPG Free-Form a Cat in Tiger's Clothes?

                                Some may remember the "emacs" VS "vi" source editor holy wars on Unix back in the early eighties. This moved someone to eventually write the following quip: "What's the best source editor in the world? It's the one you know how to use." The same thing can be said for the endless "columnar" VS "free" discussions. Personally I love using "free" because I cut my teeth on PL/I, COBOL, and FORTRAN long before I learned RPG-III. I have always found it more difficult to read programs that can't be indented (like BAL and RPG-III). Also I don't use GOTOs and I've found that everything you can do with MOVE and MOVEL you can do with a free-format EVAL (or EVALR) and BIFs. But that's me; that's what I prefer. If you prefer fixed-format code using MOVE and MOVEL then more power to you.

                                Comment

                                Working...
                                X