Error Status 1491 when invoking a SQL procedure or function.
search cancel

Error Status 1491 when invoking a SQL procedure or function.

book

Article ID: 52768

calendar_today

Updated On:

Products

IDMS IDMS - Database IDMS - ADS

Issue/Introduction

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

 

Environment

IDMS - all supported releases

Cause

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?

Resolution

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.