SET CURRENT DEBUG MODE

The SET CURRENT DEBUG MODE statement assigns a value to the CURRENT DEBUG MODE special register.

The special register sets the default value for the DEBUG MODE option for the following statements:

Start of change
  • CREATE FUNCTION statements that define an SQL scalar function
  • ALTER FUNCTION statements that create or replace a version of an SQL scalar function
  • CREATE PROCEDURE statements that define a native SQL or Java procedure
  • ALTER PROCEDURE statements that create or replace a version of a native SQL procedure
End of change

Invocation

This statement can be embedded in an application program or issued interactively. It is an executable statement that can be dynamically prepared.

Authorization

None required.

Syntax

                           .-=-.                      
>>-SET CURRENT DEBUG MODE--+---+--+-host-variable-+------------><
                                  +-DISALLOW------+   
                                  +-ALLOW---------+   
                                  '-DISABLE-------'   

Description

host-variable
Specifies a host variable that contains the debugging option. The host variable must conform to the following rules:
  • Be a CHAR, VARCHAR, GRAPHIC, or VARGRAPHIC variable. The actual length of the contents of the host variable must not exceed the length of the special register.
  • Include a keyword value of DISALLOW, ALLOW, or DISABLE that is left justified
  • Be padded on the right with blanks if the host variable is a fixed length character
  • Not contain lowercase letters or characters that cannot be specified in an ordinary identifier
  • Not be empty or contain only blanks
  • Not be the null value
DISALLOW
Start of changeSpecifies that DISALLOW DEBUG MODE is the default option for CREATE statements when defining an SQL scalar function, a native SQL procedure, or a Java procedure, or ALTER statements that create or replace a version of an SQL scalar function or a native SQL procedure.End of change
ALLOW
Start of changeSpecifies that ALLOW DEBUG MODE is the default option for CREATE statements when defining an SQL scalar function, a native SQL procedure, a Java procedure, or ALTER statements that create or replace a version of an SQL scalar function or a native SQL procedure.End of change
DISABLE
Start of changeSpecifies that DISABLE DEBUG MODE is the default option for CREATE statements when defining an SQL scalar function, a native SQL procedure, a Java procedure, or ALTER statements that create or replace a version of an SQL scalar function or a native SQL procedure.End of change

Examples

Example: The following statement sets the CURRENT DEBUG MODE special register so that the default option for CREATE PROCEDURE statements will be ALLOW DEBUG MODE:
   SET CURRENT DEBUG MODE = ALLOW;