December 13, 2021 Ted Holt
When I first learned to program computers (RPG II, COBOL 74), the only kind of variables I knew of were global variables. Any statement within a program was able to use any variable. It was not until I started my computer science degree that I found out about local variables, which are known to only part of a program. Since that time, it has been my practice to use local variables as much as possible and global variables only when necessary.
Ideally an RPG program, service program, module, or subprocedure would have no global variables at all, but I don’t …Read more