MC Press has books on this subject.
He is a link to one of them,
The “complete reference” is right where all references always are — in the Information Center for the version/release that you work with. For V5R4, the reference is at <a href=”http://publib.boulder.ibm.com/infocenter/iseries/v5r4/topic/rzahg/rzahgrpgile.htm”>Programming: RPG ILE</a>. The ILE RPG Reference is the “reference” for V5R4. The other links on that page are usage guides and supplementary material.