Guru: Overloading Subprocedures
October 5, 2020 Paul Tuohy
The ability to overload subprocedures in RPG is something I had been waiting for a long, long time. IBM finally made it available through a Technology Refresh (7.4, TR1 or 7.3 TR7). If you are not familiar with the term, overloading (in RPG) is the ability to create multiple subprocedures of the same name with different implementations.
Let’s have a look at how overloading might benefit us when it comes to writing programs and subprocedures. This is a portion of a prototype copy member that, amongst others, contains the prototypes of these three subprocedures:
dcl-pr format_from_Date varChar(10) extProc(*dclCase); dateIn date(*ISO)… Read more