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

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

    Joe, you just rekindled some memories. When I was doing my diploma in Web development a few years ago, I was told by my instructor that he did not expect me to learn polymorphism, but maybe have some idea as it is part of the c++ course. When I completed all my assignments, he was disturbed and it occured to me that in his days of schooling it might have been difficult for him. He then challenged me for Linked Lists saying no one was able to compelte these assignments and I did it! Before you call me a genius, let me tell you that I am a pathetically low paid application developer who drives a leased Honda, lives in a rented three bed room home and has a four didgit bank balance. My brother says in North America a person's intelligence is judged by his net worth, so I am officially a retard. You, the author of Step by Step books, should know that many things in our trade are overhyped myths like the Websphere. It is a matter of opportunity to lay hands on it, before they are demystified. I admit I never used Polymorphism in RPG but I know I can atleast change pointers to point to different procedures. Yes I do prefer Data Structures over C spec move+movel to concatenate. I would also prefer an alpha to num conversion thru %int instead of the invisible move. In short, I would shift from C spec to D spec as much as possible. Probably because I started in Cobol and have the 70's Cobol mentality of prefering Data Divison over Procedure Division. As for the problem of flipping pages, I also prefer as many independant procedures as possible. Again maybe a C mentality.

    Comment


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

      There is tonnes of legacy code that nobody can afford to throw away. Rewriting them from scratch will not get budgeted by the CFO. So the code rots until it becomes "beyond economic repair". A jargon that prompts the CEO to throw away the AS/400 shop along withs manager and staff, and replace it with Oracle or SAP. The key to survival is transition. Websphere can convert fixed format to /free and you can go from there. However the abominable MOVE stand there sticking out its tounge on you. You fix it manually but then the even more abominable MOVEL sticks out its tounge even more loudly. You realize there is a MOVE+MOVEL combo to concatenate. I saw this coming looong time ago when RPGIV first came. Bradley Stone wrote a beautiful utility called "RPGIV beautification". It ran over the crude CVTRPGSRC. However the MOVE stuck its tounge out. Since it was open source then, I modified this utility to cover MOVE and MOVEL. However it failed when smarty pants concatenated by using MOVE and MOVEL with other instructions in between. So I stopped using MOVE about six years ago. Then again, if MOVE is to be supported for Legacy support sake, then why not GOTO? It does not stick's out its tounge as often as MOVE, but when it does, there is no quick fix! You have to modify the logic big time. I can not imagine anything like %GOTO being ever introduced.

      Comment


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

        I would have preferred the name %substr. Other than that I have used, and seen others use without problem, SUBSTR in CL, SQL, QUERY400 and even in other languages. Even the classical old DDS allows SST. I was actually hoping %left() and %right() when I first used it.

        Comment


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

          I share your disappointment. However remember that five years ago it made a very promising start. Then it has been five years and D spec is still not free. We need introduction of Struc{} but I dont think it is going to happen any time soon. I would have moved to C/400 using embedded SQL but my problem is lack of support. There is not enough sample code, books, forums, traditions etc that would make C/SQL fly.

          Comment


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

            "I was responding to Hassan berating someone else's legitimate opinion". I am sorry if I sounded berating Jeff. I have high respect for him and read his article. I think he was once in Costco and when one of my colleague asked if COSTCO is good to join, I said, "By all means, you will be enjoying company of Jeff Olen". I was merely offering an alternate opinion and apologize if I unintentionally berated his opinion. Having said that, I still think MOVE sucks MOVEL sucks even more, and GOTO is not worth commenting on. I discovered that five years ago when I tried Brd Stone's utility to "beautify" RPGIV.

            Comment


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

              However the abominable MOVE stand there sticking out its tounge on you. Hassan, this is your opinion and you are welcome to it. Nobody here is making you use the MOVE instruction. However, there are plenty of people who use the MOVE instruction and are quite comfortable with it. Would you make them stop using it because YOU don't like it? Joe

              Comment


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

                I cant anyone from using GOTO, who am I? what I said, and please read my posting again, is that the conversion operation fails on MOVE and MOVEL. Now you would say that the problem is because there is no %MOVE BIF and the usage of MOVE is not a problem. I understand your point. However in my other postings I have mentioned, and please read them too, that this is not the first time MOVE caused trouble in conversion. The Brad Stone utility also failed in converting MOVE. Even when I enhanced the utility to cater for MOVE and MOVEL concatenation, it failed when people stuck other code in between the concatenating MOVE and MOVEL. From that point I realized that MOVE will keep giving me trouble for all conversions to come. For this experience of mine I will say this, let us assume IBM introduces %MOVE() and %MOVEL(). Would these solve of problems of concatenation problems? A very very smartly coded utility might. Howabout conversion to other languages like Java? Maybe another smart utility. How long can we go along with it? As for the speed of MOVE op is concerned, how many clock cycles will it save? The real overhead in application development is I/O and saving these clock cycle thru MOVE is insignificant. I expect you to know that since you are an application developer like me, not a compiler writer If the need-for-speed necessiates MOVE, our very own Bob Cozzi has proved that functions like memcpy are much faster. I tried that. I hate Bob's stand on /free but other than that, he is a genuine proven time-tested guru.

                Comment


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

                  Addendum: I admit I over-reacted to your posting. Since Bob's questioning of /free, I had a hard battle in my shop and any finger pointing on /free, sub procedures, ILE, externalized I/Os, embedded SQL etc etc ticked me off However I finally won the battle, just need to win the war. The senior architech of the consulting company audited my code and gave a go ahead signal with only the best words to say about my style and coding methods. Consulting companies normally dont do that and always like RPGIII style coding in the name of "Backward Compatibility". I apologize if I unintentionally sounded berating you.

                  Comment


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

                    I for one welcome my new /free overlords. rd

                    Comment


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

                      No offense taken, Hassan. Just don't lump me in with Bob. I use /free all the time, along with subprocedures and embedded SQL (and Java!). I also work with people who DON'T use /free, for various reasons. The lack of a MOVE is just one of them. For example, the old CHAIN/DOWEQ/READE/ENDDO no longer works. You used to be able to use the same indicator for the CHAIN as for the READE (albeit in different positions in the instruction). You can't do that anymore; you have to use SETLL/READE/DOWEQ/READE/ENDDO. You can't change the contents of a BIF. Sometimes (especially in testing) you want to change the value of an indicator to test a branch of code (say to simulate a missing master record). You can't do that with a BIF. The %FOUND BIF can't be changed with an EVAL statement in the debugger. %editc(val:'X') is very cumbersome. These are just a couple of issues with /free. These issues aren't enoguh to keep me from using /free, but there are shops with lage bodies of legacy code that won't move to /free because of some of these things. But by far the lack of a %MOVE is the number one reason. Joe

                      Comment


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

                        Since you have not taken an offence, like any professional should not, let me continue the argument My favourite alive philosopher (and I am sure lot here absolutely hate him) Noam Chomsky shows his irritation for people not being able to distinguish between "Argument" and "Assertion". Correct me anytime I would assert instead of argue! "there are shops with lage bodies of legacy code that won't move to /free because of some of these things". That is what I meant when I said "MOVE sticks its tounge out". I have problem with MOVE for conversion sake as well. For you, it was speed as well which I questioned. For me, it did not happen yesterday. The MOVE stuck its tounge out to me when I tried to convert RPGIII into "beautified" RPGIV (a Brad Stone phrase). After my enhanced tool for MOVE and MOVEL concatenation failed because someone stuck code in between the concatenation, the shop stopped the conversion. My gut feeling was that MOVE will get me into trouble in future as well and it indeed did when /free came. My gut feeling continues to tell me that there will be trouble with MOVE. As for %editc, I use it often as I have to produce/use files for/from other systems and unfortunately our shop is not advanced enought to use XML. I end up using %editc. I have not encountered any awkwardness so far. As for the old CHAIN/DOWEQ/READE/ENDDO, are you sure it was any better than SETLL/READE/DOWEQ/READE/ENDDO. I thought the former saved some nano or paco seconds but I never experienced it somehow. Then I was told that if you use CHAIN on a file, SETLL would be as slow as CHAIN as it will loose the buffering ability. There a discussion by Chris Ringer on the RPG forum a while ago. Maybe you can dig it. Now about the inability to change the BIF. I agree it was very irritating for me in the begining. However I found having to worry about one indicator less was an equatable trade-off for me. In worst case emergencies, I will insert temp code controllable by DEBUG. In the end, a special request. If I argue with someone, it is to obtain useful professional knowledge or at least an alternate opinion. Therefore it should be taken as one professionals respect to other. I remember my hot debate five years ago with one Antoon Os on keyed physical file. He was stubborn enough to argue with me until I was convinced. I still value his argument and would always respect him for what he gave me.
                        Code

                        Comment


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

                          It is not what is better or worse, it is whether existing code converts as is, or worse, might seem too but works differently in obscure ways. With the workloads I have seen whereever I've been, it is incomprehensible to me that a working program would be converted unless it is all but assured to continue working the same. The RPG/400 to RPG IV conversion is such a conversion. Otherwise extensive testing with the business is required, and the list of extensive testing needed with the business is already far too long for critical new projects. At least in any business running the AS/400 I've ever seen. rd

                          Comment


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

                            > "Almost as bad (with all due respect, Jon) is the argument about "it's not a migration path". "
                            It was never my argument Joe - and I thought I made it clear that I was stating IBM's POSITION. It is not and never was my position.

                            Comment


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

                              > What really gives me heartburn though, is the lack of support for MOVEA.
                              Not me - I'm happy to see the back of it. I have been forced to try to work my way through way too many programs that include gems like: MOVEA '0010111001001' *IN(75) For "real" array moves there's a simple Eval and for partial moves there's %Subarr. The rest can be covered thru a DS.

                              Comment


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

                                > For some reason I thought I could only use the MONITOR command in /free mode. Am I wrong?
                                Yes. The only commonalty between MONITOR and /Free is that both were introduced in V5R1.

                                Comment

                                Working...
                                X