A common Sample Subfile Program in RPG ILE - is it any good?
I didn't write this and it's been around since 2012. It's been stored in one of my old code sample folders on dozens of PC's over the last years.
SPOILER ALERT - The code does not compile straight out of the box. It is missing some copybook members. I solved the problem by making various small tweaks and re-writing the message handling copybooks to remove the need for the missing ones. It's not the most beautiful thing and this RPG source code does not bring me joy.. but.. it's a good example to walk through if you are learning RPG ILE.
Come with me while we step through the code, discuss what it's doing and why it's doing it.
Then we can compile it. Fix any problems we find along the way and finally... hopefully... end up with a working program.