PowerWire.eu

Independent IBM i, AIX and Linux news and tech tips for Europe and beyond

  • Home
  • News
  • Technical Articles
    • IBM i
    • AIX
    • Linux
    • VIOS
  • Subscribe
  • About Us
  • Contact Us
  • Advertise with PowerWire.eu

RPG 2017 Updates

February 24, 2017 by Andy Youens

RPG 2017

During the latest round of IBM i Technology Refreshes, TR2 for version 7.3 and TR6 for version 7.2 enhancement, IBM also introduced three enrichments for RPG.

These changes will be released as individual PTFs, around the April 2017 timespan, as with the Technology Refreshes.

Let us take a look at these.

These are:

  • Nested data-structures
  • New %Max and %Min built in features
  • Align(*Full) Keyword

Each of these new features came through the RFE (Request for Enhancement) route, which shows how worthwhile this process is.  IBMs RFEs can be seen on the DeveloperWorks website, which can found here.

Let me go through each of these new changes.

Nested data-structures

The first one on the list, the nested data-structures is a very useful feature that allows many data-structures to be encompassed within another data-structure.

In the figure below, we can see that we can now hold customer details for both the billing and the shipping addresses all incorporated within the main customer data-structure.

AY Feb17 01

We can see in the figure below how we populate these embedded fields.

AY Feb17 02

 

New %Max and %Min built in features (BIFs)

These two new built in functions will return a value from a set of arguments.

The %Max function will return the maximum value from a set.

And to follow on, %Min will return the minimum value out of a set.

There is no maximum number of arguments it will test, but obviously there must be at least two.

How many of us have been coding this functionality in a subroutine, you are not alone, a useful addition IBM.

We can see both these built-in functions in use below to determine the oldest and youngest dates.

AY Feb17 03

Align(*Full) Keyword

The new keyword option Align(*Full) for data-structures, is a requirement when calling certain C functions from within RPG.

Without this new keyword, RPG data-structures are smaller than the C structures, which can cause memory issues.

Conclusion

With all the euphoria about Open Source on our favourite server, its great to see IBM still looking to enhance their main programming language.

Thanks to Barbara Morris at IBM for the heads-up on these enhancements.

If you have any questions concerning RPG, please get in touch, I’m sure we can help.

I’m looking forward to the next round of the i-UG user group meetings this year in the UK.  Hopefully we can meet up at the Rochdale and London events in March.  Full details can be found on the iUG site here.

Andy Youens is an IBM i consultant/instructor at Milton Keynes, UK-based FormaServe Systems.

Related Posts

  • DB2 Field Procedures – TestingDB2 Field Procedures – Testing
  • RPG – What’s New in 7.3RPG – What’s New in 7.3
  • Using PHP and RPG to Communicate Together With DataQueuesUsing PHP and RPG to Communicate Together With DataQueues
  • Midnight CommanderMidnight Commander
  • The Joys of System36 – Update your flat files via SQLThe Joys of System36 – Update your flat files via SQL
  • Do I need to pay for Java?Do I need to pay for Java?

Filed Under: IBM i, Technical Articles Tagged With: IBM i, IBM Power Systems, RPG, system management

Free monthly newsletter signup

News

Seiden Group Announces Free Access to
CommunityPlus+ PHP for IBM i

— Enhanced PHP RPMs come with optional setup & support services — Ho-Ho-Kus, NJ, January 6, 2021 … [Read More...]

ARCAD releases Azure DevOps integration for all-in-one CI/CD automation on IBM i

New ARCAD for DevOps release enables rapid automation of IBM i application build and deploy within any … [Read More...]

Cloud Walkers bring new tools to IBM i administrators

Cloud Walkers s.r.o is a new company that has been set up by Bartlomiej Grabowski who is an IBM Champion, … [Read More...]

More articles from this section

Quick Links

  • Advertise
  • Subscribe

Follow Us…

  • Email
  • LinkedIn
  • Twitter

Search This Website

Copyright © 2021 · Cue Communications · All Rights Reserved · RED NOISE MEDIA

Copyright © 2021 · Magazine Pro Theme on Genesis Framework · WordPress · Log in

This site uses cookies More info