ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

Change opcodes to free format

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

  • #46
    Re: Change opcodes to free format

    Looks like your standard and mine are pretty close DAG0000

    Comment


    • #47
      Re: Change opcodes to free format

      Originally posted by Rocky View Post
      they sent the code to a 2 yr college twice a day - they'd compile the RPG code and send back the listing - basically had 2 shots a day so make them count! Memories.... LOL
      Good story, Rocky. It reminds me of my CS days, a few years after that.

      When I did my computer science degree, I taught COBOL as a graduate assistant. Some of my students who knew that I programmed RPG on the side (no student loans for me!) went to the department head and asked if I could teach an RPG class to increase their job prospects upon graduation. He nixed the idea.

      Later, when I took his graduate data structures class, he asked us the first day to answer some questions for him. One of them was to list the programming languages we knew. I didn't bother to mention RPG, since I didn't figure he would be interested in that one, but one of my fellow students did. He took up the papers and read them to the class. When he got to my fellow student's paper, he said, "RPG? That's not a programming language. It's a sin."

      Comment


      • #48
        Re: Change opcodes to free format

        Originally posted by JonBoy View Post
        I have no issues with increasing the line length - just like to see some limit that stops the real idiots in their tracks. But what is "big enough"? For me I feel I only need another 20 or so, so extending to 132 would probably be enough - but I know others would disagree.
        IMHO, there should be no limit to the line length. (Or, if it's necessary to have some sort of limit, make it something like 32k) On the compile listing, simply wrap the line as many times as you need.

        I really don't think stopping "the real idiots in their tracks" is necessary here. Since in most cases RPG limits you to one statement per line, it can't really be abused. Nobody is going to start using 4000 character variables just because of the line length -- or, if they do, it'll surely be better on a very long line vs. wrapping it with elipses!

        This is something that would be really hard to abuse.

        Comment


        • #49
          Re: Change opcodes to free format

          ... Since in most cases RPG limits you to one statement per line...
          I'm not sure I follow - free format I can have one statement spread over many lines - and I know I don't know nearly as much as you do so I'm missing something...

          Code:
                     IF (*IN22 = *ON)
                       And (@@PACT <> 'I')
                       Or (*IN23 = *ON)
                       And (@@PACT <> 'I');
          Or

          Code:
                     IF *IN22 = *ON And @@PACT <> 'I' Or *IN23 = *ON And @@PACT <> 'I';
          Same code - just how it's formatted.

          But in reality to me the problem is more likely to be something like:
          Code:
            Update TAXLIB / f5706 b  Set b.$f$nam = (Select a.$f$nam From f5706 A Join f57rel c On a.$f$pcl = c.rprcl1 Join f5706 b1 On c.rprcl2 = b1.$f$pcl Where b.$f$pcl = b1.$f$pcl And rtaxyr = :taxyr And  b1.$f$fl1 = 'P' And  a.$f$fl1 = 'P') Where b.$f$fl1 = 'P' And Exists   (Select * From f57rel c1 Join f5706 b2 On c1.rprcl2 = b2.$f$pcl Where b2.$f$fl1 = 'P' And b.$f$pcl = b2.$f$pcl And rtaxyr = :taxyr);

          As opposed to something like:
          Code:
          Exec Sql                                                 
            Update TAXLIB / f5706 b                                
              Set b.$f$nam = (Select a.$f$nam                      
                                From f5706 A                       
                                Join f57rel c                      
                                  On a.$f$pcl = c.rprcl1           
                                Join f5706 b1                      
                                  On c.rprcl2 = b1.$f$pcl          
                                Where b.$f$pcl = b1.$f$pcl And     
                                      rtaxyr = :taxyr And          
                                      b1.$f$fl1 = 'P' And          
                                      a.$f$fl1 = 'P')              
              Where b.$f$fl1 = 'P' And                             
                    Exists                                         
                (Select *                                          
                   From f57rel c1                                  
                   Join f5706 b2                                   
                     On c1.rprcl2 = b2.$f$pcl                      
                   Where b2.$f$fl1 = 'P' And                       
                         b.$f$pcl = b2.$f$pcl And                  
                         rtaxyr = :taxyr);
          Or worse - selecting all of the fields of a 70 column table listed one by one in the SELECT statement - all in one line.... ie SELECT FIELD1, FIELD2, FIELD3, ... FIELD70 FROM FILE1 WHERE ....

          Arguably this can be done via shop standards to avoid all of this - but I'd much rather see the latter than the former.

          Comment


          • #50
            Re: Change opcodes to free format

            I think he means you can't put multiple statements on a single line. Like:
            If x = y; x = y*4; endif;

            Comment


            • #51
              Re: Change opcodes to free format

              Ok - so what you're saying is he's saying that a new statement has to start on a new line... which makes sense.

              In order to free up the record length tO > 240 they would have to cut totally from SEU - people who use RPG - or rather ILE RPG will essentially be REQUIRED to use a external editor at that point.

              Comment


              • #52
                Re: Change opcodes to free format

                Yep, jtaylor is correct, that's what I was referring to.

                SEU already doesn't understand free-format H,F and D specs, or any other features newer than the GA date of 6.1. The fact that it won't support lines larger than 240 seems minor by comparison to those things... I don't think most shops would ever use a length greater than 240 -- but, if they did, the fact that SEU doesn't support it doesn't seem like a huge concern. I mean, SEU doesn't support ANYTHING new.

                Comment


                • #53
                  Re: Change opcodes to free format

                  I kind of wonder if that it's already in the road map since you can put ILE RPG source as a stream file, which would lend itself more to source that can have an undetermined line length more so than a source file.

                  Comment


                  • #54
                    Re: Change opcodes to free format

                    Originally posted by Rocky View Post
                    I kind of wonder if that it's already in the road map since you can put ILE RPG source as a stream file, which would lend itself more to source that can have an undetermined line length more so than a source file.
                    Well, I know that Barbara has thought about it. But, that doesn't necessarily mean that it's officially on the "roadmap". I know that she told me that the main roadblock was the compile listing, which can only be 132 columns wide, so changes would need to be made to the way it works. But, unless there's enough customers asking for it, I don't think (I could be wrong) that IBM will make the extra effort to solve the problem. They'll concentrade on what customers are asking for... so for those that think this is important, you should ask for it, file a requirement (or add your vote to an existing requirement if there is one.)

                    Really, it doesn't hurt to do this.

                    Comment


                    • #55
                      Re: Change opcodes to free format

                      Interesting they view 132 as the limitation - I submit that for all practical purposes 198 is the limitation... that said how does the virus world (AKA Windows) handle it since they aren't even printing on as wide a printer as we do for the most part (greenbar is what - 13.2" wide - laser is typically 11" Landscape border to border - legal is what - 14")?

                      It could be as simple as wrapping it around after 198 (or 132 if that limit is decided to be a hard limit) - if programmers don't like it that's their choice for specifying such long lines to begin with - they'll just have to choose to do all of their work via a development tool such as RDi.

                      I'd vote for it (I'd even write it up if it's not there) - I just forget where to go to do this...

                      Comment


                      • #56
                        Re: Change opcodes to free format

                        Originally posted by Rocky View Post
                        ...
                        I'd vote for it (I'd even write it up if it's not there) - I just forget where to go to do this...
                        Like Jon Paris and Susan Gantner pointed out a few weeks ago in their blog, RPG doesn't have a formal RFE process.

                        Comment


                        • #57
                          Re: Change opcodes to free format

                          I know of two ways of requesting an enhancement to RPG. (1) File a Design Change Request (DCR) with IBM or (2) Submit a requirement with the COMMON Americas Advisory Council (CAAC).

                          I've found the 2nd method to be extremely effective. You can do it at the following link. If you don't have an account, you can create one for free, no COMMON membership required

                          Comment


                          • #58
                            Re: Change opcodes to free format

                            Thanks Scott,

                            Did a search and don't see anything on this - when I went to create a requirement it gives me an error... gotta love technology LOL. I'll contact COMMON.

                            Comment

                            Working...
                            X