ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

Upcoming RPG enhancements for spring 2021 announced today

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

  • Upcoming RPG enhancements for spring 2021 announced today

    The upcoming RPG enhancements with PTFs for 7.3 and 7.4 were announced today.

    They'll be available soon, but they might be a bit later than the Spring 2021 TRs. I'll post an update when the RPG PTFs are available.

    See https://ibm.biz/rpg_cafe#announcement

    - New built-in functions %LOWER and %UPPER

    - New built-in function %SPLIT

    - EXPROPTS(*STRICTKEYS) to have stricter rules about %KDS and a parenthesized list of keys.

  • #2
    Thanks, Barbara! All three of those BIF's will be super useful.

    I really appreciate all you and the others do to help us get our jobs done.

    Comment


    • #3
      %Upper, %Lower and %Split will all be very useful. Thanks, Barbara!

      Comment


      • #4
        Yes! These BIFs are awesome!

        Thanks Barbara and team!

        Comment


        • #5
          Great, thank you! Finally, I can throw away my old homemade procedures fKlein, fGross and fTextInArray :-)

          Do %Lower and %Upper make use of the same logic as the lower() and upper() sql functions?
          I learnt that the latter don’t properly translate German umlauts.

          Markus

          Comment


          • #6
            Originally posted by Scholli2000 View Post
            Great, thank you! Finally, I can throw away my old homemade procedures fKlein, fGross and fTextInArray :-)

            Do %Lower and %Upper make use of the same logic as the lower() and upper() sql functions?
            I learnt that the latter don’t properly translate German umlauts.

            Markus
            Markus, I believe umlauts are supported correctly. %lower('ÅNGSTRÖM') returns 'ångström' and %upper('ångström') returns 'ÅNGSTRÖM'.

            But SQL lower() and upper() also return correct results for those strings. Do you know of a specific character that is not properly translated by SQL lower() and upper()?

            Comment


            • #7
              Thanks Barbara,

              here you are:

              Code:
              select lower('ÖLÜBERLÄNGE') from sysibm.sysdummy1
              
              [B]Result:[/B]
              LOWER
              ÖlÜberlÄnge
              
              -----
              select upper('ölüberlänge') from sysibm.sysdummy1
              
              [B]Result:[/B]
              UPPER
              öLüBERLäNGE
              Best,
              Markus

              Comment


              • #8
                Originally posted by Scholli2000 View Post
                lower() and upper() sql functions?
                I learnt that the latter don’t properly translate German umlauts.

                Markus
                Markus,
                they do!
                But your job or your column has to have a CCSID. Then it will be converted not only in German but also other languages.
                ... I could imagine that the RPG functions also need a CCSID for converting.
                My job has CCSID 273. Please check whether your job has CCSID 65535.

                Click image for larger version

Name:	Convert Upper Lower.jpg
Views:	160
Size:	14.2 KB
ID:	155350

                Birgitta

                Comment


                • #9
                  Thank you Santa Barbara!

                  Looking forward to getting my hands on these!

                  Ironically, I had just managed to convince the shop of the advantages of using embedded SQL e.g. "exec sql set :var1 = upper(:var2);" for case conversions - many of the team were still using %XLATE() with lower case and upper case character lists

                  Comment


                  • #10
                    Hallo Birgitta,

                    danke für den Hinweis!

                    I have to apologize, I checked, and it only happens in an STRSQL session--not in RPG.

                    The job definition for the interactive STRSQL as well as the interactively called RPG is
                    Code:
                    Sprachen-ID . . . . . . . . . . . . . . . . . . . : DEU
                    Landes- oder Regions-ID . . . . . . . . . . . . . : DE
                    ID des codierten Zeichensatzes (CCSID) . . . . . : 65535
                    Standard-ID des codierten Zeichensatzes . . . . . : 273
                    Special characters of other languages are correctly converted.

                    Code:
                    UPPER
                    [COLOR=#2ecc71]Å[/COLOR]NGSTR[COLOR=#c0392b]ö[/COLOR]M
                    But I’m afraid we’re getting a bit off-topic.

                    Comment


                    • #11
                      The 7.3 and 7.4 PTFs for the spring 2021 RPG enhancements are available now.

                      7.3
                      ILE RPG runtime: SI76098 - Warning: you need this PTF on any 7.3 system where you run a program with %LOWER, %UPPER, or %SPLIT
                      ILE RPG compiler: SI76100

                      7.4
                      ILE RPG runtime: SI76099 - Warning: you need this PTF on any 7.4 system where you run a program with %LOWER, %UPPER, or %SPLIT
                      ILE RPG compiler: SI76101
                      ILE RPG compiler for TGTRLS(V7R3M): SI76109



                      Comment

                      Working...
                      X