I added a new queue threshold task and it is getting error status 1491 and error message DB347006.

Document ID : KB000005291
Last Modified Date : 14/02/2018
Show Technical Document Details

I added a new queue with a threshold task. Both the queue and the task were added to the SYSGEN.

When triggered, the queue threshold task is getting error status 1491 and error message:

DB347006  nnnnnnnn subschema requires a DBNAME  to do bind run unit.

If the task is invoked manually from a terminal it runs without error and the queue empties



The DB347006 message indicates no DBNAME has been set. The queue threshold task runs in the background so it would not have an interactive LTERM associated with it to set a DBNAME.

You need to specify a DBNAME for the program using subschema mapping in the DBTABLE.

Add the following to the DBTABLE: 

SUBSCHEMA "nnnnnnnn" MAPS TO "nnnnnnnn" DBNAME db_name