Today’s Special: Data Area Surprise!
January 25, 2006 Ted Holt
Data areas are as handy as pockets. Maybe that’s because they are like pockets in that you can stuff things into them. RPG, like other iSeries programming languages, can read and modify data areas. In fact, RPG allows for two different data area I/O methods, and one of them has a “feature” that could give you a nasty surprise!
If you want an RPG program to read and/or change a data area, you have two options. You can let the RPG cycle handle the input and output operations, or you can control the I/O by hand. The easier method is