Note that RPG 4 can do just about anything that could be done by earlier versions of RPG such as RPG/400 and an enormous volume of additional capabilities.
Program Status Data Structure
Workstation Data Structure
Locate field value field name
What does BINARY(4) mean in API documentation?