-START FUNCTION SPECIFIC command (Db2)

The Db2 command START FUNCTION SPECIFIC starts an external function that is stopped. Built-in functions or user-defined functions that are sourced on another function cannot be started with this command.

On successful completion of the command, queued requests for the specified functions begin executing. The abend counts for those functions are set to zero.

You do not need to issue the START FUNCTION SPECIFIC command when defining a new function to Db2. Db2 automatically starts the new function on the first SQL statement that invokes the new function.

Historical statistics in the DISPLAY FUNCTION SPECIFIC report (MAXQUE, TIMEOUT) are reset each time a START FUNCTION SPECIFIC command is issued for a given function.

Abbreviation: -STA FUNC SPEC

Environment

This command can be issued from a z/OS® console, a DSN session under TSO, a DB2I panel, an IMS or CICS® terminal, or a program that uses the instrumentation facility interface (IFI).

Data sharing scope: Group or member

Authorization

To execute this command, you must use a privilege set of the process that includes one of the following authorities for each function:
  • Ownership of the function
  • RECOVER privilege
  • System DBADM authority
  • SYSOPR authority
  • SYSCTRL authority
  • SYSADM authority
If you specify START FUNCTION SPECIFIC *.* or schema.partial-name *, the privilege set of the process must include one of the following authorities:
  • SYSOPR authority
  • SYSCTRL authority
  • SYSADM authority

Db2 commands that are issued from a logged-on z/OS console or TSO SDSF can be checked by Db2 authorization using primary and secondary authorization IDs. Start of changeA logged-on z/OS user ID must be defined in RACF or a similar security server.End of change

Syntax

Read syntax diagramSkip visual syntax diagramSTART FUNCTION SPECIFIC( *.*)(,schema.specific-function-nameschema.partial-name*)SCOPE(LOCALGROUP)

Option descriptions

* (asterisk)(*.*)
Starts all functions in all schemas. This is the default.
( schema.specific-function-name )
Starts the specific function name in the schema. You cannot specify a function name in the same way that you do in SQL; you must use the specific name. If a specific name was not specified on the CREATE FUNCTION statement, query SYSIBM.SYSROUTINES for the correct specific name:
SELECT SPECIFICNAME, PARM_COUNT
  FROM SYSIBM.SYSROUTINES
   WHERE NAME='function_name'
    AND SCHEMA='schema_name';
 
For overloaded functions, this query can return multiple rows.
( schema.partial-name *)
Starts all functions or a set of functions in the specified schema. The specific names of all functions in the set begin with partial-name and can end with any string, including the empty string. For example, schema1.ABC* starts all functions with specific names that begin with ABC in schema1.
SCOPE
Specifies the scope of the command.
( LOCAL )
Specifies that the command applies only to the current member.
(GROUP)
Specifies that the command applies to all members of the data sharing group.

Usage notes

Language Environment® in the WLM-established stored procedure address space
The START FUNCTION SPECIFIC command does not refresh the Language Environment in the WLM-established stored procedure address space. You must issue the WLM command. For example, if you need to refresh the Language Environment to get new copies of user-defined function load modules, issue the following WLM command:
VARY WLM, APPLENV=applenv,REFRESH
Considerations for SQL functions
The START FUNCTION SPECIFIC command affects all versions of the SQL functions that you specify in the command.
Trace information for commands issued with group scope
If this command is issued with options that specify group scope in a Db2 data sharing member, it also runs on all other active members. IFICID 090 trace records for other group members can show that the same command was issued by the SYSOPR authorization ID from the 016.TLPKN5F correlation ID, in addition to the trace records from the member where the original command was issued. See Command scope in Db2 data sharing.

Examples

Example 1: Start all functions.
-START FUNCTION SPECIFIC
Output that is similar to the following output is generated:
DSNX973I - DSNX9ST2 START FUNCTION SPECIFIC SUCCESSFUL FOR *.*
DSN9022I - DSNX9COM '-START FUNC' NORMAL COMPLETION
Example 2: Start functions USERFN1 and USERFN2. If any requests are queued for these functions, the functions are executed.
-START FUNCTION SPECIFIC(PAYROLL.USERFN1,PAYROLL.USERFN2)
Output that is similar to the following output is generated:
DSNX973I - DSNX9ST2 START FUNCTION SPECIFIC SUCCESSFUL FOR 
PAYROLL.USERFN1 
DSNX973I - DSNX9ST2 START FUNCTION SPECIFIC SUCCESSFUL FOR 
PAYROLL.USERFN2 
DSN9022I - DSNX9COM '-START FUNC' NORMAL COMPLETION