Section Number


 
Snapshot Level
Application
 
DCS Application
DCS Statement

 
Logical Data Grouping
appl
stmt
dcs_appl
dcs_stmt

 
Monitor Switch
Statement
Statement
Statement
Statement

Resettable

No

 

Event Type
Statement

Logical Data Grouping
stmt_event

 

Element Name
Element Type

section_number
information

 

Description:  The internal section number in the package for the SQL statement currently processing or most recently processed.

Usage:  For static SQL, you can use this element along with "Application Creator" and "Package Name" to query the SYSCAT.STATEMENTS system catalog table and obtain the static SQL statement text, using the sample query as follows:

 
    SELECT SEQNO, SUBSTR(TEXT,1,120)
           FROM SYSCAT.STATEMENTS
           WHERE PKGNAME   = 'package_name' AND
                 PKGSCHEMA = 'creator'      AND
                 SECTNO    = section_number
           ORDER BY SEQNO
Note:Exercise caution in obtaining static statement text, because this query against the system catalog table could cause lock contentions. Whenever possible, only use this query when there is little other activity against the database.