Starting from scratch
If you've never programmed in any flavor of RPG, and you need to learn it from the ground up, there are two books that I recommend:
Programming in RPG IV, Fourth Edition
by Bryan Meyers and Jim Buck
This is a tutorial-style book that teaches you RPG from the beginning. It's an ideal book for both teaching yourself RPG and for a textbook for an RPG class.
The Modern RPG IV Language
by Bob Cozzi
This book has some tutorial-style information, but is more focused on acting as reference material. Once you've learned the language, you'll want a quick way to look up and use the operations that are available, and that's where this book comes in handy.