When invoking a SQL procedure or function, it fails with error:
DC172998 V1 DBKEY= STATUS=1491 BIND SUBSCHEMA-->nnnnnnnn DC173001 V1 APPLICATION ABORTED. SUBSCHEMA BIND FAILED; STATUS=1491
IDMS - all supported releases
The error status 1491 indicates no DBNAME has been established before issuing a BIND RUN UNIT.
If a DBNAME has already been set what else can cause this error?
This is caused by specifying the option DEFAULT DATABASE NULL in the CREATE PROCEDURE or CREATE FUNCTION statement that was used to define the routine. This needs to be changed to DEFAULT DATABASE CURRENT. This option will allow any databases sessions started by the SQL procedure or function to inherit the currently set DBNAME.