-STOP FUNCTION SPECIFIC (DB2)
The DB2® command STOP FUNCTION SPECIFIC prevents DB2 from accepting SQL statements with invocations of the specified functions.
This command does not prevent SQL statements with invocations of the functions from running if they have already been queued or scheduled by DB2. You cannot use this command to stop built-in functions or user-defined functions that are sourced on another function.
DB2 implicitly issues the command STOP FUNCTION SPECIFIC ACTION(REJECT) for any function that exceeds the maximum abend count. That count is set by the MAX ABEND COUNT field of installation panel DSNTIPX.
Abbreviation: -STO FUNC SPEC
Environment
This command can be issued from a z/OS® console, a DSN session under TSO, a DB2I panel (DB2 COMMANDS), an IMS™ or CICS® terminal, or a program using the instrumentation facility interface (IFI).
Data sharing scope: Group or local, depending on the value of the SCOPE option.
Authorization
- Ownership of the function
System DBADM authority
- SYSOPR authority
- SYSCTRL authority
- SYSADM authority
- 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.
Syntax
>>-STOP FUNCTION SPECIFIC---------------------------------------> .-(*.*)-------------------------------------. >--+-------------------------------------------+----------------> | .-,---------------------------------. | | V | | '-(---+-schema.specific-function-name-+-+-)-' '-schema.partial-name*----------' >--+-----------------------+--+---------------------+---------->< | .-QUEUE--. | | .-LOCAL-. | '-ACTION-(-+-REJECT-+-)-' '-SCOPE-(-+-GROUP-+-)-'
Option descriptions
- (*.*)
- Stops
access to all functions, including functions that DB2 applications have not yet accessed.
If no functions are named, all functions are stopped.
- schema.specific-function-name
- Stops
one specific function name. You cannot specify a function name as
you can 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:
For overloaded functions, this query can return multiple rows.SELECT SPECIFICNAME, PARM_COUNT FROM SYSIBM.SYSROUTINES WHERE NAME='function_name' AND SCHEMA='schema_name'; - schema.partial-name *
- Stops 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* stops all functions with specific names that begin with ABC in schema1.
- ACTION
- Indicates
what to do with an SQL statement that invokes the function while the
function is stopped. If you issue STOP FUNCTION SPECIFIC more than
once for a given function, the action that is taken is determined
by the ACTION option on the most recent command.
- (QUEUE)
- Queues
the request until either of the following conditions is true:
- The wait exceeds the installation timeout value.
- You issue START FUNCTION SPECIFIC command for the function.
- (REJECT)
- Rejects the request.
- SCOPE
- Specifies
the scope of the command.
- (LOCAL)
- Specify to stop the function on the local member only.
- (GROUP)
- Specify to stop the function on all members of the data sharing group.
Usage notes
Limitations of STOP FUNCTION
SPECIFIC : STOP FUNCTION SPECIFIC is only applicable to external
functions that run in the WLM application environment or non-inline
SQL functions. STOP FUNCTION SPECIFIC cannot stop a built-in function,
an inline SQL function, or a user-defined function that is sourced
on another function. 
- Use ALTER FUNCTION to change the LOADMOD name to a nonexistent z/OS load module
- Rename or delete the z/OS load module
Considerations for SQL functions: The
STOP FUNCTION SPECIFIC command affects all versions of the SQL functions
that you specify in the command.
Examples
-STOP FUNCTION SPECIFIC ACTION(QUEUE)
This
command produces output similar to the following output: DSNX974I - DSNX9SP2 STOP FUNCTION SPECIFIC SUCCESSFUL FOR *.*
DSN9022I - DSNX9COM '-STOP FUNC' NORMAL COMPLETION
-STOP FUNCTION SPECIFIC ACTION(REJECT)
This
command produces output similar to the following output: DSNX974I - DSNX9SP2 STOP FUNCTION SPECIFIC SUCCESSFUL FOR *.*
DSN9022I - DSNX9COM '-STOP FUNC' NORMAL COMPLETION
-STOP FUNCTION SPECIFIC(PAYROLL.USERFN1,PAYROLL.USERFN3)
This
command produces output similar to the following output: DSNX974I - DSNX9SP2 STOP FUNCTION SPECIFIC SUCCESSFUL
FOR PAYROLL.USERFN1
DSNX974I - DSNX9SP2 STOP FUNCTION SPECIFIC SUCCESSFUL
FOR PAYROLL.USERFN3
DSN9022I - DSNX9COM '-STOP FUNC' NORMAL COMPLETION
-STOP FUNCTION SPECIFIC(PAYROLL.USERFN1,PAYROLL.USERFN3) ACTION(REJECT)
This
command produces output similar to the following output: DSNX974I - DSNX9SP2 STOP FUNCTION SPECIFIC SUCCESSFUL
FOR PAYROLL.USERFN1
DSNX974I - DSNX9SP2 STOP FUNCTION SPECIFIC SUCCESSFUL
FOR PAYROLL.USERFN3
DSN9022I - DSNX9COM '-STOP FUNC' NORMAL COMPLETION