Unconfigured Ad Widget

Collapse

Announcement

Collapse
No announcement yet.

10 New Functions We'd Like to See in RPG IV

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

  • #31
    10 New Functions We'd Like to See in RPG IV

    ** This thread discusses the article: 10 New Functions We'd Like to See in RPG IV **
    Remember, when IBM adds a feature, they do NOT take an existing feature away.

    Comment


    • #32
      10 New Functions We'd Like to See in RPG IV

      ** This thread discusses the article: 10 New Functions We'd Like to See in RPG IV **
      I understand your sense of frustration with /free. I've no objection to writing free-format code, but the implementation of free-format RPG does have some odd quirks. SQL by nature is free format, but in order to embed SQL in RPG, I must first exit free-format RPG. I have to use fixed-format (C in column 6) RPG in order to enter free-format SQL statements. Huh? In service programs, where I often have multiple procedures defined, RPG forces me to exit free-format in order to define P and B specs. Is it just me, or does anyone else see the irony in the fact I have to exit free-format to define a sub-procedure, but not a subroutine?

      Comment


      • #33
        10 New Functions We'd Like to See in RPG IV

        ** This thread discusses the article: 10 New Functions We'd Like to See in RPG IV **
        I believe that a parameter not passed already has a default value - null.

        Comment


        • #34
          10 New Functions We'd Like to See in RPG IV

          ** This thread discusses the article: 10 New Functions We'd Like to See in RPG IV **
          Personally, the inability to handle multi-dimensional arrays like every other language is inexcusable. How hard could it be to implement this instead of making us jump through hoops to simulate it? I'm working on a program to sum and average multiple columns and rows and a two-dimension array would make the job so much easier than the usual workarounds.

          Comment


          • #35
            10 New Functions We'd Like to See in RPG IV

            ** This thread discusses the article: 10 New Functions We'd Like to See in RPG IV **
            They should be a part of RPG.

            Comment


            • #36
              10 New Functions We'd Like to See in RPG IV

              ** This thread discusses the article: 10 New Functions We'd Like to See in RPG IV **
              We are writing some screen programs that are quite large. It would be nice to have more than 99 indicators, mainly for displaying data and performing certain display functions within SDA.

              Comment


              • #37
                10 New Functions We'd Like to See in RPG IV

                ** This thread discusses the article: 10 New Functions We'd Like to See in RPG IV **
                I initially thought you were off the mark on arrays. Most of this can be done, but it is darn confusing on the overlays, etc.

                Comment


                • #38
                  10 New Functions We'd Like to See in RPG IV

                  ** This thread discusses the article: 10 New Functions We'd Like to See in RPG IV **
                  Yes the hyphen in eval-corr has got to be stopped. Looks too much like a subtraction operation.

                  Comment


                  • #39
                    10 New Functions We'd Like to See in RPG IV

                    ** This thread discusses the article: 10 New Functions We'd Like to See in RPG IV **
                    I guess I'm not so hung up on /free not supporting the exact syntax that I want
                    Code

                    Comment


                    • #40
                      10 New Functions We'd Like to See in RPG IV

                      ** This thread discusses the article: 10 New Functions We'd Like to See in RPG IV **
                      I guess I'm not so hung up on /free not supporting the exact syntax that I want
                      Code

                      Comment


                      • #41
                        10 New Functions We'd Like to See in RPG IV

                        ** This thread discusses the article: 10 New Functions We'd Like to See in RPG IV **
                        I've not had a need for so many indicators on a screen since I stopped using screen arrays to hold all my fields, which was what I was limited to on the S/36; and started using subfiles. Actually it seems that most code is swinging the other way with named indicators, INDARA, etc.

                        Comment


                        • #42
                          10 New Functions We'd Like to See in RPG IV

                          ** This thread discusses the article: 10 New Functions We'd Like to See in RPG IV **
                          Just look at testn. IBM's belief is that 123N is a valid numeric because of the sign may be interposed on the last digit. This may have been a valid thought when we used to use flat files and actually had to verify the data in the flat files (or key-to-diskette files). However it's rather obsolete in verifying something keyed in to a screen.

                          Comment


                          • #43
                            10 New Functions We'd Like to See in RPG IV

                            ** This thread discusses the article: 10 New Functions We'd Like to See in RPG IV **
                            I've always wanted to be able to typedef data structures in RPG. For those of you not familiar with "typedef" it's an import from "C" that allows one to describe data storage without the compiler actually allocating storage for it. The definition can then be used to declare storage in other parts of the program. If the definition needs to be changed all one has to do is recompile the modules. In addition typedef can be used on more than just structures. It can be used to describe any kind of storage from an integer to an array. IBM gave us part of the feature with the LIKEDS keyword, but it didn't go far enough because you could only use existing data structures that took up actual storage in the program. With TYPEDEF one can describe structures in /COPY members without fear that they'll end up as actual storage in the global storage area. This is how I imagine it to work:
                            Code

                            Comment


                            • #44
                              10 New Functions We'd Like to See in RPG IV

                              ** This thread discusses the article: 10 New Functions We'd Like to See in RPG IV **
                              Move Corresponding (EvalMap) Opcode -Leave out the hyphen!!! I can't think of a situation I would use this in. %RANGE, %VALUES, %MIN, %MAX, etc. Built-In Functions - Bring them on ASAP!!! %ISxxxx Built-In Functions - Builtins would be nice, but the C functions are only slightly more work than all of the % signs. Initialization of Arrays - Could have used this capability several times. Easily defined multi-dimensioned arrays would be good. Typeless Parameters on Subprocedures Default Parameter Values Improved Performance with Large Return Values I use a 3 parameter style (pointer to struct, struct size, struct format/name) on procedures to get these functionalities. Multiple Statements per Line on Conditional Logic (/free) - Yes. Better free format syntax, YES!!! Compile-time and Runtime Support for Add-on Libraries - Yes!!! Inline Function for Procedure Optimization - Couldn't hurt, could it? Personally I would like to see the /Free-/End-Free requirement dropped before anything else.

                              Comment


                              • #45
                                10 New Functions We'd Like to See in RPG IV

                                ** This thread discusses the article: 10 New Functions We'd Like to See in RPG IV **
                                I am surprised by this one. From your syntax, shouldn't it be passing the variables by reference and therefore only passing the address to the memory location and not all the data. If it only passes the address, why would the size of the variable matter. I have wondered about passing around large variables as well and had been told not too worry because only the address is being passed around, not the data. Is this incorrect?

                                Comment

                                Working...
                                X