Accounting information for stored procedure tasks

When executing a stored procedure task, the administrative task scheduler passes accounting information to the stored procedure task when establishing a Resource Recovery Services attachment facility (RRSAF) connection to Db2.

When executing a stored procedure task, the administrative scheduler sets the following information in these special registers:

  • CURRENT CLIENT_USERID: The client user ID is set to the name of the execution user.
  • CURRENT CLIENT_APPLNAME: The client application name is set to the name of the administrative task scheduler.
  • CURRENT CLIENT_ACCTNG: The DDF accounting string is set to the task name.

This information enables the stored procedure to relate its own outputs to the task execution status in the administrative task scheduler. For example, the stored procedure can save a log in a table together with the name of the task that executed it, so that you can relate the task execution status to this log.