Modern RPG : Sub Procedures

About Modern RPG : Sub Procedures

RPG subprocedures offer several advantages over subroutines, making them a preferred choice for many developers. Let's dive in and find out more...

Module Content

RPG subprocedures offer several advantages over subroutines, making them a preferred choice for many developers. Let's dive in and find out more...

An IBMi RPG sub-procedure is a modular piece of code within an RPG (Report Program Generator) program on the IBM i Power System (the replacement for the IBM iSeries and even older AS400).

Probably my favorite RPG enhancement over the years. Coming from RPG3/400 to RPGLE this is something you will definitely need to learn. It’s been used extensively everywhere I’ve worked since leaving the boundaries of ‘JBA’ code and Green screen land

in RPG (Report Program Generator), subprocedure parameters can be optional. This is achieved by specifying default values for the parameters in the procedure interface. When a parameter has a default value, it can be omitted when the subprocedure is called, and the default value will be used instead. So, let's play with an example and look at OMIT and NOPASS

IBM is adding all kinds of new tweaks to RPG with each new release of IBM i. RPG ON-EXIT is a great example of a neat tweak to the RPG programming language. In 2016, IBM quietly introduced a rather neat new function called “ON-EXIT” to our sub procedures in RPG.

Ready to learn?
{"email":"Email address invalid","url":"Website address invalid","required":"Required field missing"}
>