In a famous Henny Youngman joke, a patient says, “Doctor, it hurts when I do this,” to which the doctor replies, “Then don’t do that.” Corny jokes aside, I have spent decades trying to identify programming practices that hurt when I do them, and having identified them, cease to do them. A case in point is the misuse of the variables that the SQL precompiler defines in my RPG programs, variables such as SQLCODE, SQLSTATE, and SQLER3.
“So what,” I hear you ask, “is the problem with these variables? ” Well, they’re global, and global variables are evil. Global …
The post Guru: Beware of SQL Precompiler Variables appeared first on IT Jungle.