\[~ann.campbell.2] It seems that we have to accept more than just "SQLCODE". https://www.ibm.com/support/knowledgecenter/SSSNY3_10.1.0/com.ibm.db2.luw.apdv.embed.doc/doc/c0006155.html["SQLSTATE" is also standard].
Moreover, I could find COBOL code which seems to use a custom code. I think we should add a parameter to this rule to list alternative names which can be tested. This parameter could be named "sqlcode_alternatives" (just an idea). What do you think?
\[~ann.campbell.2] After some investigations, I still don't understand how COBOL code can use "custom codes". Let's forget the parameter for now and just accept both "SQLCODE" and "SQLSTATE".