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

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

    Luckily, the cremation ceremony of our Unix box is underway and with it will go the god farsaken VI. I have completely ported the entire system to AS/400. How did I convince them? I showed them what Query/400 can do that VI can not do. Then I showed them what SQL can do. Then I went on to show the prototype programs I wrote as a replacement of Unix programs. They liked the enhanced functionality and approved the project. VI sank the Unix ship and gave extra life AS/400. P.S. The rest of your article was exactly my sentiment. A multi-platform guy would never like fixed format.

    Comment


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

      mostly for it's portability.. i mean sure u now can access a 400 remotely but knowing that one can use any editor and then simply cut and paste codes like that is a real breather.. anyway, that's just what i think.. so u all may rant all u want but am still for free-form.. just unfortunate that i can't practice it much since am under one of those shops who jo referred to as those who'd rather not move to new and improved versions of rpg if the old one still works!.. ;>

      Comment


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

        ** This thread discusses the article: IMHO: Is RPG Free-Form a Cat in Tiger's Clothes? **
        This is a discussion about IMHO: Is RPG Free-Form a Cat in Tiger's Clothes?.

        Click here for the article.

        Comment


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

          ** This thread discusses the article: IMHO: Is RPG Free-Form a Cat in Tiger's Clothes? **
          Indenting! That is the first fruit of free format languages including Cobol, C, Java, and all others. It makes the program readable. Who needs the abominable MOVE? It is good it see go. Good riddance! No more usage of MOVE and MOVEL to concatenate. No more slippery conversion of alpha into numeric by usage of MOVE. Not supporting move is the next best thing to not supporting GOTO. Yeah, lot many would still argue that there are occasions where a GOTO is absolute necessity! Maybe you should have mentioned that "drawback" of /free too, i.e. it does not support GOTO. I am sick of this discussions and would not have thrown my two cents if it were not from a guru like you.

          Comment


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

            ** This thread discusses the article: IMHO: Is RPG Free-Form a Cat in Tiger's Clothes? **
            The one thing I have found in "/free" that is not available otherwise, is the ability to update a single field, rather than the entire record. This is occasionally useful. Dave

            Comment


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

              ** This thread discusses the article: IMHO: Is RPG Free-Form a Cat in Tiger's Clothes? **
              Hassan, I don't usually argue with you, but this is a topic that's quite important to me. Those of us who have programmed RPG for a living for a few decades understand the importance of the MOVE instruction. MOVE allowed you to avoid setting up data structures (which cause you to flip through code) and avoid %subst, and avoid things like %char and %dec. MOVE is simple, fast and elegant. It is the essence of polymorphic programming. But more important to me was the fact that there are millions (no, probably BILLIONS) of MOVE instructions out there in legacy code, and because there isn't even a %move BIF, in order to move those legacy programs to /free each MOVE instruction will have to be inspected to determine how to convert it. Rant all you want about "slippery" this and "abominable" that. The MOVE instruction was and still is very powerful, and if a single opcode confuses you then I don't give you much of a chance to figure out polymorphism or an EXCEPTION JOIN with COALESCE. Joe

              Comment


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

                ** This thread discusses the article: IMHO: Is RPG Free-Form a Cat in Tiger's Clothes? **
                In the past, you could have done this by setting up O specifications over the record format of the file that you wanted to update and issue and excpt to that o spec. I agree that the %fields built in function is much better

                Comment


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

                  ** This thread discusses the article: IMHO: Is RPG Free-Form a Cat in Tiger's Clothes? **
                  I like free form because you don't have to define key lists. Example: If you need to chain to file "Customer" using 3 fields, the free form line would be Chain (field1:field2:field3) Customer; I like that!

                  Comment


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

                    ** This thread discusses the article: IMHO: Is RPG Free-Form a Cat in Tiger's Clothes? **
                    The reason I love RPG-free: it's a lot faster to code because it requires less key strokes. Lack of redundancies (accumulators, etc.), the use of expressions in place of many lines of calculations, and the omission of implied op codes (e.g., eval) gets the program ready for production much sooner. Here we are, trying to crunch data in picoseconds -- isn't an increase in human productivity worth anything? And ah, the readability! How can a vast improvement in readability not speed up mods, maintenance and enhancements? I'm not recommending that we rewrite old code in free format; I think we've all got enough to do already. But I have yet to see a good argument for not writing new code in free format. BTW, didn't we go through this with Bob Cozzi last week?

                    Comment


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

                      ** This thread discusses the article: IMHO: Is RPG Free-Form a Cat in Tiger's Clothes? **
                      "Lack of redundancies (accumulators, etc.)" What does this mean? "Eval MyNum += 1" is certainly allowed in columnar RPG. ;-) Chris

                      Comment


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

                        ** This thread discusses the article: IMHO: Is RPG Free-Form a Cat in Tiger's Clothes? **
                        You can convert between date and numeric fields in /Free by stacking built-in functions. Examples:
                        Code

                        Comment


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

                          ** This thread discusses the article: IMHO: Is RPG Free-Form a Cat in Tiger's Clothes? **
                          "eval field1 += field2" vs. "field1 += field2" // 4 less keystrokes X how many lines of code?

                          Comment


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

                            ** This thread discusses the article: IMHO: Is RPG Free-Form a Cat in Tiger's Clothes? **
                            WebSphere will convert ILE RPG to free-format: open your source member and press Source/Convert All to Free-form. It's a little kludgy with the right-hand indicators for file IO, but everything else seems to convert cleanly. If the source isn't in ILE yet, use the CVTRPGSRC command from a command line (or set up an option in PDM to do it).

                            Comment


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

                              ** This thread discusses the article: IMHO: Is RPG Free-Form a Cat in Tiger's Clothes? **
                              "But more important to me was the fact that there are millions (no, probably BILLIONS) of MOVE instructions out there in legacy code, and because there isn't even a %move BIF, in order to move those legacy programs to /free each MOVE instruction will have to be inspected to determine how to convert it." So legacy code cannot be easily converted to free-format. Who cares? I don't understand this argument at all. What is the problem with having some programs in free format and some in fixed?

                              Comment


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

                                ** This thread discusses the article: IMHO: Is RPG Free-Form a Cat in Tiger's Clothes? **
                                For me the fact that it is free-form is enough incentive but since you asked ... There are a number of things already added to the compiler that only work in /Free: 1) %KDS - key data structure for CHAIN/SETLL/etc. 2) Even better is the ability to simply list keys in parens - the fields used don't even have to match exactly. 3) %Fields to specify those fields that are to be updated. Sure you can do this with EXCEPT but many programmers are lazy and used UPDATE with a comment that said "only fields x and y are updated" - yeah - right! 4) Although in theory the V5R4 XML-INTO can be used in fixed form, there's not enough room for an op-code extender. So it works better in /Free 5) You don't have to get frustrated at the wasted left-hand whitespace when you are forced to split a line becuase one or two characters overflow! 6) Most Opcode/Factor oriented operations can have an expression as a factor by enclosing in parens. e.g. Dsply ('This is the count: ' + %Char(myCount) ); 7) At the risk of annoying Joe - when you see a MOVE replacement you know what is going on without investigating data types/sizes. MOVE caused so many errors I am not sorry to see it go. There is more - and will be more in the future. It is important to note though that IBM never intended /Free to be a conversion target - which is why the MOVE debate never MOVEd them . That said, LInoma's tool does a very good job of working out how to do the conversion. Jon Paris

                                Comment

                                Working...
                                X