Thanks for the feedback.
Actually, error 29 is defined in SQL.DEF as:
define SQLERR_NESTIGNORE = 29 ! [112] nested CLOSE_LIB ignored
But the SQLTEST4 program is using an older version of the error message function - Fn'AshSQL'Error'Descr$(rc) - instead of the newer one Fn'SQL'ErrMsg$(cmdhdr) in the sql:fnsqlerr.bsi module. That's why it wasn't getting reported. (I'll put it on the list of things to update!)
The SQLERR_NESTIGNORE status is returned from the SQLOP_CLOSE_LIB when there have been more SQLOP_INIT_LIB calls than SQLOP_CLOSE_LIB calls. This can occur when a program or SBX is unaware of the global init status of the library and issues its own init in order to perform some SQL operations. In that case, when it issues the close operation, we don't really want to close the library for the entire instance of A-Shell. So instead, it just returns this code.
In some contexts (like a global cleanup utility, you might want to detect that status and keep issuing SQLOP_CLOSE_LIB calls until you stop getting that status returned (i.e. to fully close the library). But in most cases, one wouldn't bother with that, since you can just exit the A-Shell instance to fully disconnect the library (like you did).
I'm not sure why you got that condition with the SQLTEST4 program, but if you think it is a recurring/repeatable case, let me know and I'll investigate. But more likely, it was just a result of some aborted testing scenarios.
I'll talk to Ty about updating the documentation...