Welcome to RPGBeans.com. RPGBeans is the name I've given to my Service Program File Encapsulation approach, techniques and tools. JavaBeans™ is Sun™ Microsystems's component architecture for Java2. Using the name RPGBeans is not meant to imply that this approach is equivalant to JavaBeans™, but I did get most of my encapsulation ideas from Java and Object Oriented languages in general. I have to admit I almost named the project "GreenBeans" but I just couldn't talk myself into it.
Encapsulating file access is a technique derived from Object Oriented methodology. The idea is straight forward enough: have one source member and program object that encompasses all of the access and manipulation activity for a single database table. This approach allows the developer to control how a file is accessed, which means one can implement rules and enforcement. These rules and implementations are consequently hidden from user-developers, meaning that they do not need to know the nitty-gritty details of the file in order to use it safely. Encapsulation can also provide a serious advantage to the maintenance programmer: by having a single repository for all procedures and actions related to a particular file, the maintenance programmer need only make changes, such as adding new fields or rules, to a single Service Program object.
While Service Programs do not provide us with full OO abilities, we can mimic some of the OO style in a service program. Some of this is straight-forward, such as using getter() and setter() methods to publically access the private data stored within the Service Program. Some of this is by careful design, such as using Named Activation Groups when we want to share the data across program bounderies. I think the possibilites of this approach have yet to be fully realized. I've been publically praised and criticized for advocating this approach. If nothing else, I think that pushing the thought process and capabilities of our RPG techniques can only benefit us all in the long run.