Sie sind auf Seite 1von 474

DB210 for z/OS Reference Guide

A guide to help with daily activities on DB2 10 for z/OS

www.ylassoc.com

www.bmc.com

DB2 10 for z/OS


Reference Guide
A guide to help with daily activities on
DB2 10 for z/OS

YL&A
www.ylassoc.com

YL&A DB2 10 for z/OS Reference Guide

Produced by:
YL&A
3309 Robbins Road #226
Springfield, IL 62704
info@ylassoc.com
04/14/2012

Notice and Disclaimer


This DB2 10 for z/OS Family Reference Guide was developed to help users in their daily
activities in administrating and programming in DB2 for z/OS. There are no guarantees
expressed or implied with the contents in this guide. YL&A, is not liable for any loss or damage,
direct or indirect, resulting from usage of this reference guide.
We want to provide a quality and useful reference for users. Please notify us of any mistakes or
errors in this reference guide at info@ylassoc.com.
The syntax diagrams and tables were reprinted with permission from the IBM Corporation.
Much of the material in this guide has copyrights held by the IBM Corporation.
DB2 is a registered trademark of the IBM Corporation.

Table of Contents

YL&A DB2 10 for z/OS Reference Guide

Reading the IBM Syntax Diagrams


Read the syntax diagrams from left to right, from top to bottom, following the path of the line.
The >>--- symbol indicates the beginning of a statement.
The ---> symbol indicates that the statement syntax is continued on the next line.
The >--- symbol indicates that a statement is continued from the previous line.
The --->< symbol indicates the end of a statement.
Diagrams of syntactical units other than complete statements start with the
>--- symbol and end with the ---> symbol.
Required items appear on the horizontal line (the main path).
>>__required_item____________________________________________________________________><
Optional items appear below the main path.
>>__required_item____________________________________________________________________><
|_optional_item_|
If an optional item appears above the main path, that item has no effect on the execution of the statement
and is used only for readability.
_optional_item_
>>__required_item__|____________|_____________________________________________________><
If you can choose from two or more items, they appear vertically, in a stack. If you must choose one of the
items, one item of the stack appears on the main path.
>>__required_item____required_choice1__________________________________________________><
|_required_choice2_|
If choosing one of the items is optional, the entire stack appears below the main path.
>>__required_item____________________________________________________________________><
|_optional_choice1_|
|_optional_choice2_|
If one of the items is the default, it appears above the main path and the remaining choices are shown
below.
_default_choice__
>>__required_item__|_______________|__________________________________________________><
|_optional_choice_|
|_optional_choice_|
An arrow returning to the left, above the main line, indicates an item that can be repeated.
<_________________
>>__required_item____repeatable_item_|__________________________________________________><
If the repeat arrow contains a comma, you must separate repeated items with a comma.
<_,_______________
>>__required_item____repeatable_item_|__________________________________________________><
A repeat arrow above a stack indicates that you can repeat the items in the stack.
Keywords appear in uppercase (for example, FROM). They must be spelled exactly as shown. Variables
appear in all lowercase letters (for example, column-name). They represent user-supplied names or values.
If punctuation marks, parentheses, arithmetic operators, or other such symbols are shown, you must enter
them as part of the syntax.

Table of Contents

YL&A DB2 10 for z/OS Reference Guide

Table of Contents
DB2 10 FOR Z/OS .............................................................. 21!
LANGUAGE ELEMENTS ................................................... 21!
SPECIAL REGISTERS................................................................................................... 21!
HOST VARIABLES ....................................................................................................... 21!
FUNCTIONS ............................................................................................................... 22!
TABLE FUNCTION ....................................................................................................... 22!
EXPRESSIONS ........................................................................................................... 22!
LABELED DURATIONS ................................................................................................. 22!
CASE EXPRESSIONS ................................................................................................. 23!
CAST ....................................................................................................................... 23!
XMLCAST SPECIFICATION ......................................................................................... 24!
NEXT VALUE EXPRESSION ....................................................................................... 24!
PREVIOUS VALUE EXPRESSION .............................................................................. 24!
ROW CHANGE EXPRESSION .................................................................................... 25!
OLAP ....................................................................................................................... 25!
PREDICATES .............................................................................................................. 26!
BASIC PREDICATE ...................................................................................................... 26!
QUANTIFIED PREDICATE ............................................................................................. 26!
BETWEEN PREDICATE.............................................................................................. 27!
DISTINCT PREDICATE ............................................................................................... 27!
EXISTS PREDICATE................................................................................................... 27!
IN PREDICATE ............................................................................................................ 27!
LIKE PREDICATE........................................................................................................ 27!
NULL PREDICATE ...................................................................................................... 27!
XMLEXISTS ............................................................................................................ 27!
SEARCH CONDITIONS ................................................................................................. 27!

AGGREGATE FUNCTIONS ............................................... 28!


AVG ......................................................................................................................... 28!
CORRELATION ....................................................................................................... 28!
COUNT .................................................................................................................... 28!
COUNT_BIG ............................................................................................................ 28!
COVARIANCE OR COVARIANCE_SAMP ............................................................... 28!
MAX ......................................................................................................................... 28!
MIN .......................................................................................................................... 28!
STDDEV .................................................................................................................. 28!
4

Table of Contents

YL&A DB2 10 for z/OS Reference Guide

STDDEV_SAMP ......................................................................................................28!
SUM .........................................................................................................................28!
VARIANCE OR VARIANCE SAMP ...........................................................................29!
XMLAGG ..................................................................................................................29!

SCALAR FUNCTIONS ........................................................ 29!


ABS ..........................................................................................................................29!
ACOS .......................................................................................................................29!
ADD_MONTHS ........................................................................................................29!
ASCII ........................................................................................................................29!
ASCII_CHR ..............................................................................................................29!
ASCII_STR ..............................................................................................................29!
ASIN .........................................................................................................................29!
ATAN .......................................................................................................................29!
ATANH .....................................................................................................................29!
ATAN2 .....................................................................................................................29!
BIGINT .....................................................................................................................29!
BLOB .......................................................................................................................30!
BINARY ....................................................................................................................30!
CCSID_ENCODING ................................................................................................30!
CEILING ...................................................................................................................30!
CHAR .......................................................................................................................30!
CHARACTER_LENGTH ..........................................................................................31!
CLOB .......................................................................................................................31!
COALESCE .............................................................................................................31!
COLLATION_KEY ...................................................................................................31!
COMPARE_DECFLOAT ..........................................................................................31!
CONCAT ..................................................................................................................31!
CONTAINS ..............................................................................................................31!
COS .........................................................................................................................32!
COSH .......................................................................................................................32!
DATE .......................................................................................................................32!
DAY ..........................................................................................................................32!
DAYOFMONTH .......................................................................................................32!
DAYOFWEEK ..........................................................................................................32!
DAYOFWEEK_ISO ..................................................................................................32!
DAYOFYEAR ...........................................................................................................32!
DAYS .......................................................................................................................32!
DBCLOB ..................................................................................................................32!
DECFLOAT ..............................................................................................................32!
DECFLOAT_SORTKEY ...........................................................................................33!
DECIMAL OR DEC ...................................................................................................33!
DECRYPT ................................................................................................................33!
Table of Contents

YL&A DB2 10 for z/OS Reference Guide

DEGREES ............................................................................................................... 33!


DIFFERENCE .......................................................................................................... 33!
DIGITS ..................................................................................................................... 33!
DOUBLE OR DOUBLE_PRECISION ....................................................................... 33!
DSN_XMLVALIDATE .............................................................................................. 33!
EBCDIC_CHR ......................................................................................................... 33!
EBCDIC_STR .......................................................................................................... 34!
ENCRYPT_TDES .................................................................................................... 34!
EXP ......................................................................................................................... 34!
EXTRACT ................................................................................................................ 34!
FLOAT ..................................................................................................................... 34!
FLOOR .................................................................................................................... 34!
GENERATE UNIQUE .............................................................................................. 34!
GETHINT ................................................................................................................. 34!
GETVARIABLE ........................................................................................................ 34!
GRAPHIC ................................................................................................................ 34!
HEX ......................................................................................................................... 35!
HOUR ...................................................................................................................... 35!
IDENTITY_VAL_LOCAL() ....................................................................................... 35!
IFNULL .................................................................................................................... 35!
INSERT ................................................................................................................... 35!
INTEGER OR INT ..................................................................................................... 35!
JULIAN_DAY ........................................................................................................... 35!
LAST_DAY .............................................................................................................. 35!
LCASE OR LOWER .................................................................................................. 35!
LEFT ........................................................................................................................ 35!
LENGTH .................................................................................................................. 35!
LN ............................................................................................................................ 36!
LOCATE .................................................................................................................. 36!
LOCATE_IN_STRING ............................................................................................. 36!
LOG10 ..................................................................................................................... 36!
LOWER ................................................................................................................... 36!
LPAD ....................................................................................................................... 36!
LTRIM ...................................................................................................................... 36!
MAX ......................................................................................................................... 36!
MICROSECOND ..................................................................................................... 36!
MIDNIGHT_SECONDS ........................................................................................... 36!
MIN .......................................................................................................................... 36!
MINUTE ................................................................................................................... 36!
MOD ........................................................................................................................ 36!
MONTH ................................................................................................................... 37!
MONTHS_BETWEEN ............................................................................................. 37!
MULTIPLY_ALT ...................................................................................................... 37!
6

Table of Contents

YL&A DB2 10 for z/OS Reference Guide

NEXT_DAY ..............................................................................................................37!
NORMALIZE_DECFLOAT .......................................................................................37!
NORMALIZE_STRING ............................................................................................37!
NULLIF .....................................................................................................................37!
OVERLAY ................................................................................................................37!
POSITION ................................................................................................................37!
POSSTR ..................................................................................................................37!
POWER ...................................................................................................................37!
QUANTIZE ...............................................................................................................37!
QUARTER ...............................................................................................................37!
RADIANS .................................................................................................................37!
RAISE_ERROR .......................................................................................................38!
RAND .......................................................................................................................38!
REAL ........................................................................................................................38!
REPEAT ...................................................................................................................38!
REPLACE ................................................................................................................38!
RID ...........................................................................................................................38!
RIGHT ......................................................................................................................38!
ROUND ....................................................................................................................38!
ROUND_TIMESTAMP .............................................................................................38!
ROWID .....................................................................................................................38!
RPAD .......................................................................................................................38!
RTRIM ......................................................................................................................38!
SCORE ....................................................................................................................38!
SECOND ..................................................................................................................39!
SIGN ........................................................................................................................39!
SIN ...........................................................................................................................39!
SINH ........................................................................................................................39!
SMALLINT ...............................................................................................................39!
SOUNDEX ...............................................................................................................39!
SOAPHTTPC AND SOAPHTTPV..............................................................................39!
SPACE .....................................................................................................................39!
SQRT .......................................................................................................................39!
STRIP ......................................................................................................................39!
SUBSTR ..................................................................................................................39!
SUBSTRING ............................................................................................................39!
TAN ..........................................................................................................................40!
TANH .......................................................................................................................40!
TIME ........................................................................................................................40!
TIMESTAMP ............................................................................................................40!
TIMESTAMPADD ....................................................................................................40!
TIMESTAMP_FORMAT ...........................................................................................40!
TIMESTAMP_ISO ....................................................................................................40!
Table of Contents

YL&A DB2 10 for z/OS Reference Guide

TIMESTAMPDIFF .................................................................................................... 40!


TIMESTAMP_TZ ..................................................................................................... 40!
TO_CHAR ............................................................................................................... 40!
TO_DATE ................................................................................................................ 40!
TOTALORDER ........................................................................................................ 41!
TRANSLATE ........................................................................................................... 41!
TRUNCATE ............................................................................................................. 41!
TRUNC_TIMESTAMP ............................................................................................. 41!
UCASE OR UPPER .................................................................................................. 41!
UNICODE ................................................................................................................ 41!
UNICODE_STR ....................................................................................................... 41!
VALUE ..................................................................................................................... 41!
VARBINARY ............................................................................................................ 41!
VARCHAR ............................................................................................................... 41!
VARCHAR_FORMAT .............................................................................................. 42!
VARGRAPHIC ......................................................................................................... 42!
WEEK ...................................................................................................................... 42!
WEEK_ISO .............................................................................................................. 43!
XMLATTRIBUTES ................................................................................................... 43!
XMLCOMMENT ....................................................................................................... 43!
XMLCONCAT .......................................................................................................... 43!
XMLDOCUMENT .................................................................................................... 43!
XMLELEMENT ........................................................................................................ 43!
XMLFOREST ........................................................................................................... 43!
XMLMODIFY ........................................................................................................... 44!
XMLNAMESPACE ................................................................................................... 44!
XMLPARSE ............................................................................................................. 44!
XMLPI ...................................................................................................................... 44!
XMLQUERY ............................................................................................................ 44!
XMLSERIALIZE ....................................................................................................... 44!
XMLTEXT ................................................................................................................ 44!
YEAR ....................................................................................................................... 45!

TABLE FUNCTIONS........................................................... 45!


ADMIN_TASK_LIST ................................................................................................ 45!
ADMIN_TASK_STATUS ......................................................................................... 45!
XMLTABLE .............................................................................................................. 45!

QUERIES ............................................................................ 46!


............................................................................................................... 46!
select-clause ........................................................................................................ 46!
FULLSELECT .............................................................................................................. 48!
SUBSELECT

Table of Contents

YL&A DB2 10 for z/OS Reference Guide

ALLOCATE CURSOR ..............................................................................................50!


ALTER DATABASE .................................................................................................50!
ALTER FUNCTION (EXTERNAL) ................................................................................50!
ALTER FUNCTION (SQL SCALAR) ...........................................................................52!
ALTER FUNCTION (SQL TABLE) ..............................................................................54!
ALTER INDEX ..........................................................................................................55!
ALTER MASK ..........................................................................................................57!
ALTER PERMISSION ..............................................................................................57!
ALTER PROCEDURE (EXTERNAL) ...........................................................................57!
ALTER PROCEDURE (SQL-EXTERNAL) ...................................................................58!
ALTER PROCEDURE (SQL-NATIVE) ........................................................................59!
ALTER SEQUENCE ................................................................................................61!
ALTER STOGROUP ................................................................................................61!
ALTER TABLE .........................................................................................................62!
ALTER TABLESPACE .............................................................................................68!
ALTER TRIGGER ....................................................................................................69!
ALTER TRUSTED CONTEXT ..................................................................................69!
ALTER VIEW ...........................................................................................................70!
ASSOCIATE LOCATORS ........................................................................................70!
BEGIN DECLARE SECTION ...................................................................................70!
CALL ........................................................................................................................70!
CLOSE .....................................................................................................................71!
COMMENT ON ........................................................................................................71!
COMMIT ..................................................................................................................72!
CONNECT (TYPE 1 OR TYPE 2).................................................................................72!
CREATE ALIAS .......................................................................................................73!
CREATE AUXILIARY TABLE ...................................................................................73!
CREATE DATABASE ..............................................................................................73!
CREATE FUNCTION (EXTERNAL SCALAR) ................................................................73!
CREATE FUNCTION(EXTERNAL SCALAR) .................................................................76!
CREATE FUNCTION(EXTERNAL TABLE) ...................................................................78!
CREATE FUNCTION (SOURCED) .............................................................................80!
CREATE FUNCTION (SQL SCALAR) ........................................................................81!
CREATE FUNCTION (SQL TABLE) ..........................................................................83!
CREATE GLOBAL TEMPORARY TABLE ...............................................................85!
CREATE INDEX .......................................................................................................86!
CREATE MASK .......................................................................................................88!
CREATE PERMISSION ...........................................................................................88!
CREATE PROCEDURE (EXTERNAL) ........................................................................88!
CREATE PROCEDURE (SQL - EXTERNAL) ..............................................................91!
CREATE PROCEDURE (SQL-NATIVE) .....................................................................92!
CREATE ROLE ........................................................................................................95!
CREATE SEQUENCE .............................................................................................95!
Table of Contents

YL&A DB2 10 for z/OS Reference Guide

CREATE STOGROUP ............................................................................................. 96!


CREATE SYNONYM ............................................................................................... 96!
CREATE TABLE ...................................................................................................... 96!
CREATE TABLESPACE ........................................................................................ 101!
CREATE TRIGGER ............................................................................................... 103!
CREATE TRUSTED CONTEXT ............................................................................ 103!
CREATE TYPE ...................................................................................................... 104!
CREATE VIEW ...................................................................................................... 105!
DECLARE CURSOR ............................................................................................. 105!
DECLARE GLOBAL TEMPORARY TABLE ........................................................... 106!
DECLARE STATEMENT ....................................................................................... 107!
DECLARE TABLE ................................................................................................. 108!
DECLARE VARIABLE ........................................................................................... 108!
DELETE ................................................................................................................. 108!
DESCRIBE CURSOR ............................................................................................ 109!
DESCRIBE INPUT ................................................................................................. 109!
DESCRIBE OUTPUT ............................................................................................. 109!
DESCRIBE PROCEDURE .................................................................................... 109!
DESCRIBE TABLE ................................................................................................ 110!
DROP .................................................................................................................... 110!
END DECLARE SECTION .................................................................................... 111!
EXCHANGE .......................................................................................................... 111!
EXECUTE .............................................................................................................. 111!
EXECUTE IMMEDIATE ......................................................................................... 111!
EXPLAIN ............................................................................................................... 112!
FETCH ................................................................................................................... 112!
FREE LOCATOR ................................................................................................... 113!
GET DIAGNOSTICS .............................................................................................. 113!
GRANT .................................................................................................................. 114!
GRANT (COLLECTION PRIVILEGES) .......................................................................... 114!
GRANT (DATABASE PRIVILEGES).............................................................................. 114!
GRANT (TYPE OR JAR PRIVILEGES) ......................................................................... 115!
GRANT (FUNCTION OR PROCEDURE PRIVILEGES) ...................................................... 115!
GRANT (PACKAGE PRIVILEGES) ............................................................................... 116!
GRANT (PLAN PRIVILEGES) ..................................................................................... 117!
GRANT (SCHEMA PRIVILEGES)................................................................................. 117!
GRANT (SEQUENCE PRIVILEGES) ............................................................................. 117!
GRANT (SYSTEM PRIVILEGES) ................................................................................. 117!
GRANT (TABLE OR VIEW PRIVILEGES) ...................................................................... 118!
GRANT (USE PRIVILEGES) ....................................................................................... 118!
HOLD LOCATOR .................................................................................................. 119!
INCLUDE ............................................................................................................... 119!
INSERT ................................................................................................................. 119!
10

Table of Contents

YL&A DB2 10 for z/OS Reference Guide

LABEL ON ..............................................................................................................120!
LOCK TABLE .........................................................................................................120!
MERGE ..................................................................................................................121!
OPEN .....................................................................................................................122!
PREPARE ..............................................................................................................122!
REFRESH TABLE ..................................................................................................123!
RELEASE ..............................................................................................................124!
RELEASE SAVEPOINT .........................................................................................124!
RELEASE (CONNECTION) ........................................................................................124!
RENAME ................................................................................................................124!
REVOKE ................................................................................................................124!
REVOKE (COLLECTION PRIVILEGES) ........................................................................124!
REVOKE (DATABASE PRIVILEGES)............................................................................125!
REVOKE (TYPE OR JAR PRIVILEGES) .......................................................................125!
REVOKE (FUNCTION OR PROCEDURE PRIVILEGES) ....................................................125!
REVOKE (PACKAGE PRIVILEGES) .............................................................................127!
REVOKE (PLAN PRIVILEGES) ...................................................................................127!
REVOKE (SCHEMA PRIVILEGES)...............................................................................128!
REVOKE (SEQUENCE PRIVILEGES) ...........................................................................128!
REVOKE (SYSTEM PRIVILEGES) ...............................................................................128!
REVOKE (TABLE OR VIEW PRIVILEGES) ....................................................................129!
REVOKE (USE PRIVILEGES) .....................................................................................129!
ROLLBACK ............................................................................................................130!
SAVEPOINT ..........................................................................................................130!
SELECT INTO ........................................................................................................130!
SET CONNECTION ...............................................................................................130!
SET CURRENT APPLICATION ENCODING SCHEME .........................................131!
SET CURRENT DEBUG MODE ............................................................................131!
SET CURRENT DECFLOAT ROUNDING MODE ..................................................131!
SET CURRENT DEGREE ......................................................................................131!
SET CURRENT EXPLAIN MODE ..........................................................................131!
SET CURRENT LOCALE LC_CTYPE ...................................................................131!
SET CURRENT MAITAINED TABLE TYPES FOR OPTIMIZATION ......................131!
SET CURRENT OPTIMIZATION HINT ..................................................................132!
SET CURRENT PACKAGE PATH .........................................................................132!
SET CURRENT PACKAGESET ............................................................................132!
SET CURRENT PRECISION .................................................................................132!
SET CURRENT REFRESH AGE ...........................................................................132!
SET CURRENT RULES .........................................................................................132!
SET CURRENT ROUTINE VERSION ....................................................................132!
SET CURRENT SQLID ..........................................................................................132!
SET ENCRYPTION PASSWORD ..........................................................................133!
SET HOST VARIABLE ASSIGNMENT ..................................................................133!
Table of Contents

11

YL&A DB2 10 for z/OS Reference Guide

SET PATH ............................................................................................................. 133!


SET SCHEMA ....................................................................................................... 133!
SET SESSION TIME ZONE ................................................................................... 133!
SET TRANSITION VARIABLE ............................................................................... 134!
SIGNAL SQLSTATE .............................................................................................. 134!
TRUNCATE ........................................................................................................... 134!
UPDATE ................................................................................................................ 134!
VALUES ................................................................................................................ 136!
VALUES INTO ....................................................................................................... 136!
WHENEVER .......................................................................................................... 136!

COMMANDS ..................................................................... 137!


-ACCESS DATBASE(DB2) .................................................................................... 137!
-ALTER BUFFERPOOL ......................................................................................... 137!
-ALTER GROUPBUFFERPOOL ........................................................................... 137!
-ALTER UTILITY .................................................................................................... 138!
-ARCHIVE LOG ..................................................................................................... 138!
-BIND PACKAGE ................................................................................................... 138!
-BIND PLAN ........................................................................................................... 140!
-BIND QUERY ....................................................................................................... 141!
-CANCEL THREAD ............................................................................................... 141!
/CHANGE IMS ....................................................................................................... 141!
DCLGEN ................................................................................................................ 141!
/DISPLAY IMS ....................................................................................................... 142!
-DISPLAY ARCHIVE ............................................................................................. 142!
-DISPLAY BUFFERPOOL ..................................................................................... 142!
-DISPLAY DATABASE .......................................................................................... 143!
-DISPLAY DDF ...................................................................................................... 144!
-DISPLAY FUNCTION SPECIFIC ......................................................................... 144!
-DISPLAY GROUP ................................................................................................ 144!
-DISPLAY GROUPBUFFERPOOL ........................................................................ 144!
-DISPLAY LOCATION ........................................................................................... 144!
-DISPLAY LOG ...................................................................................................... 145!
-DISPLAY PROCEDURE ...................................................................................... 145!
-DISPLAY PROFILE .............................................................................................. 145!
-DISPLAY RLIMIT .................................................................................................. 145!
-DISPLAY THREAD ............................................................................................... 145!
-DISPLAY TRACE ................................................................................................. 145!
-DISPLAY UTILITY ................................................................................................ 147!
DSN TSO ............................................................................................................... 148!
DSNC (CICS ATTACHMENT FACILITY) ....................................................................... 148!
DSNC DISCONNECT (CICS ATTACHMENT FACILITY) .............................................. 148!
DSNC DISPLAY (CICS ATTACHMENT FACILITY) ....................................................... 148!
12

Table of Contents

YL&A DB2 10 for z/OS Reference Guide

DSNC MODIFY(CICS ATTACHMENT FACILITY) .........................................................148!


DSNC STOP (CICS ATTACHMENT FACILITY).............................................................148!
DSNC START (CICS ATTACHMENT FACILITY)...........................................................148!
DSNH (TSO CLIST) ...............................................................................................148!
END .......................................................................................................................148!
FREE PACKAGE ...................................................................................................148!
FREE PLAN ...........................................................................................................149!
FREE QUERY ........................................................................................................149!
-MODIFY DDF ........................................................................................................149!
MODIFY IRLMPROC, ABEND ...............................................................................149!
MODIFY IRLMPROC, DIAG ...................................................................................149!
MODIFY IRLMPROC, PURGE ...............................................................................150!
MODIFY IRLMPROC, SET ....................................................................................150!
MODIFY IRLMPROC, STATUS .............................................................................150!
-MODIFY TRACE (DB2) .........................................................................................150!
REBIND PACKAGE ...............................................................................................150!
REBIND PLAN .......................................................................................................152!
REBIND TRIGGER PACKAGE ..............................................................................153!
-RECOVER BSDS .................................................................................................153!
-RECOVER INDOUBT ...........................................................................................153!
-RECOVER POSTPONED .....................................................................................154!
-REFRESH DB2, EARLY .......................................................................................154!
-RESET GENERICLU ............................................................................................154!
-RESET INDOUBT .................................................................................................154!
RUN .......................................................................................................................154!
-SET ARCHIVE ......................................................................................................154!
-SET LOG ..............................................................................................................154!
-SET SYSPARM ....................................................................................................155!
SPUFI ....................................................................................................................155!
/SSR .......................................................................................................................155!
/START IMS ...........................................................................................................155!
-START DATABASE ..............................................................................................155!
-START DB2 ..........................................................................................................156!
-START DDF ..........................................................................................................156!
-START FUNCTION SPECIFIC .............................................................................156!
-START ADMTPROC .................................................................................................156!
-START IRLMPROC ..................................................................................................156!
-START PROCEDURE ..........................................................................................157!
-START PROFILE ..................................................................................................157!
-START RLIMIT .....................................................................................................157!
-START TRACE .....................................................................................................157!
STOP .....................................................................................................................159!
STOP ADMTPROC ....................................................................................................159!
Table of Contents

13

YL&A DB2 10 for z/OS Reference Guide

-STOP DATABASE ................................................................................................ 159!


-STOP DB2 ............................................................................................................ 160!
-STOP DDF ........................................................................................................... 160!
-STOP FUNCTION SPECIFIC ............................................................................... 160!
STOP IRLMPROC ..................................................................................................... 160!
-STOP PROCEDURE ............................................................................................ 160!
-STOP PROFILE ................................................................................................... 161!
-STOP RLIMIT ....................................................................................................... 161!
-STOP TRACE ....................................................................................................... 161!
-TERM UTILITY ..................................................................................................... 163!
TRACE IMS ........................................................................................................... 163!
TRACE CT ............................................................................................................. 163!

SQL CONTROL STATEMENTS ....................................... 164!


SQL CONTROL STATEMENT ..................................................................................... 164!
ASSIGNMENT ........................................................................................................... 164!
CALL ...................................................................................................................... 164!
CASE ..................................................................................................................... 164!
COMPOUND ............................................................................................................. 165!
FOR ....................................................................................................................... 166!
GET DIAGNOSTICS .............................................................................................. 166!
GOTO .................................................................................................................... 166!
IF ........................................................................................................................... 166!
ITERATE ............................................................................................................... 166!
LEAVE ................................................................................................................... 166!
LOOP ..................................................................................................................... 166!
REPEAT ................................................................................................................ 167!
RESIGNAL ............................................................................................................ 167!
RETURN ................................................................................................................ 167!
SIGNAL ................................................................................................................. 167!
WHILE ................................................................................................................... 167!
SQL PROCEDURE STATEMENT ................................................................................. 167!

EXPLAIN TABLES............................................................ 170!


PLAN_TABLE ........................................................................................................ 170!
DSN_COLDIST_TABLE ........................................................................................ 176!
DSN_DETCOST_TABLE ...................................................................................... 178!
DSN_FILTER_TABLE ........................................................................................... 180!
DSN_FUNCTION_TABLE ..................................................................................... 182!
DSN_KEYTGTDIST_TABLE ................................................................................. 183!
DSN_PGRANGE_TABLE ...................................................................................... 185!
DSN_PGROUP_TABLE ........................................................................................ 186!
14

Table of Contents

YL&A DB2 10 for z/OS Reference Guide

DSN_PREDICAT_TABLE ......................................................................................188!
DSN_PTASK_TABLE ............................................................................................191!
DSN_QUERY_TABLE ...........................................................................................193!
DSN_SORTKEY_TABLE .......................................................................................194!
DSN_SORT_TABLE ..............................................................................................196!
DSN_STATEMENT_CACHE_TABLE ....................................................................197!
DSN_STATEMNT_TABLE .....................................................................................200!
DSN_STRUCT_TABLE .........................................................................................201!
DSN_VIEWREF_TABLE ........................................................................................203!

DSNZPARMS .................................................................... 205!


BIND PARAMETERS ........................................................ 214!
DB2 LIMITS ....................................................................... 218!
IDENTIFIER LENGTH LIMITS .......................................................................................218!
NUMERIC LIMITS.......................................................................................................218!
STRING LENGTH LIMITS ............................................................................................219!
DATETIME LIMITS .....................................................................................................220!
DB2 LIMITS ON SQL STATEMENTS ............................................................................220!
DB2 SYSTEM LIMITS ................................................................................................221!

SQL COMMUNICATION AREA (SQLCA) ........................ 223!


THE REXX SQLCA ........................................................... 226!
GET DIAGNOSTICS ......................................................... 227!
STATEMENT INFORMATION ........................................................................................227!
CONDITIONAL DATA TYPES .......................................................................................228!
CONNECTION INFORMATION ......................................................................................229!

PREDICATES.................................................................... 230!
IFCIDS ............................................................................... 232!
EXCEPTIONS.................................................................... 244!
DETERMINING PARTITION FROM PAGE NUMBER...... 247!
Table of Contents

15

YL&A DB2 10 for z/OS Reference Guide

CATALOG TABLES ......................................................... 249!


SYSIBM.IPLIST ..................................................................................................... 249!
SYSIBM.IPNAMES ................................................................................................ 249!
SYSIBM.LOCATIONS ........................................................................................... 250!
SYSIBM.LULIST .................................................................................................... 252!
SYSIBM.LUMODES .............................................................................................. 252!
SYSIBM.LUNAMES ............................................................................................... 252!
SYSIBM.MODESELECT ....................................................................................... 254!
SYSIBM.AUDITPOLICIES ..................................................................................... 254!
SYSIBM.SYSAUTOALERTS ................................................................................. 256!
SYSIBM.SYSAUTOALERTS_OUT ....................................................................... 257!
SYSIBM.SYSAUTORUNS_HIST .......................................................................... 257!
SYSIBM.SYSAUTORUNS_HISTOU ..................................................................... 258!
SYSIBM.SYSAUTOTIMEWINDOWS .................................................................... 258!
SYSIBM.SYSAUXRELS ........................................................................................ 259!
SYSIBM.SYSCHECKDEP ..................................................................................... 259!
SYSIBM.SYSCHECKS .......................................................................................... 259!
SYSIBM.SYSCHECKS2 ........................................................................................ 260!
SYSIBM.SYSCOLAUTH ........................................................................................ 260!
SYSIBM.SYSCOLDIST ......................................................................................... 261!
SYSIBM.SYSCOLDISTSTATS .............................................................................. 262!
SYSIBM.SYSCOLDIST_HIST ............................................................................... 263!
SYSIBM.SYSCOLSTATS ...................................................................................... 264!
SYSIBM.SYSCOLUMNS ....................................................................................... 265!
SYSIBM.SYSCOLUMNS_HIST ............................................................................. 271!
SYSIBM.SYSCONSTDEP ..................................................................................... 273!
SYSIBM.SYSCONTEXT ........................................................................................ 273!
SYSIBM.SYSCONTEXTAUTHIDS ........................................................................ 274!
SYSIBM.SYSCONTROLS ..................................................................................... 275!
SYSIBM.SYSCOPY ............................................................................................... 276!
SYSIBM.SYSCTXTTRUSTATTRS ........................................................................ 282!
SYSIBM.SYSDATABASE ...................................................................................... 283!
SYSIBM.SYSDATATYPES ................................................................................... 284!
SYSIBM.SYSDBAUTH .......................................................................................... 285!
SYSIBM.SYSDBRM .............................................................................................. 287!
SYSIBM.SYSDEPENDENCIES ............................................................................ 288!
SYSIBM.SYSDUMMY1 ......................................................................................... 289!
SYSIBM.SYSDUMMYA ......................................................................................... 289!
SYSIBM.SYSDUMMYE ......................................................................................... 289!
SYSIBM.SYSDUMMYU ......................................................................................... 289!
SYSIBM.SYSENVIRONMENT .............................................................................. 289!
SYSIBM.SYSFIELDS ............................................................................................ 291!
16

Table of Contents

YL&A DB2 10 for z/OS Reference Guide

SYSIBM.SYSFOREIGNKEYS ...............................................................................292!
SYSIBM.SYSINDEXES .........................................................................................292!
SYSIBM.SYSINDEXES_HIST ...............................................................................296!
SYSIBM.SYSINDEXES_RTSECT .........................................................................297!
SYSIBM.SYSINDEXES_TREE ..............................................................................297!
SYSIBM.SYSINDEXPART .....................................................................................297!
SYSIBM.SYSINDEXPART_HIST ..........................................................................300!
SYSIBM.SYSINDEXSPACESTATS ......................................................................302!
SYSIBM.SYSINDEXSTATS ...................................................................................305!
SYSIBM.SYSINDEXSTATS_HIST ........................................................................306!
SYSIBM.SYSJARCLASS_SOURCE .....................................................................307!
SYSIBM.SYSJARCONTENTS ...............................................................................307!
SYSIBM.SYSJARDATA .........................................................................................307!
SYSIBM.SYSJAROBJECTS ..................................................................................307!
SYSIBM.SYSJAVAOPTS ......................................................................................308!
SYSIBM.SYSJAVAPATHS ....................................................................................308!
SYSIBM.SYSKEYCOLUSE ...................................................................................308!
SYSIBM.SYSKEYS ................................................................................................309!
SYSIBM.SYSKEYTARGETS .................................................................................309!
SYSIBM.SYSKEYTARGETSTATS ........................................................................311!
SYSIBM.SYSKEYTARGETS_HIST .......................................................................311!
SYSIBM.SYSKEYTGTDIST ...................................................................................313!
SYSIBM.SYSKEYTGTDISTSTATS .......................................................................314!
SYSIBM.SYSKEYTGTDIST_HIST ........................................................................315!
SYSIBM.SYSLOBSTATS ......................................................................................316!
SYSIBM.SYSLOBSTATS_HIST ............................................................................316!
SYSIBM.SYSOBJROLEDEP .................................................................................316!
SYSIBM.SYSPACKAGE ........................................................................................317!
SYSIBM.SYSPACKCOPY .....................................................................................323!
SYSIBM.SYSPACKAUTH ......................................................................................329!
SYSIBM.SYSPACKDEP ........................................................................................330!
SYSIBM.SYSPACKLIST ........................................................................................332!
SYSIBM.SYSPACKSTMT ......................................................................................332!
SYSIBM.PACKSTMT_STMB .................................................................................334!
SYSIBM.PACKSTMT_STMT .................................................................................334!
SYSIBM.SYSPARMS ............................................................................................334!
SYSIBM.SYSPENDINGDDL ..................................................................................337!
SYSIBM.SYSPENDINGOBJECTS ........................................................................337!
SYSIBM.SYSPKSYSTEM ......................................................................................338!
SYSIBM.SYSPLAN ................................................................................................338!
SYSIBM.SYSPLANAUTH ......................................................................................342!
SYSIBM.SYSPLANDEP ........................................................................................343!
SYSIBM.SYSPLSYSTEM ......................................................................................344!
Table of Contents

17

YL&A DB2 10 for z/OS Reference Guide

SYSIBM.SYSQUERY ............................................................................................ 344!


SYSIBM.SYSQUERY_AUX ................................................................................... 345!
SYSIBM.SYSQUERYOPTS .................................................................................. 346!
SYSIBM.SYSQUERYPLAN ................................................................................... 346!
SYSIBM.SYSRELS ............................................................................................... 352!
SYSIBM.SYSRESAUTH ........................................................................................ 353!
SYSIBM.SYSROLES ............................................................................................. 354!
SYSIBM.SYSROUTINEAUTH ............................................................................... 354!
SYSIBM.SYSROUTINES ...................................................................................... 355!
SYSIBM.SYSROUTINESTEXT ............................................................................. 363!
SYSIBM.SYSROUTINES_OPTS .......................................................................... 364!
SYSIBM.SYSROUTINES_PTREE ........................................................................ 364!
SYSIBM.SYSROUTINES_SRC ............................................................................. 364!
SYSIBM.SYSSCHEMAAUTH ................................................................................ 365!
SYSIBM.SYSSEQUENCEAUTH ........................................................................... 365!
SYSIBM.SYSSEQUENCES .................................................................................. 366!
SYSIBM.SYSSEQUENCESDEP ........................................................................... 368!
SYSIBM.SYSSTMT ............................................................................................... 368!
SYSIBM.SYSSTOGROUP .................................................................................... 371!
SYSIBM.SYSSTRINGS ......................................................................................... 372!
SYSIBM.SYSSYNONYMS .................................................................................... 373!
SYSIBM.SYSTABAUTH ........................................................................................ 373!
SYSIBM.SYSTABCONST ..................................................................................... 375!
SYSIBM.SYSTABLEPART .................................................................................... 376!
SYSIBM.SYSTABLEPART_HIST .......................................................................... 380!
SYSIBM.SYSTABLES ........................................................................................... 381!
SYSIBM.SYSTABLESPACE ................................................................................. 387!
SYSIBM.SYSTABLESPACESTATS ...................................................................... 391!
SYSIBM.SYSTABLES_HIST ................................................................................. 394!
SYSIBM.SYSTABLES_PROFILES ....................................................................... 395!
SYSIBM.SYSTABLES_PROFILE_TEXT .............................................................. 396!
SYSIBM.SYSTABSTATS ...................................................................................... 396!
SYSIBM.SYSTABSTATS_HIST ............................................................................ 396!
SYSIBM.SYSTRIGGERS ...................................................................................... 397!
SYSIBM.SYSTRIGGERS_STMT .......................................................................... 398!
SYSIBM.SYSUSERAUTH ..................................................................................... 398!
SYSIBM.SYSVIEWDEP ........................................................................................ 401!
SYSIBM.SYSVIEWS ............................................................................................. 401!
SYSIBM.SYSVIEWS_STMT ................................................................................. 403!
SYSIBM.SYSVIEWS_TREE .................................................................................. 403!
SYSIBM.SYSVOLUMES ....................................................................................... 403!
SYSIBM.SYSXMLRELS ........................................................................................ 403!
SYSIBM.SYSXMLSTRINGS ................................................................................. 403!
18

Table of Contents

YL&A DB2 10 for z/OS Reference Guide

SYSIBM.USERNAMES ..........................................................................................404!
SYSIBM.SYSXMLTYPMOD ..................................................................................405!
SYSIBM.SYSXMLTYPMSCHEMA ........................................................................405!
SYSIBM.XSRCOMPONENT ..................................................................................405!
SYSIBM.XSROBJECTS ........................................................................................405!
SYSIBM.XSROBJECTCOMPONENTS .................................................................406!
SYSIBM.XSROBJECTGRAMMER ........................................................................407!
SYSIBM.XSROBJECTHIERARCHIES ..................................................................407!
SYSIBM.XRSOBJECTPROPERTY .......................................................................407!
SYSIBM.XSRPROPERTY .....................................................................................407!

UPDATEABLE CATALOG STATISTICS ......................... 408!


IBM UTILITIES .................................................................. 410!
BACKUP SYSTEM .................................................................................................410!
CATENFM ..............................................................................................................410!
CATMAINT .............................................................................................................410!
CHECK DATA ........................................................................................................410!
CHECK INDEX .......................................................................................................411!
CHECK LOB ..........................................................................................................412!
COPY .....................................................................................................................412!
COPYTOCOPY ......................................................................................................413!
DIAGNOSE ............................................................................................................414!
EXEC SQL .............................................................................................................415!
LISTDEF ................................................................................................................415!
LOAD .....................................................................................................................416!
MERGECOPY ........................................................................................................420!
MODIFY RECOVERY ............................................................................................420!
MODIFY STATISTICS ...........................................................................................421!
OPTIONS ...............................................................................................................421!
QUIESCE ...............................................................................................................421!
REBUILD INDEX ....................................................................................................422!
RECOVER .............................................................................................................423!
REORG INDEX ......................................................................................................423!
REORG TABLESPACE .........................................................................................425!
REPAIR ..................................................................................................................429!
REPORT ................................................................................................................430!
RESTORE SYSTEM ..............................................................................................431!
RUNSTATS ............................................................................................................431!
STOSPACE ...........................................................................................................433!
TEMPLATE ............................................................................................................433!
UNLOAD ................................................................................................................434!
Table of Contents

19

YL&A DB2 10 for z/OS Reference Guide

SQL POSITIVE RETURN CODES .................................... 439!


SQL ERROR RETURN CODES ....................................... 443!
RESOURCE TYPES ................................................................................................... 470!

20

Table of Contents

YL&A DB2 10 for z/OS Reference Guide

DB2 10 for z/OS


Language Elements
Special registers
>>__ _CURRENT APPLICATION ENCODING SCHEME________________________ ___________><
|_CURRENT CLIENT_ACCTNG______________________________________|
|_CURRENT CLIENT_APPLNAME____________________________________|
|_CURRENT CLIENT_USERID______________________________________|
|_CURRENT CLIENT_WRKSTNNAME__________________________________|
|_ _CURRENT DATE____ ________________________________________|
| |
|
|
| |_CURRENT_DATE____|
|
|_CURRENT DEBUG MODE_________________________________________|
|_CURRENT DECFLOAT ROUNDING MODE_____________________________|
|_CURRENT DEGREE_____________________________________________|
|
_LOCALE_
|
|_ _CURRENT__|________|__LC_CTYPE_ __________________________|
| |_CURRENT_LC_CTYPE______________|
|
|
_TABLE_
_FOR OPTIMIZATION_ |
|_CURRENT MAINTAINED__|_______|__TYPES__|__________________|_|
|_CURRENT MEMBER_____________________________________________|
|_CURRENT OPTIMIZATION HINT__________________________________|
|_CURRENT PACKAGE PATH_______________________________________|
|_CURRENT PACKAGESET_________________________________________|
|_ _CURRENT PATH_ ___________________________________________|
| |_CURRENT_PATH_|
|
|_CURRENT PRECISION__________________________________________|
|_CURRENT REFRESH AGE________________________________________|
|_CURRENT ROUTINE VERSION____________________________________|
|_CURRENT RULES______________________________________________|
|_ _CURRENT SCHEMA____ ______________________________________|
| |
|
|
| |_CURRENT_SCHEMA____|
|
|_CURRENT SERVER_____________________________________________|
|_CURRENT SQLID______________________________________________|
|
___(_6_)___
_WITHOUT TIME ZONE_
|
|_ _CURRENT TIMESTAMP__|___________|_|___________________|___|
| |
||_(integer)_| |_WITH TIME ZONE____|
|
| |_CURRENT_TIMESTAMP_|
|
|_ _CURRENT TIME_________ ___________________________________|
| |
|
|
| |_CURRENT_TIME_________|
|
|_CURRENT TIMEZONE___________________________________________|
|_SESSION_USER_______________________________________________|
|_USER______|

Host Variables
>__:host-identifier__________________________________________________>
|
_INDICATOR_
|
DB2 10 for z/OS

21

YL&A DB2 10 for z/OS Reference Guide


|__|___________|_:host-identifier_|
In Java, the syntax of host-variable is:
>__:_____________java-identifier___________________________________________>
|_IN____| |_(java-expression_)_| | _INDICATOR_
|
|_OUT___|
|_|___________|_:_Java-identifier_|
|_INOUT_|
In PL/I, C, and COBOL, the syntax of host-variable is:
>__:______________________host-identifier___________________________________>
|_host-identifier._|
>___________________________________________________________________________>
|
_INDICATOR_
|
|__|___________|_:______________________host-identifier_|
|_host-identifier._|

Functions
>__function-name__(_________________________________________________)_______>
|_ALL______| | <_,______________________________ |
|_DISTINCT_| |____expression____________________|_|
|_TABLE__transition-table-name_|

Table Function
>_TABLE_(function-name(_____________________________))_correlation-clause __>
| <_,____________________________ |
|_|_expression__________________|_|
|_TABLE_transition_table_name_|

Expressions
<_operator_________________________
>___|_________function-invocation_____|________________________________>
|_+_| |_(expression)__________|
|_-_| |_constant______________|
|_column-name___________|
|_variable______________|
|_special-register______|
|_scalar-fullselect_____|
|_time-zone-expression__|
|_labeled-duration______|
|_case-expression_______|
|_cast-specification____|
|_XMLCAST-specification_|
|_sequence-reference____|
|_row-change-expression_|
|_OLAP-specification____|
>____CONCAT____________________________________________________________>
|_||_____|
|_/______|
|_*______|
|_+______|
|_-______|

Labeled durations
>____function-invocation____YEAR___________________________________________>
22

DB2 10 for z/OS

YL&A DB2 10 for z/OS Reference Guide


|_(expression)__|
|_constant______|
|_column-name___|
|_variable______|

|_YEARS________|
|_MONTH________|
|_MONTHS_______|
|_DAY__________|
|_DAYS_________|
|_HOUR_________|
|_HOURS________|
|_MINUTE_______|
|_MINUTES______|
|_SECOND_______|
|_SECONDS______|
|_MICROSECOND__|
|_MICROSECONDS_|

CASE expressions
_ELSE NULL_______________
>__CASE____searched-when-clause____|_________________________|_______>
|_simple-when-clause___| |_ELSE__result-expression_|
>__END_______________________________________________________________>
searched-when-clause:
<_____________________________________________________
>____WHEN__search-condition__THEN____result-expression___|___________>
|_NULL______________|
simple-when-clause:
<_______________________________________________
>__expression____WHEN__expression__THEN____result-expression___|_____>
|_NULL______________|

CAST
>__CAST__(____expression__________AS__data-type__)___________________>
|_NULL_____________|
|_parameter-marker_|
data-type:
>_________________built-in-data-type_________________________________>
|_schema._| |_distinct-type-name_|
built-in data-type:
>__SMALLINT__________________________________________________________________________________><
| |_INTEGER__|
|
| | |INT__| |
|
| |_BIGINT___|
|
|
______(5,0)______________________
|
|__DECIMAL____|_________________________________|___________________________________________|
||_DEC_____| |_(__integer_________________)____|
|
||_NUMERIC_|
|_, integer_|
|
|
_(34)_
|
|_DECFLOAT_ |______|________________________________________________________________________|
|
|_(16)_|
|
|
_(53)__________
|
|___FLOAT__|_______________|_______________________________________________________________ |
| |
|_(__integer__)_|
|
|_|_REAL___________________|
|
| |
_PRECISION_
|
|
|_|_DOUBLE__|___________|__|
|
|
__(1)___________
|
|_______CHARACTER____|________________|_____________________________________________________|
| | | |_CHAR______| |_(_length__)____| |
|_FOR___SBCS____DATA_|
| |

DB2 10 for z/OS

23

YL&A DB2 10 for z/OS Reference Guide


| | |___CHARACTER__VARYING__(_length__)__|
|_MIXED_|
| |
| | | |_CHAR_____|
|
|_BIT___|
| |
| | |__VARCHAR____________|
| |
| |
_(1M)_______
| |
| |_____CHARACTER___LARGE OBJECT_ |____________|__________________________________________| |
|
| |_CHAR______|
|_(_integer_)_| |_FOR__SBCS____DATA_|
|
|
|___CLOB______________________|
|_MIXED_|
|
|
__(1)______________
|
|___GRAPHIC_|__________________|____________________________________________________________|
| |
|_(__integer___)___|
|
|
| |_VARGRAPHIC__(__integer__)___________|
|
| |
__(1M)_____________
|
| |_DBCLOB_|___________________|
|
|
|_(integer)_________|
|
|
_(1)________
|
|_ _BINARY__|____________|__________________________________________________________________|
| |
|_(integer)__|
|
|
| |__BINARY VARYING _(integer)______________________________|
|
| | |_VARBINARY_____|
|
|
| |
_(1M)____________________
|
|
| |_BINARY LARGE OBJECT_____|_________________________|_____|
|
| |_BLOB________________| |_(__integer_________)____|
|
|
|_K_|
|
|
|_M_|
|
|
|_G_|
|
|___DATE____________________________________________________________________________________|
| |_TIME______|
|
| |
__(_6_)_____
_WITHOUT TIME ZONE_
|
| |_TIMESTAMP_|____________|___|___________________|________________________________________|
|
|_(integer_)_|
|_WITH TIME ZONE____|
|
|_ROWID_____________________________________________________________________________________|
|_XML_______________________________________________________________________________________|

length:
>_integer_______________________________________________________________>
|_CODEUNITS16_|
|_CODEUNITS32_|
|_OCTETS______|
Lob-length:
>_integer_______________________________________________________________>
|_K_| |_CODEUNITS16_|
|_M_| |_CODEUNITS32_|
|_G_| |_OCTETS______|

XMLCAST specification
>__XMLCAST_(__expression____________AS__data-type________________________>
|_NULL_____________|
|_parameter-marker_|

NEXT VALUE expression


>__NEXT VALUE FOR sequence-name__________________________________________>

PREVIOUS VALUE expression


>__PREVIOUS VALUE FOR sequence-name_______________________________________>
24

DB2 10 for z/OS

YL&A DB2 10 for z/OS Reference Guide

ROW CHANGE expression


>_ROW CHANGE____TIMESTAMP____FOR__table-designator_________________________>
|_TOKEN_____|

OLAP
>___ordered-OLAP-specification ____________________________________________>
|_numbering-specification___|
|_aggregation-specification_|
ordered-OLAP-specification:
>__RANK________(_)_OVER_(____________________________window-order-clause_)_>
|_DENSE_RANK_(_)|
|_window-partition-clause_|
numbering-specification:
>__ROW_NUMBER___()_OVER_(____________________________window-order-clause_)_>
|_window-partition-clause_|
aggregation-specification:
>_aggregate function_()_OVER_(________________________window-order-clause_)_>
|_window-partition-clause_|
__RANGE BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING__________
>__|_____________________________________________________________________|__>
|
_RANGE BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW_
|
|_window-order_|___________________________________________________|_)|
|_ window-aggregation-group-clause__________________|
window-partition-clause:
<_,_____________________
>_PARTITION BY__ partition-expression__|___________________________________>
window-order-clause:
<_,_______________________________________________
_NULLS LAST_
|
_ASC__|____________|____ |
>_ORDER BY___sort-key-expression____|________________________|_|___________>
|_ASC NULLS FIRST_______|
|
__NULLS FIRST_ |
|_DESC_|______________|_|
|_DESC NULLS LAST_______|
aggregate-function:
>___AVG function___________________________________________________________>
|_CORRELATION function_|
|_COUNT function_______|
|_COUNT_BIG function___|
|_COVARIANCE function__|
|_MAX function_________|
|_MIN function_________|
|_STDDEV function______|
|_SUM function_________|
|_VARIANCE function____|

DB2 10 for z/OS

25

YL&A DB2 10 for z/OS Reference Guide


window-aggregation-group-clause
>___ROWS_____________group-start__________________________________________>
|_RANGE_|
|_group-between_|
|_group-end_____|
group-start
>___UNBOUNDED PRECEDING___________________________________________________>
|_unsigned-constant_PRECEDING_|
|_CURRENT ROW_________________|
group-between
>___BETWEEN__group-bound____AND___group-bound-2___________________________>
group-bound-1
>___UNBOUNDED PRECEDING___________________________________________________>
|_unsigned-constant_PRECEDING_|
|_unsigned-constant_FOLLOWING_|
|_CURRENT ROW_________________|
group-end
>___UNBOUNDED FOLLOWING___________________________________________________>
|_unsigned-constant_FOLLOWING_|

Predicates
>_______basic predicate__________________________________________________>
|_quantified predicate_|
|_BETWEEN predicate____|
|_DISTINCT predicate___|
|_EXISTS predicate_____|
|_IN predicate_________|
|_LIKE predicate_______|
|_NULL predicate_______|
|_XMLEXISTS predicate__|

Basic predicate
>>__ _expression_ _=_____ _expression__________________________ _________><
|
|_<>____|
|
|
|_<_____|
|
|
|_>_____|
|
|
|_<=____|
|
|
|_>=____|
|
|
|
|_(row-value-expression)__ _=____ __(row-value-expression)_|
|_<>___|

Quantified predicate
>>__ _expression__ _=_____ __ _SOME_ __(fullselect1)____ ______________><
|
|
| |_ANY__|
|
|
|_<>____| |_ALL__|
|
|
|_<_____|
|
|
|_>_____|
|
|
|_<=____|
|
|
|_>=____|
|
26

DB2 10 for z/OS

YL&A DB2 10 for z/OS Reference Guide


|_(row-value-expression)=_ _SOME_ _(fullselect2)____|
|
|_ANY__|
|
|_(row-value-expression)___<>______ALL(fullselect2)_|

BETWEEN predicate
>__expression___________BETWEEN__expression__AND__expression______________><
|_NOT_|

DISTINCT predicate
>__expression_IS________DISTINCT FROM__expression_________________________><
|
|_NOT_|
|
|_(row-value-expression)_IS_______DISTINCT FROM_(row-value-expression)__|
|_NOT_|

EXISTS predicate
>__EXISTS(fullselect)_____________________________________________________><

IN predicate
>>__ _expression1__ _____ __IN_ _(fullselect1)_________ __ _____________><
|
|_NOT_|
|
<_,_____________
| |
|
|_(____expression2__|_)_| |
|_(row-value-expression)__ _____ __IN__(fullselect2)__|
|_NOT_|

LIKE predicate
>__match-expression___________LIKE__pattern-expression____________________>
|_NOT_|
>_________________________________________________________________________>
|_ESCAPE__escape-expression_|

NULL predicate
>__expression__IS___________NULL__________________________________________>
|_NOT_|

XMLEXISTS
>_XMLEXISTS_(_xquery-expression-constant__________________________________>
>___________________________________________________)____________________><
|
_BY REF_
|
|_PASSING_|________|xquery-argument___|
xquery-argument
>__xquery-context-item-expression________________________________________><
|_xquery-context-item-expression_AS_identifier_|

Search conditions
>_____________predicate________________________________)__________________>
|_NOT_| |_(search-condition)_|
<______________________________________________
>__________________________________________________|______________________>
|___AND_______________predicate____________|
|_OR__| |_NOT_| |_(search-condition)_|
DB2 10 for z/OS

27

YL&A DB2 10 for z/OS Reference Guide

Aggregate Functions
AVG
_ALL______
>__AVG(_|__________|_numeric-expression)____________________________________>
|_DISTINCT_|

CORRELATION
>_CORRELATION(expression-1, expression-2)___________________________________>

COUNT
_ALL______
>_COUNT(___|__________|__expression___)_____________________________________>
| |_DISTINCT_|
|
|_*________________________|

COUNT_BIG
_ALL______
>_COUNT_BIG(___|__________|__expression___)_________________________________>
| |_DISTINCT_|
|
|_*________________________|

COVARIANCE or COVARIANCE_SAMP
>___COVARIANCE_______(expression-1, expression-2)___________________________>
|_COVARIANCE_SAMP_|

MAX
_ALL______
>__MAX(_|__________|_expression)____________________________________________>
|_DISTINCT_|

MIN
_ALL______
>__MIN(_|__________|_expression)____________________________________________>
|_DISTINCT_|

STDDEV
_ALL______
>__STDDEV(_|__________|_expression)_________________________________________>
|_DISTINCT_|

STDDEV_SAMP
_ALL______
>__STDDEV_SAMP(_|__________|_expression)____________________________________>
|_DISTINCT_|

SUM
_ALL______
>__SUM(_|__________|_expression)____________________________________________>
|_DISTINCT_|
28

DB2 10 for z/OS

YL&A DB2 10 for z/OS Reference Guide

VARIANCE or VARIANCE SAMP


_ALL______
>_____VARIANCE_______(_|__________|_expression)____________________________>
|_VARIANCE_SAMP_| |_DISTINCT_|

XMLAGG
>____XMLAGG(XML-expression_______________________________________________)_>
|
<_,______________________ |
|
_ASC___
| |
|_ORDER BY_sort-key___|_______|_____|_|
sort-key
|_DESC__|
>________column-name______________________________________________________><
|_expression_|

Scalar functions
ABS
>__ABS(numeric-expression)_____________________________________________>

ACOS
>__ACOS(numeric-expression)____________________________________________>

ADD_MONTHS
>__ADD_MONTHS(expression,numeric-expression)___________________________>

ASCII
>_ASCII(string-expression)_____________________________________________>

ASCII_CHR
>_ASCII_CHR(expression)________________________________________________>

ASCII_STR
>_ASCII_CHR(string-expression)_________________________________________>

ASIN
>__ASIN(numeric-expression)____________________________________________>

ATAN
>__ATAN(numeric-expression)____________________________________________>

ATANH
>__ATANH(numeric-expression)__________________________________________>

ATAN2
>__ATAN2(numeric-expression1,numeric-expression2)______________________>

BIGINT
Numeric to Big Integer:
>_BIGINT(numeric-expression____________________________________________>
String to Big Integer:
>_BIGINT(string-expression_____________________________________________>
DB2 10 for z/OS

29

YL&A DB2 10 for z/OS Reference Guide

BINARY
>_BINARY(string-expression________________)____________________________>
|_,_integer_|

BITAND, BITANDNOT, BITOR, BITXOR and BITNOT


>__BITAND_____(_expression1__, expression2__)__________________________>
|_BITANDNOT_|
|_BITOR_____|
|_BITXOR____|
>_BINOT(_expression_)__________________________________________________>

BLOB
>__BLOB(expression________________)____________________________________>
|_,__integer_|

CCSID_ENCODING
>__CCSID_ENCODING(expression)__________________________________________>

CEILING
>__CEILING_______(__expression__)______________________________________>

CHAR
Datetime to Character:
>__CHAR(datetime-expression__________________)_________________________>
|_,____ISO_____|
|_USA___|
|_EUR___|
|_JIS___|
|_LOCAL_|
Character to Character:
>__CHAR(character-expression_______________________________)___________>
|_,_integer__________________|
|_,|_CODEUNITS16_|
|_CODEUNITS32_|
|_OCTETS______|
Graphic to Character:
>__CHAR(graphic-expression__________________________________)__________>
|_,_integer__________________|
|_,|_CODEUNITS16_|
|_CODEUNITS32_|
Integer to Character:
>__CHAR(integer-expression)____________________________________________>
Decimal to Character:
>__CHAR(decimal-expression__________________________)__________________>
|_,__decimal-character_|
Decimal floating-Point to Character:
>__CHAR(decimal-floating-point-expression)_____________________________>
30

DB2 10 for z/OS

YL&A DB2 10 for z/OS Reference Guide


Floating-Point to Character:
>__CHAR(floating-point-expression)_____________________________________>
Row ID to Character:
>__CHAR(row-ID-expression)_____________________________________________>

CHARACTER_LENGTH
Character sting:
>__CHARACTER_LENGTH(character-expression__,_ CODEUNITS16_____)_________>
|_CODEUNITS32_|
|_OCTETS______|
Graphic string:
>__CHARACTER_LENGTH(graphic-expression__,___CODEUNITS16_____)__________>
|_CODEUNITS32_|

CLOB
Character to CLOB:
>__CLOB(character-expression_______________________________)___________>
|_,_integer__________________|
|_,|_CODEUNITS16_|
|_CODEUNITS32_|
|_OCTETS______|
GRAPHIC to CLOB:
>__CLOB(graphic-expression__________________________________)__________>
|_,_integer__________________|
|_,|_CODEUNITS16_|
|_CODEUNITS32_|

COALESCE
<___________
>_____COALESCE___(expression__,expression|_)___________________________>

COLLATION_KEY
>__COLLATION_KEY(string-expression, collation-name______________)______>
|_,integer_|

COMPARE_DECFLOAT
>__COMPARE_DECFLOAT(decfloat-expression1,decfloat-expression2__________>

CONCAT
>_____CONCAT____(expression1,expression2)______________________________>
|_"||"____|

CONTAINS
>__CONTAINS ____(column-name, search-argument)_________________________>
|_,string-constant_|
Search-argument-options:
<_____________________
>___________________________|__________________________________________>
|_QUERYLANGUAGE = value_|
|_RESULTLIMIT = value___|
DB2 10 for z/OS

31

YL&A DB2 10 for z/OS Reference Guide


|
_OFF_
|
|_SYNONYM = |_ON__|_____|

COS
>__COS(numeric-expression)_____________________________________________>

COSH
>__COSH(numeric-expression)____________________________________________>

DATE
>__DATE(expression)____________________________________________________>

DAY
>__DAY(expression)_____________________________________________________>

DAYOFMONTH
>__DAYOFMONTH(expression)______________________________________________>

DAYOFWEEK
>__DAYOFWEEK(expression)_______________________________________________>

DAYOFWEEK_ISO
>__DAYOFWEEK_ISO(expression)___________________________________________>

DAYOFYEAR
>__DAYOFYEAR(expression)_______________________________________________>

DAYS
>__DAYS(expression)____________________________________________________>

DBCLOB
Character to DBCLOB:
>__DBCLOB(character-expression_______________________________)_________>
|_,_integer__________________|
|_,|_CODEUNITS16_|
|_CODEUNITS32_|
GRAPHIC to DBCLOB:
>__DBCLOB(graphic-expression________________________________)__________>
|_,_integer__________________|
|_,|_CODEUNITS16_|
|_CODEUNITS32_|

DECFLOAT
numeric to DECFLOAT:

_,34_
>__DECFLOAT_(_numeric-expression__|_____|________________________)_____>
|_,16_|
string to DECFLOAT:
_,34_
>__DECFLOAT_(_string-expression___|_____|________________________)_____>
|_,16_|

32

DB2 10 for z/OS

YL&A DB2 10 for z/OS Reference Guide

DECFLOAT_SORTKEY
>_DECFLOAT_SORTKEY_ (_decfloat-expression_)______________________________>

DECIMAL or DEC
Numeric to decimal:
>_____DECIMAL___(___numeric-expression________________________)__________>
|_DEC_____|
|_precision_________|
|_scale_|
String to decimal:
>_DECIMAL_(string-expression___________________________________)_________>
|_DEC__|
|_,precision_____________________|
|_,scale____________|
|_,decimal-char_|

DECODE
<__________________________________
>_DECODE_(_expression1__,_expression2_,_result-expression_|______________>
>_________________________________________________________)______________>
|_,_else-expression_|

DECRYPT
>>___ _DECRYPT_BINARY_________(encrypted-data____________________________>
|_DECRYPT_BIT___|
|_DECRYPT_CHAR__|
|_DECRYPT_DB____|
>_____ _________________________________________________________)________><
|_,_ _password-string____________ _ _ ___________________|
|_DEFAULT____________________| |_,__ccsid-constant_|

DEGREES
>__DEGREES(expression)___________________________________________________>

DIFFERENCE
>__DIFFERENCE(expression1, expression2)__________________________________>

DIGITS
>__DIGITS(expression)____________________________________________________>

DOUBLE or DOUBLE_PRECISION
>__DOUBLE_________________(___numeric-expression___)_____________________>
|_DOUBLE_PRECISION_|
|_string-expression__|

DSN_XMLVALIDATE
>__DSN_XMLVALIDATE_______________________________________________________>
>_(string-expression_,_schema-name-sting_________________________________>
|_xml-expression_| |target-namespace-uri-sting,schema-loaction-string|

EBCDIC_CHR
>>__EBCDIC(expression)___________________________________________________>

DB2 10 for z/OS

33

YL&A DB2 10 for z/OS Reference Guide

EBCDIC_STR
>>__EBCDIC_STR(string-expression)________________________________________>

ENCRYPT_TDES
>>__ENCRYPT_TDES(data-string_____________________________________________>
|_,password-string,hint-string_|

EXP
>__EXP(numeric-expression)_______________________________________________>

EXTRACT
Extract date values:
>__EXTRACT(__YEAR____)_FROM__date-expression_________)___________________>
|_MONTH_|
|_timestamp-expression_|
|_DAY___|
Extract time values:
>__EXTRACT(___HOUR____)_FROM__time-expression_________)__________________>
|_MINUTE_|
|_timestamp-expression_|
|_SECOND_|
Extract time zone values:
>__EXTRACT(___HOUR____)________FROM__date-expression_________)___________>
|_MINUTE__________|
|_time-expression______|
|_SECOND__________|
|_timestamp-expression_|
|_TIMEZONE_HOUR___|
|_TIMEZONE_MINUTE_|

FLOAT
>__FLOAT(numeric-expression)_____________________________________________>

FLOOR
>__FLOOR(numeric-expression)_____________________________________________>

GENERATE UNIQUE
>__GENERATE_UNIQUE()_____________________________________________________>

GETHINT
>__GETHINT(encrypted-data)_______________________________________________>

GETVARIABLE
>__GETVARIABLE(string-constant_ _________________________________________>
|_,__default-value_________________|
|_,__CAST_(_NULL AS_VARCHAR(1)_)___|

GRAPHIC
Character to Graphic:
>__GRAPHIC(character-expression__________________________________)_______>
|_,_integer____________________|
|_,_CODEUNITS16___|
|_CODEUNITS32_|
Graphic to Graphic:
>__GRAPHIC(graphic-expression___________________________________)________>
|_,_integer____________________|
34

DB2 10 for z/OS

YL&A DB2 10 for z/OS Reference Guide


|_,_CODEUNITS16___|
|_CODEUNITS32_|

HEX
>__HEX(expression)_______________________________________________________>

HOUR
>__HOUR(expression)______________________________________________________>

IDENTITY_VAL_LOCAL()
>__IDENTITY_VAL_LOCAL()__________________________________________________>

IFNULL
>__IFNULL(expression,expression)_________________________________________>

INSERT
>_INSERT(source-string,start,length,insert-string___________________)____>
|_,_CODEUNITS16___|
|_CODEUNITS32_|
|_OCTETS______|

INTEGER or INT
>_____INTEGER___(___numeric-expression___)_______________________________>
|_INT_____|
|_string-expression__|

JULIAN_DAY
>__JULIAN_DAY(expression)________________________________________________>

LAST_DAY
>__LAST_DAY(expression)__________________________________________________>

LCASE
>_____LCASE___(string-expression)________________________________________>
|,_locale-name_| |_,_integer_|

LEFT
Character string:
>_LEFT(character-expression,length ____________________)_________________>
|_,_CODEUNITS16___|
|_CODEUNITS32_|
|_OCTETS______|
Graphic string:
>_LEFT(graphic-expression,length ____________________)___________________>
|_,_CODEUNITS16___|
|_CODEUNITS32_|
Binary string:
>_LEFT(binary-expression,length ____________________)____________________>

LENGTH
>__LENGTH(expression)____________________________________________________>

DB2 10 for z/OS

35

YL&A DB2 10 for z/OS Reference Guide

LN
>__LN(numeric-expression)________________________________________________>

LOCATE
>_LOCATE(search-string,source-string_____________)_______________________>
|_,_start_| |_,_CODEUNITS16___|
|_CODEUNITS32_|
|_OCTETS______|

LOCATE_IN_STRING
>_LOCATE(source-string,search-string_____________________________________>
|_,_start_______________|
|_,instance_|
>_________________________________________________)______________________><
|_,_CODEUNITS16___|
|_CODEUNITS32_|
|_OCTETS______|

LOG10
>__LOG10(numeric-expression)_____________________________________________>

LOWER
>__LOWER(string-expression__________________________________)____________>
|_,_locale-name_| |_,_integer_|

LPAD
>__LPAD(string-expression,integer____________)___________________________>
|_,_pad_|

LTRIM
>__LTRIM(string-expressio)_____________________________)_________________>
|_,_trim-expression_|

MAX
<__________
>__MAX(expression, expression_|_)________________________________________>

MICROSECOND
>__MICROSECOND(expression)_______________________________________________>

MIDNIGHT_SECONDS
>__MIDNIGHT_SECONDS(expression)__________________________________________>

MIN
<__________
>__MIN(expression, expression_|_)________________________________________>

MINUTE
>__MINUTE(expression)____________________________________________________>

MOD
>__MOD(numeric-expression1,numeric-expression2)__________________________>
36

DB2 10 for z/OS

YL&A DB2 10 for z/OS Reference Guide

MONTH
>__MONTH(expression)_____________________________________________________>

MONTHS_BETWEEN
>__MONTHS_BETWEEN(expression1,expression2)_______________________________>

MULTIPLY_ALT
>__MULTIPLY_ALT(exact-numeric-expression1,exact-numeric-expression2)_____>

NEXT_DAY
>__NEXT_DAY(expression,string-expression)________________________________>

NORMALIZE_DECFLOAT
>__NORMALIZE_DECFLOAT(decfloat-expression)_______________________________>

NORMALIZE_STRING
_NFC__
>__NORMALIZE_STRING(unicode-string,_|_NFD__|______________)______________>
|_NFKC_| |_,_integer_|
|_NFKD_|

NULLIF
>__NULLIF(expression,expression)_________________________________________>

NVL
<__________
>__NVL(expression, expression_|_)________________________________________>

OVERLAY
>_OVERLAY(source-string_,insert-sting_,_length_,_CODEUNITS16______)______>
|_CODEUNITS32_|
|_OCTETS______|

POSITION
>_POSTITION(search-string,source-string_,_ CODEUNITS16__)________________>
|_CODEUNITS32_|
|_OCTETS______|

POSSTR
>__POSSTR(source-string,search-string)___________________________________>

POWER
>__POWER(numeric-expression1,numeric-expression2)________________________>

QUANTIZE
>__QUANTIZE(expression-1,expression-2)___________________________________>

QUARTER
>__QUARTER(expression)___________________________________________________>

RADIANS
>__RADIANS(numeric-expression)___________________________________________>
DB2 10 for z/OS

37

YL&A DB2 10 for z/OS Reference Guide

RAISE_ERROR
>__RAISE_ERROR(sqlstate,diagnostic-string)_______________________________>

RAND
>__RAND(________________________)________________________________________>
|_numeric-expression_|

REAL
>__REAL(___numeric-expression___)________________________________________>
|_string-expression__|

REPEAT
>__REPEAT(expression,integer)____________________________________________>

REPLACE
>__REPLACE(source-string, search-string, replace-string)_________________>

RID
>__RID(table-designator)_________________________________________________>

RIGHT
>__RIGHT(string-expression,length)_______________________________________>
|_,_CODEUNITS16___|
|_CODEUNITS32_|
|_OCTETS______|

ROUND
_,_0___________________
>__ROUND(numeric-expression1,_|_______________________|_)________________>
|_,_numeric-expression2_|

ROUND_TIMESTAMP
_,_DD_________
>__ROUND_TIMESTAMP(_expression_|________________|_)______________________>
|_,format-string_|

ROWID
>__ROWID(expression)_____________________________________________________>

RPAD
>__RPAD(string-expression,integer____________)___________________________>
|_,_pad_|

RTRIM
>__RTRIM(string-expression)______________________________________________>

SCORE
>__SCORE(column-name, search-argument, string-constant)__________________>
Search-argument-options:
<_____________________
>___________________________|____________________________________________>
|_QUERYLANGUAGE = value_|
38

DB2 10 for z/OS

YL&A DB2 10 for z/OS Reference Guide


|_RESULTLIMIT = value___|
|
_OFF_
|
|_SYNONYM = |_ON__|_____|

SECOND
>__SECOND(expression)____________________________________________________>
|_,integer-constant_|

SIGN
>__SIGN(numeric-expression)______________________________________________>

SIN
>__SIN(numeric-expression)_______________________________________________>

SINH
>__SINH(numeric-expression)______________________________________________>

SMALLINT
>__SMALLINT(___numeric-expression___)____________________________________>
|_string-expression__|

SOUNDEX
>__SOUNDEX(expression)___________________________________________________>

SOAPHTTPC and SOAPHTTPV


>__SOAPHTTPC___(endpoint_url, soap_action, soap_body)____________________>
|_SOAPHTTPV_|

SPACE
>__SPACE(numeric-expression)_____________________________________________>

SQRT
>__SQRT(numeric-expression)______________________________________________>

STRIP
>__STRIP_(_string-expression___________________________________________)_>
|___,BOTH_____________________________|
|_,B________| |_,strip-character_|
|_,LEADING__|
|_,L________|
|_,TRAILING_|
|_,T________|

SUBSTR
>__SUBSTR(string-expression,start_____________)__________________________>
|_,length_|

SUBSTRING
Character:
>_SUBSTRING(character-expression,start,___________,_CODEUNITS16____)_____>
|_,length_| |_CODEUNITS32_|
|__OCTETS_____|
DB2 10 for z/OS

39

YL&A DB2 10 for z/OS Reference Guide


Graphic:
>_SUBSTRING(graphic-expression,start,___________,_CODEUNITS16____)_______>
|_,length_| |_CODEUNITS32_|
Binary:
>_SUBSTRING(binary-expression,start,____________)________________________>
|_,length_|

TAN
>__TAN(numeric-expression)_______________________________________________>

TANH
>__TANH(numeric-expression)______________________________________________>

TIME
>__TIME(expression)______________________________________________________>

TIMESTAMP
>__TIMESTAMP(expression_________________)________________________________>
|_,expression_|

TIMESTAMPADD
>__TIMESTAMPADD(interval, number, expression)____________________________>

TIMESTAMP_FORMAT
>__TIMESTAMP_FORMAT(string-expression,format-string______________________>
_,6_______________________
>__|__________________________|_______)__________________________________>
|_,_precision-constant_____|

TIMESTAMP_ISO
>_TIMESTAMP_ISO(expression)______________________________________________>

TIMESTAMPDIFF
>__TIMESTAMPDIFF(numeric-expression,string-expression)___________________>

TIMESTAMP_TZ
>_TIMESTAMP_TZ(expression1)______________________________________________>
|_,expression2_|

TO_CHAR
>__TO_CHAR(string-expression,format-string)______________________________>

TO_DATE
>__TO_DATE(string-expression,format-string)______________________________>
_,6_______________________
>__|__________________________|_______)__________________________________>
|_,_precision-constant_____|

TO_NUMBER
>_TO_NUMBER(string-expression)_____________________)_____________________>
|_,_format string_|

40

DB2 10 for z/OS

YL&A DB2 10 for z/OS Reference Guide

TOTALORDER
>__TOTALORDER(expression1, expression2)__________________________________>

TRANSLATE
>_TRANSLATE(expression_____________________________________________)_____>
|_,_to-string________________________________________|
|
_,__' '___________ |
|_,__from-string_|__________________|_|
|_,__pad-character_|

TRUNCATE or TRUNC
_,_0___________________
>__TRUNCATE_(numeric-expression1_|_______________________|_)_____________>
|__TRUNC__|
|_,numeric expression2__|

TRUNC_TIMESTAMP
_DD___________
>__TRUNC_TIMESTAMP_(expression1_|________________|_)_____________________>
|_,format-string_|

UCASE
>_____UCASE___(string-expression_________________________________)_______>
|_,_locale-name_| |_,_integer_|

UNICODE
>____UNICODE___(string-expression)_______________________________________>

UNICODE_STR
_,UTF-8_
>____UNICODE_STR_(string-expression)_|________|_)________________________>
|_,UTF16_|

UPPER
>_____UPPER___(string-expression_________________________________)_______>
|_,_locale-name_| |_,_integer_|

VALUE
<____________
>____VALUE_(expression_, expression_|_)__________________________________>

VARBINARY
>__VARCHAR(string-expression______________)______________________________>
|_,__integer_|

VARCHAR
Varchar to Character:
>__VARCHAR(character-expression_______________________________)__________>
|_,_integer__________________|
|_,__CODEUNITS16_|
|_CODEUNITS32_|
|_OCTETS______|
DB2 10 for z/OS

41

YL&A DB2 10 for z/OS Reference Guide


Graphic to Varchar:
>__VARCHAR(graphic-expression__________________________________)_________>
|_,_integer__________________|
|_,_CODEUNITS16__|
|_CODEUNITS32__|
Datetime to Varchar:
>__VARCHAR(datetime-expression___________________________________________>
Integer to Varchar:
>__VARCHAR(integer-expression)___________________________________________>
Decimal to Varchar:
>__VARCHAR(decimal-expression__________________________)_________________>
|_,__decimal-character_|
Decimal floating-Point to Varchar:
>__VARCHAR(decimal-floating-point-expression)____________________________>
Floating-Point to Varchar:
>__VARCHAR(floating-point-expression)____________________________________>
Row ID to Varchar:
>__VARCHAR(row-ID-expression)____________________________________________>

VARCHAR_FORMAT
>__VARCHAR_FORMAT(timestamp-expression,format-string)____________________>

VARGRAPHIC
Character to Vargraphic:
>__VARGRAPHIC(character-expression___________________________)________>
|_,_integer_____________|
|_,_CODEUNITS16__|
|__CODEUNITS32_|
Graphic to Vargraphic:
>__VARGRAPHIC(graphic-expression____________________________)_________>
|_,_integer_____________|
|_,_CODEUNITS16__|
|__CODEUNITS32_|

VERIFY_GROUP_FOR_USER
<_,_________
>__VERIFY_GROUP_FOR_USER_(_SESSION_USER__,_group-name-expression_|_)_____>
|_USER_______|

VERIFY_ROLE_FOR_USER
<_,_________
>__VERIFY_ROLE_FOR_USER_(_SESSION_ROLE__,_role-name-expression_|_)_______>
|_USER_______|

VERIFY_TRUSTED_CONTEXT_ROLE_USER
<_,_________
>__VERIFY_TRUSTED_CONTEXT_ROLE_FOR_USER_(_SESSION_ROLE_,_role-name-exp_|_)_>
|_USER_______|

42

DB2 10 for z/OS

YL&A DB2 10 for z/OS Reference Guide

WEEK
>__WEEK(expression)______________________________________________________>

WEEK_ISO
>__WEEK_ISO(expression)__________________________________________________>

XMLATTRIBUTES
<_,______________________________________________
>__XMLATTRIBUTES(_attribute-value-expression_______________________|_____>
|_AS_attribute-name_|

XMLCOMMENT
>__XML2COMMENT(string-expression)________________________________________>

XMLCONCAT
<__________________
>__XMLCONCAT(XML- expression____,__XML-expression_|_)_____________________>

XMLDOCUMENT
>__XMLDOCUMENT(XML-expression)____________________________________________>

XMLELEMENT
>__XMLELEMENT(_NAME__ element-name________________________________________>
|_,_xmlnamespace-declaration_|
<_______________________________
>_________________________________________________________________|_______>
|,_XML-attributes-function_|
|_,_element-content-expression_|
>_________________________________________________________________________>
|
|
|
<_________________________________
|
|
_EMPTY ON NULL_
|
|
|_OPTION_____|_NULL ON NULL__|______________ |___|
|
_USING_
|
| _XMLBINARY__|______|_BASE64__ |
||
_USING_
| |
||_XMLBINARY__|______|_HEX_____|_|

XMLFOREST
>_XMLFOREST(_ __________________________________________________________>
|_XMLnamespace-function_,_|
<__,____________________________________________
>_ element-content-expression_____________________|_____________________>
|_AS_element-name_|
>_______________________________________________________________________>
|
<_________________________________
|
|
_EMPTY ON NULL_
|
|
|_OPTION_____|_NULL ON NULL__|______________ |___|
|
_USING_
|
| _XMLBINARY__|______|_BASE64__ |
||
_USING_
| |
||_XMLBINARY__|______|_HEX_____|_|

DB2 10 for z/OS

43

YL&A DB2 10 for z/OS Reference Guide

XMLMODIFY
>__XMLMODIFY(__xquery-update-constant____________________________)_________>
|
<_________________________________________ |
|_,___xquery-variable-expression_AS_identifier |_|

XMLNAMESPACE
<_,__________________________________
>__XMLNAMESPACES(__namespace-uri_AS_namespace-prefix__|_)__________________>
|_DEFAULT_XML-namespace-uri________|
|_NO DEFAULT_____________|

XMLPARSE
_STRIP WHITESPACE_______
>_XMLPARSE(DOCUMENT_string-expression___|________________________|_)_______>
|_XML-host-variable_| |_PRESERVE WHITESPACE_|

XMLPI
>_XMLPI(NAME_pi-name________________________________)______________________>
|_,_string-expression_|

XMLQUERY
>_XMLQUERY(xquery-expression-constant)_____________________________________>
|
_BY REF_
|
|_PASSING_|________|_xquery-argument_|
_BY REF_
_RETURNING SEQUENCE_|________|_
_EMPTY ON EMPTY_
>_|_______________________________|_|________________|__)__________________>
Xquery-argument:
>____xquery-context-item-expression________________________________________>
|_xquery-variable-expression AS identifier__|

XMLSERIALIZE
_CONTENT_
>_XMLSERIALIZE(_|_________|_XML-expression AS data-type____________________>
<_______________________________________
_VERSION__1.0____________________
|
>__|___________________________________|___|_______________________________>
| _EXCLUDING XMLDECLARATION__
|
|_|_INCLUDING XMLDECLARATION__|____|
data-type:

_(_1M_)_____________
>______CHARACTER______LARGE OBJECT_____|____________________|______________>
| | |_CHAR_______|
| | |_(__integer______)_|
| |_CLOB_________________________| |
|_K_|
|_DBCLOB___________________________|
|_M_|
|__BINARY LARGE OBJECT_____________|
|_G_|
|_BLOB________________|

XMLTEXT
>_XMLTEXT(_string-expression _____________________)________________________>
44

DB2 10 for z/OS

YL&A DB2 10 for z/OS Reference Guide

XMLXSROBJECTID
>_XMLXSROBJECTID(_xml-value-expression __)_________________________________>

YEAR
>_YEAR(expression)_________________________________________________________>

Table Functions
ADMIN_TASK_LIST
>_ADMIN_TASK_LIST()________________________________________________________>

ADMIN_TASK_OUTPUT
>_ADMIN_TASK_OUTPUT(_task-name_,_num-invocations)__________________________>

ADMIN_TASK_STATUS
>_ADMIN_TASK_STATUS(__________________)____________________________________>
|_max-history_|

XMLTABLE
>_XMLTABLE_(______________________________row-xquery-expression-constant___>
|xmlnamespaces-declaration_,_|
>__________________________________________________________________________>
|
<__,____________________________
|
|
_BY REF_
|
|
|_PASSING_|________|_____row-xquery-argument _______|___|
>__________________________________________________________________________>
|
<__,_____________________________________
|
|_COLUMNS_____xml-table-regular-column-definition ____|_)_|
|_xml-table-ordinality-column-definition_|
Row-xquery-argument:
>_xquery-context-item-expression___________________________________________>
|_xquery-variable-expression_AS_identifier_|
Xml-table-regular-column-definition:
>_column-name_data-type____________________________________________________>
|_default-clause_________________________|
|_PATH_column-xquery-expression-constant_|
Xml-table-ordinality-column-definition:
>_column-name_FOR ORDINALITY_______________________________________________>

DB2 10 for z/OS

45

YL&A DB2 10 for z/OS Reference Guide

Queries
subselect
>>__select-clause__from-clause___________________________________________>
|_where-clause_|
>________________________________________________________________________>
|_group-by-clause_| |_having-clause_|
>________________________________________________________________________><
|_order-by-clause_| |_fetch-first-clause_|

select-clause
_ALL______
>>__SELECT__|__________|________________________________________________>
|_DISTINCT_|
>____*__________________________________________________________________><
| <_,_______________________________________ |
|_____expression____________________________|_|
|
| _AS_
| |
|
|_|____|__column-name_| |
|____table-name_________.*____________|
|_view-name________|
|_correlation-name_|
from-clause:
<_,______________
>>___FROM___table-reference__|___________________________________________><
table-reference:
>>_______single-table____________________________________________________><
|_nested-table-expression_______________|
|_table-function-reference______________|
|_data-change-table-reference___________|
|_joined-table__________________________|
|_table-locator-reference_______________|
|_xmltable-expression___________________|
single-table:
>>___table-name__________________________________________________________><
|_view-name___________________| |_correlation-clause_|
period-specification:
>>___FOR___SYSTEM_TIME______________AS OF value__________________________><
|_BUSINESS_TIME______________| |_FROM_value1_to_value2_____|
|_BETWEEN_value2_AND_value2_|
correlation-clause:
_AS_
>>___|____|___correlation-name___________________________________________><
|
<_,_________
|
|_(__column-name|_)_|
nested-table-expression:
46

DB2 10 for z/OS

YL&A DB2 10 for z/OS Reference Guide


>>__________(fullselect)__correlation-clause_____________________________><
|_TABLE_|
table-function-reference:
>>_TABLE_(function-name(________________________________________)_________>
| <_,________________________________ |
|_____expression_____________________|_|
|_TABLE__transition_table_name_|
>__table-UDF-cardinality-clause__)________________________________________>
>__correlation-clause____________________________________________________><
table-UDF-cardinality-clause:
>>__CARDINALITY__integer-constant________________________________________><
|_CARDINALITY MULTIPLIER_numeric-constant_|
data-change-table-reference:
>>__FINAL TABLE_(INSERT statement)_______________________________________><
|__FINAL____TABLE (searched UPDATE statement)_| |_correlation-clause_|
| |_OLD__|
|
|_OLD TABLE__(searchred DELETE statement______|
|_FINAL TABLE__(MERGE statement)______________|
table-locator-reference:
>>__TABLE_(_table-locator-variable_LIKE_table-name_)_____________________><
|_correlation-name_|
xmltable-expression:
>>_xmltable-function__correlation clause_________________________________><
joined-table:
_INNER____
>>__table-reference_|__________|__JOIN__table-reference_ON_join-condition_><
|
|
_OUTER_ |
|
|
|___LEFT____|_______|_|
|
|
|_RIGHT_|
|
|
|_FULL__|
|
|_(__joined-table__)_________________________________________________|
For INNER, LEFT OUTER, and RIGHT OUTER joins:
>>__search-condition______________________________________________________><
For FULL OUTER joins:
<_AND________________________________________
>>____full-join-expression__=__full-join-expression_|_____________________><
full-join-expression:
>>______column-name_______________________________________________________><
| |_cast-function____|
|
|
<______________________
|
|___COALESCE___(___column-name____________, column-name______|_)_|
|_cast-function____|
|_, cast-function___|
where-clause:
>>__WHERE__search-condition_______________________________________________><
group-by-clause:
DB2 10 for z/OS

47

YL&A DB2 10 for z/OS Reference Guide


<_,___________________
>>__GROUP BY____grouping-expression_|_____________________________________><
having-clause:
>>__HAVING__search-condition_____________________________________________><
order-by-clause:
<_,__________________
_ASC__ |
>__ORDER BY____sort-key__|______|_|_______________________________________><
| |
|_DESC_|
| |
| |_ORDER OF table-designator_| |
|_INPUT SEQUENCE_________________|
sort-key:
>__ _column-name_ ________________________________________________________><
|_integer______________|
|_sort-key-expression__|
fetch-first-clause:
_1_______
>>__FETCH FIRST__|_________|__ _ROW__ __ONLY______________________________><
|_integer_| |_ROWS_|

fullselect
<____________________________________________
>____subselect____________________________________________________|________>
|_(fullselect)_| |
_DISTINCT_
|
|_UNION_______|__________|__subselect______|
|_EXCEPT____| |_ALL______| |_(fullselect)_|
|_INTERSECT_|
>_________________________________________________________________________><
|_order-by-clause_| |_fetch-first-clause_|
select-statement:
>__ _______________________________________________________________________>
|_WITH__common-table-expression_|
<_________________________
>__fullselect________________________________________________________|_____>
|_read-only-clause____|
|_update-clause_______|
|_optimize-clause_____|
|_isolation-clause____|
|_queryno-clause______|
|_SKIP LOCKED DATA____|
common-table-expression:
>__table-identifier_____ _________________________ __AS_(fullselect)______>
|
<_,_____________
|
|_(___ _____________ |__)_|
|_column-name_|
read-only-clause:
>>__FOR_READ_ONLY_________________________________________________________><
48

DB2 10 for z/OS

YL&A DB2 10 for z/OS Reference Guide


update-clause:
<_,___________
>>__FOR UPDATE OF____column-name_|______________________________________><
optimize-for-clause:
>>__OPTIMIZE FOR__integer____ROWS_______________________________________><
|_ROW__|
isolation-clause:
>>__WITH_____CS_________________________________________________________><
|_UR________________________|
|_RR________________________|
|
|_lock-clause__|
|
|_RS________________________|
|_lock-clause_|
lock-clause:
>_USE AND KEEP____EXCLUSIVE___LOCKS_____________________________________><
|__UPDATE____|
|__SHARE_____|
queryno-clause:
>>__QUERYNO__integer____________________________________________________><
SKIP LOCKED DATA:
>>__SKIP LOCKED DATA____________________________________________________><

DB2 10 for z/OS

49

YL&A DB2 10 for z/OS Reference Guide

Statements
ALLOCATE CURSOR
>>__ALLOCATE__cursor-name_CURSOR FOR RESULT SET__rs-locator-variable_____>

ALTER DATABASE
<_____________________________
>>__ALTER DATABASE__database-name_______BUFFERPOOL__bpname__________|____>
|_INDEXBP__bpname_________|
|_STOGROUP__stogroup-name_|
|_CCSID__ccsid-value______|

ALTER FUNCTION (external)


>>__ALTER____FUNCTION__function-name_____________________________________>
|
|
<_,__________________
| |
|
|_(_______________________|__)_| |
|
|_parameter-type_|
|
|_SPECIFIC FUNCTION__specific-name__________________________|
>__option-list__________________________________________________________><
parameter-type:
>>____data-type_________________________________________________________><
|_AS LOCATOR____|
data-type:
>>____built-in-data-type________________________________________________><
|_distinct-type-name_|
built-in-data-type:
>__SMALLINT__________________________________________________________________________________><
| |_INTEGER__|
|
| | |INT__| |
|
| |_BIGINT___|
|
|
______(5,0)______________________
|
|__DECIMAL____|_________________________________|___________________________________________|
||_DEC_____| |_(__integer_________________)____|
|
||_NUMERIC_|
|_, integer_|
|
|
_(34)_
|
|_DECFLOAT_ |______|________________________________________________________________________|
|
|_(16)_|
|
|
_(53)__________
|
|___FLOAT__|_______________|_______________________________________________________________ |
| |
|_(__integer__)_|
|
|_|_REAL___________________|
|
| |
_PRECISION_
|
|
|_|_DOUBLE__|___________|__|
|
|
__(1)___________
|
|_______CHARACTER____|________________|_____________________________________________________|
| | | |_CHAR______| |_(_length__)____| |
|_FOR___SBCS____DATA_|
| |
| | |___CHARACTER__VARYING__(_length__)__|
|_MIXED_|
| |
| | | |_CHAR_____|
|
|_BIT___|
| |
| | |__VARCHAR____________|
| |
| |
_(1M)_______
| |
| |_____CHARACTER___LARGE OBJECT_ |____________|__________________________________________| |
|
| |_CHAR______|
|_(_integer_)_| |_FOR__SBCS____DATA_|
|
|
|___CLOB______________________|
|_MIXED_|
|
|
__(1)______________
|
|___GRAPHIC_|__________________|____________________________________________________________|
| |
|_(__integer___)___|
|
|
| |_VARGRAPHIC__(__integer__)___________|
|
| |
__(1M)_____________
|
| |_DBCLOB_|___________________|
|
|
|_(integer)_________|
|
|
_(1)________
|
|_ _BINARY__|____________|__________________________________________________________________|

50

DB2 10 for z/OS

YL&A DB2 10 for z/OS Reference Guide


| |
|_(integer)__|
|
|
| |__BINARY VARYING _(integer)______________________________|
|
| | |_VARBINARY_____|
|
|
| |
_(1M)____________________
|
|
| |_BINARY LARGE OBJECT_____|_________________________|_____|
|
| |_BLOB________________| |_(__integer_________)____|
|
|
|_K_|
|
|
|_M_|
|
|
|_G_|
|
|___DATE____________________________________________________________________________________|
| |_TIME______|
|
| |
__(_6_)_____
_WITHOUT TIME ZONE_
|
| |_TIMESTAMP_|____________|___|___________________|________________________________________|
|
|_(integer_)_|
|_WITH TIME ZONE____|
|
|_ROWID_____________________________________________________________________________________|

options-list
>>__EXTERNAL_NAME_ _external-program name_ _LANGUAGE_ _ASSEMBLE__ ___>
|_identifier____________|
|_C_________|
|_COBOL_____|
|_JAVA______|
|_PLI_______|
>__PARAMETER STYLE__ _SQL_______ __ _NOT DETERMINISTIC_ _____________>
|_JAVA______| |_DETERMINISTIC_____|
>__ _RETURNS NULL ON NULL INPUT_ ______ _MODIFIES SQL_________ ______>
|_CALLED ON NULL INPUT_______|
|_READS SQL DATA_______|
|_CONTAINS SQL DATA____|
|_NO SQL_______________|
>__ _NO EXTERNAL ACTION_ __ _NO SCRATCHPAD__________ ________________>
|_EXTERNAL ACTION____| |_SCRATCHPAD____length___|
>__PACKAGE PATH package path_________________________________________>
|_NO PACKAGEPATH___________|
>__ _NO FINAL CALL_ __ _ALLOW PARALLEL____ __ _NO DBINFO_ ___________>
|_FINAL CALL____| |_DISALLOW PARALLEL_| |_DBINFO____|
>__CARDINALITY__integer______ _NO COLLID_____________ _______________>
|_COLLID__collection-id_|
>__WLM ENVIRONMENT__ _name___________ _______________________________>
|_(__name__,*__)_|
>__ASUTIME__ _NO LIMIT_______ __STAY RESIDENT__ _NO__ _______________>
|_LIMIT__integer_|
|_YES_|
>__PROGRAM TYPE__ _SUB__ __SECURITY__ _DB2_____ _____________________>
|_MAIN_|
|_USER____|
|_DEFINER_|
>__STOP AFTER SYSTEM DEFAULT FAILURES________________________________>
|_STOP AFTER-integer-FAILURES_______|
|_CONTINUE AFTER FAILURE____________|
>__RUN OPTIONS__run-time-options_____________________________________>
>_ _INHERIT SPECIAL REGISTERS_ ____ STATIC DISPATCH _SECURED________><
|_DEFAULT SPECIAL REGISTERS_|
|_NOT SECURED_|
external-java-routine-name:
>__ ___________ __method-name___ __________________ _________________>
|_jar-name:_|
|_method-signature_|
jar-name:
>__ ______________ __jar-id__________________________________________>
|_schema-name._|
method-name:
<________________________
DB2 10 for z/OS

51

YL&A DB2 10 for z/OS Reference Guide


>___ ______________________ |__class-id__ _.____ __method-id____________>
|_package-id_ _.____ __|
|_!____|
|_/____|
method-signature:
>__ ___________________________ ________________________________________>
|_(_ ___________________ _)_|
| <_,___________
|
|___java-datatype|__|

ALTER FUNCTION (SQL scalar)


>__ALTER____function-designator__________________________________________>
__ALTER__
__ACTIVE VERSION____________
<_____________
>__|_________|_|____________________________|______options-list_|________>
|
|_ALL VERSIONS_______________|
|
|
|_VERSION routine-version-id_|
|
|
_ACTIVE VERSION_____________
|
|_REPLACE_|____________________________|__routine-specification____|
|
|_VERSION_routine-version_id_|
|
|_ADD VERSION_routing-version-id__routine-specification____________|
|_ACTIVATE VERSION_routing-version-id______________________________|
|
_ACTIVE VERSION______________
|
|_REGENERATE___|_____________________________|_____________________|
|
|_VERSION_routing-version-id__|
|
|_DROP VERSION_routine-version-id__________________________________|
function-designator:
>____FUNCTION__function-name_____________________________________________>
|
|
<_,__________________
| |
|
|_(_______________________|__)_| |
|
|_data-type______|
|
|_SPECIFIC FUNCTION__specific-name__________________________|
routine-specification:
<_______________
>_(______________________________)_RETURNS_data-type2_________________|__>
| <_,______________________ |
|_options-list__|
|_parameter-name_data-type_|_|
>__SQL-routine-body_____________________________________________________><
data-type, data-type2:
>>____built-in-data-type________________________________________________><
|_distinct-type-name_|
built-in-data-type:

>__SMALLINT__________________________________________________________________________________><
| |_INTEGER__|
|
| | |INT__| |
|
| |_BIGINT___|
|
|
______(5,0)______________________
|
|__DECIMAL____|_________________________________|___________________________________________|
||_DEC_____| |_(__integer_________________)____|
|
||_NUMERIC_|
|_, integer_|
|
|
_(34)_
|
|_DECFLOAT_ |______|________________________________________________________________________|

52

DB2 10 for z/OS

YL&A DB2 10 for z/OS Reference Guide


|
|_(16)_|
|
|
_(53)__________
|
|___FLOAT__|_______________|_______________________________________________________________ |
| |
|_(__integer__)_|
|
|_|_REAL___________________|
|
| |
_PRECISION_
|
|
|_|_DOUBLE__|___________|__|
|
|
__(1)___________
|
|_______CHARACTER____|________________|_____________________________________________________|
| | | |_CHAR______| |_(_length__)____| |
|_FOR___SBCS____DATA_|
| |
| | |___CHARACTER__VARYING__(_length__)__|
|_MIXED_|
| |
| | | |_CHAR_____|
|
|_BIT___|
| |
| | |__VARCHAR____________|
| |
| |
_(1M)_______
| |
| |_____CHARACTER___LARGE OBJECT_ |____________|__________________________________________| |
|
| |_CHAR______|
|_(_integer_)_| |_FOR__SBCS____DATA_|
|
|
|___CLOB______________________|
|_MIXED_|
|
|
__(1)______________
|
|___GRAPHIC_|__________________|____________________________________________________________|
| |
|_(__integer___)___|
|
|
| |_VARGRAPHIC__(__integer__)___________|
|
| |
__(1M)_____________
|
| |_DBCLOB_|___________________|
|
|
|_(integer)_________|
|
|
_(1)________
|
|_ _BINARY__|____________|__________________________________________________________________|
| |
|_(integer)__|
|
|
| |__BINARY VARYING _(integer)______________________________|
|
| | |_VARBINARY_____|
|
|
| |
_(1M)____________________
|
|
| |_BINARY LARGE OBJECT_____|_________________________|_____|
|
| |_BLOB________________| |_(__integer_________)____|
|
|
|_K_|
|
|
|_M_|
|
|
|_G_|
|
|___DATE____________________________________________________________________________________|
| |_TIME______|
|
| |
__(_6_)_____
_WITHOUT TIME ZONE_
|
| |_TIMESTAMP_|____________|___|___________________|________________________________________|
|
|_(integer_)_|
|_WITH TIME ZONE____|
|
|_ROWID_____________________________________________________________________________________|
|_XML_______________________________________________________________________________________|

SQL-routine-body
>>_SQL-control-statement__________________________________________________><
option-list:
>_____NOT DETERMINISTIC_______EXTERNAL ACTION______________________________>
|_DETERMINISTIC_____|
|_NO EXTERNAL ACTION_|
>_____READS SQL DATA _________CALLED ON NULL INPUT_________________________>
|_CONTAINS SQL ______|
|_RETURNS NULL ON NULL INPUT_|
|_MODIFIES SQL DATA__|
>_____STATIC DISPATCH___________ALLOW PARALLEL_____________________________>
|_DISALLOW PARALLEL_|
>__DISALLOW DEBUG MODE______QUALIFIER schema-name__________________________>
|_ALLOW DEBUG MODE____|
|_DISABLE DEBUG MODE__|
>__PACKAGE OWNER__authorization-name____ASUTIME_NO LIMIT___________________>
|_ASUTIME_LIMIT__integer_|
>__INHERIT SPECIAL REGISTERS_____WLM ENVIRONMENT FOR DEBUG MODE name________>
|_DEFAULT SPECIAL REGISTERS_|
>__CURRENT DATA NO_____CONCURRENT ACCESS RESOLUTION USE CURRENTLY COMMITTED_>
|_CURRENT DATA YES_||_CONCURRENT ACCESS RESOULTION WAIT FOR OUTCOME______|
>____DYNAMICRULES RUN ______________________________________________________>
DB2 10 for z/OS

53

YL&A DB2 10 for z/OS Reference Guide


|_DYNAMICRULES BIND_______| |_APPLICATION ENCODING SCHEME ASCII___|
|_DYNAMICRULES DEFINEBIND_| |_APPLICATION ENCODING SCHEME EBCDIC__|
|_DYNAMICRULES DEFINERUN__| |_APPLICATION ENCODING SCHEME UNICODE_|
|_DYNAMICRULES INVOKEBIND_|
|_DYNAMICRULES INVOKERUN__|
>__WITHOUT EXPLAIN____ISOLATION LEVEL CS__OPHINT__ _______________________>
|_WIHT EXPLAIN___||_ISOLATION LEVEL RS_|
|_OPHINT_string-constant_|
|_ISOLATION LEVEL RR_|
|_ISOLATION LEVEL UR_|
<_,______
>_SQL PATH__schema-name|______REOPT NONE______VALIDATE RUN__________________>
|_SCHEMA PATH__| |_REOPT ALWAYS_| |_VALIDATE BIND_|
|_SESSION USER_| |_REOPT ONCE___|
|_USER_|
>___________________________________________________________________________>
|_ROUNDING DEC_ROUND_CEILING___|
|_DATE FORMAT ISO___ |
|_ROUNDING DEC_ROUND_DOWN______|
|_DATE FORMAT EUR___ |
|_ROUNDING DEC_ROUND_FLOOR_____|
|_DATE FORMAT USA___ |
|_ROUNDING DEC_ROUND_HALF_DOWN_|
|_DATE FORMAT JIS___ |
|_ROUNDING DEC_ROUND_HALF_EVEN_|
|_DATE FORMAT LOCAL_ |
|_ROUNDING DEC_ROUND_HALF_UP___|
|_ROUNDING DEC_ROUND_UP________|
>_________________________FOR UPDATE CLAUSE REQUIRED_______________________>
|_DECIMAL(15)___ | |_FOR UPDATE CLAUSE OPTIONAL_|
|_DECIMAL(31)___ |
|_DECIMAL(15,s)_ |
|_DECIMAL(31,s)_ |
>____________________________SECURED______________________________________><
|_TIME FORMAT ISO___| |_NOT SECURED_|
|_TIME FORMAT EUR___|
|_TIME FORMAT USA___|
|_TIME FORMAT JIS___|
|_TIME FORMAT LOCAL_|

ALTER FUNCTION (SQL table)


>__ALTER____function-designator__RESTRICT___options-list____________________>
function-designator:
>____FUNCTION__function-name________________________________________________>
|
|
<_,__________________
| |
|
|_(_______________________|__)_| |
|
|_parameter-type_|
|
|_SPECIFIC FUNCTION__specific-name__________________________|
parameter-type:
>>____data-type_____________________________________________________________><
data-type:
>>____built-in-data-type____________________________________________________><
|_distinct-type-name_|
built-in-data-type:
54

DB2 10 for z/OS

YL&A DB2 10 for z/OS Reference Guide


>__SMALLINT__________________________________________________________________________________><
| |_INTEGER__|
|
| | |INT__| |
|
| |_BIGINT___|
|
|
______(5,0)______________________
|
|__DECIMAL____|_________________________________|___________________________________________|
||_DEC_____| |_(__integer_________________)____|
|
||_NUMERIC_|
|_, integer_|
|
|
_(34)_
|
|_DECFLOAT_ |______|________________________________________________________________________|
|
|_(16)_|
|
|
_(53)__________
|
|___FLOAT__|_______________|_______________________________________________________________ |
| |
|_(__integer__)_|
|
|_|_REAL___________________|
|
| |
_PRECISION_
|
|
|_|_DOUBLE__|___________|__|
|
|
__(1)___________
|
|_______CHARACTER____|________________|_____________________________________________________|
| | | |_CHAR______| |_(_length__)____| |
|_FOR___SBCS____DATA_|
| |
| | |___CHARACTER__VARYING__(_length__)__|
|_MIXED_|
| |
| | | |_CHAR_____|
|
|_BIT___|
| |
| | |__VARCHAR____________|
| |
| |
_(1M)_______
| |
| |_____CHARACTER___LARGE OBJECT_ |____________|__________________________________________| |
|
| |_CHAR______|
|_(_integer_)_| |_FOR__SBCS____DATA_|
|
|
|___CLOB______________________|
|_MIXED_|
|
|
__(1)______________
|
|___GRAPHIC_|__________________|____________________________________________________________|
| |
|_(__integer___)___|
|
|
| |_VARGRAPHIC__(__integer__)___________|
|
| |
__(1M)_____________
|
| |_DBCLOB_|___________________|
|
|
|_(integer)_________|
|
|
_(1)________
|
|_ _BINARY__|____________|__________________________________________________________________|
| |
|_(integer)__|
|
|
| |__BINARY VARYING _(integer)______________________________|
|
| | |_VARBINARY_____|
|
|
| |
_(1M)____________________
|
|
| |_BINARY LARGE OBJECT_____|_________________________|_____|
|
| |_BLOB________________| |_(__integer_________)____|
|
|
|_K_|
|
|
|_M_|
|
|
|_G_|
|
|___DATE____________________________________________________________________________________|
| |_TIME____________________________________________________________________________________|
| |
__(_6_)_____
_WITHOUT TIME ZONE_
|
| |_TIMESTAMP_|____________|___|___________________|________________________________________|
|
|_(integer_)_|
|_WITH TIME ZONE____|
|
|_ROWID_____________________________________________________________________________________|
|_XML_______________________________________________________________________________________|

option-list:
>_____NOT DETERMINISTIC_______EXTERNAL ACTION_________________________>
|_DETERMINISTIC_____|
|_NO EXTERNAL ACTION_|
>_____READS SQL DATA _________CALLED ON NULL INPUT____________________>
|_CONTAINS SQL ______|
>_____INHERIT SPECIAL REGISTERS___STATIC DISPATCH_____________________>
>_____CARDINALITY integer___SECURED___________________________________>
|_NOT SECURED_|

ALTER INDEX
>>__ALTER INDEX__index-name___________________________________________>
|_REGENERATE_|
DB2 10 for z/OS

55

YL&A DB2 10 for z/OS Reference Guide


<___________________________________
>__________________________________________________________________|__>
|_BUFFERPOOL__bpname___________________________|
|_CLOSE____YES_________________________________|
|
|_NO__|
|
|_COPY____NO___________________________________|
|
|_YES_|
|
|_PIECESIZE_____integer____K___________________|
|
|_M_|
|
|
|_G_|
|
|_using-block__________________________________|
|_free-block___________________________________|
|_gbpcache-block_______________________________|
|___CLUSTER____________________________________|
| |_NOT CLUSTER_|
|
|__COMPRESS NO_________________________________|
| |_COMPRESS YES_|
|
|___NOT PADDED_________________________________|
| |_PADDED______|
|
|
_ASC____
|
|_ADD COLUMN_(column name_|________|_)_________|
|
|_DESC___|
|
|
|_RANDOM_|
|
|_INCLUDE COLUMN (column-name)__|
>__ ___________________________________________________________________>
|
<_,_________________________________________________________ |
|
|
<_,_____________________________________________ ||
|
|
|
<_____________________ | ||
|____|___ALTER__|___partition-element___|__ ________________ _|_|_||
|_using-block____|
|_free-block_____|
|_gbpcache-block_|
using-block
<________________________________________
>>______USING____VCAT__catalog-name__________|______________________><
|
|_STOGROUP__stogroup-name_| |
|_PRIQTY__integer____________________|
|_SECQTY__integer____________________|
|_ERASE____YES_______________________|
|_NO__|
free-block
<_______________________
>>______FREEPAGE__integer___|_______________________________________><
|_PCTFREE__integer__|
gbpcache-block
>>__GBPCACHE____CHANGED_____________________________________________><
|_ALL_____|
|_NONE____|
partition-element
>>__PARTITION__integer_______________________________________________>
|
|
|
_AT_
<_,________
_INCLUSIVE_
|
|_ENDING__|____|__(_constant___|_)_|___________|___|
|_MAXVALUE_|
|_MINVALUE_|
56

DB2 10 for z/OS

YL&A DB2 10 for z/OS Reference Guide

ALTER MASK
>>__ALTER MASK__mask-name___ENABLE__________________________________>
|_DISABLE____|
|_REGENERATE_|

ALTER PERMISSION
>>__ALTER PERMISSION__permission-name___ENABLE______________________>
|_DISABLE____|
|_REGENERATE_|

ALTER PROCEDURE (external)


>>__ALTER PROCEDURE__procedure-name___option-list___________________>
option-list
>______DYNAMIC__RESULT____SETS____integer_________________________><
|_EXTERNAL NAME____'string'_______________________|
|
|_identifier_|
|
|_LANGUAGE____ASSEMBLE____________________________|
|
|_C________|
|
|
|_COBOL____|
|
|
|_JAVA_____|
|
|
|_PLI______|
|
|
|_REXX_____|
|
|_________________________________________________|
| |_PARAMETER STYLE____SQL______________________| |
|
|_GENERAL____________|
|
|
|_GENERAL WITH NULLS_|
|
|
|_JAVA_______________|
|
|___NOT DETERMINISTIC_____________________________|
| |_DETERMINISTIC_____|
|
|__PACKAGE PATH__package path_____________________|
| |_NO PACKAGE PATH_____________|
|
|___CONTAINS SQL__________________________________|
| |_READS SQL DATA____|
|
| |_MODIFIES SQL DATA_|
|
| |_NO SQL____________|
|
|___NO DBINFO_____________________________________|
| |_DBINFO____|
|
|___NO COLLID_____________________________________|
| |_COLLID__collection-id_|
|
|___WLM ENVIRONMENT____name_______________________|
|
|_(__name__,*__)_|
|
|_ASUTIME____NO LIMIT_____________________________|
|
|_LIMIT__integer_|
|
|_STAY RESIDENT____NO_____________________________|
|
|_YES_|
|
|_PROGRAM TYPE____SUB_____________________________|
|
|_MAIN_|
|
|_SECURITY____DB2_________________________________|
|
|_USER____|
|
|
|_DEFINER_|
|
|_RUN OPTIONS__run-time-options___________________|
|_COMMIT ON RETURN____NO__________________________|
|
|_YES_|
|
DB2 10 for z/OS

57

YL&A DB2 10 for z/OS Reference Guide


|_ INHERIT SPECIAL REGISTERS__ ___________________|
| |_DEFAULT SPECIAL REGISTERS_|
|
|_CALLED ON NULL INPUT____________________________|
|___STOP AFTER SYSTEM DEFAULT FAILURES____________|
| |_STOP AFTER integer FAILURES__________|
|
| |_CONTINUE AFTER FAILURE_______________|
|
|__DISALLOW DEBUG MODE____________________________|
|_ALLOW DEBUG MODE_____________|
|_DISABLE DEBUG MODE___________|
external-java-routine-name
|__ ___________ __method-name___ __________________ ________________|
|_jar-name:_|
|_method-signature_|
jar-name
|__ ______________ __jar-id_________________________________________|
|_schema-name._|
method-name
<________________________
|___ ______________________ |__class-id__ _.____ __method-id_______|
|_package-id_ _.____ __|
|_!____|
|_/____|
method-signature
|__ ___________________________ ___________________________________|
|_(_ ___________________ _)_|
| <_,___________
|
|___java-datatype|__|

ALTER PROCEDURE (SQL-external)


>>__ALTER PROCEDURE__procedure-name__option-list____________________>
<_____________________________________________
>______DYNAMIC__RESULT__SETS______integer________|________________><
|_EXTERNAL NAME____'string'_______________|
|
|_identifier_|
|
|___NOT DETERMINISTIC_____________________|
| |_DETERMINISTIC_____|
|
|___CONTAINS SQL__________________________|
| |_READS SQL DATA____|
|
| |_MODIFIES SQL DATA_|
|
|___NO COLLID_____________________________|
| |_COLLID__collection-id_|
|
|___WLM ENVIRONMENT____name_______________|
|
|_(__name__,*__)_|
|
|_ASUTIME____NO LIMIT_____________________|
|
|_LIMIT__integer_|
|
|_STAY RESIDENT____NO_____________________|
|
|_YES_|
|
|_PROGRAMTYPE___SUB_______________________|
|
|_MAIN_|
|
|_SECURITY____DB2_________________________|
|
|_USER____|
|
|
|_DEFINER_|
|
|_RUN OPTIONS__run-time-options___________|
|_COMMIT ON RETURN____NO__________________|
|
|_YES_|
|
58

DB2 10 for z/OS

YL&A DB2 10 for z/OS Reference Guide


|_ INHERIT SPECIAL REGISTERS___ __________|
| |_DEFAULT SPECIAL REGISTERS__|
|
|___STOP AFTER SYSTEM DEFAULT FAILURES____|
|_STOP AFTER integer FAILURES__________|
|_CONTINUE AFTER FAILURE_______________|

ALTER PROCEDURE (SQL-native)


>_ALTER PROCEDURE__procedure-name_______________________________________>
_ALTER_
_ACTIVE VERSION_______________
>__|_______|_|______________________________|_option-list ______________><
|
|_VERSION__routine-version-id__|
|
|
_ACTIVE VERSION______________
|
|_REPLACE_|_____________________________|_routine-specification __|
|
|_VERSION routine-version-id__|
|
|_ADD VERSION__routine-version-id__ routine-specification ________|
|_ACTIVATE VERSION__routine-version-id____________________________|
|
_ACTIVE VERSION______________
|
|_REGENERATE__|_____________________________|_____________________|
|
|_VERSION--routine-version-id_|
|
|_DROP VERSION__routine-version-id________________________________|
routine-specification:
>______________________________________________________SQL-routine-body_>
|
| |_option-list_|
|_(____________________________)_|
|<__,___________________ |
|_parameter-declaration |_|
parameter-declaration:
__IN___
>_|_______|_parameter-name__data-type___________________________________>
|_OUT___|
|_INOUT_|
data-type:
>>____built-in-data-type________________________________________________><
|_distinct-type-name_|
built-in-data-type:
>__SMALLINT__________________________________________________________________________________><
| |_INTEGER__|
|
| | |INT__| |
|
| |_BIGINT___|
|
|
______(5,0)______________________
|
|__DECIMAL____|_________________________________|___________________________________________|
||_DEC_____| |_(__integer_________________)____|
|
||_NUMERIC_|
|_, integer_|
|
|
_(34)_
|
|_DECFLOAT_ |______|________________________________________________________________________|
|
|_(16)_|
|
|
_(53)__________
|
|___FLOAT__|_______________|_______________________________________________________________ |
| |
|_(__integer__)_|
|
|_|_REAL___________________|
|
| |
_PRECISION_
|
|
|_|_DOUBLE__|___________|__|
|
|
__(1)___________
|

DB2 10 for z/OS

59

YL&A DB2 10 for z/OS Reference Guide


|_______CHARACTER____|________________|_____________________________________________________|
| | | |_CHAR______| |_(_length__)____| |
|_FOR___SBCS____DATA_|
| |
| | |___CHARACTER__VARYING__(_length__)__|
|_MIXED_|
| |
| | | |_CHAR_____|
|
|_BIT___|
| |
| | |__VARCHAR____________|
| |
| |
_(1M)_______
| |
| |_____CHARACTER___LARGE OBJECT_ |____________|__________________________________________| |
|
| |_CHAR______|
|_(_integer_)_| |_FOR__SBCS____DATA_|
|
|
|___CLOB______________________|
|_MIXED_|
|
|
__(1)______________
|
|___GRAPHIC_|__________________|____________________________________________________________|
| |
|_(__integer___)___|
|
|
| |_VARGRAPHIC__(__integer__)___________|
|
| |
__(1M)_____________
|
| |_DBCLOB_|___________________|
|
|
|_(integer)_________|
|
|
_(1)________
|
|_ _BINARY__|____________|__________________________________________________________________|
| |
|_(integer)__|
|
|
| |__BINARY VARYING _(integer)______________________________|
|
| | |_VARBINARY_____|
|
|
| |
_(1M)____________________
|
|
| |_BINARY LARGE OBJECT_____|_________________________|_____|
|
| |_BLOB________________| |_(__integer_________)____|
|
|
|_K_|
|
|
|_M_|
|
|
|_G_|
|
|___DATE____________________________________________________________________________________|
| |_TIME____________________________________________________________________________________|
| |
__(_6_)_____
_WITHOUT TIME ZONE_
|
| |_TIMESTAMP_|____________|___|___________________|________________________________________|
|
|_(integer_)_|
|_WITH TIME ZONE____|
|
|_XML_______________________________________________________________________________________|

option-list:
>_____NOT DETERMINISTIC_____________________________________________________>
|_DETERMINISTIC_____|
|_DYNAMIC RESULT SETS integer_|
>_____READS SQL DATA _______________________________________________________>
|_CONTAINS SQL ______| |_CALLED ON NULL INPUT_|
|_MODIFIES SQL DATA__|
>_____STATIC DISPATCH___________ALLOW PARALLEL______________________________>
|_DISALLOW PARALLEL_|
>__DISALLOW DEBUG MODE______QUALIFIER schema-name___________________________>
|_ALLOW DEBUG MODE____|
|_DISABLE DEBUG MODE__|
>__PACKAGE OWNER__authorization-name____ASUTIME_NO LIMIT____________________>
|_ASUTIME_LIMIT__integer_|
>__INHERIT SPECIAL REGISTERS_____WLM ENVIRONMENT FOR DEBUG MODE name________>
|_DEFAULT SPECIAL REGISTERS_|
>__CURRENT DATA NO_____CONCURRENT ACCESS RESOLUTION USE CURRENTLY COMMITTED_>
|_CURRENT DATA YES_||_CONCURRENT ACCESS RESOULTION WAIT FOR OUTCOME______|
>_________________________DEGREE 1__________________________________________>
|_DEFER PREPARE___|
|_DEGREE ANY_|
|_NODEFER PREPARE_|
>____DYNAMICRULES RUN ______________________________________________________>
|_DYNAMICRULES BIND_______| |_APPLICATION ENCODING SCHEME ASCII___|
|_DYNAMICRULES DEFINEBIND_| |_APPLICATION ENCODING SCHEME EBCDIC__|
|_DYNAMICRULES DEFINERUN__| |_APPLICATION ENCODING SCHEME UNICODE_|
|_DYNAMICRULES INVOKEBIND_|
|_DYNAMICRULES INVOKERUN__|
>__WITHOUT EXPLAIN____ISOLATION LEVEL CS_________OPHINT__ ________________>
|_WIHT EXPLAIN___||_ISOLATION LEVEL RS_|
|_OPHINT_string-constant_|
|_ISOLATION LEVEL RR_|
60

DB2 10 for z/OS

YL&A DB2 10 for z/OS Reference Guide


|_ISOLATION LEVEL UR_|
<_,______
>_SQL PATH__schema-name|______REOPT NONE______VALIDATE RUN__________________>
|_SCHEMA PATH__| |_REOPT ALWAYS_| |_VALIDATE BIND_|
|_SESSION USER_| |_REOPT ONCE___|
|_USER_|
>___________________________________________________________________________>
|_ROUNDING DEC_ROUND_CEILING___|
|_DATE FORMAT ISO___ |
|_ROUNDING DEC_ROUND_DOWN______|
|_DATE FORMAT EUR___ |
|_ROUNDING DEC_ROUND_FLOOR_____|
|_DATE FORMAT USA___ |
|_ROUNDING DEC_ROUND_HALF_DOWN_|
|_DATE FORMAT JIS___ |
|_ROUNDING DEC_ROUND_HALF_EVEN_|
|_DATE FORMAT LOCAL_ |
|_ROUNDING DEC_ROUND_HALF_UP___|
|_ROUNDING DEC_ROUND_UP________|
>_________________________FOR UPDATE CLAUSE REQUIRED_______________________>
|_DECIMAL(15)___ | |_FOR UPDATE CLAUSE OPTIONAL_|
|_DECIMAL(31)___ |
|_DECIMAL(15,s)_ |
|_DECIMAL(31,s)_ |
>__________________________________________________________________________><
|_TIME FORMAT ISO___|
|_TIME FORMAT EUR___|
|_TIME FORMAT USA___|
|_TIME FORMAT JIS___|
|_TIME FORMAT LOCAL_|

ALTER SEQUENCE
>>__ALTER SEQUENCE__sequence-name__________________________________________>
<_______________________________________
>___ _RESTART__ ________________________ _ |_____________________________><
|
|_WITH__numeric-constant_| |
|_INCREMENT BY__numeric-constant______|
|_ _NO MINVALUE________________ ______|
| |_MINVALUE__numeric-constant_|
|
|_ _NO MAXVALUE________________ ______|
| |_MAXVALUE__numeric-constant_|
|
|_ _NO CYCLE_ ________________________|
| |_CYCLE____|
|
|_ _NO CACHE________________ _________|
| |_CACHE__integer-constant_|
|
|_ _NO ORDER_ ________________________|
|_ORDER_____|

ALTER STOGROUP
>>__ALTER STOGROUP__stogroup-name_________________________________________>
<_____________________________________________
<_,_______
|
>______ADD VOLUMES(____volume-id|_______)______|______________________><
|
| <_,___
|
|
|
|___'*'_|_________|
|
|
<_,_______
|
|_REMOVE VOLUMES(____volume-id|_______)_|
DB2 10 for z/OS

61

YL&A DB2 10 for z/OS Reference Guide


| <_,___
|
|___'*'_|_________|
>________________________________________________________________________><
|_DATACLAS_dc-name_| |_MGMTCLAS_mc-name_| |_STORCLAS_sc-name_|

ALTER TABLE
>>__ALTER TABLE__table-name______________________________________________>
<_________________________________________________
>_________ADD___column-definition _____________________|________________>
|
|_unique-constraint_______|
|
|
|_referential-constraint__|
|
|
|_check-constraint________|
|
|
|_add-partition___________|
|
|
|_partitioning-clause_____|
|
|
|_RESTRICT ON DROP________|
|
|
|_CLONE clone-table-name__|
|
|_ALTER__column-alteration___________________ |
|
|_partition-alteration_|
|
|_ROTATE_partition-rotation___________________|
|_ADD VERSIONING_USE HISTORY TABLE hist-table_|
|_DROP VERSIONING_____________________________|
|_ADD PERIOD period-definition________________|
|_ADD ORGANIZE BY HASH organization-clause____|
|_ALTER ORGANIZATION_SET HASH SPACE int__K____|
|
|_M_| |
|
|_G_| |
|_DROP ORGANIZATION___________________________|
|__ACTIVATE_________ROW ACCESS CONTROL________|
| |_DEACTIVATE_|
|
|__ACTIVATE_________COLUMN ACCESS CONTROL_____|
| |_DEACTIVATE_|
|
|_APPEND___NO_________________________________|
|
|_YES_|
|_DROP__ PRIMARY KEY__________________________|
|
| |_FOREIGN KEY_constraint-name_| |
|
|
| |_UNIQUE______|
|
|
|
| |_CHECK_______|
|
|
|
| |_CONSTRAINT__|
|
|
|
|_RESTRICT ON DROP________________|
|
|
|_CLONE___________________________|
|
|_VALIDPROC____program-name___________________|
|
|_NULL_________|
|
|_AUDIT____NONE_______________________________|
|
|_CHANGES_|
|
|
|_ALL_____|
|
|_DATA CAPTURE____NONE________________________|
|
|_CHANGES_|
|
|
_CARDINALITY_
|
|__NOT VOLATILE____|_____________|____________|
| |_VOLATILE____|
|
|
__MATERIALIZED_
|
|
__|_______________|__QUERY_
|
|_ADD_|___________________________|_mqt-def___|
|
_ MATERIALIZED_
|
62

DB2 10 for z/OS

YL&A DB2 10 for z/OS Reference Guide


|_DROP_|_______________|_QUERY________________|
|
_ MATERIALIZED_
|
|_ALTER_|_______________|_QUERY_____mqt-alt___|
|_RENAME COLUMN source-column-name ___________|
|_TO target-column-name___|
column-definition:
_COLUMN_
>>___|________|___column-name__data-type______________________________>
<_______________________________________________________________
>________________________________________________________________|___><
|_default-clause_____________________________________________|
|_NOT NULL___________________________________________________|
|_GENERATED_______ALWAYS_____________________________________|
|
|_BY DEFAULT_| |_as-identity-clause_|
||
|
|_as-row-change-timestamp-cls_||
|
|_as-row-transaction-tmsp-cls_||
|
|_as-row-transaction-id-cls___||
|_references-clause__________________________________________|
|_check-constraint___________________________________________|
|_FIELDPROC__program-name____________________________________|
|
|
<_,________
|
|
|
|_(___constant_|_)_|
|
|_AS SECURITY LABEL__________________________________________|
|_IMPLICITLY HIDDEN__________________________________________|
|_INLINE LENGTH__integer_____________________________________|
data-type:
>>______built-in-data-type___________________________________________><
|_distinct-type-name____|
built-in-type:
>__SMALLINT__________________________________________________________________________________><
| |_INTEGER__|
|
| | |INT__| |
|
| |_BIGINT___|
|
|
______(5,0)______________________
|
|__DECIMAL____|_________________________________|___________________________________________|
||_DEC_____| |_(__integer_________________)____|
|
||_NUMERIC_|
|_, integer_|
|
|
_(34)_
|
|_DECFLOAT_ |______|________________________________________________________________________|
|
|_(16)_|
|
|
_(53)__________
|
|___FLOAT__|_______________|_______________________________________________________________ |
| |
|_(__integer__)_|
|
|_|_REAL___________________|
|
| |
_PRECISION_
|
|
|_|_DOUBLE__|___________|__|
|
|
__(1)___________
|
|_______CHARACTER____|________________|_____________________________________________________|
| | | |_CHAR______| |_(_length__)____| |
|_FOR___SBCS____DATA_|
| |
| | |___CHARACTER__VARYING__(_length__)__|
|_MIXED_|
| |
| | | |_CHAR_____|
|
|_BIT___|
| |
| | |__VARCHAR____________|
| |
| |
_(1M)_______
| |
| |_____CHARACTER___LARGE OBJECT_ |____________|__________________________________________| |
|
| |_CHAR______|
|_(_integer_)_| |_FOR__SBCS____DATA_|
|
|
|___CLOB______________________|
|_MIXED_|
|
|
__(1)______________
|
|___GRAPHIC_|__________________|____________________________________________________________|
| |
|_(__integer___)___|
|
|
| |_VARGRAPHIC__(__integer__)___________|
|

DB2 10 for z/OS

63

YL&A DB2 10 for z/OS Reference Guide


| |
__(1M)_____________
|
| |_DBCLOB_|___________________|
|
|
|_(integer)_________|
|
|
_(1)________
|
|_ _BINARY__|____________|__________________________________________________________________|
| |
|_(integer)__|
|
|
| |__BINARY VARYING _(integer)______________________________|
|
| | |_VARBINARY_____|
|
|
| |
_(1M)____________________
|
|
| |_BINARY LARGE OBJECT_____|_________________________|_____|
|
| |_BLOB________________| |_(__integer_________)____|
|
|
|_K_|
|
|
|_M_|
|
|
|_G_|
|
|___DATE____________________________________________________________________________________|
| |_TIME______|
|
| |
__(_6_)_____
_WITHOUT TIME ZONE_
|
| |_TIMESTAMP_|____________|___|___________________|________________________________________|
|
|_(integer_)_|
|_WITH TIME ZONE____|
|
|_ROWID_____________________________________________________________________________________|
|_XML__( XML-type-modifier_)________________________________________________________________|

XML-type-modifier:
>>__XMLSCHEMA XML-schema-specification_______________________________>
|_ELEMENT_element-name__|
XML-schema-specification:
>>__ID registered-XML-schema-name____________________________________>
|_URL target-namespace___________________________________|
|_NO NAMESPACE_________| |_LOCATION_schema-location_|
default-clause:
_WITH_
>>_|______|__DEFAULT________________________________________________><
|_constant_______________________________|
|_SESSION_USER___________________________|
| |_USER_______|
|
|_CURRENT SQLID__________________________|
|_NULL___________________________________|
|_cast-function-name_(_constant________)_|
|_SESSION_USER__|
| |_USER_______||
|_CURRENT SQLID_|
|_NULL__________|
as-identity-clause:
>>__AS IDENTITY______________________________________________________><
|
<_,______________________________________
|
|_(______START WITH___numeric-constant________|__)_|
|
_1________________
|
|_INCREMENT BY_|_numeric-constant_|__|
| _CACHE 20_______
|
|_|_NO CACHE_______|_________________|
| |_CACHE__integer_|
|
| _NO CYCLE_
|
|_|_CYCLE____|_______________________|
| _NO MAXVALUE________________
|
|_|_MAXVALUE__numeric-constant_|_____|
| _NO MINVALUE_________________
|
|_|_MINVALUE__numeric-constant__|____|
| _NO ORDER_
|
64

DB2 10 for z/OS

YL&A DB2 10 for z/OS Reference Guide


|_|__________|_______________________|
|_ORDER____|
as-row-change-timestamp-clause:
>>__FOR EACH ROW ON UPDATE AS ROW CHANGE TIMESTAMP_______________________>
as-row-transaction-timestamp-clause:
>>__AS ROW__BEGIN________________________________________________________>
|_END_|
as-row-transaction-id-clause:
>>__AS TRANSACTION START ID______________________________________________>
column-constraint:
>>__reference-clause_____________________________________________________>
|_check-constraint_|
column-alteration:
>>_column-name_SET_DATATYPE_altered-data-type_____________________________>
|
|
|_INLINE LENGTH_integer_| ||
|
|__default-clause______________________________________||
|
|_INLINE LENGTH__integer_______________________________||
|
|_GENERATED__ALWAYS____________________________________||
|
|_BY DEFAULT_||_identity-alteration_________||
|
|_as-row-transaction-tmsp-cls_||
|
|_as-row-transaction-id-cls___||
|__DROP DEFAULT_____________________________________________|
altered-data-type:
>__SMALLINT__________________________________________________________________________________><
| |_INTEGER__|
|
| | |INT__| |
|
| |_BIGINT___|
|
|
______(5,0)______________________
|
|__DECIMAL____|_________________________________|___________________________________________|
||_DEC_____| |_(__integer_________________)____|
|
||_NUMERIC_|
|_, integer_|
|
|
_(34)_
|
|_DECFLOAT_ |______|________________________________________________________________________|
|
|_(16)_|
|
|
_(53)__________
|
|___FLOAT__|_______________|_______________________________________________________________ |
| |
|_(__integer__)_|
|
|_|_REAL___________________|
|
| |
_PRECISION_
|
|
|_|_DOUBLE__|___________|__|
|
|
__(1)___________
|
|_______CHARACTER____|________________|_____________________________________________________|
| | | |_CHAR______| |_(_length__)____| |
|_FOR___SBCS____DATA_|
| |
| | |___CHARACTER__VARYING__(_length__)__|
|_MIXED_|
| |
| | | |_CHAR_____|
|
|_BIT___|
| |
| | |__VARCHAR____________|
| |
| |
_(1M)_______
| |
| |_____CHARACTER___LARGE OBJECT_ |____________|__________________________________________| |
|
| |_CHAR______|
|_(_integer_)_| |_FOR__SBCS____DATA_|
|
|
|___CLOB______________________|
|_MIXED_|
|
|
__(1)______________
|
|___GRAPHIC_|__________________|____________________________________________________________|
| |
|_(__integer___)___|
|
|
| |_VARGRAPHIC__(__integer__)___________|
|
| |
__(1M)_____________
|
| |_DBCLOB_|___________________|
|
|
|_(integer)_________|
|

DB2 10 for z/OS

65

YL&A DB2 10 for z/OS Reference Guide


|
_(1)________
|
|_ _BINARY__|____________|__________________________________________________________________|
| |
|_(integer)__|
|
|
| |__BINARY VARYING _(integer)______________________________|
|
| | |_VARBINARY_____|
|
|
| |
_(1M)____________________
|
|
| |_BINARY LARGE OBJECT_____|_________________________|_____|
|
| |_BLOB________________| |_(__integer_________)____|
|
|
|_K_|
|
|
|_M_|
|
|
|_G_|
|
|___DATE____________________________________________________________________________________|
| |_TIME______|
|
| |
__(_6_)_____
_WITHOUT TIME ZONE_
|
| |_TIMESTAMP_|____________|___|___________________|________________________________________|
|
|_(integer_)_|
|_WITH TIME ZONE____|
|
|_XML__( XML-type-modifier_)________________________________________________________________|

XML-type-modifier:
>>__XMLSCHEMA XML-schema-specification_______________________________>
|_ELEMENT_element-name__|
XML-schema-specification:
>>__ID registered-XML-schema-name____________________________________>
|_URL target-namespace___________________________________|
|_NO NAMESPACE_________| |_LOCATION_schema-location_|
identity-aleration:
<__________________________________________
>>__RESTART___________________________________|_____________________><
|
|_WITH_numeric-constant___| |
|_SET INCREMENT BY___numeric-constant____|
|_SET__NO MINVALUE_______________________|
|
|_MINVALUE_numeric-constant__|
|
|_SET__NO MAXVALUE_______________________|
|
|_MAXVALUE_numeric-constant__|
|
|_SET__NO CYCLE__________________________|
|
|_CYCLE_numeric-constant__|
|
|_SET__NO ORDER__________________________|
|_ORDER____|
unique-constraint:
<_,_________
>>________________________________PRIMARY KEY_ _(__column-name|_)___>
|_CONSTRAINT__constraint-name_| |_UNIQUE____|
>_____________________________________________________________________><
|_,_BUSINESS_TIME_WITHOUT OVERLAPS_|
referential-constraint:
<_,___________
>>_________________________________ FOREIGN KEY _(_column-name_|)_____>
|_CONSTRAINT___constraint-name_|
>__references-clause__________________________________________________><
references-clause:
>>__REFERENCES__table-name____________________________________________>
|
<_,___________
|
|_(___column-name_|_)_|
>_____________________________________________________________________><
|_ON DELETE____RESTRICT____|
|_NO ACTION_|
66

DB2 10 for z/OS

YL&A DB2 10 for z/OS Reference Guide


|_CASCADE___|
|_SET NULL__|
_ENFORCED______
_ENABLE QUERY OPTIMIZATION_
>__|___________________|____________________|_________________________________|______><
|_NOT ENFORCED__|
check-constraint:
>>___________________________________CHECK__(check-condition)_________><
|_CONSTRAINT__constraint-name_|
partitioning-clause:
_RANGE_
<_,__________________
>>_____|______|__(___partition-expression_|_)_________________________>
<_,________________
>__(__partition-element__|__)________________________________________><
partitioning-expression:
_NULLS LAST_
__ASC__
>>__column-name__|___________|__|_______|____________________________>
|_DESC__|
partition-element:
_AT_
<_,______
_INCLUSIVE_
>>__ ENDING_|____|_(___constant_|_)_|___________|____________________><
|
|_MAXVALUE_|
|
|
|_MINVALUE_|
|
|_HASH SPACE_integer___K____________________________________|
|_M_|
|_G_|
partition-clause:
_AT_
<_,______
_INCLUSIVE_
>>_ ENDING_|____|_(___constant_|_)_|___________|____________________><
|
|_MAXVALUE_|
|
|
|_MINVALUE_|
|
|_HASH SPACE_integer___K____________________________________|
|_M_|
|_G_|
partition-rotation:
_AT_
<_,______
_INCLUSIVE_
>>_ENDING__|____|_(___constant_|_)_|___________|_____RESET___________><
|_MAXVALUE_|
|_MINVALUE_|
materialized-query-definition:
>>__(_fullselect_) refreshable-table-options__________________________>
refreshable-table-options:
>>__DATA INITIALLY DEFERRED__REFRESH DEFERRED_________________________>
<_________________________________
>___ ________________________________|____________________________><
| _MAINTAINED BY SYSTEM_
|
|_|______________________|_______|
| |_MAINTAINED BY USER___|
|
| _ENABLE QUERY OPTIMIZATION__ |
DB2 10 for z/OS

67

YL&A DB2 10 for z/OS Reference Guide


|_|____________________________|_|
|_DISABLE QUERY OPTIMIZATION_|
materialized-query-table-alteration:
<_____________________________
>>_SET_____MAINTAINED BY SYSTEM__________|____________________________>
||_MAINTAINED BY USER___|
|
|__ENABLE_QUERY OPTIMIZATION___|
|_DISABLE_QUERY OPMITIZATION__|
period-definition:
>>_SYSTEM_TIME______(_start-column-name, end-column-name_)____________>
|_BUSINESS_TIME_|
organization-clause:
<_______________
_HASH SPACE_64M__________
>>_UNIQUE__(_column-name_)_|___|_________________________|____________>
|_HASH SPACE_integer__K___|
|_M_|
|_G_|

ALTER TABLESPACE
>>__ALTER TABLESPACE______________________table-space-name____________>
|_database-name._|
<________________________________________
>______BUFFERPOOL__bpname___________________|____________________><
|_LOCKSIZE____ANY____________________|
|
|_TABLESPACE_|
|
|
|_TABLE______|
|
|
|_PAGE_______|
|
|
|_ROW________|
|
|
|_LOB________|
|
|_LOCKMAX____SYSTEM__________________|
|
|_integer_|
|
|_CLOSE____YES_______________________|
|
|_NO__|
|
|_USING____VCAT__catalog-name________|
|
|_STOGROUP__stogroup-name_| |
|_PRIQTY__integer____________________|
|_SECQTY__integer____________________|
|_ERASE____YES_______________________|
|
|_NO__|
|
|_FREEPAGE__integer__________________|
|_PCTFREE__integer___________________|
|_COMPRESS____YES____________________|
|
|_NO__|
|
|_DROP PENDING CHANGES_______________|
|_DSSIZE_integer_G___________________|
|__MEMBER CLUSTER YES________________|
| |_MEMBER CLUSTER NO__|
|
|_SEGSIZE_integer____________________|
|_GBPCACHE____CHANGED________________|
|
|_ALL_____|
|
|
|_SYSTEM__|
|
|
|_NONE____|
|
68

DB2 10 for z/OS

YL&A DB2 10 for z/OS Reference Guide


|_LOCKPART____YES____________________|
|
|_NO__|
|
|_MAXROWS__integer___________________|
|_MAXPARTITIONS_integer______________|
|_TRACKMOD____YES____________________|
|
|_NO__|
|
|_LOGGED_____________________________|
| |_NOT LOGGED__|
|
|_CCSID__ccsid-value_________________|
>>__ALTER PARTITION__integer_____________________________________________>
|_USING____VCAT__catalog-name________|
|
|_STOGROUP__stogroup-name_| |
|_PRIQTY__integer____________________|
|_SECQTY__integer____________________|
|_ERASE____YES_______________________|
|
|_NO__|
|
|_FREEPAGE__integer__________________|
|_PCTFREE__integer___________________|
|_COMPRESS____YES____________________|
|
|_NO__|
|
|_GBPCACHE____CHANGED________________|
|
|_ALL_____|
|
|
|_SYSTEM__|
|
|
|_NONE____|
|
|_TRACKMOD____YES____________________|
|_NO__|

ALTER TRIGGER
>>_ALTER TRIGGER_trigger-name___SECURED____________________________________>
|_NOT SECURED_|

ALTER TRUSTED CONTEXT


>>_ALTER TRUSTED CONTEXT_context-name______________________________________>
<________________________________________________________________________
<___________________________________________________________________ |
>___ALTER___SYSTEM AUTHID__authorization-name_________________________|_|_><
|
|_NO DEFAULT ROLE___________________________________________| | |
|
| |
_WITHOUT ROLE AS OBJECT OWNER_ | | |
|
| |_DEFAULT ROLE role-name_|______________________________|_| | |
|
|
|_WITH ROLE AS OBJECT OWNER____|
| |
|
|__ENABLE_____________________________________________________| |
|
| |_DISABLE_|
| |
|
|_NO DEFAULT SECURITY LABEL___________________________________| |
|
||_DEFAULT SECURITY LABEL_seclabel-name_|
| |
|
|
<__,_________________________________
| |
|
|_ATTRIBUTES________(______ADDRESS__address-value__________|_)| |
|
| |_ENCRYPTION_encryption-value___| |
|
|
| |_SERVAUTH_servauth-value_______| |
|
|
|_JOBNAME__jobname-value____________|
|
|
<__,_________________________________
|
|_ADD_ATTRIBUTES___(______ADDRESS__address-value__________|_)___________|
|
| |_SERVAUTH_servauth-value_______| |
|
|
|_JOBNAME__jobname-value____________|
|
DB2 10 for z/OS

69

YL&A DB2 10 for z/OS Reference Guide


|
<__,_________________________________
|
|_DROP_ATTRIBUTES__(______ADDRESS__address-value__________|_)___________|
|
| |_SERVAUTH_servauth-value_______| |
|
|
|_JOBNAME__jobname-value____________|
|
|_user-clause___________________________________________________________|
user-clause:

<_,______________________________________________
>>__ADD USE FOR _____authorization-name ____________________________|______><
|
|
|_ use-options _|
||
|
|_EXTERNAL SECURITY PROFILE profile-name_______________||
|
|
_WITHOUT AUTHENTICATION_ |_use-options_||
|
|_PUBLIC______|________________________|_______|
|
|
|_WITH AUTHENTICATION____|
|
|
<_,____________________________________________
|
|_REPLACE USE FOR_______authorization-name _______________________|__|
|
|
|_ use-options _|
|
|
|
|
_WITHOUT AUTHENTICATION_
|
|
|
|_PUBLIC______|________________________|_______|
|
|
|_WITH AUTHENTICATION____|
|
|
<_,_________________________________________
|
|_DROP USE FOR_______authorization-name _______________________|_____|
|_EXTERNAL SECURITY PROFILE_profile-name_|
|__PUBLIC_____________|
use-options:
>>______________________________________________________________________>
|_ROLE_role-name_| |_SECURITY LABEL-seclabel-name_|
_WITHOUT AUTHENTICATION_
>>___________________________________________|________________________|_><
|_WITH AUTHENTICATION____|

ALTER VIEW
>>__ALTER VIEW__view-name____REGENERATE_________________________________>

ASSOCIATE LOCATORS
_RESULT SET_
>>__ASSOCIATE__|____________|____LOCATOR________________________________>
|_LOCATORS_|
<_,___________________
>__(____rs-locator-variable_|__)_______________________________________>
>__WITH PROCEDURE____procedure-name____________________________________><
|_host-variable__|

BEGIN DECLARE SECTION


>>__BEGIN DECLARE SECTION______________________________________________><

CALL
>>__CALL____procedure-name_____________________________________________>
|_host-variable__|
>__________________________________________________________________><
70

DB2 10 for z/OS

YL&A DB2 10 for z/OS Reference Guide


|_(____________________________________________)_|
|
| <_,________________________________ |
|
|
|_____expression_____________________|_|
|
|
|_NULL_________________________|
|
|
|_TABLE__transition_table_name_|
|
|_USING DESCRIPTOR__descriptor-name______________|

CLOSE
>>__CLOSE__cursor-name_________________________________________________><

COMMENT ON
>>__COMMENT ON_________________________________________________________>
>____ALIAS__alias-name______________________________IS_string-constant_><
| |_COLUMN_____table-name___.column-name______________|
|
| |
|_view-name__|
|
|
| |
_ACTIVE VERSION_____________ |
|
| |_function-designator_|____________________________||
|
| |
|_VERSION_routine-version-id_||
|
| |_INDEX_ index-name_________________________________|
|
| |_PACKAGE_collection-id.package-name________________|
|
| |
| _VERSION_
||
|
| |
||_________|_id_||
|
| |_PLAN_plan-name____________________________________|
|
| |
_ACTIVE VERSION________ |
|
| |_PROCEDURE_procedure-name_|_______________________||
|
| |
|_VERSION_rt-ver-id_____||
|
| |_ROLE_role-name____________________________________|
|
| |_SEQUENCE_sequence-name____________________________|
|
| |_TABLE____table-name_______________________________|
|
| |
|_view-name__|
|
|
| |_TRIGGER__trigger-name_____________________________|
|
| |_TRUSTED CONTEXT_context-name______________________|
|
| |_TYPE_____distinct-type-name_______________________|
|
| |_MASK_____mask-name________________________________|
|
| |_PERMISSION_permission-name________________________|
|
|_multiple-column_list____________________________________|
multiple-column-list
<_,_____________________________
>>__table-name_________(_column-name__IS__string-constant_|__)______>
|_view-name__|
function-designator
>>__ FUNCTION__function-name________________________________________>
|
| <_,____________________
|
|
|
|_(_______________________|_)_|
|
|
|___________________|
|
|
|_parameter-type_|
|
|____SPECIFIC FUNCTION_specific-name_________________________|
parameter-type
>>____data-type_____________________________________________________><
|_AS LOCATOR____|
DB2 10 for z/OS

71

YL&A DB2 10 for z/OS Reference Guide


data-type
>>____built-in-data-type____________________________________________><
|_distinct-type-name_|
built-in-data-type
>__SMALLINT__________________________________________________________________________________><
| |_INTEGER__|
|
| | |INT__| |
|
| |_BIGINT___|
|
|
______(5,0)______________________
|
|__DECIMAL____|_________________________________|___________________________________________|
||_DEC_____| |_(__integer_________________)____|
|
||_NUMERIC_|
|_, integer_|
|
|
_(34)_
|
|_DECFLOAT_ |______|________________________________________________________________________|
|
|_(16)_|
|
|
_(53)__________
|
|___FLOAT__|_______________|_______________________________________________________________ |
| |
|_(__integer__)_|
|
|_|_REAL___________________|
|
| |
_PRECISION_
|
|
|_|_DOUBLE__|___________|__|
|
|
__(1)___________
|
|_______CHARACTER____|________________|_____________________________________________________|
| | | |_CHAR______| |_(_length__)____| |
|_FOR___SBCS____DATA_|
| |
| | |___CHARACTER__VARYING__(_length__)__|
|_MIXED_|
| |
| | | |_CHAR_____|
|
|_BIT___|
| |
| | |__VARCHAR____________|
| |
| |
_(1M)_______
| |
| |_____CHARACTER___LARGE OBJECT_ |____________|__________________________________________| |
|
| |_CHAR______|
|_(_integer_)_| |_FOR__SBCS____DATA_|
|
|
|___CLOB______________________|
|_MIXED_|
|
|
__(1)______________
|
|___GRAPHIC_|__________________|____________________________________________________________|
| |
|_(__integer___)___|
|
|
| |_VARGRAPHIC__(__integer__)___________|
|
| |
__(1M)_____________
|
| |_DBCLOB_|___________________|
|
|
|_(integer)_________|
|
|
_(1)________
|
|_ _BINARY__|____________|__________________________________________________________________|
| |
|_(integer)__|
|
|
| |__BINARY VARYING _(integer)______________________________|
|
| | |_VARBINARY_____|
|
|
| |
_(1M)____________________
|
|
| |_BINARY LARGE OBJECT_____|_________________________|_____|
|
| |_BLOB________________| |_(__integer_________)____|
|
|
|_K_|
|
|
|_M_|
|
|
|_G_|
|
|___DATE____________________________________________________________________________________|
| |_TIME____________________________________________________________________________________|
| |
__(_6_)_____
_WITHOUT TIME ZONE_
|
| |_TIMESTAMP_|____________|___|___________________|________________________________________|
|
|_(integer_)_|
|_WITH TIME ZONE____|
|
|_ROWID_____________________________________________________________________________________|

COMMIT
_WORK_
>>__COMMIT__|______|___________________________________________________><

CONNECT (Type 1 or Type 2)


>>__CONNECT___________________________________________________________><
|_TO____location-name______________________|
|
|_host-variable_| |_authorization_| |
|_RESET____________________________________|
|_authorization____________________________|
authorization
72

DB2 10 for z/OS

YL&A DB2 10 for z/OS Reference Guide


>>__USER__host-variable__USING__host-variable__________________________><

CREATE ALIAS
>>__CREATE ALIAS__alias-name__FOR____table-name________________________><
|_view-name__|

CREATE AUXILIARY TABLE


>>__CREATE____AUXILIARY____TABLE__aux-table-name__IN___________________>
|_AUX_______|
>____________________table-space-name__STORES__table-name______________>
|_database-name._|
>__APPEND NO_____COLUMN__column-name___________________________________><
|_APEEND YES_|
|_PART__integer_|

CREATE DATABASE
>>__CREATE DATABASE__database-name_____________________________________>
<____________________________________________
>_______________________________________________|______________________><
|_BUFFERPOOL__bpname_____________________|
|_INDEXBP__bpname________________________|
|_AS____WORKFILE_________________________|
|
|_FOR__member-name_| |
|
_SYSDEFLT______
|
|_STOGROUP__|_stogroup-name_|____________|
|_CCSID____ASCII_________________________|
|_EBCDIC__|
|_UNICODE_|

CREATE FUNCTION (external scalar)


>>__CREATE FUNCTION__function-name__(_____________________________)___>
| <_,____________________ |
|___parameter-declaration_|_|
>__RETURNS_____data-type2________________option-list__________________><
|
|_AS LOCATOR____|
|
|_data-type3__CAST FROM__data-type4____________________|
|_AS LOCATOR__|
parameter-declaration:
>>______________________parameter-type________________________________><
|_parameter-name_|
parameter-type:
>>____data-type_______________________________________________________><
|
|_AS LOCATOR____|
|
|_TABLE LIKE____table-name____AS LOCATOR_|
|_view-name__|
data-type:
>>____built-in-data-type______________________________________________><
|_distinct-type-name_|
built-in-data-type:
>__SMALLINT__________________________________________________________________________________><
| |_INTEGER__|
|

DB2 10 for z/OS

73

YL&A DB2 10 for z/OS Reference Guide


| | |INT__| |
|
| |_BIGINT___|
|
|
______(5,0)______________________
|
|__DECIMAL____|_________________________________|___________________________________________|
||_DEC_____| |_(__integer_________________)____|
|
||_NUMERIC_|
|_, integer_|
|
|
_(34)_
|
|_DECFLOAT_ |______|________________________________________________________________________|
|
|_(16)_|
|
|
_(53)__________
|
|___FLOAT__|_______________|_______________________________________________________________ |
| |
|_(__integer__)_|
|
|_|_REAL___________________|
|
| |
_PRECISION_
|
|
|_|_DOUBLE__|___________|__|
|
|
__(1)___________
|
|_______CHARACTER____|________________|_____________________________________________________|
| | | |_CHAR______| |_(_length__)____| |
|_FOR___SBCS____DATA_|
| |
| | |___CHARACTER__VARYING__(_length__)__|
|_MIXED_|
| |
| | | |_CHAR_____|
|
|_BIT___|
| |
| | |__VARCHAR____________|
| |
| |
_(1M)_______
| |
| |_____CHARACTER___LARGE OBJECT_ |____________|__________________________________________| |
|
| |_CHAR______|
|_(_integer_)_| |_FOR__SBCS____DATA_|
|
|
|___CLOB______________________|
|_MIXED_|
|
|
__(1)______________
|
|___GRAPHIC_|__________________|____________________________________________________________|
| |
|_(__integer___)___|
|
|
| |_VARGRAPHIC__(__integer__)___________|
|
| |
__(1M)_____________
|
| |_DBCLOB_|___________________|
|
|
|_(integer)_________|
|
|
_(1)________
|
|_ _BINARY__|____________|__________________________________________________________________|
| |
|_(integer)__|
|
|
| |__BINARY VARYING _(integer)______________________________|
|
| | |_VARBINARY_____|
|
|
| |
_(1M)____________________
|
|
| |_BINARY LARGE OBJECT_____|_________________________|_____|
|
| |_BLOB________________| |_(__integer_________)____|
|
|
|_K_|
|
|
|_M_|
|
|
|_G_|
|
|___DATE____________________________________________________________________________________|
| |_TIME____________________________________________________________________________________|
| |
__(_6_)_____
_WITHOUT TIME ZONE_
|
| |_TIMESTAMP_|____________|___|___________________|________________________________________|
|
|_(integer_)_|
|_WITH TIME ZONE____|
|
|_ROWID_____________________________________________________________________________________|

option-list:
>>___________________________________________________________________>
|_SPECIFIC_specific-name_| |
<________________________ |
|_PARAMETER_CCSID_ ASCII_____________|_|
|
|_EBCDIC__|
|
|
|_UNICODE_|
|
|_VARCHAR__NULTERM______|
|_STRUCTURE_|
>__EXTERNAL____________________________LANGUAGE____ASSEMBLE__________>
|_NAME____'string'_____|
|_C________|
|_identifier_|
|_COBOL____|
|_JAVA_____|
|_PLI______|
_PARAMETER STYLE SQL____
_NOT DETERMINISTIC_
_FENCED_
>_|________________________|_|___________________|______|________|___>
|_PARAMETER STYLE JAVA___| |_DETERMINISTIC_____|
_RETURNS NULL ON NULL INPUT_
_READS SQL DATA____
74

DB2 10 for z/OS

YL&A DB2 10 for z/OS Reference Guide


>__|____________________________|______|___________________|_________>
|_CALLED ON NULL INPUT_______|
|_NO SQL____________|
|_MODIFIES SQL DATA_|
|_CONTAINS SQL______|
_EXTERNAL ACTION____
_NO SCRATCHPAD__________
>__|____________________|__|________________________|________________>
|_NO EXTERNAL ACTION_| |
_100____ |
|_SCRATCHPAD__|________|_|
|_length_|
_NO FINAL CALL_
_ALLOW PARALLEL____
_NO DBINFO_
>__|_______________|__|___________________|______|___________|_______>
|_FINAL CALL____| |_DISALLOW PARALLEL_|
|_DBINFO____|
_NO COLLID_____________
>__|_______________________|_________________________________________>
|_COLLID__collection-id_| |_WLM ENVIRONMENT____name_________|
|_(__name__)_|
_ASUTIME NO LIMIT________
_STAY RESIDENT NO__
>__|_________________________|__|___________________|________________>
|_ASUTIME__LIMIT__integer_| |_STAY RESIDENT YES_|
_PROGRAM TYPE SUB__
_SECURITY DB2__________
>__|___________________|__|_______________________|__________________>
|_PROGRAM TYPE MAIN_| |_SECURITY____USER______|
|_DEFINER_|
_STOP AFTER SYSTEM DEFAULT FAILURES___
>___|______________________________________|_________________________>
|_STOP AFTER integer FAILURES__________|
|_CONTINUE AFTER FAILURE_______________|
>____________________________________________________________________>
|_RUN OPTIONS__run-time-options_|
_INHERIT SPECIAL REGISTERS_
_STATIC DISPATCH
>__|___________________________|_________|________________|__________>
|_DEFAULT SPECIAL REGISTERS_|
_NOT SECURED_______________
>__|___________________________|____________________________________><
|_SECURED___________________|
external-java-routine-name
|__ ___________ __method-name___ __________________ _________________|
|_jar-name:_|
|_method-signature_|
jar-name
|__ ______________ __jar-id__________________________________________|
|_schema-name._|
method-name
<________________________
|___ ______________________ |__class-id__ _.____ __method-id_________|
|_package-id_ _.____ __|
|_!____|
|_/____|
method-signature
|__ ___________________________ ____________________________________|
|_(_ ___________________ _)_|
| <_,___________
|
|___java-datatype|__|

DB2 10 for z/OS

75

YL&A DB2 10 for z/OS Reference Guide

CREATE FUNCTION(external scalar)


>>__CREATE FUNCTION__function-name____________________________________>
>__(__ ___________________________ __)_______________________________>
| <_,_____________________ |
|___parameter-declaration_|_|
>__RETURNS__data-type2________________________________|_)_option-list_><
|
|_AS LOCATOR_| |
|_data-type3__CAST_data-type4_____________|
|_AS LOCATOR_|
parameter-declaration:
>>__ ________________ __data-type_____________________________________><
|_parameter-name_| |
|
|
|
|
|_AS LOCATOR____|
|
|_TABLE LIKE__ _table-name_ __AS LOCATOR_|
|_view-name__|
data-type:
>>____built-in-data-type______________________________________________><
|_distinct-type-name_|
built-in-type:
>__SMALLINT__________________________________________________________________________________><
| |_INTEGER__|
|
| | |INT__| |
|
| |_BIGINT___|
|
|
______(5,0)______________________
|
|__DECIMAL____|_________________________________|___________________________________________|
||_DEC_____| |_(__integer_________________)____|
|
||_NUMERIC_|
|_, integer_|
|
|
_(34)_
|
|_DECFLOAT_ |______|________________________________________________________________________|
|
|_(16)_|
|
|
_(53)__________
|
|___FLOAT__|_______________|_______________________________________________________________ |
| |
|_(__integer__)_|
|
|_|_REAL___________________|
|
| |
_PRECISION_
|
|
|_|_DOUBLE__|___________|__|
|
|
__(1)___________
|
|_______CHARACTER____|________________|_____________________________________________________|
| | | |_CHAR______| |_(_length__)____| |
|_FOR___SBCS____DATA_|
| |
| | |___CHARACTER__VARYING__(_length__)__|
|_MIXED_|
| |
| | | |_CHAR_____|
|
|_BIT___|
| |
| | |__VARCHAR____________|
| |
| |
_(1M)_______
| |
| |_____CHARACTER___LARGE OBJECT_ |____________|__________________________________________| |
|
| |_CHAR______|
|_(_integer_)_| |_FOR__SBCS____DATA_|
|
|
|___CLOB______________________|
|_MIXED_|
|
|
__(1)______________
|
|___GRAPHIC_|__________________|____________________________________________________________|
| |
|_(__integer___)___|
|
|
| |_VARGRAPHIC__(__integer__)___________|
|
| |
__(1M)_____________
|
| |_DBCLOB_|___________________|
|
|
|_(integer)_________|
|
|
_(1)________
|
|_ _BINARY__|____________|__________________________________________________________________|
| |
|_(integer)__|
|
|
| |__BINARY VARYING _(integer)______________________________|
|
| | |_VARBINARY_____|
|
|
| |
_(1M)____________________
|
|
| |_BINARY LARGE OBJECT_____|_________________________|_____|
|
| |_BLOB________________| |_(__integer_________)____|
|
|
|_K_|
|
|
|_M_|
|
|
|_G_|
|
|___DATE____________________________________________________________________________________|

76

DB2 10 for z/OS

YL&A DB2 10 for z/OS Reference Guide


| |_TIME____________________________________________________________________________________|
| |
__(_6_)_____
_WITHOUT TIME ZONE_
|
| |_TIMESTAMP_|____________|___|___________________|________________________________________|
|
|_(integer_)_|
|_WITH TIME ZONE____|
|
|_ROWID_____________________________________________________________________________________|

option-list:
>>___________________________________________________________________>
|_SPECIFIC_specific-name_| |
<________________________ |
|_PARAMETER_CCSID_ ASCII_____________|_|
|
|_EBCDIC__|
|
|
|_UNICODE_|
|
|_VARCHAR__NULTERM______|
|_STRUCTURE_|
>__EXTERNAL____________________________LANGUAGE____ASSEMBLE__________>
|_NAME____'string'_____|
|_C________|
|_identifier_|
|_COBOL____|
|_JAVA_____|
|_PLI______|
_PARAMETER STYLE SQL____
_NOT DETERMINISTIC_
_FENCED_
>_|________________________|_|___________________|______|________|___>
|_PARAMETER STYLE JAVA___| |_DETERMINISTIC_____|
_RETURNS NULL ON NULL INPUT_
_READS SQL DATA____
>__|____________________________|______|___________________|_________>
|_CALLED ON NULL INPUT_______|
|_NO SQL____________|
|_MODIFIES SQL DATA_|
|_CONTAINS SQL______|
_EXTERNAL ACTION____
_NO SCRATCHPAD__________
>__|____________________|__|________________________|________________>
|_NO EXTERNAL ACTION_| |
_100____ |
|_SCRATCHPAD__|________|_|
|_length_|
_NO FINAL CALL_
_ALLOW PARALLEL____
_NO DBINFO_
>__|_______________|__|___________________|______|___________|_______>
|_FINAL CALL____| |_DISALLOW PARALLEL_|
|_DBINFO____|
_NO COLLID_____________
>__|_______________________|_________________________________________>
|_COLLID__collection-id_| |_WLM ENVIRONMENT____name_________|
|_(__name__)_|
_ASUTIME NO LIMIT________
_STAY RESIDENT NO__
>__|_________________________|__|___________________|________________>
|_ASUTIME__LIMIT__integer_| |_STAY RESIDENT YES_|
_PROGRAM TYPE SUB__
_SECURITY DB2__________
>__|___________________|__|_______________________|__________________>
|_PROGRAM TYPE MAIN_| |_SECURITY____USER______|
|_DEFINER_|
_STOP AFTER SYSTEM DEFAULT FAILURES___
>___|______________________________________|_________________________>
|_STOP AFTER integer FAILURES__________|
|_CONTINUE AFTER FAILURE_______________|
>____________________________________________________________________>
|_RUN OPTIONS__run-time-options_|
_INHERIT SPECIAL REGISTERS_
_STATIC DISPATCH
>__|___________________________|_________|________________|__________>
|_DEFAULT SPECIAL REGISTERS_|

DB2 10 for z/OS

77

YL&A DB2 10 for z/OS Reference Guide


_NOT SECURED_______________
>__|___________________________|_____________________________________><
|_SECURED___________________|

CREATE FUNCTION(external table)


>>__CREATE FUNCTION__function-name____________________________________>
>__(__ ___________________________ __)_______________________________>
| <_,_____________________ |
|___parameter-declaration_|_|
<__,_______________________________
>__RETURNS_TABLE_(_column-name data-type______________|_)_option-list_><
|_AS LOCATOR_|
parameter-declaration:
>>__ ________________ __parameter-type________________________________><
|_parameter-name_|
parameter-type:
>>__ _data-type_____ ________________________ ________________________><
|
|_AS LOCATOR____|
|
|_TABLE LIKE__ _table-name_ __AS LOCATOR_|
|_view-name__|
data-type:
>>____built-in-data-type______________________________________________><
|_distinct-type-name_|
built-in-data-type:
>__SMALLINT__________________________________________________________________________________><
| |_INTEGER__|
|
| | |INT__| |
|
| |_BIGINT___|
|
|
______(5,0)______________________
|
|__DECIMAL____|_________________________________|___________________________________________|
||_DEC_____| |_(__integer_________________)____|
|
||_NUMERIC_|
|_, integer_|
|
|
_(34)_
|
|_DECFLOAT_ |______|________________________________________________________________________|
|
|_(16)_|
|
|
_(53)__________
|
|___FLOAT__|_______________|_______________________________________________________________ |
| |
|_(__integer__)_|
|
|_|_REAL___________________|
|
| |
_PRECISION_
|
|
|_|_DOUBLE__|___________|__|
|
|
__(1)___________
|
|_______CHARACTER____|________________|_____________________________________________________|
| | | |_CHAR______| |_(_length__)____| |
|_FOR___SBCS____DATA_|
| |
| | |___CHARACTER__VARYING__(_length__)__|
|_MIXED_|
| |
| | | |_CHAR_____|
|
|_BIT___|
| |
| | |__VARCHAR____________|
| |
| |
_(1M)_______
| |
| |_____CHARACTER___LARGE OBJECT_ |____________|__________________________________________| |
|
| |_CHAR______|
|_(_integer_)_| |_FOR__SBCS____DATA_|
|
|
|___CLOB______________________|
|_MIXED_|
|
|
__(1)______________
|
|___GRAPHIC_|__________________|____________________________________________________________|
| |
|_(__integer___)___|
|
|
| |_VARGRAPHIC__(__integer__)___________|
|
| |
__(1M)_____________
|
| |_DBCLOB_|___________________|
|
|
|_(integer)_________|
|
|
_(1)________
|
|_ _BINARY__|____________|__________________________________________________________________|
| |
|_(integer)__|
|
|
| |__BINARY VARYING _(integer)______________________________|
|
| | |_VARBINARY_____|
|
|
| |
_(1M)____________________
|
|

78

DB2 10 for z/OS

YL&A DB2 10 for z/OS Reference Guide


| |_BINARY LARGE OBJECT_____|_________________________|_____|
|
| |_BLOB________________| |_(__integer_________)____|
|
|
|_K_|
|
|
|_M_|
|
|
|_G_|
|
|___DATE____________________________________________________________________________________|
| |_TIME____________________________________________________________________________________|
| |
__(_6_)_____
_WITHOUT TIME ZONE_
|
| |_TIMESTAMP_|____________|___|___________________|________________________________________|
|
|_(integer_)_|
|_WITH TIME ZONE____|
|
|_ROWID_____________________________________________________________________________________|

option-list:
>>___________________________________________________________________>
|_SPECIFIC_specific-name_| |
<________________________ |
|_PARAMETER CCSID_ ASCII_____________|_|
|
|_EBCDIC__|
|
|
|_UNICODE_|
|
|_VARCHAR__NULTERM______|
|_STRUCTURE_|
>__EXTERNAL____________________________LANGUAGE____ASSEMBLE__________>
|_NAME____'string'_____|
|_C________|
|_identifier_|
|_COBOL____|
|_JAVA_____|
|_PLI______|
_PARAMETER STYLE DB2SQL_
_NOT DETERMINISTIC_
_FENCED_
>_|________________________|_|___________________|______|________|___>
|_PARAMETER STYLE JAVA___| |_DETERMINISTIC_____|
_RETURNS NULL ON NULL INPUT_
_READS SQL DATA____
>__|____________________________|______|___________________|_________>
|_CALLED ON NULL INPUT_______|
|_NO SQL____________|
|_CONTAINS SQL______|
_EXTERNAL ACTION____
_NO SCRATCHPAD__________
>__|____________________|__|________________________|________________>
|_NO EXTERNAL ACTION_| |
_100____ |
|_SCRATCHPAD__|________|_|
|_length_|
_NO PACKAGE PATH___________
>_|___________________________|______________________________________>
|_PACKAGE PATH package-path_|
_NO FINAL CALL_
_NO DBINFO_
>__|_______________|_____________________________|___________|_______>
|_FINAL CALL____| |_DISALLOW PARALLEL_|
|_DBINFO____|
_NO COLLID_____________
>__|_______________________|_________________________________________>
|_COLLID__collection-id_| |_WLM ENVIRONMENT____name_________|
|_(__name__)_|
>____________________________________________________________________>
|_CARDINALITY_integer___|
_ASUTIME NO LIMIT________
_STAY RESIDENT NO__
>__|_________________________|__|___________________|________________>
|_ASUTIME__LIMIT__integer_| |_STAY RESIDENT YES_|
_PROGRAM TYPE SUB__
_SECURITY DB2__________
>__|___________________|__|_______________________|__________________>
|_PROGRAM TYPE MAIN_| |_SECURITY____USER______|
|_DEFINER_|
_STOP AFTER SYSTEM DEFAULT FAILURES___
>___|______________________________________|_________________________>
DB2 10 for z/OS

79

YL&A DB2 10 for z/OS Reference Guide


|_STOP AFTER integer FAILURES__________|
|_CONTINUE AFTER FAILURE_______________|
>____________________________________________________________________>
|_RUN OPTIONS__run-time-options_|
_INHERIT SPECIAL REGISTERS_
_STATIC DISPATCH_
>__|___________________________|_________|_________________|________><
|_DEFAULT SPECIAL REGISTERS_|
_NOT SECURED_______________
>__|___________________________|____________________________________><
|_SECURED___________________|

CREATE FUNCTION (sourced)


>>__CREATE FUNCTION__function-name____________________________________>
>__(__ ___________________________ __)_______________________________>
| <_,_____________________ |
|___parameter-declaration_|_|
>__RETURNS__data-type2__ _______________ ____________________________>
|_AS LOCATOR____|
>__ _________________________ __ ______________________________ _____>
|_SPECIFIC__specific-name_| |_PARAMETER CCSID__ _ASCII___ _|
|_EBCDIC__|
|_UNICODE_|
>__SOURCE_ _function-name_______________________________ ___________><
|_SPECIFIC__specific-name_____________________|
|_function-name__(__ ____________________ __)_|
| <_,______________ |
|___parameter-type_|_|
parameter-declaration:
>>__ ________________ __parameter-type_______________________________><
|_parameter-name_|
parameter-type:
>>__ _data-type_____ ________________________ _______________________><
|
|_AS LOCATOR____|
|
|_TABLE LIKE__ _table-name_ __AS LOCATOR_|
|_view-name__|
data-type:
>>____built-in-data-type_____________________________________________><
|_distinct-type-name_|
built-in-data-type:
>__SMALLINT__________________________________________________________________________________><
| |_INTEGER__|
|
| | |INT__| |
|
| |_BIGINT___|
|
|
______(5,0)______________________
|
|__DECIMAL____|_________________________________|___________________________________________|
||_DEC_____| |_(__integer_________________)____|
|
||_NUMERIC_|
|_, integer_|
|
|
_(34)_
|
|_DECFLOAT_ |______|________________________________________________________________________|
|
|_(16)_|
|
|
_(53)__________
|
|___FLOAT__|_______________|_______________________________________________________________ |
| |
|_(__integer__)_|
|
|_|_REAL___________________|
|
| |
_PRECISION_
|
|
|_|_DOUBLE__|___________|__|
|
|
__(1)___________
|
|_______CHARACTER____|________________|_____________________________________________________|

80

DB2 10 for z/OS

YL&A DB2 10 for z/OS Reference Guide


| | | |_CHAR______| |_(_length__)____| |
|_FOR___SBCS____DATA_|
| |
| | |___CHARACTER__VARYING__(_length__)__|
|_MIXED_|
| |
| | | |_CHAR_____|
|
|_BIT___|
| |
| | |__VARCHAR____________|
| |
| |
_(1M)_______
| |
| |_____CHARACTER___LARGE OBJECT_ |____________|__________________________________________| |
|
| |_CHAR______|
|_(_integer_)_| |_FOR__SBCS____DATA_|
|
|
|___CLOB______________________|
|_MIXED_|
|
|
__(1)______________
|
|___GRAPHIC_|__________________|____________________________________________________________|
| |
|_(__integer___)___|
|
|
| |_VARGRAPHIC__(__integer__)___________|
|
| |
__(1M)_____________
|
| |_DBCLOB_|___________________|
|
|
|_(integer)_________|
|
|
_(1)________
|
|_ _BINARY__|____________|__________________________________________________________________|
| |
|_(integer)__|
|
|
| |__BINARY VARYING _(integer)______________________________|
|
| | |_VARBINARY_____|
|
|
| |
_(1M)____________________
|
|
| |_BINARY LARGE OBJECT_____|_________________________|_____|
|
| |_BLOB________________| |_(__integer_________)____|
|
|
|_K_|
|
|
|_M_|
|
|
|_G_|
|
|___DATE____________________________________________________________________________________|
| |_TIME____________________________________________________________________________________|
| |
__(_6_)_____
_WITHOUT TIME ZONE_
|
| |_TIMESTAMP_|____________|___|___________________|________________________________________|
|
|_(integer_)_|
|_WITH TIME ZONE____|
|
|_ROWID_____________________________________________________________________________________|

CREATE FUNCTION (SQL Scalar)


>>_CREATE FUNCTION_function-name__(_ ___________________________ __)_>
| <_,_____________________ |
|__parameter-declaration_|__|
_VERSION V1_________________
>____RETURNS__data-type2_|____________________________|______________>
|_VERSION_routine-version-id_|
>____SQL-routine-body_______________________________________________><
parameter-declaration:
>>__ parameter-name ___paramter-type________________________________><
parameter-type:
>>____data-type_____________________________________________________><
|_TABLE LIKE____table-name__AS LOCATOR_|
|_view-name_|
data-type:
>>____built-in-data-type____________________________________________><
|_distinct-type-name_|
built-in-data-type:
>__SMALLINT__________________________________________________________________________________><
| |_INTEGER__|
|
| | |INT__| |
|
| |_BIGINT___|
|
|
______(5,0)______________________
|
|__DECIMAL____|_________________________________|___________________________________________|
||_DEC_____| |_(__integer_________________)____|
|
||_NUMERIC_|
|_, integer_|
|
|
_(34)_
|
|_DECFLOAT_ |______|________________________________________________________________________|
|
|_(16)_|
|
|
_(53)__________
|

DB2 10 for z/OS

81

YL&A DB2 10 for z/OS Reference Guide


|___FLOAT__|_______________|_______________________________________________________________ |
| |
|_(__integer__)_|
|
|_|_REAL___________________|
|
| |
_PRECISION_
|
|
|_|_DOUBLE__|___________|__|
|
|
__(1)___________
|
|_______CHARACTER____|________________|_____________________________________________________|
| | | |_CHAR______| |_(_length__)____| |
|_FOR___SBCS____DATA_|
| |
| | |___CHARACTER__VARYING__(_length__)__|
|_MIXED_|
| |
| | | |_CHAR_____|
|
|_BIT___|
| |
| | |__VARCHAR____________|
| |
| |
_(1M)_______
| |
| |_____CHARACTER___LARGE OBJECT_ |____________|__________________________________________| |
|
| |_CHAR______|
|_(_integer_)_| |_FOR__SBCS____DATA_|
|
|
|___CLOB______________________|
|_MIXED_|
|
|
__(1)______________
|
|___GRAPHIC_|__________________|____________________________________________________________|
| |
|_(__integer___)___|
|
|
| |_VARGRAPHIC__(__integer__)___________|
|
| |
__(1M)_____________
|
| |_DBCLOB_|___________________|
|
|
|_(integer)_________|
|
|
_(1)________
|
|_ _BINARY__|____________|__________________________________________________________________|
| |
|_(integer)__|
|
|
| |__BINARY VARYING _(integer)______________________________|
|
| | |_VARBINARY_____|
|
|
| |
_(1M)____________________
|
|
| |_BINARY LARGE OBJECT_____|_________________________|_____|
|
| |_BLOB________________| |_(__integer_________)____|
|
|
|_K_|
|
|
|_M_|
|
|
|_G_|
|
|___DATE____________________________________________________________________________________|
| |_TIME____________________________________________________________________________________|
| |
__(_6_)_____
_WITHOUT TIME ZONE_
|
| |_TIMESTAMP_|____________|___|___________________|________________________________________|
|
|_(integer_)_|
|_WITH TIME ZONE____|
|
|_ROWID_____________________________________________________________________________________|
|_XML_______________________________________________________________________________________|

SQL-routine-body:
>>____SQL-control-statement_____________________________________________><
|_simple-return-statement_|
simple-return-statement:
>>____RETURN___expression_______________________________________________><
|_NULL_____|
option-list:
>_____LANGUAGE SQL_______________________________________________________>
|_SPECIFIC specific-name_____|
>_____NOT DETERMINISTIC_______EXTERNAL ACTION____________________________>
|_DETERMINISTIC_____|
|_NO EXTERNAL ACTION_|
>_____READS SQL DATA _________CALLED ON NULL INPUT_______________________>
|_CONTAINS SQL ______|
|_RETURNS NULL ON NULL INPUT_|
|_MODIFIES SQL DATA__|
>_____STATIC DISPATCH___________ALLOW PARALLEL___________________________>
|_DISALLOW PARALLEL_|
>__DISALLOW DEBUG MODE______QUALIFIER schema-name________________________>
|_ALLOW DEBUG MODE____|
|_DISABLE DEBUG MODE__|
>__________________________________DEGREE _______________________________>
|_PARAMETER CCSID ASCII___|
|_DEGREE ANY_|
82

DB2 10 for z/OS

YL&A DB2 10 for z/OS Reference Guide


|_PARAMETER CCSID EBCDIC__|
|_PARAMETER CCSID UNICODE_|
>__PACKAGE OWNER__authorization-name____ASUTIME_NO LIMIT____________________>
|_ASUTIME_LIMIT__integer_|
>__INHERIT SPECIAL REGISTERS_____WLM ENVIRONMENT FOR DEBUG MODE name________>
|_DEFAULT SPECIAL REGISTERS_|
>__CURRENT DATA NO_____CONCURRENT ACCESS RESOLUTION USE CURRENTLY COMMITTED_>
|_CURRENT DATA YES_||_CONCURRENT ACCESS RESOULTION WAIT FOR OUTCOME______|
>____DYNAMICRULES RUN ______________________________________________________>
|_DYNAMICRULES BIND_______| |_APPLICATION ENCODING SCHEME ASCII___|
|_DYNAMICRULES DEFINEBIND_| |_APPLICATION ENCODING SCHEME EBCDIC__|
|_DYNAMICRULES DEFINERUN__| |_APPLICATION ENCODING SCHEME UNICODE_|
|_DYNAMICRULES INVOKEBIND_|
|_DYNAMICRULES INVOKERUN__|
>__WITHOUT EXPLAIN____ISOLATION LEVEL CS_____OPHINT__ ____________________>
|_WIHT EXPLAIN___||_ISOLATION LEVEL RS_| |_OPHINT_string-constant_|
|_ISOLATION LEVEL RR_|
|_ISOLATION LEVEL UR_|
<_,______
>_SQL PATH__schema-name|______REOPT NONE______VALIDATE RUN__________________>
|_SCHEMA PATH__| |_REOPT ALWAYS_| |_VALIDATE BIND_|
|_SESSION USER_| |_REOPT ONCE___|
|_USER_|
>___________________________________________________________________________>
|_ROUNDING DEC_ROUND_CEILING___|
|_DATE FORMAT ISO___ |
|_ROUNDING DEC_ROUND_DOWN______|
|_DATE FORMAT EUR___ |
|_ROUNDING DEC_ROUND_FLOOR_____|
|_DATE FORMAT USA___ |
|_ROUNDING DEC_ROUND_HALF_DOWN_|
|_DATE FORMAT JIS___ |
|_ROUNDING DEC_ROUND_HALF_EVEN_|
|_DATE FORMAT LOCAL_ |
|_ROUNDING DEC_ROUND_HALF_UP___|
|_ROUNDING DEC_ROUND_UP________|
>_________________________FOR UPDATE CLAUSE REQUIRED_______________________>
|_DECIMAL(15)___ | |_FOR UPDATE CLAUSE OPTIONAL_|
|_DECIMAL(31)___ |
|_DECIMAL(15,s)_ |
|_DECIMAL(31,s)_ |
>____________________________SECURED_______________________________________><
|_TIME FORMAT ISO___| |_NOT SECURED_|
|_TIME FORMAT EUR___|
|_TIME FORMAT USA___|
|_TIME FORMAT JIS___|
|_TIME FORMAT LOCAL_|

CREATE FUNCTION (SQL Table)


>__CREATE FUNCTION__function-name_(______________________________________)_>
|
<_,__________________
|
|_________________________|___|
|_parameter-declaration_|
<_,____________________
>_RETURNS TABLE__(_column-name__data-type2_|______ options-list____________>
DB2 10 for z/OS

83

YL&A DB2 10 for z/OS Reference Guide


>_SQL-routine-body_________________________________________________________>
parameter-declaration:
>>__parameter-name parameter-type__________________________________________><
parameter-type:
>>____data-type1___________________________________________________________><
|_TABLE LIKE___table-name___AS LOCATOR_|
|_view name__|
data-type1, data-typ2:
>>____built-in-data-type___________________________________________________><
|_distinct-type-name_|
built-in-data-type:
>__SMALLINT__________________________________________________________________________________><
| |_INTEGER__|
|
| | |INT__| |
|
| |_BIGINT___|
|
|
______(5,0)______________________
|
|__DECIMAL____|_________________________________|___________________________________________|
||_DEC_____| |_(__integer_________________)____|
|
||_NUMERIC_|
|_, integer_|
|
|
_(34)_
|
|_DECFLOAT_ |______|________________________________________________________________________|
|
|_(16)_|
|
|
_(53)__________
|
|___FLOAT__|_______________|_______________________________________________________________ |
| |
|_(__integer__)_|
|
|_|_REAL___________________|
|
| |
_PRECISION_
|
|
|_|_DOUBLE__|___________|__|
|
|
__(1)___________
|
|_______CHARACTER____|________________|_____________________________________________________|
| | | |_CHAR______| |_(_length__)____| |
|_FOR___SBCS____DATA_|
| |
| | |___CHARACTER__VARYING__(_length__)__|
|_MIXED_|
| |
| | | |_CHAR_____|
|
|_BIT___|
| |
| | |__VARCHAR____________|
| |
| |
_(1M)_______
| |
| |_____CHARACTER___LARGE OBJECT_ |____________|__________________________________________| |
|
| |_CHAR______|
|_(_integer_)_| |_FOR__SBCS____DATA_|
|
|
|___CLOB______________________|
|_MIXED_|
|
|
__(1)______________
|
|___GRAPHIC_|__________________|____________________________________________________________|
| |
|_(__integer___)___|
|
|
| |_VARGRAPHIC__(__integer__)___________|
|
| |
__(1M)_____________
|
| |_DBCLOB_|___________________|
|
|
|_(integer)_________|
|
|
_(1)________
|
|_ _BINARY__|____________|__________________________________________________________________|
| |
|_(integer)__|
|
|
| |__BINARY VARYING _(integer)______________________________|
|
| | |_VARBINARY_____|
|
|
| |
_(1M)____________________
|
|
| |_BINARY LARGE OBJECT_____|_________________________|_____|
|
| |_BLOB________________| |_(__integer_________)____|
|
|
|_K_|
|
|
|_M_|
|
|
|_G_|
|
|___DATE____________________________________________________________________________________|
| |_TIME____________________________________________________________________________________|
| |
__(_6_)_____
_WITHOUT TIME ZONE_
|
| |_TIMESTAMP_|____________|___|___________________|________________________________________|
|
|_(integer_)_|
|_WITH TIME ZONE____|
|
|_ROWID_____________________________________________________________________________________|
|_XML_______________________________________________________________________________________|

84

DB2 10 for z/OS

YL&A DB2 10 for z/OS Reference Guide


option-list:
>_____LANGUAGE SQL____________________________________________________>
|_SPECIFIC_specific-name_|
>_____NOT DETERMINISTIC_______EXTERNAL ACTION_________________________>
|_DETERMINISTIC_____|
|_NO EXTERNAL ACTION_|
>_____READS SQL DATA _________CALLED ON NULL INPUT____________________>
|_CONTAINS SQL ______|
>_____INHERIT SPECIAL REGISTERS__STATIC DISPATCH______________________>
|_CARDINALITY int_|
>_____SECURED___________PARAMETER CCSID_______________________________>
|_NOT SECURED_|
|_ASCII___|
|_EDCIDIC_|
|_UNICODE_|
SQL-routine-body:
>>_RETURN statement__________________________________________________><
|_BEGIN ATOMIC RETURN statement_END_|

CREATE GLOBAL TEMPORARY TABLE


<____________
>>__CREATE GLOBAL TEMPORARY TABLE_table-name_(__column-spec_|_)_______>
|_LIKE__table-name____|
|_view-name_|
>_____________________________________________________________________>
|_CCSID______ASCII_____|
|_EBCDIC__|
|_UNICODE_|
column-spec:
>>__columne-name_data-type____________________________________________>
|_NOT NULL_|
data-type:
>>__built-in-data-type________________________________________________>
|_distinct-type_name_|
built-in-data-type:
>__SMALLINT__________________________________________________________________________________><
| |_INTEGER__|
|
| | |INT__| |
|
| |_BIGINT___|
|
|
______(5,0)______________________
|
|__DECIMAL____|_________________________________|___________________________________________|
||_DEC_____| |_(__integer_________________)____|
|
||_NUMERIC_|
|_, integer_|
|
|
_(34)_
|
|_DECFLOAT_ |______|________________________________________________________________________|
|
|_(16)_|
|
|
_(53)__________
|
|___FLOAT__|_______________|________________________________________________________________|
| |
|_(__integer__)_|
|
|_|_REAL___________________|
|
| |
_PRECISION_
|
|
|_|_DOUBLE__|___________|__|
|
|
__(1)___________
|
|_______CHARACTER____|________________|_____________________________________________________|
| | | |_CHAR______| |_(_integer_)____| |
|_FOR___SBCS____DATA_|
|
| | |___CHARACTER__VARYING__(_integer_)__|
|_MIXED_|
|
| | | |_CHAR_____|
|
|_BIT___|
|
| | |__VARCHAR____________|
|
|
__(1)_____________
|
|___GRAPHIC_|__________________|____________________________________________________________|

DB2 10 for z/OS

85

YL&A DB2 10 for z/OS Reference Guide


| |
|_(__integer__)____|
|
|
| |_VARGRAPHIC__(_ integer_)____________|
|
|
_(1)________
|
|_ _BINARY__|____________|__________________________________________________________________|
| |
|_(integer)__|
|
|
| |__BINARY VARYING _(integer)______________________________|
|
| | |_VARBINARY_____|
|
|___DATE____________________________________________________________________________________|
|_TIME______|
|
|
__(_6_)_____
_WITHOUT TIME ZONE_ |
|_TIMESTAMP_|____________|___|___________________|_|
|_(integer_)_|
|_WITH TIME ZONE____|

CREATE INDEX
>>__CREATE________________________________INDEX__index-name__ON__________>
|_UNIQUE__________________|
|_WHERE NOT NULL_|
<_,___________________
_ASC__
|
>_table-name_(___column-name_____|________|_|____________________________>
|
|_key-expression_| |_DESC___|
|
|
|_RANDOM_|
|
|_aux-table-name_____________________________|
>______________________________________________)_________________________>
|___,__BUSINESS_TIME WITHOUT OVERLAPS__|
<_______________________________________
>>_____________________________________________________________________|_>
|_XML index-specification_||_INCLUDE(column-name)_|| _NOT CLUSTER_ |
|_|_CLUSTER_____|_|
|_PARTITIONED_____|
| _NOT PADDED_
|
|_|_PADDED_____|__|
|_free-block______|
|_using-block_____|
|_gbpcache-block__|
|
_YES_ |
|_DEFINE__|_NO__|_|
|
_YES_ |
|_COMPRESS_|_NO__||
>_________________________________________________________________________>
|
<_,________________________________
|
|
_RANGE_
<________________ |
|
|_PARTITION BY_|_______|__partition-element__________________|_|___)_|
|_using-block____|
|_free-block_____|
|_gbpcache-block_|
<_______________________________
>__________________________________|_____________________________________><
|_BUFFERPOOL__bpname________|
|
_YES_
|
|_CLOSE__|_NO__|____________|
|
_NO__
|
|_DEFER__|_YES_|____________|
|
_NO__
|
|_COPY__|_YES_|_____________|
|_PIECESIZE__integer____K___|
86

DB2 10 for z/OS

YL&A DB2 10 for z/OS Reference Guide


|_M_|
|_G_|
XML-index-specification:
>>_GENERATE KEY USING____XMLPATTERN_xml-pattern-clause_AS_sql-data-type_><
|_GENERATE KEYS USING_|
XML-pattern-clause:
>>______________________ pattern-expression_____________________________><
|_ proglog _|
prolog:
<____________________________________________________
>>___declare names NOName = StringLiteral ;_____________|______________><
|_declare defulat element namespace Stringliteral ;__|
pattern-expression:
>>_______________________________________________________________________>
| <_________________________________________ |
|___/____forward-axis__element-name_________|_|
|_//_||
|_*_________________| |
|
|_nsprefix:*________| |
|
|_*:NOName__________| |
|_*_________________________________|
>>______________________________________________________________________>
|___/____@attribute-name____________________|
|_//_||_attribute::attribute-name_________|
|_@*________________________________|
|_arrtibute::*______________________|
|_forward axis__text()______________|
Forward-axis:
_child::__________________
>>______|__________________________|_____________________________________>
|_descendant::_____________|
|_self::___________________|
|_descendant or self::_____|
SQL-data-type:
>>__SQL__VARCHAR__(integer)_____________________________________________><
|
_(34)_
|
|_DECFLOAT__|______|____|
|_DATE__________________|
|
_(12)_
|
|_TIMESTAMP__|______|___|
using-block:
>>__USING____________________________________________________________>
>____VCAT__catalog-name_____________________________________________><
|
<_________________________
|
|_STOGROUP__stogroup-name____________________________|_____|
|
_12______ |
|_PRIQTY__|_integer_|_|
|_SECQTY__integer_____|
|
_NO__
|
|_ERASE__|_YES_|______|
free-block:
DB2 10 for z/OS

87

YL&A DB2 10 for z/OS Reference Guide


<___________________________
_0_______
|
>>______FREEPAGE__|_integer_|___|_____________________________________><
|
_10______
|
|_PCTFREE__|_integer_|__|
gbpcache-block:
_CHANGED_
>>__GBPCACHE__|_ALL_____|_________________________________________________><
|_NONE____|
partition-element:
_AT_
<_,________
_INCLUSIVE_
>>__PARTITION__integer_ENDING__|____|_(__constant_|_)_|___________|_______><
|_MAXVALUE_|
|_MINVALUE_|

CREATE MASK
>>__CREATE MASK_mask-name_ON_table-name____________________________________>
| _AS_
|
|__|___|_correlation-name_____|
>___FOR COLUMN_column-name____RETURN case-expression___DISABLE____________><
|_ENABLE_|

CREATE PERMISSION
>>_CREATE PERMISSION_permission-name_ON_table-name_________________________>
| _AS_
|
|_|___|_correlation-name_|
>_FOR ROWS WHERE_search-condition__ENFORCED FOR ALL ACCESS__DISABLE_______><
|_ENABLE_|

CREATE PROCEDURE (external)


>>__CREATE PROCEDURE__procedure-name_______________________________________>
<_,_______________________
>__(____________________________|__)__option-list______________________><
|_parameter-declaration_|
parameter-declaration:
_IN_______
>__|_OUT______|______________________parameter-type_______________________>
|_INOUT____| |_parameter-name_|
parameter-type:
>>____data-type__________________________________________________________><
|
|_AS LOCATOR____|
|
|_TABLE LIKE____table-name____AS LOCATOR_|
|_view-name__|
data-type:
>>____built-in-data-type__________________________________________________><
|_distinct-type-name_|
built-in-data-type:

>__SMALLINT__________________________________________________________________________________><
| |_INTEGER__|
|
| | |INT__| |
|
| |_BIGINT___|
|
|
______(5,0)______________________
|

88

DB2 10 for z/OS

YL&A DB2 10 for z/OS Reference Guide


|__DECIMAL____|_________________________________|___________________________________________|
||_DEC_____| |_(__integer_________________)____|
|
||_NUMERIC_|
|_, integer_|
|
|
_(34)_
|
|_DECFLOAT_ |______|________________________________________________________________________|
|
|_(16)_|
|
|
_(53)__________
|
|___FLOAT__|_______________|_______________________________________________________________ |
| |
|_(__integer__)_|
|
|_|_REAL___________________|
|
| |
_PRECISION_
|
|
|_|_DOUBLE__|___________|__|
|
|
__(1)___________
|
|_______CHARACTER____|________________|_____________________________________________________|
| | | |_CHAR______| |_(_length__)____| |
|_FOR___SBCS____DATA_|
| |
| | |___CHARACTER__VARYING__(_length__)__|
|_MIXED_|
| |
| | | |_CHAR_____|
|
|_BIT___|
| |
| | |__VARCHAR____________|
| |
| |
_(1M)_______
| |
| |_____CHARACTER___LARGE OBJECT_ |____________|__________________________________________| |
|
| |_CHAR______|
|_(_integer_)_| |_FOR__SBCS____DATA_|
|
|
|___CLOB______________________|
|_MIXED_|
|
|
__(1)______________
|
|___GRAPHIC_|__________________|____________________________________________________________|
| |
|_(__integer___)___|
|
|
| |_VARGRAPHIC__(__integer__)___________|
|
| |
__(1M)_____________
|
| |_DBCLOB_|___________________|
|
|
|_(integer)_________|
|
|
_(1)________
|
|_ _BINARY__|____________|__________________________________________________________________|
| |
|_(integer)__|
|
|
| |__BINARY VARYING _(integer)______________________________|
|
| | |_VARBINARY_____|
|
|
| |
_(1M)____________________
|
|
| |_BINARY LARGE OBJECT_____|_________________________|_____|
|
| |_BLOB________________| |_(__integer_________)____|
|
|
|_K_|
|
|
|_M_|
|
|
|_G_|
|
|___DATE____________________________________________________________________________________|
| |_TIME____________________________________________________________________________________|
| |
__(_6_)_____
_WITHOUT TIME ZONE_
|
| |_TIMESTAMP_|____________|___|___________________|________________________________________|
|
|_(integer_)_|
|_WITH TIME ZONE____|
|
|_ROWID_____________________________________________________________________________________|

option-list:
_DYNAMIC RESULT SET 0_____________
>>__|__________________________________|_____________________________>
|_DYNAMIC__RESULT____SET___integer_|
>____________________________________________________________________>
|_PARAMETER _____CCSID__ASCII________________|
|
|_EBCDIC__|
|
|
|_UNICODE_|
|
|__VARCHAR_________NULTERM____|
|_STRUCTURE___|
>__EXTERNAL____________________________LANGUAGE____ASSEMBLE__________>
|_NAME____'string'_____|
|_C________|
|_identifier_|
|_COBOL____|
|_JAVA_____|
|_PLI______|
|_REXX_____|
_PARAMETER STYLE SQL___________________________
>__|_______________________________________________|_________________>
|
_PARAMETER STYLE_
|
|__|_________________|__________________________|
DB2 10 for z/OS

89

YL&A DB2 10 for z/OS Reference Guide


|_GENERAL____________|
|_GENERAL WITH NULLS_|
|_JAVA_______________|
_NOT DETERMINISTIC_
_FENCED_
>__|___________________|______|________|_____________________________>
|_DETERMINISTIC_____|
_CALLED ON NULL INPUT____
_MODIFIES SQL DATA_
>__|_________________________|__|___________________|_________________>
|_NO SQL____________|
|_CONTAINS SQL______|
|_READS SQL DATA____|
_NO PACAKGE PATH_____________
>__|_____________________________|____________________________________>
|_PACKAGE PATH package-path___|
_NO DBINFO_
_NO COLLID_____________
>__|___________|__|_______________________|___________________________>
|_DBINFO____| |_COLLID__collection-id_|
>_____________________________________________________________________>
|_WLM ENVIRONMENT____name_____________|
|_(__name__,*__)_|
_ASUTIME NO LIMIT________
_STAY RESIDENT NO__
>__|_________________________|__|___________________|_________________>
|_ASUTIME__LIMIT__integer_| |_STAY RESIDENT YES_|
_PROGRAM TYPE MAIN_
_SECURITY DB2__________
>__|___________________|_________|_______________________|____________>
|_PROGRAM TYPE SUB__|
|_SECURITY USER_________|
|_SECURITY DEFINER______|
_STOP AFTER SYSTEM DEFAULT FAILURES___
>_|______________________________________|____________________________>
|_STOP AFTER integer FAILURES__________|
|_CONTINUE AFTER FAILURE_______________|
_COMMIT ON RETURN NO__
>_____________________________________|______________________|________><
|_RUN OPTIONS__run-time-options_| |_COMMIT ON RETURN YES_|
_INHERIT SPECIAL REGISTERS_
_CALLED ON NULL INPUT_
>__|___________________________|____|______________________|__________>
|_DEFAULT SPECIAL REGISTERS_|
>_____________________________________________________________________><
|_DISALLOW DEBUG MODE____|
|_ALLOW DEBUG MODE_______|
|_DISABLE DEBUG MODE_____|
external-java-routine-name
|__ ___________ __method-name___ __________________ _________________|
|_jar-name:_|
|_method-signature_|
jar-name
|__ ______________ __jar-id__________________________________________|
|_schema-name._|
method-name
<________________________
|___ ______________________ |__class-id__ _.____ __method-id________|
|_package-id_ _.____ __|
|_!____|
|_/____|
90

DB2 10 for z/OS

YL&A DB2 10 for z/OS Reference Guide


method-signature
|__ ___________________________ ____________________________________|
|_(_ ___________________ _)_|
| <_,___________
|
|___java-datatype|__|

CREATE PROCEDURE (SQL - external)


>>__CREATE PROCEDURE__procedure-name___________________________________>
<_,_______________________
>__(__________________________|_)_option-list___SQL-routine-body_______><
|_parameter-declaration_|
parameter-declaration:
_IN_______
>__|_OUT______|______________________parameter-type___________________>
|_INOUT____| |_parameter-name_|
parameter-type:
>>____built-in data-type______________________________________________><
|
|_AS LOCATOR____|
|
|_TABLE LIKE____table-name____AS LOCATOR_|
|_view-name__|
built-in-data-type:
>__SMALLINT__________________________________________________________________________________><
| |_INTEGER__|
|
| | |INT__| |
|
| |_BIGINT___|
|
|
______(5,0)______________________
|
|__DECIMAL____|_________________________________|___________________________________________|
||_DEC_____| |_(__integer_________________)____|
|
||_NUMERIC_|
|_, integer_|
|
|
_(34)_
|
|_DECFLOAT_ |______|________________________________________________________________________|
|
|_(16)_|
|
|
_(53)__________
|
|___FLOAT__|_______________|_______________________________________________________________ |
| |
|_(__integer__)_|
|
|_|_REAL___________________|
|
| |
_PRECISION_
|
|
|_|_DOUBLE__|___________|__|
|
|
__(1)___________
|
|_______CHARACTER____|________________|_____________________________________________________|
| | | |_CHAR______| |_(_length__)____| |
|_FOR___SBCS____DATA_|
| |
| | |___CHARACTER__VARYING__(_length__)__|
|_MIXED_|
| |
| | | |_CHAR_____|
|
|_BIT___|
| |
| | |__VARCHAR____________|
| |
| |
_(1M)_______
| |
| |_____CHARACTER___LARGE OBJECT_ |____________|__________________________________________| |
|
| |_CHAR______|
|_(_integer_)_| |_FOR__SBCS____DATA_|
|
|
|___CLOB______________________|
|_MIXED_|
|
|
__(1)______________
|
|___GRAPHIC_|__________________|____________________________________________________________|
| |
|_(__integer___)___|
|
|
| |_VARGRAPHIC__(__integer__)___________|
|
| |
__(1M)_____________
|
| |_DBCLOB_|___________________|
|
|
|_(integer)_________|
|
|
_(1)________
|
|_ _BINARY__|____________|__________________________________________________________________|
| |
|_(integer)__|
|
|
| |__BINARY VARYING _(integer)______________________________|
|
| | |_VARBINARY_____|
|
|
| |
_(1M)____________________
|
|
| |_BINARY LARGE OBJECT_____|_________________________|_____|
|
| |_BLOB________________| |_(__integer_________)____|
|
|
|_K_|
|
|
|_M_|
|
|
|_G_|
|

DB2 10 for z/OS

91

YL&A DB2 10 for z/OS Reference Guide


|___DATE____________________________________________________________________________________|
|_TIME___________________________________________________|
|
__(_6_)_____
_WITHOUT TIME ZONE_
|
|_TIMESTAMP_|____________|___|___________________|_______|
|_(integer_)_|
|_WITH TIME ZONE____|

option-list:
_FENCED_
>>__LANGUAGE SQL__|________|________________________________________>
|_EXTERNAL NAME____string__________|
|_identifier_|
_DYNAMIC RESULT SET 0_____________
>__|__________________________________|_____________________________>
|_DYNAMIC__RESULT____SET___integer_|
>___________________________________________________________________>
|_PARAMETER _____CCSID__ASCII________________|
|_EBCDIC__|
|_UNICODE_|
_NOT DETERMINISTIC_
>__|___________________|____________________________________________>
|_DETERMINISTIC_____|
_CALLED ON NULL INPUT____
_MODIFIES SQL DATA_
>__|_________________________|__|___________________|_______________>
|_NO SQL____________|
|_CONTAINS SQL______|
|_READS SQL DATA____|
_NO DBINFO_
_NO COLLID_____________
>__|___________|__|_______________________|_________________________>
|_COLLID__collection-id_|
>___________________________________________________________________>
|_WLM ENVIRONMENT____name_____________|
|_(__name__,*__)_|
_ASUTIME NO LIMIT________
_STAY RESIDENT NO__
>__|_________________________|__|___________________|_______________>
|_ASUTIME__LIMIT__integer_| |_STAY RESIDENT YES_|
_PROGRAM TYPE MAIN_
_SECURITY DB2__________
>__|___________________|_________|_______________________|__________>
|_PROGRAM TYPE SUB__|
|_SECURITY USER_________|
|_SECURITY DEFINER______|
_STOP AFTER SYSTEM DEFAULT FAILURES___
>_|______________________________________|__________________________>
|_STOP AFTER integer FAILURES__________|
|_CONTINUE AFTER FAILURE_______________|
_COMMIT ON RETURN NO__
>_____________________________________|______________________|______>
|_RUN OPTIONS__run-time-options_| |_COMMIT ON RETURN YES_|
_INHERIT SPECIAL REGISTERS_
_CALLED ON NULL INPUT_
>__|___________________________|____|______________________|________><
|_DEFAULT SPECIAL REGISTERS_|

CREATE PROCEDURE (SQL-native)


>>__CREATE PROCEDURE__procedure-name_________________________________>
|_(_________________________)_|
| <_,__________________ |

92

DB2 10 for z/OS

YL&A DB2 10 for z/OS Reference Guide


|_paremeter declaration_|
_VERSION V1_____________
>_|________________________|_____________________SQL-routine-body____>
|_VERSION routine ver-id_|
|_option-list_|
parameter-declaration:
_IN____
>__|_______|__parameter-name__parameter-type_________________________>
|_OUT___|
|_INOUT_|
parameter-type:
>>__built-in-data-type______________________________________________><
|_TABLE LIKE__table-name__AS LOCATOR_|
|_view-name_|
built-in-data-type:
>__SMALLINT__________________________________________________________________________________><
| |_INTEGER__|
|
| | |INT__| |
|
| |_BIGINT___|
|
|
______(5,0)______________________
|
|__DECIMAL____|_________________________________|___________________________________________|
||_DEC_____| |_(__integer_________________)____|
|
||_NUMERIC_|
|_, integer_|
|
|
_(34)_
|
|_DECFLOAT_ |______|________________________________________________________________________|
|
|_(16)_|
|
|
_(53)__________
|
|___FLOAT__|_______________|_______________________________________________________________ |
| |
|_(__integer__)_|
|
|_|_REAL___________________|
|
| |
_PRECISION_
|
|
|_|_DOUBLE__|___________|__|
|
|
__(1)___________
|
|_______CHARACTER____|________________|_____________________________________________________|
| | | |_CHAR______| |_(_integer_)____| |
|_CCSID__ASCII___| |_FOR___SBCS____DATA_|
| |
| | |___CHARACTER__VARYING__(_integer__)_|
|_EBCDIC__|
|_MIXED_|
| |
| | | |_CHAR_____|
|
|_UNICODE_|
|_BIT___|
| |
| | |__VARCHAR____________|
| |
| |
_(1M)_______
| |
| |_____CHARACTER___LARGE OBJECT_ |____________|__________________________________________| |
|
| |_CHAR______|
|_(_integer_)_| |_CCSID__ASCII___| |_FOR__SBCS____DATA_
|
|
|___CLOB______________________|
|_EBCDIC__|
|_MIXED_|
|
|
|_UNICODE_|
|
|
|
|
__(1)_____________
|
|___GRAPHIC_|__________________|____________________________________________________________|
| |
|_(__integer__)____|
|_CCSID___ASCII___|
|
| |_VARGRAPHIC__(__integer__)__|
|_EBCDIC__|
|
| |
__(1M)_____________
|_UNICODE_|
|
| |_DBCLOB_|___________________|
|
|
|_(integer___)______|
|
|
_(1)________
|
|_ _BINARY__|____________|__________________________________________________________________|
| |
|_(integer)__|
|
|
| |__BINARY VARYING _(integer)______________________________|
|
| | |_VARBINARY_____|
|
|
| |
_(1M)____________________
|
|
| |_BINARY LARGE OBJECT_____|_________________________|_____|_______________________________|
| |_BLOB________________| |_(__integer_________)____|
|
|
|_K_|
|
|
|_M_|
|
|
|_G_|
|
|___DATE____________________________________________________________________________________|
| |_TIME____________________________________________________________________________________|
| |
__(_6_)_____
_WITHOUT TIME ZONE_
|
| |_TIMESTAMP_|____________|___|___________________|________________________________________|
|
|_(integer_)_|
|_WITH TIME ZONE____|
|
|_XML_______________________________________________________________________________________|

DB2 10 for z/OS

93

YL&A DB2 10 for z/OS Reference Guide


option-list:
_NOT DETERMINISTIC_
_MODIFIES SQL DATA_
>>_ |___________________|__ |___________________|________________>
|_DETERMINISTIC_____|
|_READS SQL DATA____|
|_CONTAINS SQL______|
_CALLED ON NULL INPUT_
_DYNAMIC RESULT SETS 0________
>__|______________________|__|______________________________|____>
|_DYNAMIC RESULT SETS__integer_|
>________________________________________________________________>
|_DISALLOW DEBUG MODE_|
|_PARAMETER CCSID ASCII___|
|_ALLOW DEBUG MODE____|
|_PARAMETER CCSID EBCDIC__|
|_DISABLE DEBUG MODE__|
|_PARAMETER CCSID UNICODE_|
>________________________________________________________________>
|_QUALIFIER__schema_name_|
>________________________________________________________________>
|_PACKAGE OWNER__authorization_name_|
_ASUTIME NO LIMIT_______
_COMMIT ON RETURN NO__
>__|________________________|__ |______________________|_________>
|_ASUTIME LIMIT__integer_|
|_COMMIT ON RETURN YES_|
_INHERIT SPECIAL REGISTERS_
>__|___________________________|_________________________________>
|_DEFAULT SPECIAL REGISTERS_|
_STOP AFTER SYSTEM DEFAULT FAILURES_
>__|____________________________________|________________________>
|_STOP AFTER__integer__FAILURES______|
|_CONTINUE AFTER FAILURE_____________|
>________________________________________________________________>
|_WLM ENVIRONMENT FOR DEBUG MODE__name_|
_CURRENT DATA NO__
_DEGREE 1___
>_______________________ |__________________|__|____________|____>
|_DEFER PREPARE___ |
|_CURRENT DATA YES_| |_DEGREE ANY_|
|_NODEFER PREPARE_ |
>______CONCURRENT ACCESS RESOLUTION USE CURRENTLY COMMITTED______>
|_CONCURRENT ACCESS RESOULTION WAIT FOR OUTCOME______|
_DYNAMICRULES RUN________
>__|_________________________|___________________________________>
|_DYNAMICRULES BIND_______|
|_DYNAMICRULES DEFINEBIND_|
|_DYNAMICRULES DEFINERUN__|
|_DYNAMICRULES INVOKEBIND_|
|_DYNAMICRULES INVOKERUN__|
>________________________________________________________________>
|_APPLICATION ENCODING SCHEME ASCII___|
|_APPLICATION ENCODING SCHEME EBCDIC__|
|_APPLICATION ENCODING SCHEME UNICODE_|
_WITHOUT EXPLAIN_
_WITHOUT IMMEDIATE WRITE_
>__|_________________|__ |_________________________|_____________>
|_WITH EXPLAIN____|
|_WITH IMMEDIATE WRITE____|
_ISOLATION LEVEL CS_
_WITHOUT KEEP DYNAMIC_
>__ |____________________|__|______________________|_____________>
|_ISOLATION LEVEL RS_| |_WITH KEEP DYNAMIC____|
|_ISOLATION LEVEL RR_|
94

DB2 10 for z/OS

YL&A DB2 10 for z/OS Reference Guide


|_ISOLATION LEVEL UR_|
_OPTHINT_____________________
>__|_____________________________|____________________________________>
|_OPTHINT__string_constant____|
>_____________________________________________________________________>
|_SQL PATH__schema_name__________|
|_SQL PATH__schema_name_list_____|
|_SQL PATH__SESSION_USER or USER_|
|_SQL PATH__DEFAULT______________|
_RELEASE AT COMMIT______
_REOPT NONE____
>__|_______________________ |__ |______________ |_____________________>
|_RELEASE AT DEALLOCATE__|
|_REOPT ALWAYS__|
|_REOPT ONCE____|
_VALIDATE RUN___
>___|________________|________________________________________________>
|_VALIDATE BIND_ | |_ROUNDING DEC_ROUND_CEILING___|
|_ROUNDING DEC_ROUND_DOWN______|
|_ROUNDING DEC_ROUND_FLOOR_____|
|_ROUNDING DEC_ROUND_HALF_DOWN_|
|_ROUNDING DEC_ROUND_HALF_EVEN_|
|_ROUNDING DEC_ROUND_HALF_UP___|
|_ROUNDING DEC_ROUND_UP________|
>_____________________________________________________________________>
|_DATE FORMAT ISO___ |
|_DECIMAL(15)___ |
|_DATE FORMAT EUR___ |
|_DECIMAL(31)___ |
|_DATE FORMAT USA___ |
|_DECIMAL(15,s)_ |
|_DATE FORMAT JIS___ |
|_DECIMAL(31,s)_ |
|_DATE FORMAT LOCAL_ |
_FOR UPDATE CLAUSE REQUIRED_
>___|____________________________|____________________________________><
|_FOR UPDATE CLAUSE OPTIONAL_| |_TIME FORMAT ISO___|
|_TIME FORMAT EUR___|
|_TIME FORMAT USA___|
|_TIME FORMAT JIS___|
|_TIME FORMAT LOCAL_|

CREATE ROLE
>>__CREATE ROLE__role-name_____________________________________________>

CREATE SEQUENCE
<_,_____________________________
>>_CREATE SEQUENCE_sequence-name_____________________________________|_><
|
_INTEGER___
|
|_AS__|_data-type_|_________________|
|_START WITH__numeric-constant______|
| _INCREMENT BY 1_________________ |
|_|________________________________||
| |_INCREMENT BY__numeric-constant_||
| _NO MINVALUE________________
|
|_|____________________________|____|
| |_MINVALUE__numeric-constant_|
|
| _NO MAXVALUE________________
|
|_|____________________________|____|
DB2 10 for z/OS

95

YL&A DB2 10 for z/OS Reference Guide


| |_MAXVALUE__numeric-constant_|
|
| _NO CYCLE_
|
|_|__________|______________________|
| |_CYCLE____|
|
| _CACHE 20________________
|
|_|_________________________|_______|
| |_NO CACHE________________|
|
| |_CACHE__integer-constant_|
|
| | _NO ORDER_
|
|_|_|__________|____________________|
|_ORDER____|

data-type:
>>___built-in-type_____________________________________________________>
|_distinct-type-name_|
built-in-type:
>__SMALLINT____________________________________________________________><
| |_INTEGER__|
|
| | |INT_|
|
|
| |_BIGINT___|
|
|
______(5,0)_____________________ |
|__DECIMAL____|________________________________|_|
|_DEC_____| |_(__integer___________________)_|
|_numeric_|
|_,integer_|

CREATE STOGROUP
<_,_______
>>__CREATE STOGROUP__stogroup-name__VOLUMES(____volume-id|_______)_____>
|
<_,___
|
|______'*'_|______|
>__VCAT__catalog-name__________________________________________________>
>______________________________________________________________________><
|_DATACLASdc-name_| |_MGMTCLASmc-name_| |_STORCLASsc-name_|

CREATE SYNONYM
>>__CREATE SYNONYM__synonym____________________________________________>
>__FOR__authorization-name.___table-name___________________________><
|_view-name__|

CREATE TABLE
>>__CREATE TABLE__table-name____________________________________________>
<_,_________________________
>__(_____column-definition_______|__)___________________________________>
|
|_period-definition______|
|
|
|_unique-constraint______|
|
|
|_referential-constraint_|
|
|
|_check-constraint_______|
|
|__LIKE__table-name_____copy-options________________________________|
| |
|_view-name__| |
|
| |__as-result-table___|_copy-options_______________________________|
|__materialized-query-definition____________________________________|
<____________________________________________________
>_______________________________________________________|______________><
96

DB2 10 for z/OS

YL&A DB2 10 for z/OS Reference Guide


|___IN______________________table-space-name___|
| |
|_database-name._|
|
|
| |_IN DATABASE__database-name_____________|
|
|_partitioning-clause__________________________|
|_organization-clause__________________________|
|
_WITH ROW ATTRIBUTES____ |
|_EDITPROC_prg-name_|________________________| |
|
|_WITHOUT ROW ATTRIBUTES_| |
|_VALIDPROC__program-name______________________|
|
_NONE____
|
|_AUDIT__|_CHANGES_|___________________________|
|
|_ALL_____|
|
|_OBID__integer________________________________|
|
_NONE____
|
|_DATA CAPTURE__|_CHANGES_|____________________|
|_WITH RESTRICT ON DROP________________________|
|_CCSID____ASCII_______________________________|
|
|_EBCDIC__|
|
|
|_UNICODE_|
|
|
_NOT VOLATILE_
_CARDINALITY_
|
|__|______________|__|_____________|___________|
| |
_CARDINALITY_ |
|
| |_VOLATILE______|_____________|_|
|
|
_LOGGED_____
|
|__|___________|_______________________________|
| |_NOT LOGGED_|
|
|
_COMPRESS NO__
|
|__|______________|____________________________|
| |_COMPRESS YES_|
|
|
_NO__
|
|_APPEND_____|_YES_|___________________________|
|_DSSIZE_integer_G_____________________________|
|_BUFFERPOOL_bpname____________________________|
|_MEMBER CLUSTER_______________________________|
|
_TRACKMOD YES_____
|
|__|__________________|________________________|
|_TRACKMOD NO______|
column-definition:
<__________________________________________________________
>>__column-name__data-type________________________________________|__>
>____________________________________________________________________>>
|_NOT NULL________________________________________________________|
|____________________________________ PRIMARY KEY ________________|
| |_CONSTRAINT__constraint-name_| | |_UNIQUE______|
| |
|
|_references-clause__________| |
|
|_CHECK(check-condition)_____| |
| _WITH_
|
|_|______|__DEFAULT_______________________________________________|
|
|_constant____________________________|
|
|
|_SESSION_USER________________________|
|
|
| |_USER__________|
|
|
|_CURRENT SQLID_______________________|
|
|
|_NULL________________________________|
|
DB2 10 for z/OS

97

YL&A DB2 10 for z/OS Reference Guide


|
|_cast-function-name_(constant_)_____|
|
|
|_SESSION_USER__|
|
|
| |_USER___|
|
|
|
|_CURRENT SQLID_|
|
|
|_NULL__________|
|
|_GENERATED_______ALWAYS__________________________________________|
||
|_BY DEFAULT_| |_as-identity-clause_____________| | |
||
|_as-row-change-timestamp-clause_| | |
||_GENEREATED__ALWAYS___________________________________________| |
|
|_as-row-transaction-timestamp-clause_|
|
|
|_as-row-transaction-start-id-clause_|
|
|_references-clause_______________________________________________|
|_column-constraint_______________________________________________|
|_FIELDPROC__program-name_________________________________________|
|
|
<_,________
|
|
|
|_(___constant_|_)_|
|
|_AS SECURITY LABEL_______________________________________________|
|_IMPLICITY HIDDEN________________________________________________|
|_INLINE LENGTH___________________________________________________|
data-type:
>>____built-in-data-type__________________________________________><
|_distinct-type-name_|
built-in-data-type:

>__SMALLINT__________________________________________________________________________________><
| |_INTEGER__|
|
| | |INT__| |
|
| |_BIGINT___|
|
|
______(5,0)______________________
|
|__DECIMAL____|_________________________________|___________________________________________|
||_DEC_____| |_(__integer_________________)____|
|
||_NUMERIC_|
|_, integer_|
|
|
_(34)_
|
|_DECFLOAT_ |______|________________________________________________________________________|
|
|_(16)_|
|
|
_(53)__________
|
|___FLOAT__|_______________|________________________________________________________________|
| |
|_(__integer__)_|
|
|_|_REAL___________________|
|
| |
_PRECISION_
|
|
|_|_DOUBLE__|___________|__|
|
|
__(1)___________
|
|_______CHARACTER____|________________|_____________________________________________________|
| | | |_CHAR______| |_(_integer_)____| |
|_FOR SBCS____DATA_|
| |
| | |___CHARACTER__VARYING_(_ integer _)_|
|_MIXED_|
| |
| | | |_CHAR_____|
|
|_BIT___|
| |
| | |__VARCHAR____________|
| |
| |
_(1M)______________
| |
| |_____CHARACTER___LARGE OBJECT_ |___________________|___________________________________| |
|
| |_CHAR______|
| |_(_integer ________)|
|_FOR__SBCS____DATA_|
|
|
|___CLOB____________________|
|_K_|
|_MIXED_|
|
|
|_M_|
|
|
|_G_|
|
|
__(1)_____________
|
|___GRAPHIC_|__________________|____________________________________________________________|
| |
|_(_integer___)____|
|
|
| |_VARGRAPHIC__(__integer_)____________|
|
| |
__(1M)_____________
|
| |_DBCLOB_|___________________|
|
|
|_(integer)______|
|
|
|_K_|
|
|
|_M_|
|
|
|_G_|
|
|
_(1)________
|
|_ _BINARY__|____________|__________________________________________________________________|
| |
|_(integer)__|
|
|

98

DB2 10 for z/OS

YL&A DB2 10 for z/OS Reference Guide


| |__BINARY VARYING _(integer)______________________________|
|
| | |_VARBINARY_____|
|
|
| |
_(1M)____________________
|
|
| |_BINARY LARGE OBJECT_____|_________________________|_____|_______________________________|
| |_BLOB________________| |_(__integer_________)____|
|
|
|_K_|
|
|
|_M_|
|
|
|_G_|
|
|___DATE____________________________________________________________________________________|
| |_TIME____________________________________________________________________________________|
| |
__(_6_)_____
_WITHOUT TIME ZONE_
|
| |_TIMESTAMP_|____________|___|___________________|________________________________________|
|
|_(integer_)_|
|_WITH TIME ZONE____|
|
|_ROWID_____________________________________________________________________________________|
|_XML__(XML type-modifier)__________________________________________________________________|

XML-type-modifier:
>>__XMLSCHEMA XML-schema-specification__________________________________>
|_ELEMENT_element-name__|
XML-schema-specification:
>>__ID registered-XML-schema-name_______________________________________>
|_URL target-namespace___________________________________|
|_NO NAMESPACE_________| |_LOCATION_schema-location_|
as-identity-clause:
>>__AS IDENTITY_________________________________________________________><
|
<_,______________________________________
|
|
_1________________
|
|
|_(______START WITH_|_numeric-constant_|______|__)_|
|
_1________________
|
|_INCREMENT BY_|_numeric-constant_|__|
| _CACHE 20_______
|
|_|_NO CACHE_______|_________________|
| |_CACHE__integer_|
|
| _NO CYCLE_
|
|_|_CYCLE____|_______________________|
| _NO MAXVALUE________________
|
|_|_MAXVALUE__numeric-constant_|_____|
| _NO MINVALUE_________________
|
|_|_MINVALUE__numeric-constant__|____|
| _NO ORDER_
|
|_|__________|_______________________|
|_ORDER____|
as-row-change-timestamp-clause:
>>__FOR EACH ROW__ON UPDATE__AS ROW CHANGE__TIMESTAMP___________________><
as-row-transaction-timestamp-clause:
>>__AS ROW__BEGIN________________________________________________________>
|_END_|
as-row-transaction-id-clause:
>>__AS TRANSACTION START ID______________________________________________>
column-constraint:
>>_______________________________________PRIMARY KEY____________________><
|_CONSTRAINT_constraint-name_||
|_UNIQUE________|
|
|_references clause____________|
|_CHECK(_check-condition_)_____|
period-definition:
DB2 10 for z/OS

99

YL&A DB2 10 for z/OS Reference Guide


>>_SYSTEM_TIME______(_start-column-name, end-column-name_)_______________>
|_BUSINESS_TIME_|
unique-constraint:
<_,___________
>>________________________________PRIMARY KEY__(___column-name_|_________>
|_CONSTRAINT__constraint-name |_UNIQUE___|
>_____________________________________________)__________________________><
|__,_BUSINESS_TIME WITHOUT OVERLAPS_____|
referential-constraint:
<_,_______
>>______________________________FOREIGN KEY_(_column-name_|_)____________>
|_CONSTRAINT_constraint-name_|
>__references-clause_____________________________________________________><
references-clause:
>>__REFERENCES__table-name_______________________________________________>
|
<_,___________
|
|_(___column-name_|_)_|
>________________________________________________________________________><
|_ON DELETE____RESTRICT____|
|_NO ACTION_|
|_CASCADE___|
|_SET NULL__|
_ENFORCED______
_ENABLE QUERY OPTIMIZATION_
>_____|_______________|_|___________________________|____________________><
|_NOT ENFORCED__|
check-constraint:
>>___________________________________CHECK__(check-condition)____________><
|_CONSTRAINT__constraint-name_|
as-result_table:
>>__________________________AS_(fullselect)_WITH NO DATA_________________><
| <__,_________
|
|_(column-name_|_)_|
copy-options:
<___________________________________________________________
_COLUMN ATTRIBUTES_
|
_EXCLUDING IDENTITY__|___________________|_
|
>>____|___________________________________________|______________|_______>
||
_COLUMN ATTRIBUTES_ |
|
||_INCLUDING IDENTITY__|___________________|_|
|
|
_COLUMN ATTRIBUTES_
|
| _EXCLUDING ROW CHANGE TIMESTAMP_|__________________|_ |
|_|_____________________________________________________| |
| |
_COLUMN ATTRIBUTES_ | |
| |_INCLUDING ROW CHANGE TIMESTAMP_|__________________|_| |
|
_COLUMN_
|
|
_EXCLUDING__|________|__DEFAULTS_
|
|___|_________________________________|___________________|
|
|
_COLUMN_
|
|
|
|_INCLUDING__|________|__DEFAULTS_|
|
|
|_USING TYPE DEFAULTS_____________|
|
100

DB2 10 for z/OS

YL&A DB2 10 for z/OS Reference Guide


|_EXCLUDING XML TYPE MODIFIERS__________________________|
partitioning-clause:
_RANGE_
<_,__________________
>>__PARTITION BY__|_______|__(_partition-expression_|_)_________________>
|_SIZE_______________________________________________|
|__EVERY_ integer-constant_G_|
<_,__________________
>__(_partition-element_____|__)_________________________________________><
partition-expression:
_NULLS LAST_
_ASC__
>>__column-name__|____________|__|______|_______________________________><
|_DESC_|
partition-element:
_AT_
<_,________
>>__PARTITION__integer__ENDING__|____|__(___constant_|_)________________>
|_MAXVALUE_|
|_MINVALUE_|
_INCLUSIVE_
>__HASH SPACE__integer___K______________________________|__________|____><
|_M_|
|_G_|
organization-clause:
<_______________
_HASH SPACE_64M__________
>>_UNIQUE__(_column-name_)_|___|_________________________|______________>
|_HASH SPACE_integer__K___|
|_M_|
|_G_|
materialized-query-definition:
>>__ _______________________ __AS__(fullselect)_________________________>
|
<_,___________
|
|_(____column-name_|__)_|
>__ ____________________________________________________________________><
|_ refreshable-table-options_____|
refreshable-table-options:
>>__DATA INITIALLY DEFERRED__REFRESH DEFERRED___________________________>
<_________________________________
>___ ________________________________|_______________________________><
| _MAINTAINED BY SYSTEM_
|
|_|______________________|_______|
| |_MAINTAINED BY USER___|
|
| _ENABLE QUERY OPTIMIZATION__ |
|_|____________________________|_|
|_DISABLE QUERY OPTIMIZATION_|

CREATE TABLESPACE
>>__CREATE______TABLESPACE__table-space-name____________________________>
|_LOB_|
|
_DSNDB04_______ |
|_IN_|_database-name_|_|
<_________________
>____________________|__________________________________________________>
DB2 10 for z/OS

101

YL&A DB2 10 for z/OS Reference Guide


|_using-block_____|
|_free-block______|
|_gbpcache-block__|
|_trackmod-block__|
|
_YES_ |
|_DEFINE__|_NO__|_|
| _LOGGED_____
|
|_|____________|__|
|_NOT LOGGED_|

|_DSSIZE__integer__G_|

<_____________________________
>______________________________________________________________________|__><
|_partition-by-growth-specifications_| |_BUFFERPOOL__bpname_______|
|_partition-by-range-specifications__| |
_ANY________ |
|_SEGSIZE integer____________________| |_LOCKSIZE__|_TABLESPACE_|_|
|
|_TABLE______| |
|
|_PAGE_______| |
|
|_ROW________| |
|
|_LOB________| |
|_LOCKMAX____SYSTEM________|
|
|_integer_|
|
|
_YES_
|
|_CLOSE__|_NO__|___________|
|
_NO__
|
|_COMPRESS__|_YES_|________|
|_CCSID____ASCII___________|
|
|_EBCDIC__|
|
|
|_UNICODE_|
|
|_MAXROWS__integer_________|
|_SEGSIZE_integer__________|
using-block:
>>__USING________________________________________________________________>
>____VCAT__catalog-name_________________________________________________><
|
<_____________________
|
|_STOGROUP__stogroup-name________________________|_____|
|_PRIQTY__integer_|
|_SECQTY__integer_|
|
_NO__
|
|_ERASE__|_YES_|__|
free-block:
<___________________________
_0_______
|
>>______FREEPAGE__|_integer_|___|_______________________________________><
|
_5_______
|
|_PCTFREE__|_integer_|__|
gbpcache-block:
_CHANGED_
>>__GBPCACHE__|_ALL_____|_______________________________________________><
|_SYSTEM__|
|_NONE____|
trackmod-block:
_YES_
>>__TRACKMOD__|_NO__|___________________________________________________><
Partition-by-growth-specification:
<________________
102

DB2 10 for z/OS

YL&A DB2 10 for z/OS Reference Guide


>_MAXPARTITIONS_integer______________________|__________________________><
|_MEMBER CLUSTER___|
|_NUMPARTS integer_|
Partition-by-range-specification
<_______________________________________________________________
>________________________________________________________________________|>
|
<________________
|
|_NUMPARTS__integer__________________________|________________________|
|
|
<_,_______________________________
||_MEMBER CLUSTER_||
|
|
<__________________
|
|
|
|
|(_PARTITION_integer _using-block_ |__|_)_|
|
|
|_free-block________|
|
|
|_gbpcache-block____|
|
|
|_trackmod-block____|
|
|
|
_NO__ |
|
|
|_COMPRESS__|_YES_|_|
|
|_MEMBER CLUSTER______________________________________________________|

CREATE TRIGGER
>>__CREATE TRIGGER__ trigger-name____NO CASCADE BEFORE_____________________>
|_AFTER_____________|
|_INSTEAD OF________|
>____INSERT_____________________________ON__table-name_____________________>
|_DELETE__________________________|
|_UPDATE__________________________|
|
<_,___________
|
|_OF___column-name_|__|
>__________________________________________________________________________>
|
<______________________________________
|
|
_AS_
|
|
|_REFERENCING______OLD__|____|__correlation-name______|_____|
|
_AS_
|
|_NEW__|____|__correlation-name____|
|
_AS_
|
|_OLD TABLE_____|____|__identifier_|
|
_AS_
|
|_NEW TABLE_____|____|__identifier_|
>____FOR EACH ROW_________MODE DB2SQL__NOT SECURED__triggered-action_____><
|_FOR EACH STATEMENT_|
|_SECURED____|
triggered-action
>>_______________________________________SQL trigger body_________________>
|_WHEN__(__search-condition__)_|
<____________________________
>__BEGIN ATOMIC____triggered-SQL-statement__;_|__END______________________><

CREATE TRUSTED CONTEXT


>>__CREATED TRUSTED CONTEXT__context-name_________________________________>
>_BASED UPON CONNECTION USING SYSTEM AUTHID_authorization-name____________>
_NO DEFAULT ROLE________________________________________
_DISABLE_
>_|________________________________________________________|__|________|__>
DB2 10 for z/OS

103

YL&A DB2 10 for z/OS Reference Guide


|
_WITHOUT ROLE AS OBJECT OWNER_ | |_ENABLE_|
|_DEFAULT ROLE_role-name_|_____________________________|_|
|_WITH ROLE AS OBJECT OWNER___|
_NO DEFAULT SECURITY LABEL_________________
>_|___________________________________________|___________________________>
|_DEFAULT SECURITY LABEL seclabel-name______|
<_,____________________________
>_ATTRIBUTES__(_____ADDRESS__address-value________|_______________________>
| |_ENCRYPTION_encryption-value__|
|
| |_SERVAUTH_servauth-value______|
|
| <_,__________________________
|
|_____JOBNAME_jobname-value___|_______|
>_________________________________________________________________________>
|
<_,_______________________________________
|
|_WITH USE FOR_____authorization-name______________________|_________|_>
|
|_user-options__|
|
|_EXTERNAL SECURITY PROFILE_profile-name_______________|
|
_WITHOUT AUTHENTICATION_ |_user-options_||
|_PUBLIC____|________________________|_________________|
|_WITH AUTHENTICATION____|
user-options:
_WITHOUT AUTHENTICATION_
>>________________________________________________|_______________________|_>
|_ROLE_role-name_||_SECURITY LABEL_seclabel-name_||_WITH AUTHENTICATION_|

CREATE TYPE
>>__CREATE TYPE_distinct-type-name_AS_source-data-type______________________>
>___________________________________________________________________________>
|_INLINE LENGTH_integer_|
source-data-type:

>__SMALLINT__________________________________________________________________________________><
| |_INTEGER__|
|
| | |INT__| |
|
| |_BIGINT___|
|
|
______(5,0)______________________
|
|__DECIMAL____|_________________________________|___________________________________________|
||_DEC_____| |_(__integer_________________)____|
|
||_NUMERIC_|
|_, integer_|
|
|
_(34)_
|
|_DECFLOAT_ |______|________________________________________________________________________|
|
|_(16)_|
|
|
_(53)__________
|
|___FLOAT__|_______________|_______________________________________________________________ |
| |
|_(__integer__)_|
|
|_|_REAL___________________|
|
| |
_PRECISION_
|
|
|_|_DOUBLE__|___________|__|
|
|
__(1)___________
|
|_______CHARACTER____|________________|_____________________________________________________|
| | | |_CHAR______| |_(_length__)____| |
|_FOR___SBCS____DATA_|
| |
| | |___CHARACTER__VARYING__(_length__)__|
|_MIXED_|
| |
| | | |_CHAR_____|
|
|_BIT___|
| |
| | |__VARCHAR____________|
| |
| |
_(1M)_______
| |
| |_____CHARACTER___LARGE OBJECT_ |____________|__________________________________________| |
|
| |_CHAR______|
|_(_integer_)_| |_FOR__SBCS____DATA_|
|
|
|___CLOB______________________|
|_MIXED_|
|
|
__(1)______________
|
|___GRAPHIC_|__________________|____________________________________________________________|
| |
|_(__integer___)___|
|
|
| |_VARGRAPHIC__(__integer__)___________|
|

104

DB2 10 for z/OS

YL&A DB2 10 for z/OS Reference Guide


| |
__(1M)_____________
|
| |_DBCLOB_|___________________|
|
|
|_(integer)_________|
|
|
_(1)________
|
|_ _BINARY__|____________|__________________________________________________________________|
| |
|_(integer)__|
|
|
| |__BINARY VARYING _(integer)______________________________|
|
| | |_VARBINARY_____|
|
|
| |
_(1M)____________________
|
|
| |_BINARY LARGE OBJECT_____|_________________________|_____|
|
| |_BLOB________________| |_(__integer_________)____|
|
|
|_K_|
|
|
|_M_|
|
|
|_G_|
|
|___DATE____________________________________________________________________________________|
| |_TIME____________________________________________________________________________________|
| |
__(_6_)_____
_WITHOUT TIME ZONE_
|
| |_TIMESTAMP_|____________|___|___________________|________________________________________|
|
|_(integer_)_|
|_WITH TIME ZONE____|
|
|_ROWID_____________________________________________________________________________________|

CREATE VIEW
>>__CREATE VIEW__view-name_____________________________________________>
|
<_,___________
|
|_(___column-name_|_)_|
>____________________________________________ AS__fullselect ______>
|
<__,____________________
|
|_WITH common-table-expression_|__|
>__________________________________________________________________><
|
_CASCADED_
|
|_WITH__|__________|__CHECK OPTION_|
|_LOCAL____|

DECLARE CURSOR
_NO SCROLL__________________________
>>__DECLARE__cursor-name__|____________________________________|______>
|
_ASENSITIVE_____________
|
|__|________________________|_SCROLL_|
|_INSENSITIVE____________|
|
_DYNAMIC_
|
|_SENSITIVE_|_________|__|
|_STATIC__|
<________________________
>__CURSOR____ ____________________ _|_________________________________>
|_holdability________|
|_returnability______|
|_rowset-positioning_|
>__FOR__ _select-statement_ __________________________________________><
|_statement-name___|
holdability:
_WITHOUT HOLD_
>>__|______________|___________________________________________________><
|_WITH HOLD____|
returnability:
_WITHOUT RETURN_______________
>>__|______________________________|___________________________________><
|
_TO CALLER_
|
DB2 10 for z/OS

105

YL&A DB2 10 for z/OS Reference Guide


|_WITH RETURN__|___________|___|
|_TO CLIENT_|
rowset-positioning:
_WITHOUT ROWSET POSITIONING_
>>__|____________________________|____________________________________><
|_WITH ROWSET POSITIONING____|

DECLARE GLOBAL TEMPORARY TABLE


>>__DECLARE GLOBAL TEMPORARY TABLE__table-name________________________>
<_,____________
>_(_____column-spec___|_)_____________________________________________>
|_LIKE___table-name____|____________________________|
|
|_view-name__|
|
|_copy-options_|
|_as-result-table__________|
<_________________________________
>____________________________________|________________________________><
|_CCSID___ASCII_______________|
|
|_EBCDIC__|
|
|
|_UNICODE_|
|
|
_DELETE ROWS___ |
|_ON COMMIT_|_PRESERVE_ROWS_|_|
|_DROP_TABLE____|
column spec:
>>__column-name__data-type____________________________________________>
<_____________________________________________________
>________________________________________________________|___________><
|_NOT NULL__________________________________________|
|
_WITH_
|
|__|______|_DEFAULT_________________________________|
|
|_constant______|
|
|
|_SESSION_USER__|
|
|
||_USER_______| |
|
|
|_CURRENT SQLID_|
|
|
|_NULL__________|
|
|_GENERATED___ALWAYS________________________________|
|_BY DEFAULT_| |_as-identity-clause_|
data-type:
>>___built-in type____________________________________________________><
|_distinct_type_name_|
built-in-type:
>__SMALLINT__________________________________________________________________________________><
| |_INTEGER__|
|
| | |INT__| |
|
| |_BIGINT___|
|
|
______(5,0)______________________
|
|__DECIMAL____|_________________________________|___________________________________________|
||_DEC_____| |_(__integer_________________)____|
|
||_NUMERIC_|
|_, integer_|
|
|
_(34)_
|
|_DECFLOAT_ |______|________________________________________________________________________|
|
|_(16)_|
|
|
_(53)__________
|
|___FLOAT__|_______________|________________________________________________________________|
| |
|_(__integer__)_|
|
|_|_REAL___________________|
|
| |
_PRECISION_
|
|

106

DB2 10 for z/OS

YL&A DB2 10 for z/OS Reference Guide


|_|_DOUBLE__|___________|__|
|
|
__(1)___________
|
|_______CHARACTER____|________________|_____________________________________________________|
| | | |_CHAR______| |_(_integer_)____| |
|_FOR___SBCS____DATA_|
|
| | |___CHARACTER__VARYING__(_integer_)__|
|_MIXED_|
|
| | | |_CHAR_____|
|
|_BIT___|
|
| | |__VARCHAR____________|
|
|
__(1)_____________
|
|___GRAPHIC_|__________________|____________________________________________________________|
| |
|_(__integer__)____|
|
|
| |_VARGRAPHIC__(_ integer_)____________|
|
|
_(1)________
|
|_ _BINARY__|____________|__________________________________________________________________|
| |
|_(integer)__|
|
|
| |__BINARY VARYING _(integer)______________________________|
|
| | |_VARBINARY_____|
|
|___DATE____________________________________________________________________________________|
|_TIME_____________________________________________|
|
__(_6_)_____
_WITHOUT TIME ZONE_ |
|_TIMESTAMP_|____________|___|___________________|_|
|_(integer_)_|
|_WITH TIME ZONE____|

as-result-table:
>>____AS__(fullselect)__WITH NO DATA_________________________________><
copy-options:
_COLUMN ATTRIBUTES_
_EXCLUDING IDENTITY__|___________________|_
>>__|___________________________________________|___________________>
|
_COLUMN ATTRIBUTES_ |
|_INCLUDING IDENTITY__|___________________|_|
_COLUMN_
_EXCLUDING_|________|_DEFAULTS_
>__|_______________________________|________________________________><
|
_COLUMN_
|
|_INCLUDING_|________|_DEFAULTS_|
|_USING TYPE DEFAULTS________________|
as-identity-clause:
>>__AS IDENTITY______________________________________________________><
|
<_,______________________________________
|
|
_1________________
|
|
|_(______START WITH_|_numeric-constant_|______|__)_|
|
_1________________
|
|_INCREMENT BY_|_numeric-constant_|__|
| _CACHE 20_______
|
|_|_NO CACHE_______|_________________|
| |_CACHE__integer_|
|
| _NO CYCLE_
|
|_|_CYCLE____|_______________________|
| _NO MAXVALUE________________
|
|_|_MAXVALUE__numeric-constant_|_____|
| _NO MINVALUE_________________
|
|_|_MINVALUE__numeric-constant__|____|
| _NO ORDER_
|
|_|__________|_______________________|
|_ORDER____|

DECLARE STATEMENT
<_,______________
DB2 10 for z/OS

107

YL&A DB2 10 for z/OS Reference Guide


>>__DECLARE____statement-name_|__STATEMENT____________________________><

DECLARE TABLE
>>_DECLARE__table-name_________________________________________________>
|_view-name__|
<_,_____________________________________________
>_TABLE(column-name__built-in-data-type____________________________|_)_><
|_distinct-type-name_||_NOT NULL______________|
|_NOT NULL WITH DEFAULT_|

DECLARE VARIABLE
<_,___________
_CCSID EBCDIC__
>>_DECLARE__host-variable|_VARIABLE_|_______________|___________________><
||_CCSID ASCII___| |_FOR SBCS DATA__||
||_CCSID UNICODE_| |_FOR MIXED DATA_||
|
|_FOR BIT DATA___||
|_CCSID__integer_____________________|

DELETE
searched delete:
>>__DELETE FROM____table-name_________________________________________>
|_view-name__| |_correlation-name_|
>_____________________________________________________________________>
|_include-column_|
|_SET assignment-clause_|
>_____________________________________________________________________>
|_WHERE__search-condition_| |_isolation-clause__|
|_SKIP LOCKED DATA__|
>_____________________________________________________________________><
|_QUERYNO__integer_|
positioned delete:
>>__DELETE FROM____table-name____WHERE CURRENT OF__cursor-name________><
|_view-name__|
>_____________________________________________________________________><
|_FOR ROW___host-variable______OF ROWSET_|
|_integer-constant__|
Period-clause:
>>__FOR PORTION OF BUSINESS_TIME_FROM_value1 to value2________________><
include-column:
>>__INCLUDE__(__column-name__data-type__)_____________________________><
data-type:
>>___built-in type____________________________________________________><
|_distinct_type_name_|
built-in-type:

>__SMALLINT__________________________________________________________________________________><
| |_INTEGER__|
|
| | |INT__| |
|
| |_BIGINT___|
|
|
______(5,0)______________________
|
|__DECIMAL____|_________________________________|___________________________________________|
||_DEC_____| |_(__integer_________________)____|
|
||_NUMERIC_|
|_, integer_|
|
|
_(34)_
|
|_DECFLOAT_ |______|________________________________________________________________________|

108

DB2 10 for z/OS

YL&A DB2 10 for z/OS Reference Guide


|
|_(16)_|
|
|
_(53)__________
|
|___FLOAT__|_______________|________________________________________________________________|
| |
|_(__integer__)_|
|
|_|_REAL___________________|
|
| |
_PRECISION_
|
|
|_|_DOUBLE__|___________|__|
|
|
__(1)___________
|
|_______CHARACTER____|________________|_____________________________________________________|
| | | |_CHAR______| |_(_integer_)____| |
|_FOR___BIT____DATA_|
|
| | |___CHARACTER__VARYING__(_integer_)__|
|
| | | |_CHAR_____|
|
|
| | |__VARCHAR____________|
|
|
__(1)_____________
|
|___GRAPHIC_|__________________|____________________________________________________________|
| |
|_(__integer__)____|
|
|
| |_VARGRAPHIC__(_ integer_)____________|
|
|
_(1)________
|
|_ _BINARY__|____________|__________________________________________________________________|
| |
|_(integer)__|
|
|
| |__BINARY VARYING _(integer)______________________________|
|
| | |_VARBINARY_____|
|
|___DATE____________________________________________________________________________________|
|_TIME_____________________________________________|
|
__(_6_)_____
_WITHOUT TIME ZONE_ |
|_TIMESTAMP_|____________|___|___________________|_|
|_(integer_)_|
|_WITH TIME ZONE____|

assignment-clause:
<__,___________________________________________________
>>_____column-name___expression_____________________________|____________><
|
|_NULL_________|
|
|
<_,___________
<_,__________________
|
|_(_column-name___|_)_(________expression____|_____)__|
|
|_NULL_________| |
|_row-fullselect________|
isolation-clause:
>>_WITH___RR_____________________________________________________________><
|_RS_|
|_CS_|

DESCRIBE CURSOR
>>__DESCRIBE CURSOR____cursor-name______INTO__descriptor-name____________><
|_host-variable_|

DESCRIBE INPUT
>>__DESCRIBE INPUT____statement-name____INTO__descriptor-name____________><

DESCRIBE OUTPUT
_OUTPUT_
>>_DESCRIBE_|________|_statement-name____INTO__descriptor-name___________>
>________________________________________________________________________><
|
_NAMES__ |
|_USING__|_LABELS_|_|
|_ANY____|
|_BOTH___|

DESCRIBE PROCEDURE
>>__DESCRIBE PROCEDURE____procedure-name____INTO__descriptor-name________><
|_host-variable__|
DB2 10 for z/OS

109

YL&A DB2 10 for z/OS Reference Guide

DESCRIBE TABLE
>>_DESCRIBE_TABLE___host-variable_________INTO__descriptor-name___________>
>_________________________________________________________________________><
|
_NAMES__ |
|_USING__|_LABELS_|_|
|_ANY____|
|_BOTH___|

DROP
>>_DROP____ALIAS__alias-name______________________________________________><
|_DATABASE__database-name_________________________________________|
|_TYPE______________distinct-type-name__RESTRICT__________________|
|__FUNCTION__function-name______________________________RESTRICT__|
| |
|
<_,__________________
|
| |
| |
|_(_______________________|__)_|
| |
| |
|_parameter-type_|
| |
| |__SPECIFIC FUNCTION specific-name______RESTRICT______________| |
|_INDEX__index-name_______________________________________________|
|_MASK_mask-name__________________________________________________|
|_PACKAGE__collection-id.package-id_______________________________|
|
| _VERSION_
| |
|
|_|________|__version-id_| |
|_PERMISSION__permission-name_____________________________________|
|_PROCEDURE__procedure-name__RESTRICT_____________________________|
|_ROLE_role-name__RESTRICT________________________________________|
|_SEQUENCE__sequence-name_________________________________________|
|_STOGROUP__stogroup-name_________________________________________|
|_SYNONYM__synonym________________________________________________|
|_TABLE__table-name_______________________________________________|
|_TABLESPACE______________________table-space-name________________|
|
|_database-name._|
|
|_TRIGGER__trigger-name___________________________________________|
|_TRUSTED CONTEXT__context-name___________________________________|
|_TYPE_distinct-type-name____RESTRICT_____________________________|
|_VIEW__view-name_________________________________________________|
parameter type:
>>____data-type_________________________________________________________><
|_AS LOCATOR____|
data type:
>>____built-in-data-type________________________________________________><
|_distinct-type-name_|
built-in-data-type:
>__SMALLINT__________________________________________________________________________________><
| |_INTEGER__|
|
| | |INT__| |
|
| |_BIGINT___|
|
|
______(5,0)______________________
|
|__DECIMAL____|_________________________________|___________________________________________|
||_DEC_____| |_(__integer_________________)____|
|
||_NUMERIC_|
|_, integer_|
|
|
_(34)_
|
|_DECFLOAT_ |______|________________________________________________________________________|
|
|_(16)_|
|
|
_(53)__________
|
|___FLOAT__|_______________|_______________________________________________________________ |
| |
|_(__integer__)_|
|
|_|_REAL___________________|
|
| |
_PRECISION_
|
|

110

DB2 10 for z/OS

YL&A DB2 10 for z/OS Reference Guide


|_|_DOUBLE__|___________|__|
|
|
__(1)___________
|
|_______CHARACTER____|________________|_____________________________________________________|
| | | |_CHAR______| |_(_integer__)____| |
|_CCSID__ASCII___| |_FOR___SBCS____DATA_| | |
| | |___CHARACTER__VARYING__(_integer__)__|
|_EBCDIC__|
|_MIXED_|
| |
| | | |_CHAR_____|
|
|_UNICODE_|
|_BIT___|
| |
| | |__VARCHAR____________|
| |
| |
_(1M)_______
| |
| |_____CHARACTER___LARGE OBJECT_ |____________|__________________________________________| |
|
| |_CHAR______|
|_(_integer_)_| |_CCSID__ASCII___| |_FOR__SBCS___DATA_| |
|
|___CLOB______________________|
|_EBCDIC__|
|_MIXED_|
|
|
|_UNICODE_|
|
|
|
|
__(1)_____________
|
|___GRAPHIC_|__________________|____________________________________________________________|
| |
|_(__integer___)___|
|
|_CCSID___ASCII___|
|
| |_VARGRAPHIC__(__integer__)____________|
|_EBCDIC__|
|
| |
__(1M)_____________
|_UNICODE_|
|
| |_DBCLOB_|___________________|
|
|
|_(integer)_________|
|
|
_(1)________
|
|_ _BINARY__|____________|__________________________________________________________________|
| |
|_(integer)__|
|
|
| |__BINARY VARYING _(integer)______________________________|
|
| | |_VARBINARY_____|
|
|
| |
_(1M)____________________
|
|
| |_BINARY LARGE OBJECT_____|_________________________|_____|_______________________________|
| |_BLOB________________| |_(__integer_________)____|
|
|
|_K_|
|
|
|_M_|
|
|
|_G_|
|
|___DATE____________________________________________________________________________________|
| |_TIME____________________________________________________________________________________|
| |
__(_6_)_____
_WITHOUT TIME ZONE_
|
| |_TIMESTAMP_|____________|___|___________________|________________________________________|
|
|_(integer_)_|
|_WITH TIME ZONE____|
|
|_ROWID_____________________________________________________________________________________|

END DECLARE SECTION


>>__END DECLARE SECTION_________________________________________________><

EXCHANGE
>>__EXCHANGE DATA BETWEEN TABLE table-name1_AND_table-name2 ____________><

EXECUTE
>>__EXECUTE__statement-name_____________________________________________>
>___________________________________________________________________><
|
<_,_____________
|
|_USING______host-variable_|_____________|
|
|_DESCRIPTOR__descriptor-name_| |
|_ source-row-data_______________________|
source-row-data:
<_,_____________________
>>__ _USING___ _host-variable-array_ |__ ______________________________>
|
|_host-variable_______|
|
|_USING DESCRIPTOR__descriptor-name_|
>__ _______________________________ ___________________________________><
|_FOR_ _host-variable____ _ROWS_|
|_integer-constant_|

EXECUTE IMMEDIATE
>>__EXECUTE IMMEDIATE____string-expression______________________________><
DB2 10 for z/OS

111

YL&A DB2 10 for z/OS Reference Guide


|_host-variable_____|

EXPLAIN
>>__EXPLAIN_____________________________________________________________>
>_ _ _PLAN_ __ _____________________ _FOR_sql-statement_ ______________><
| |_ALL__| |_SET QUERYNO=integer_|
|
|_STMTCACHE___ALL_____________________________________|
|
|_STMTID__ _id-host-variable_ _______|
|
|
|
|_integer-constant_|
|
|
|
|_STMTTOKEN__ _token-host-variable_ _|
|
|
|_string-constant_____|
|
|_PACKAGE__package-specification______________________|
Pacakge-specification:
>>__COLLECTION-collection-name___________________________________________>
>___PACKAGE-package-name_________________________________________________><
|_VERSION_version-name| |_COPY_copy-id_|

FETCH
_FROM_
>>__FETCH__ ________________ ___fetch-orientation______|______|_________>
|_INSENSITIVE____|
|_SENSITIVE______|
>__cursor-name__ ________________________ _____________________________><
|__ single-row-fetch ____|
|__ multiple-row-fetch __|
fetch-orientation:
>_ _BEFORE________________ _____________________________________________>
|_AFTER_________________|
|___row-positioned______|
|___rowset-positioned___|
row-positioned:
_NEXT___________________________
__|________________________________|__________________________________>
|_PRIOR__________________________|
|_FIRST__________________________|
|_LAST___________________________|
|_CURRENT________________________|
|_ABSOLUTE_ _host-variable____ __|
|
|_integer-constant_| |
|_RELATIVE_ _host-variable____ __|
|_integer-constant_|
rowset-positioned:
_NEXT ROWSET____________________________________________ __________>
|_PRIOR ROWSET___________________________________________|
|_FIRST ROWSET___________________________________________|
|_LAST ROWSET____________________________________________|
|_CURRENT ROWSET_________________________________________|
|_ROWSET STARTING AT_ _ABSOLUTE_ __ _host-variable____ __|
|_RELATIVE_| |_integer-constant_|
single-row-fetch:
_________________________________ _________________________________>
|
<_,___________
|
112

DB2 10 for z/OS

YL&A DB2 10 for z/OS Reference Guide


|_INTO__host-variable|____________|
|_INTO DESCRIPTOR descriptor-name_|
multiple-row-fetch:
|__ _________________________________ _____________________________>
|_FOR__ _host-variable____ __ROWS_|
|_integer-constant_|
>__ _________________________________ _____________________________>
|
<_,_________________
|
|_INTO___host-variable-array|_____|
|_INTO DESCRIPTOR descriptor-name_|

FREE LOCATOR
<_,_____________
>>__FREE LOCATOR____host_variable_|___________________________________><

GET DIAGNOSTICS
>>__GET DIAGNOSTICS__ __statement-information _ ______________________><
|__condition-information _|
|__combined-information _|
statement-information:
<_,______________________________________________________
>__ ___host-variable1__=__| statement-information-item-name |_|_ ____>
|_host-variable1__=__DB2_GET_DIAGNOSTICS_DIAGNOSTICS_________|
|_nost-variable1_=_DB2_SQL_NESTING_LEVEL_____________________|
statement-information-item-name:
<_,___________________________________
>____ _DB2_LAST_ROW____________________ _|___________________________>
|_DB2_NUMBER_PARAMETER_MARKERS____|
|_DB2_NUMBER_RESULT_SETS__________|
|_DB2_RETURN_STATUS_______________|
|_DB2_SQL_ATTR_CURSOR_HOLD________|
|_DB2_SQL_ATTR_CURSOR_ROWSET______|
|_DB2_SQL_ATTR_CURSOR_SCROLLABLE__|
|_DB2_SQL_ATTR_CURSOR_SENSITIVITY_|
|_DB2_SQL_ATTR_CURSOR_TYPE________|
|_MORE____________________________|
|_NUMBER__________________________|
|_ROW_COUNT_______________________|
condition-information:
>__CONDITION__ _host-variable2_ _____________________________________>
|_integer________|
<_,________________________________________________________
>__host-variable3__ =__ ___condition-information-item-name ___ _|____>
|___connection-information-item-name __|
condition-information-item-name:
>__ _CATALOG_NAME_______________ ____________________________________>
|_CONDITION_NUMBER___________|
|_CURSOR_NAME________________|
|_DB2_ERROR_CODE1____________|
|_DB2_ERROR_CODE2____________|
|_DB2_ERROR_CODE3____________|
|_DB2_ERROR_CODE4____________|
|_DB2_INTERNAL_ERROR_POINTER_|
|_DB2_LINE_NUMBER____________|
DB2 10 for z/OS

113

YL&A DB2 10 for z/OS Reference Guide


|_DB2_MESSAGE_ID_____________|
|_DB2_MODULE_DETECTING_ERROR_|
|_DB2_ORDINAL_TOKEN_n________|
|_DB2_REASON_CODE____________|
|_DB2_RETURNED_SQLCODE_______|
|_DB2_ROW_NUMBER_____________|
|_DB2_SQLERRD_SET____________|
|_DB2_SQLERRD1_______________|
|_DB2_SQLERRD2_______________|
|_DB2_SQLERRD3_______________|
|_DB2_SQLERRD4_______________|
|_DB2_SQLERRD5_______________|
|_DB2_SQLERRD6_______________|
|_DB2_TOKEN_COUNT____________|
|_MESSAGE_TEXT_______________|
|_RETURNED_SQLSTATE__________|
|_SERVER_NAME________________|
connection-information-item-name:
>__ _DB2_AUTHENTICATION_TYPE_ ______________________________________>
|_DB2_AUTHORIZATION_ID____|
|_DB2_CONNECTION_STATE____|
|_DB2_CONNECTION_STATUS___|
|_DB2_ENCRYPTION_TYPE_____|
|_DB2_SERVER_CLASS_NAME___|
|_DB2_PRODUCT_ID__________|
combined-information:
<_,____________________________________
>__host-variable4__=__ALL___ _STATEMENT___________________________|__><
|_ _CONDITION__ __ ________________ _|
|_CONNECTION_| |_host-variable5_|
|_integer________|

GRANT
>>__GRANT__authorization-specification_______________________________>
<_,___________________________
>__TO______authorization-name________|_______________________________><
|_PUBLIC__________________|
|_WITH GRANT OPTION_|
|_ROLE_role-name__________|

GRANT (collection privileges)


<_,_____________
>>__GRANT____CREATE_______ON____COLLECTION______collection-id_|______>
|_PACKADM_| |_IN_|
|_*_________________|
<_,______________________
>__TO______authorization-name___|____________________________________><
|_PUBLIC_____________|
|_WITH GRANT OPTION_|
|_ROLE_role-name_____|

GRANT (database privileges)


<_,_____________
<_,_____________
>>__GRANT______DBADM_______|__ON DATABASE____database-name_|_________>
|_DBCTRL____|
|_DBMAINT___|
|_CREATETAB_|
114

DB2 10 for z/OS

YL&A DB2 10 for z/OS Reference Guide


|_CREATETS__|
|_DISPLAYDB_|
|_DROP______|
|_IMAGCOPY__|
|_LOAD______|
|_RECOVERDB_|
|_REORG_____|
|_REPAIR____|
|_STARTDB___|
|_STATS_____|
|_STOPDB____|
<_,______________________
>__TO______authorization-name___|____________________________________><
|_PUBLIC_____________|
|_WITH GRANT OPTION_|
|_ROLE_role-name_____|

GRANT (type or JAR privileges)


<_,__________________
>>__GRANT__USAGE ON__DISTINCT TYPE_______distinct-type-name_|________>
|
<_,________
|
|_JAR____jar-name_|________________________|
<_,______________________
>__TO______authorization-name___|____________________________________><
|_PUBLIC_____________|
|_WITH GRANT OPTION_|
|_ROLE_role-name_____|

GRANT (function or procedure privileges)


>>__GRANT__EXECUTE__ON________________________________________________>
<_,_________________________________________
>____FUNCTION______function-name______________________________|_______>
|
|
|
<_,__________________
|
| |
|
|
|_(_______________________|__)_|
| |
|
|
|_parameter-type_|
| |
|
|_*______________________________________________| |
|
<_,_____________
|
|_SPECIFIC FUNCTION____specific-name_|_________________________|
|
<_,______________
|
|_PROCEDURE______procedure-name_|______________________________|
|_*__________________|
<_,______________________
>__TO______authorization-name___|________________________________><
|_PUBLIC_____________|
|_WITH GRANT OPTION_|
|_ROLE_role-name_____|
parameter type:
>>____data-type_____________________________________________________><
|_AS LOCATOR____|
data type:
>>____built-in-data-type____________________________________________><
|_distinct-type-name_|
built-in data type:
>__SMALLINT__________________________________________________________________________________><
| |_INTEGER__|
|
| | |INT__| |
|
| |_BIGINT___|
|

DB2 10 for z/OS

115

YL&A DB2 10 for z/OS Reference Guide


|
______(5,0)______________________
|
|__DECIMAL____|_________________________________|___________________________________________|
||_DEC_____| |_(__integer_________________)____|
|
||_NUMERIC_|
|_, integer_|
|
|
_(34)_
|
|_DECFLOAT_ |______|________________________________________________________________________|
|
|_(16)_|
|
|
_(53)__________
|
|___FLOAT__|_______________|_______________________________________________________________ |
| |
|_(__integer__)_|
|
|_|_REAL___________________|
|
| |
_PRECISION_
|
|
|_|_DOUBLE__|___________|__|
|
|
__(1)___________
|
|_______CHARACTER____|________________|_____________________________________________________|
| | | |_CHAR______| |_(_integer__)____| |
|_CCSID__ASCII___| |_FOR___SBCS____DATA_| | |
| | |___CHARACTER__VARYING__(_integer__)__|
|_EBCDIC__|
|_MIXED_|
| |
| | | |_CHAR_____|
|
|_UNICODE_|
|_BIT___|
| |
| | |__VARCHAR____________|
| |
| |
_(1M)_______
| |
| |_____CHARACTER___LARGE OBJECT_ |____________|__________________________________________| |
|
| |_CHAR______|
|_(_integer_)_| |_CCSID__ASCII___| |_FOR__SBCS___DATA_| |
|
|___CLOB______________________|
|_EBCDIC__|
|_MIXED_|
|
|
|_UNICODE_|
|
|
|
|
__(1)_____________
|
|___GRAPHIC_|__________________|____________________________________________________________|
| |
|_(__integer___)___|
|
|_CCSID___ASCII___|
|
| |_VARGRAPHIC__(__integer__)____________|
|_EBCDIC__|
|
| |
__(1M)_____________
|_UNICODE_|
|
| |_DBCLOB_|___________________|
|
|
|_(integer)_________|
|
|
_(1)________
|
|_ _BINARY__|____________|__________________________________________________________________|
| |
|_(integer)__|
|
|
| |__BINARY VARYING _(integer)______________________________|
|
| | |_VARBINARY_____|
|
|
| |
_(1M)____________________
|
|
| |_BINARY LARGE OBJECT_____|_________________________|_____|_______________________________|
| |_BLOB________________| |_(__integer_________)____|
|
|
|_K_|
|
|
|_M_|
|
|
|_G_|
|
|___DATE____________________________________________________________________________________|
| |_TIME____________________________________________________________________________________|
| |
__(_6_)_____
_WITHOUT TIME ZONE_
|
| |_TIMESTAMP_|____________|___|___________________|________________________________________|
|
|_(integer_)_|
|_WITH TIME ZONE____|
|
|_ROWID_____________________________________________________________________________________|

GRANT (package privileges)


>>__GRANT____ALL____________________ON____PACKAGE____________________>
| <_,_______________ |
|_*_______|
|_____BIND__________|_|
|_COPY________|
|___EXECUTE___|
|_RUN_____|
<_,______________________________
>____collection-id.___package-id____|____________________________>
|_*__________|
<_,______________________
>__TO______authorization-name___|________________________________><
|_PUBLIC_____________|
|_WITH GRANT OPTION_|
|_ROLE_role-name_____|

116

DB2 10 for z/OS

YL&A DB2 10 for z/OS Reference Guide

GRANT (plan privileges)


<_,___________
<_,_________
>>__GRANT______BIND______|__ON PLAN____plan-name_|_______________________>
|_EXECUTE_|
<_,______________________
>__TO______authorization-name___|____________________________________><
|_PUBLIC_____________|
|_WITH GRANT OPTION_|
|_ROLE_role-name_____|

GRANT (schema privileges)


<_,____________
<_,___________
>>__GRANT______ALTERIN____|__ON__SCHEMA______schema-name_|_______________>
|_CREATEIN_|
|_DROPIN___|
<_,______________________
>__TO______authorization-name___|______________________________________><
|_PUBLIC_____________|
|_WITH GRANT OPTION_|
|_ROLE_role-name_____|

GRANT (sequence privileges)


<_,__________
<_,____________
>>__GRANT______ALTER____|__ON_SEQUENCE______sequence-name_|______________>
|_USAGE____|
|_*_______________|
<_,______________________
>__TO______authorization-name___|______________________________________><
|_PUBLIC_____________|
|_WITH GRANT OPTION_|
|_ROLE_role-name_____|

GRANT (system privileges)


<_,_________________
>>__GRANT__________ACCESSCTRL___________|_______________________________>
|_ARCHIVE_____________________________________________|
|_BINDADD_____________________________________________|
|_BINDAGENT___________________________________________|
|_BSDS________________________________________________|
|_CREATEALIAS_________________________________________|
|_CREATEDBA___________________________________________|
|_CREATEDBC___________________________________________|
|_CREATESG____________________________________________|
|_CREATETMTAB_________________________________________|
|_CREATE_SECURE_OBJECT________________________________|
|_DATAACCESS__________________________________________|
|
_WITH ACCESSCTRL_____ _WITH DATAACCESS____ |
|_DBADM_|_____________________||____________________|_|
|
|_WITHOUT ACCESS CTRL_||_WITHOUT DATAACCESS_| |
|_DEBUGSESSION________________________________________|
|_DISPLAY_____________________________________________|
|_EXPLAIN_____________________________________________|
|_MONITOR1____________________________________________|
|_MONITOR2____________________________________________|
DB2 10 for z/OS

117

YL&A DB2 10 for z/OS Reference Guide


|_RECOVER_____________________________________________|
|_SQLADM______________________________________________|
|_STOPALL_____________________________________________|
|_STOSPACE____________________________________________|
|_SYSADM______________________________________________|
|_SYSCTRL_____________________________________________|
|_SYSOPR______________________________________________|
|_TRACE_______________________________________________|
>_______________________________________________________________________>
|_ON SYSTEM_|
<_,______________________
>__TO______authorization-name___|_______________________________________><
|_PUBLIC_____________|
|_WITH GRANT OPTION_|
|_ROLE_role-name_____|

GRANT (table or view privileges)


_PRIVILEGES_
>>__GRANT____ALL__|____________|________________________________________>
| <_,_______________________________________ |
|_____ALTER_________________________________|_|
|_DELETE______________________________|
|_INDEX_______________________________|
|_INSERT______________________________|
|_SELECT______________________________|
|_REFERENCES__________________________|
|
|
<_,___________
| |
|
|_(___column-name_|_)_| |
|_TRIGGER_____________________________|
|_UPDATE______________________________|
|
<_,___________
|
|_(___column-name_|_)_|
_TABLE_
<_,______________
>__ON__|_______|______table-name___|____________________________>
|_view-name__|
<_,___________________________
>__TO______authorization-name________|__________________________><
|_PUBLIC_______________|
|_WITH GRANT OPTION_|
|_ROLE_role-name_______|

GRANT (use privileges)


>>__GRANT USE OF____________________________________________________>
<_,____
>____BUFFERPOOL___bpname|___________________________________________>
|_ALL BUFFERPOOLS______________________________________
|
<_,_____________
|
|_STOGROUP____stogroup-name_|__________________________|
|
<_,____________________________________ |
|_TABLESPACE________________________table-space-name_|_|
|_database-name._|
<_,______________________
>__TO______authorization-name___|___________________________________><
|_PUBLIC_____________|
|_WITH GRANT OPTION_|
118

DB2 10 for z/OS

YL&A DB2 10 for z/OS Reference Guide


|_ROLE_role-name_____|

HOLD LOCATOR
<_,_____________
>>__HOLD LOCATOR____host_variable_|______________________________________><

INCLUDE
>>__INCLUDE____SQLCA_____________________________________________________><
|_SQLDA_______|
|_member-name_|

INSERT
>>__INSERT INTO____table-name____________________________________________>
|_view-name__| |
<_,___________
|
|_(____column-name_|__)_|
>________________________________________________________________________>
|_include-column_|
|_OVERRIDING USER VALUE_|
>____VALUES_____expression_______________________________________________><
|
| |_DEFAULT____|
|
|
|
| |_NULL_______|
|
|
|
|
<_,____________
|
|
|
|_(____expression__|_)_|
|
|
|_DEFAULT____|
|
|
|_NULL_______|
|
|
<_,_____________________
|
|_WITH common-table-expression |____________________|
|_fullselect________________________________________|
|
|_WITH____RR___| |_QUERYNO__integer_| |
|
|_RS_|
|
|
|_CS_|
|
|_multi-row-insert__________________________________|
include-column:
<_,_____________________
>>__INCLUDE__(__column-nmae__data-type_|_)_____________________________><
data-type:
>>___built-in type_____________________________________________________><
|_distinct_type_name_|
built-in-type:
>__SMALLINT__________________________________________________________________________________><
| |_INTEGER__|
|
| | |INT__| |
|
| |_BIGINT___|
|
|
______(5,0)______________________
|
|__DECIMAL____|_________________________________|___________________________________________|
||_DEC_____| |_(__integer_________________)____|
|
||_NUMERIC_|
|_, integer_|
|
|
_(34)_
|
|_DECFLOAT_ |______|________________________________________________________________________|
|
|_(16)_|
|
|
_(53)__________
|
|___FLOAT__|_______________|________________________________________________________________|
| |
|_(__integer__)_|
|

DB2 10 for z/OS

119

YL&A DB2 10 for z/OS Reference Guide


|_|_REAL___________________|
|
| |
_PRECISION_
|
|
|_|_DOUBLE__|___________|__|
|
|
__(1)___________
|
|_______CHARACTER____|________________|_____________________________________________________|
| | | |_CHAR______| |_(_integer_)____| |
|_FOR___BIT____DATA_|
|
| | |___CHARACTER__VARYING__(_integer_)__|
|
| | | |_CHAR_____|
|
|
| | |__VARCHAR____________|
|
|
__(1)_____________
|
|___GRAPHIC_|__________________|____________________________________________________________|
| |
|_(__integer__)____|
|
|
| |_VARGRAPHIC__(_ integer_)____________|
|
|
_(1)________
|
|_ _BINARY__|____________|__________________________________________________________________|
| |
|_(integer)__|
|
|
| |__BINARY VARYING _(integer)______________________________|
|
| | |_VARBINARY_____|
|
|___DATE____________________________________________________________________________________|
|_TIME_____________________________________________|
|
__(_6_)_____
_WITHOUT TIME ZONE_ |
|_TIMESTAMP_|____________|___|___________________|_|
|_(integer_)_|
|_WITH TIME ZONE____|

multi-row-insert:
>>__VALUES__ _ _expression__________ _______ ____________________________>
| |_host-variable-array_|
|
| |_NULL________________|
|
| |_DEFAULT_____________|
|
|
<_,_____________________
|
|_(__ _expression__________ |_)_|
|_host-variable-array_|
|_NULL________________|
|_DEFAULT_____________|
>__ ____________________________________ _____________________________>
|
|
|_FOR__ _host-variable____ __ROWS____|
|_integer-constant_|
_ATOMIC_________________________________
>__|________________________________________|________________________><
|
|
|_NOT ATOMIC CONTINUE ON SQLEXCEPTION____|

LABEL
>>__LABEL ON___TABLE____table-name________________IS_string-constant_____><
| |
|_view-name__|
|
|
| |_ALIAS__alias-name_________________|
|
| |_COLUMN____table-name.column-name__|
|
|
|_view-name.column-name__|
|
|
<_,________________________________
|
|_table-name_(___column-name__IS__string-constant_|__)__|
|_view-name__|

LOCK TABLE
>>__LOCK TABLE__table-name______________________________________________>
|_PARTITION__integer_|
>__IN____SHARE________MODE______________________________________________><
|_EXCLUSIVE_|
120

DB2 10 for z/OS

YL&A DB2 10 for z/OS Reference Guide

MERGE
>>__MERGE INTO____table-name____________________________________________>
|_view-name__| | _AS_
|
|_|____|_correlation-name_|
>_______________________________________________________________________>
|_include-column_|
>__USING_source-table_ON_search-condition_______________________________><
<______________________________________________________
>___WHEN_matching-condition_THEN_modification-operation___|_____________>
>_______________________________________________________________________><
|_NOT ATOMIC CONTINUE ON SQL EXCEPTION_| |_QUERYNO_integer_|
include-column:
<_,_____________________
>>__INCLUDE__(__column-name__data-type_|_)______________________________><
data-type:
>>___built-in type______________________________________________________><
|_distinct_type_name_|
built-in-type:
>__SMALLINT__________________________________________________________________________________><
| |_INTEGER__|
|
| | |INT__| |
|
| |_BIGINT___|
|
|
______(5,0)______________________
|
|__DECIMAL____|_________________________________|___________________________________________|
||_DEC_____| |_(__integer_________________)____|
|
||_NUMERIC_|
|_, integer_|
|
|
_(34)_
|
|_DECFLOAT_ |______|________________________________________________________________________|
|
|_(16)_|
|
|
_(53)__________
|
|___FLOAT__|_______________|________________________________________________________________|
| |
|_(__integer__)_|
|
|_|_REAL___________________|
|
| |
_PRECISION_
|
|
|_|_DOUBLE__|___________|__|
|
|
__(1)___________
|
|_______CHARACTER____|________________|_____________________________________________________|
| | | |_CHAR______| |_(_integer_)____| |
|_FOR___BIT____DATA_|
|
| | |___CHARACTER__VARYING__(_integer_)__|
|
| | | |_CHAR_____|
|
|
| | |__VARCHAR____________|
|
|
__(1)_____________
|
|___GRAPHIC_|__________________|____________________________________________________________|
| |
|_(__integer__)____|
|
|
| |_VARGRAPHIC__(_ integer_)____________|
|
|
_(1)________
|
|_ _BINARY__|____________|__________________________________________________________________|
| |
|_(integer)__|
|
|
| |__BINARY VARYING _(integer)______________________________|
|
| | |_VARBINARY_____|
|
|___DATE____________________________________________________________________________________|
|_TIME_____________________________________________|
|
__(_6_)_____
_WITHOUT TIME ZONE_ |
|_TIMESTAMP_|____________|___|___________________|_|
|_(integer_)_|
|_WITH TIME ZONE____|

source-table:
_AS_
<,__________
>>_(VALUES__values-single-row____)_|__|_correlation-name_(_column-name_|_)_><
DB2 10 for z/OS

121

YL&A DB2 10 for z/OS Reference Guide


|_values-multiple-row_|
values-single-row:
>>____expression___________________________________________________________><
| |_NULL_______|
|
| <,_______________
|
|_(_expression______|__)__|
|__NULL_______|
values-multiple-row:
>>____expression__________________FOR__host-variable____________ROWS______><
| |_host-variable-array_|
|
|_integer-constant_|
| |_NULL_______|
|
| <,____________________
|
|_(_expression___________|_)_|
|__NULL_______________|
|_host-variable-array_|
Matching-condition:
>>_____________MATCHED_____________________________________________________><
|_NOT_|
Modification-operation:
>>______UPDATE SET___assignment-clause_____________________________________><
|_insert-operation___________________|
Assignment-clause:
<,______________________________________________________
>>_column-name______expression_________________________________|___________><
|
|_DEFAULT_______|
|
|
|_NULL__________|
|
|
<,_________________
<,____________
|
|_(_column-name________|__)______(___expression_____|__)__|
|_DEFAULT____|
|_NULL_______|
insert-operation
>>__INSERT______VALUES__________________expression_________________________><
| <,___________
|
| |_DEFAULT______|
|
|_(_column-name_|__)_|
| |_NULL________|
|
|
<,______________
|
|_(___expression_____|__)_|
|_DEFAULT____|
|_NULL_______|

OPEN
>>__OPEN__cursor-name______________________________________________________><
|
<_,_____________
|
|_USING______host-variable_|_____________|
|_USING DESCRIPTOR_______descriptor-name_|

PREPARE
>>__PREPARE__statement-name_______________________________________________>
>_________________________________________________________________________>
|_INTO__descriptor-name________________________|
|
_NAMES__ |
|_USING__|_LABELS_|_|
122

DB2 10 for z/OS

YL&A DB2 10 for z/OS Reference Guide


|_ANY____|
|_BOTH___|
>__FROM____string-expression______________________________________________><
|______________________________________FROM_host-variable_____|
|__ATTRIBUTES__attr-host-variable_|
attribute-string
<______________________
>>______ ASENSITIVE __________|___________________________________________><
||__INSENSITIVE___________|
|
||__SENSITIVE__STATIC_____|
|
|
|_DYNAMIC_|
|
| _NO SCROLL_
|
|_|_SCROLL____|___________________________|
|_holdability_____________________________|
|_returnability___________________________|
|_rowset-positioning______________________|
|_fetch-first-clause______________________|
|__read-only-clause_______________________|
| |_update-clause___|
|
|_optimize-clause_________________________|
|_isolation-clause________________________|
|__FOR MULTIPLE ROWS______________________|
| |_FOR SINGLE ROW___|
|
| _ATOMIC_
|
|_|________|______________________________|
| |_NOT ATOMIC CONINUE ON SQLEXCEPTION_| |
|__SKIP LOCKED DATA_______________________|
| |_USE CURRENTLY COMMITTED_|
|
| |_WAIT FOR OUTCOME________|
|
|__WITHOUT EXTENDED INDICATORS____________|
| |_WITH EXTENDED INDICATORS___|
|
|__CONCENTRATE STATEMENTS OFF_____________|
||_CONCENTRATE STATEMENTS WITH LITERALS_|_|
holdability :
>>___________________________________________________________________><
|_WITHOUT HOLD_|
|_WITH HOLD____|
returnability :
>>___ WITHOUT RETURN ________________________________________________><
|
_TO CALLER_ |
|_WITH RETURN_|___________|_|
|_TO CLIENT_|
rowset-positioning :
>>___________________________________________________________________><
|_WITHOUT ROWSET POSITIONING_|
|_WITH ROWSET POSITIONING____|
concurrent-access-resolution :
>>___SKIP LOCKED DATA________________________________________________><
|_USE CURRENTLY COMMITTED__|
|_WAIT FOR OUTCOME_________|

REFRESH TABLE
>>__REFRESH_TABLE table-name_________________________________________><
DB2 10 for z/OS

123

YL&A DB2 10 for z/OS Reference Guide


|_QUERYNO integer_|

RELEASE
>>__RELEASE____location-name_________________________________________><
|_host-variable_|
|_CURRENT_______|
|
_SQL_
|
|_ALL_|_____|___|

RELEASE SAVEPOINT
_TO_
>>__RELEASE___|____|___SAVEPOINT__svpt-name__________________________><

RELEASE (connection)
>>__RELEASE__ _location-name_ _______________________________________><
|_host-variable_|
|_CURRENT_______|
|
_SQL_
|
|_ALL_|_____|___|

RENAME
_TABLE_
>>__RENAME__|_______|__source-table-name__TO__new-table-identifier____><
|_INDEX__source-index-name__TO__new-index-identifier___|

REVOKE
>>__REVOKE__authorization-specification_______________________________>
<_,___________________________
>__FROM______authorization-name________|______________________________>
|_PUBLIC__________________|
|_ROLE-role-name__________|
>_____________________________________________________________________><
|
<_,__________________
|
|_BY______authorization-name_|___|
|_ALL____________________|
>___INCLUDING DEPENDENT PRIVILEGES____________________________________><
|_NOT INCLUDING DEPENDENT PRIVILEGES__|
|_RESTRICT____|

REVOKE (collection privileges)


<_,_____________
>>__REVOKE____CREATE_______IN____COLLECTION______collection-id_|______>
|_PACKADM_| |_ON_|
|_*_________________|
<_,______________________
>__FROM______authorization-name___|___________________________________>
|_PUBLIC_____________|
|_ROLE-role-name_____|
>_____________________________________________________________________>
|
<_,__________________
|
|_BY______authorization-name_|___|
|_ALL____________________|
124

DB2 10 for z/OS

YL&A DB2 10 for z/OS Reference Guide


>___INCLUDING DEPENDENT PRIVILEGES____________________________________><
|_NOT INCLUDING DEPENDENT PRIVILEGES__|

REVOKE (database privileges)


<_,_____________
<_,_____________
>>__REVOKE______DBADM_______|__ON DATABASE____database-name_|_________>
|_DBCTRL____|
|_DBMAINT___|
|_CREATETAB_|
|_CREATETS__|
|_DISPLAYDB_|
|_DROP______|
|_IMAGCOPY__|
|_LOAD______|
|_RECOVERDB_|
|_REORG_____|
|_REPAIR____|
|_STARTDB___|
|_STATS_____|
|_STOPDB____|
<_,______________________
>__FROM______authorization-name___|____________________________________>
|_PUBLIC_____________|
|_ROLE-role-name_____|
>______________________________________________________________________>
|
<_,__________________
|
|_BY______authorization-name_|___|
|_ALL____________________|
>___INCLUDING DEPENDENT PRIVILEGES____________________________________><
|_NOT INCLUDING DEPENDENT PRIVILEGES__|

REVOKE (type or JAR privileges)


<_,__________________
>>__REVOKE__USAGE ON__DISTINCT TYPE_______distinct-type-name_|________>
|
<_,______
|
|_JAR____jar-name_|___________|
<_,______________________
>__FROM______authorization-name___|___________________________________>
|_PUBLIC_____________|
|_ROLE-role-name_____|
>______________________________________RESTRICT_______________________>
|
<_,__________________
|
|_BY______authorization-name_|___|
|_ALL____________________|
>___INCLUDING DEPENDENT PRIVILEGES____________________________________><
|_NOT INCLUDING DEPENDENT PRIVILEGES__|

REVOKE (function or procedure privileges)


>>__REVOKE__EXECUTE__ON_______________________________________________>
DB2 10 for z/OS

125

YL&A DB2 10 for z/OS Reference Guide


<_,_____________________________________
>____FUNCTION__function-name______________________________|___________>
|
|
| <_,__________________
|
| |
|
|
|_(_____________________|__)_|
| |
|
|
|_parameter-type_|
| |
|
|_*____________________________________________| |
|
<_,_____________
|
|_SPECIFIC FUNCTION____specific-name_|___________________|
|
<_,______________
|
|_PROCEDURE______procedure-name_|________________________|
|_*__________________|
<_,_____________________
>__FROM______authorization-name___|_______________________RESTRICT__>
|_PUBLIC_____________| |
<_,__________________
|
|_ROLE-role-name_____| |_BY___authorization-name_|___|
|_ROLE-role-name_________|
|_ALL____________________|
>___INCLUDING DEPENDENT PRIVILEGES___________________________________><
|_NOT INCLUDING DEPENDENT PRIVILEGES__|
parameter type:
>>____data-type_____________________________________________________><
|_AS LOCATOR____|
data type:
>>____built-in-data-type____________________________________________><
|_distinct-type-name_|
built-in data type:
>__SMALLINT__________________________________________________________________________________><
| |_INTEGER__|
|
| | |INT__| |
|
| |_BIGINT___|
|
|
______(5,0)______________________
|
|__DECIMAL____|_________________________________|___________________________________________|
||_DEC_____| |_(__integer_________________)____|
|
||_NUMERIC_|
|_, integer_|
|
|
_(34)_
|
|_DECFLOAT_ |______|________________________________________________________________________|
|
|_(16)_|
|
|
_(53)__________
|
|___FLOAT__|_______________|_______________________________________________________________ |
| |
|_(__integer__)_|
|
|_|_REAL___________________|
|
| |
_PRECISION_
|
|
|_|_DOUBLE__|___________|__|
|
|
__(1)___________
|
|_______CHARACTER____|________________|_____________________________________________________|
| | | |_CHAR______| |_(_integer__)____| |
|_CCSID__ASCII___| |_FOR___SBCS____DATA_| | |
| | |___CHARACTER__VARYING__(_integer__)__|
|_EBCDIC__|
|_MIXED_|
| |
| | | |_CHAR_____|
|
|_UNICODE_|
|_BIT___|
| |
| | |__VARCHAR____________|
| |
| |
_(1M)_______
| |
| |_____CHARACTER___LARGE OBJECT_ |____________|__________________________________________| |
|
| |_CHAR______|
|_(_integer_)_| |_CCSID__ASCII___| |_FOR__SBCS___DATA_| |
|
|___CLOB______________________|
|_EBCDIC__|
|_MIXED_|
|
|
|_UNICODE_|
|
|
|
|
__(1)_____________
|
|___GRAPHIC_|__________________|____________________________________________________________|
| |
|_(__integer___)___|
|
|_CCSID___ASCII___|
|
| |_VARGRAPHIC__(__integer__)____________|
|_EBCDIC__|
|
| |
__(1M)_____________
|_UNICODE_|
|
| |_DBCLOB_|___________________|
|
|
|_(integer)_________|
|
|
_(1)________
|
|_ _BINARY__|____________|__________________________________________________________________|

126

DB2 10 for z/OS

YL&A DB2 10 for z/OS Reference Guide


| |
|_(integer)__|
|
|
| |__BINARY VARYING _(integer)______________________________|
|
| | |_VARBINARY_____|
|
|
| |
_(1M)____________________
|
|
| |_BINARY LARGE OBJECT_____|_________________________|_____|_______________________________|
| |_BLOB________________| |_(__integer_________)____|
|
|
|_K_|
|
|
|_M_|
|
|
|_G_|
|
|___DATE____________________________________________________________________________________|
| |_TIME____________________________________________________________________________________|
| |
__(_6_)_____
_WITHOUT TIME ZONE_
|
| |_TIMESTAMP_|____________|___|___________________|________________________________________|
|
|_(integer_)_|
|_WITH TIME ZONE____|
|
|_ROWID_____________________________________________________________________________________|

REVOKE (package privileges)


>>__REVOKE____ALL____________________________________________________>
| <_,_______________ |
|____BIND___________|_|
|_COPY________|
|___EXECUTE___|
|_RUN_____|
<_,_____________________________
>__ON____PACKAGE______collection-id.___package-id____|_______________>
|_PROGRAM_|
|_*__________|
<_,_____________________
>__FROM______authorization-name___|__________________________________>
|_PUBLIC_____________|
|_ROLE_role-name_____|
>____________________________________________________________________>
|
<_,__________________
|
|_BY______authorization-name_|___|
|_ALL____________________|
|_ROLE_role-name_________|
>___INCLUDING DEPENDENT PRIVILEGES___________________________________><
|_NOT INCLUDING DEPENDENT PRIVILEGES__|

REVOKE (plan privileges)


<_,__________
<_,_________
>>__REVOKE______BIND______|__ON PLAN____plan-name_|__________________>
|_EXECUTE_|
<_,______________________
>__FROM______authorization-name___|__________________________________>
|_PUBLIC_____________|
|_ROLE_role-name_____|
>____________________________________________________________________>
|
<_,__________________
|
|_BY______authorization-name_|___|
|_ALL____________________|
|_ROLE_role-name_________|
>___INCLUDING DEPENDENT PRIVILEGES___________________________________><
|_NOT INCLUDING DEPENDENT PRIVILEGES__|

DB2 10 for z/OS

127

YL&A DB2 10 for z/OS Reference Guide

REVOKE (schema privileges)


<_,___________
<_,__________
>>__REVOKE______ALTERIN____|__ON__SCHEMA______schema-name_|__________>
|_CREATEIN_|
|_*_______________|
|_DROPIN___|
<_,______________________
>__FROM______authorization-name___|__________________________________>
|_PUBLIC_____________|
|_ROLE_role-name_____|
>___________________________________________________________________><
|
<_,__________________
|
|_BY______authorization-name_|___|
|_ALL____________________|
|_ROLE_role-name_________|

REVOKE (sequence privileges)


<_,___________
<_,__________
>>__REVOKE______ALTER______|__ON__SEQUENCE____schema-name_|__________>
|_USAGE______|
<_,______________________
>__FROM______authorization-name___|__________________________________>
|_PUBLIC_____________|
|_ROLE_role-name_____|
_RESTRICT_
>__________________________________________|__________|______________>
|
<_,__________________
|
|_BY______authorization-name_|___|
|_ALL____________________|
|_ROLE_role-name_________|
>___INCLUDING DEPENDENT PRIVILEGES___________________________________><
|_NOT INCLUDING DEPENDENT PRIVILEGES__|

REVOKE (system privileges)


<_,____________________
<_,__________________
>>__REVOKE______ACCESSCTRL____________|__FROM_authorization-name__|_>
|_ARCHIVE______________|
|_PUBLIC_____________|
|_BINDADD______________|
|_ROLE_role-name_____|
|_BINDAGENT____________|
|_BSDS_________________|
|_CREATEALIAS__________|
|_CREATEDBA____________|
|_CREATEDBC____________|
|_CREATESG_____________|
|_CREATETMTAB__________|
|_CREATE_SECURE_OBJECT_|
|_DATAACCESS___________|
|_DBADAM_______________|
|_DEBUGSESSION_________|
|_DISPLAY______________|
|_EXPLAIN______________|
|_MONITOR1_____________|
|_MONITOR2_____________|
128

DB2 10 for z/OS

YL&A DB2 10 for z/OS Reference Guide


|_RECOVER______________|
|_SQLADM_______________|
|_STOPALL______________|
|_STOSPACE_____________|
|_SYSADM_______________|
|_SYSCTRL______________|
|_SYSOPR_______________|
|_TRACE________________|
>___________________________________________________________________>
|
<_,__________________
|
|_BY______authorization-name_|___|
|_ALL____________________|
|_ROLE_role-name_________|
>___INCLUDING DEPENDENT PRIVILEGES___________________________________><
|_NOT INCLUDING DEPENDENT PRIVILEGES__|

REVOKE (table or view privileges)


_PRIVILEGES_
>>__REVOKE____ALL__|____________|____________________________________>
| <_,______________
|
|_____ALTER________|__|
|_DELETE_____|
|_INDEX______|
|_INSERT_____|
|_REFERENCES_|
|_SELECT_____|
|_TRIGGER____|
|_UPDATE_____|
_TABLE_
<_,______________
>__ON__|_______|______table-name___|_________________________________>
|_view-name__|
<_,__________________________
>__FROM______authorization-name________|_____________________________>
|_PUBLIC__________________|
|_ROLE_role-name__________|
>____________________________________________________________________>
|
<_,__________________
|
|_BY______authorization-name_|___|
|_ALL____________________|
|_ROLE_role-name_________|
>___INCLUDING DEPENDENT PRIVILEGES___________________________________><
|_NOT INCLUDING DEPENDENT PRIVILEGES__|

REVOKE (use privileges)


>>__REVOKE USE OF____________________________________________________>
<_,_____
>____BUFFERPOOL____bpname_|__________________________________________>
|_ALL BUFFERPOOLS______________________________________|
|
<_,_____________
|
|_STOGROUP____stogroup-name_|__________________________|
|
<_,____________________________________ |
DB2 10 for z/OS

129

YL&A DB2 10 for z/OS Reference Guide


|_TABLESPACE________________________table-space-name_|_|
|_database-name._|
<_,______________________
>__FROM______authorization-name___|__________________________________>
|_PUBLIC_____________|
|_ROLE_role-name_____|
>____________________________________________________________________>
|
<_,__________________
|
|_BY______authorization-name_|___|
|_ALL____________________|
|_ROLE_role-name_________|
>___INCLUDING DEPENDENT PRIVILEGES___________________________________><
|_NOT INCLUDING DEPENDENT PRIVILEGES__|

ROLLBACK
_WORK_
>>__ROLLBACK__|______|_______________________________________________><
|_TO SAVEPOINT________________|
|_svpt-name_|

SAVEPOINT
>>__SAVEPOINT__svpt-name_____________________________________________>
|_UNIQUE_| _ON ROLLBACK RETAIN LOCKS_
>__ON ROLLBACK RETAIN CURSORS_________|__________________________|___><

SELECT INTO
>____________________________________________________________________>
|
<_________________________ |
|_WITH __common-table-expression___|_|
<_,_____________
>__select-clause__INTO____host-variable_|_from-clause________________>
|_where-clause_|
>____________________________________________________________________>
|_group-by-clause_| |_having-clause_| |_order-by-clause_|
<_,__________________
>________________________|___________________________________________><
|_SKIP_LOCKED_DATA_|
|_QUERYNO__integer_|
|_WITH____RR_______|
|_RS_|
|_CS_|
|_UR_|
>__ ____________________________________ ____________________________><
|
_1_
|
|_FETCH FIRST__|___|__ _ROW__ __ONLY_|
|_ROWS_|

SET CONNECTION
>>__SET CONNECTION____location-name__________________________________><
|_host-variable___|

130

DB2 10 for z/OS

YL&A DB2 10 for z/OS Reference Guide

SET CURRENT APPLICATION ENCODING SCHEME


_APPLICATION_
_=_
>>__SET CURRENT_|_____________|_ENCODING SCHEME__|___|_______________>
>___string-constant__________________________________________________><
|_host-variable____|

SET CURRENT DEBUG MODE


_=_
>>__SET CURRENT_DEBUG MODE_|___|___host-variable_____________________><
|_DISALLOW______|
|_ALLOW_________|
|_DIABLE________|

SET CURRENT DECFLOAT ROUNDING MODE


_=_
>>__SET CURRENT DECFLOAT ROUNING MODE_|___|___ROUND_CEILING_________><
|_ROUND_DOWN__________|
|_ROUND_FLOOR_________|
|_ROUND_HALF_DOWN_____|
|_ROUND_HALF_EVEN_____|
|_ROUND_HALF_UP_______|
|_ROUND_UP____________|
|_string-constant_____|
|_host-variable_______|

SET CURRENT DEGREE


>>__SET CURRENT DEGREE =___string-constant__________________________><
|_host-variable___|

SET CURRENT EXPLAIN MODE


>>__SET CURRENT EXPLAIN MODE =__NO__________________________________><
|_YES___________|
|_EXPLAIN_______|
|_host-variable_|

SET CURRENT LOCALE LC_CTYPE


_=_
>>__SET_____________________________LC_CTYPE_____|___|_______________>
| |_CURRENT_____________|
|
|
|_LOCALE_|
|
|_CURRENT_LC_CTYPE__________________|
>____string-constant________________________________________________><
|_host-variable___|

SET CURRENT MAITAINED TABLE TYPES FOR OPTIMIZATION


_TABLE_
_FOR OPTIMIZATION_
_=_
>>__SET CURRENT MAINTAINED_|_______|_TYPES_|__________________|_|___|_>
>__ALL____________ _________________________________________________><
|_NONE__________|
|_SYSTEM________|
|_SESSION_USER__|
||_USER________||
|_host-variable_|
DB2 10 for z/OS

131

YL&A DB2 10 for z/OS Reference Guide

SET CURRENT OPTIMIZATION HINT


>>__SET CURRENT OPTIMIZATION HINT =____string-constant______________><
|_host-variable___|

SET CURRENT PACKAGE PATH


_=_
<_,_________________________
>>__SET CURRENT PACKAGE PATH_|___|___ _collection-id___________ |___><
|_SESSION_USER____________|
||_USER__________|
|
|_CURRENT PACKAGE PATH____|
|_CURRENT PATH____________|
|_host-variable___________|
|_string-constant_________|

SET CURRENT PACKAGESET


>>__SET CURRENT PACKAGESET =____SESSION USER________________________><
||_USED________| |
|_string-constant_|
|_host-variable___|

SET CURRENT PRECISION


>>__SET CURRENT PRECISION =____string-constant______________________><
|_host-variable___|

SET CURRENT QUERY ACCELERATION


_=_
>>__SET CURRENT QUERY ACCELERATION_|___|_ _NONE_____________________><
|_ENABLE_______________|
|_ENABLE WITH FAILBACK_|
|_host-variable________|

SET CURRENT REFRESH AGE


_=_
>>__SET CURRENT REFRESH AGE___|___|___ _numeric-constant_ __________><
|_ANY______________|
|_host-variable____|

SET CURRENT RULES


>>__SET CURRENT RULES =____string-constant__________________________><
|_host-variable___|

SET CURRENT ROUTINE VERSION


_=_
>>__SET CURRENT ROUTINE VERSION_|___|__routine-version-id___________><
|_string-constant___|
|_host-variable_____|

SET CURRENT SQLID


>>__SET CURRENT SQLID =___SESSION_USER______________________________><
||_USER________| |
|_string-constant_|
132

DB2 10 for z/OS

YL&A DB2 10 for z/OS Reference Guide


|_host-variable___|

SET ENCRYPTION PASSWORD


_=_
>>__SET ENCRYPTION PASSWORD___|___|___ _password-host-variable______>
|_password-string-const__|
>___________________________________________________________________><
|
_=_
|
|_WITH HINT_|___|__hint-host-variable___|
|_hint-string-const__|

SET HOST VARIABLE ASSIGNMENT


>>__SET__ _host-variable=_ _CURRENT SERVER__________________________><
|
|_CURRENT PACKAGESET___|
|
|
|_CURRENT PACKAGE PATH_|
|
|
<_,_________________________________________________ |
|___ _host-variable=_ _expression_ _____________________|_|
|
|_NULL_______|
|
|
<_,___________
<_,____________
|
|_(__host-variable|_)=(_ __ _expression_ |___)_____|
| |_NULL_______|
|
|_VALUES_ _ _expression___|
| |_NULL______| |
| <_,_________ |
|_(_expression_|)|
|_NULL____|

SET PATH
_CURRENT_
_=_
>>__SET__|_________|__PATH__|___|______________________________________>
<_,______________________
>____ _schema-name__________ _|________________________________________><
|_SYSTEM PATH__________|
|_SESSION_USER_________|
||_USER__________|
|
| _CURRENT_
|
|_|_________|__PATH____|
|_CURRENT PACKAGE PATH_|
|_host-variable________|
|_string-constant______|

SET SCHEMA
_CURRENT_
_=_
>>__SET__|_________|__SCHEMA___|___|____schema-name____________________>
|_CURRENT_SCHEMA_____|
|_SESSION USER_________|
||_USER____________|
|
|_host-variable________|
|_string-constant______|
|_DEFAULT______________|

SET SESSION TIME ZONE


_=_
DB2 10 for z/OS

133

YL&A DB2 10 for z/OS Reference Guide


>>__SET_SESSION TIME ZONE___|___|____string-constant___________________>
|_host-variable______|

SET TRANSITION VARIABLE


>>__SET__ _transition-variable=___expression___________________________><
|
|_DEFAULT___|
|
|
|_NULL______|
|
|
<_,____________________
<_,______________
|
|___ (transition-variable |)_=_(_expression____|________|
|
|_DEFAULT____|
|
|
|_NULL_______|
|
|_VALUES_ _ _expression___|
| |_NULL______| |
| |_DEFAULT___| |
| <_,_________ |
|_(_expression_|)|
|_DEFAULT_|
|_NULL____|
transition variable
>>__ ___________________ __column-name_________________________________><
|_correlation-name._|

SIGNAL SQLSTATE
_VALUE_
>>__SIGNAL__SQLSTATE_|_______|__sqlstate-string-constant_______________>
|
|_variable_name___________| |
|_condition-name_________________________________|
>__(__diagnostic-string-constant__)____________________________________><

TRUNCATE
_TABLE_
_DROP STORAGE_
>>__TRUNCATE_|_______|___table-name__|______________|__________________>
_IGNORE DELETE TRIGGERS____________
>_____|__RESTRICT WHEN DELETE TRIGGERS____|____________________________><
|_IMMEDIATE_|

UPDATE
searched update:
>>__UPDATE____table-name____________________________________________>
|_view-name__| |_correlation-name_| |_include_column_|
>__SET__assignment-clause___________________________________________>
|_WHERE__search-condition_|
>___________________________________________________________________><
|_SKIP LOCKED DATA_|
|_QUERYNO__integer_|
|_WITH____RR_______|
|_RS_|
|_CS_|
positioned update:
>>__UPDATE___table-name_______________________SET_assignment-clause___>
|_view-name__| |_correlation-name_|
134

DB2 10 for z/OS

YL&A DB2 10 for z/OS Reference Guide


>_WHERE CURRENT OF_cursor-name________________________________________><
|_FOR ROW__host-variable___OF ROWSET_|
|integer-constant|
period-clause:
>>_FOR PORTION OF BUSINESS_TIME__FROM_value1_TO_value2________________><
include-column:
<_,_______________________
>>_INCLUDE_(__column-name____data-type__|___)_________________________><
data-type:
>>___built-in type____________________________________________________><
|_distinct_type_name_|
built-in-type:
>__SMALLINT__________________________________________________________________________________><
| |_INTEGER__|
|
| | |INT__| |
|
| |_BIGINT___|
|
|
______(5,0)______________________
|
|__DECIMAL____|_________________________________|___________________________________________|
||_DEC_____| |_(__integer_________________)____|
|
||_NUMERIC_|
|_, integer_|
|
|
_(34)_
|
|_DECFLOAT_ |______|________________________________________________________________________|
|
|_(16)_|
|
|
_(53)__________
|
|___FLOAT__|_______________|________________________________________________________________|
| |
|_(__integer__)_|
|
|_|_REAL___________________|
|
| |
_PRECISION_
|
|
|_|_DOUBLE__|___________|__|
|
|
__(1)___________
|
|_______CHARACTER____|________________|_____________________________________________________|
| | | |_CHAR______| |_(_integer_)____| |
|_FOR___BIT____DATA_|
|
| | |___CHARACTER__VARYING__(_integer_)__|
|
| | | |_CHAR_____|
|
|
| | |__VARCHAR____________|
|
|
__(1)_____________
|
|___GRAPHIC_|__________________|____________________________________________________________|
| |
|_(__integer__)____|
|
|
| |_VARGRAPHIC__(_ integer_)____________|
|
|
_(1)________
|
|_ _BINARY__|____________|__________________________________________________________________|
| |
|_(integer)__|
|
|
| |__BINARY VARYING _(integer)______________________________|
|
| | |_VARBINARY_____|
|
|___DATE____________________________________________________________________________________|
|_TIME_____________________________________________|
|
__(_6_)_____
_WITHOUT TIME ZONE_ |
|_TIMESTAMP_|____________|___|___________________|_|
|_(integer_)_|
|_WITH TIME ZONE____|

assignment clause:
<_,__________________________________________________________
>>______column-name=___expression________________________________|__><
|
|_DEFAULT_______________|
|
|
|_NULL__________________|
|
|
|_(scalar-fullselect__)_|
|
|
<_,___________
<_,______________
|
|_(___column-name_|_)__=__(_______expression___|_______)_|
|
|_DEFAULT____|
|
|
|_NULL_______|
|
DB2 10 for z/OS

135

YL&A DB2 10 for z/OS Reference Guide


|_row-fullselect______|

VALUES
>>__VALUES____expression_____________________________________________><
|
<_,____________
|
|_(____expression__|_)_|

VALUES INTO
<_,____________
>>__VALUES______expression______________INTO__host-variable_|________><
||_NULL_________________||
||_CURRENT SERVER_______||
||_CURRENT PACKAGESET___||
||_CURRENT PACKAGE PATH_||
|
<_,____________
|
|_(____expression__|_)_|
|_NULL_______|

WHENEVER
>>__WHENEVER____NOT FOUND_______CONTINUE_____________________________><
|_SQLERROR___| |___GOTO_____host-label_|
|_SQLWARNING_|
|_GO TO_|

136

DB2 10 for z/OS

YL&A DB2 10 for z/OS Reference Guide

Commands
-ACCESS DATBASE(DB2)
<_,_____________
>>__ACCESS DATABASE__(_____database-name_|_______)____________________>
|_*_____________________|
|_dbname1:dbname2_______|
|_dbname*_______________|
|_*dbname_______________|
|_*dbname*______________|
|_*dbstring1*dbstring2*_|
> ____________________________________________________________________>
|
<_,________
|
|_SPACENAM(_ ___space-name_|________)_______________________________|
|_*___________________________||
<_,_______
|
|_spacename1:spacename2_______||_PART(_ ___integer_|_)_|
|_spacename*__________________|
|_int1:int2_|
|_*spacename__________________|
|_*spacename*_________________|
|_*spacestring1*spacestring2*_|
>_____MODE(__OPEN_______)_____________________________________________><
|_NGBPDEP_|

-ALTER BUFFERPOOL
>>__ALTER BUFFERPOOL__(__bpname__)__ _________________ _______________>
|_VPSIZE(integer)_|
>__ _________________ __ __________________ __________________________>
|_VPSEQT(integer)_| |_VPPSEQT(integer)_|
>__ ___________________ __ ___________________________________________>
|_VPXPSEQT(integer)_| |_DWQT(integer)_|
>__ __________________________ _______________________________________>
|_VDWQT(integer1,integer2)_|
>__ _________________________ ________________________________________>
|_PGSTEAL__(____LRU_____)_|
|_FIFO_|
|_NONE_|
>__ __________________________________________________________________><
|
__NO___
| |
_NO__
|
|_PGFIX__(_|__YES__|__)_| |_AUTOSIZE_(_|_YES_|_)_|

-ALTER GROUPBUFFERPOOL
>>__ALTER GROUPBUFFERPOOL__(__ _gbpname________ __)__________________>
|_structure-name_|
>__ _____________________ __ ____________________ ___________________>
|_GBPCACHE(_ _YES_ _)_| |_AUTOREC(_ _YES_ _)_|
|_NO__|
|_NO__|
>__ ______________ __ _________________ __ __________________ _______>
|_RATIO(ratio)_| |_CLASST(integer)_| |_GBPOOLT(integer)_|
>__ ___________________ ____________________________________________><
|_GBPCHKPT(integer)_|
DB2 10 for z/OS

137

YL&A DB2 10 for z/OS Reference Guide

-ALTER UTILITY
>>__ALTER__UTILITY__(__utility-id__)__REORG_________________________________>
|_REBUILD_|
>__ ___________________________ __ ______________________ __________________>
|_DEADLINE(_ _NONE______ _)_| |_MAXRO(_ _integer_ _)_|
|_timestamp_|
|_DEFER___|
>__ _________________________ __ ______________________ ___________________><
|_LONGLOG(_ _CONTINUE_ _)_| |_DELAY(___integer___)_|
|_TERM_____|
|_DRAIN____|

-ARCHIVE LOG
>>__ARCHIVE LOG____________________________________________________________>
_SCOPE(MEMBER)_____________________________________
>__|___________________________________________________|___________________><
|_SCOPE(GROUP)______________________________________|
|_MODE(QUIESCE)__ ___________ __ _________________ _|
|
|_TIME(nnn)_| |
_NO__
| |
|
|_WAIT(_|_YES_|_)_| |
|_CANCEL OFFLOAD____________________________________|

-BIND PACKAGE
>>_BIND PACKAGE_(________________collection-id__)_____________________)_____>
|_location-name._|
|_OWNER(authorization-id)_|
>________________________________enable-block_______________________________>
|_QUALIFIER(qualifier-name)_|
>_MEMBER(dbrm-member-name)__________________________________________________>
|
|_LIBRARY(dbrm-pds-name)_|
|
|_COPY(collection-id.package-id)__________________________________________|
|
|_COPYVER(version-id)_|
|
|
|
_COMPOSITE_
|
|
|_OPTIONS(|_COMMAND___|)_________________|
|
|
|_DEPLOY(collection-id.package-id_COPYVER (version-id)____________________|
>___________________________________________________________________________>
|_DEFER(PREPARE)_________| |_ACTION__(REPLACE)_____________________|
|_NODEFER(PREPARE)_______| |
|_REPLVER(version-id)_| |
|_DEFER(INHERITFROMPLAN)_| |_(ADD)___________________________|
>___________________________________________________________________________>
|
_NO__
|
|_CURRENTDATA(_|_YES_|_)|
>__ ________________________________________________________________________>
|_DBPROTOCOL__(___DRDA____)_||
_1___
||_DYNAMICRULES(_RUN_)_|
|_DEGREE(_|_ANY_|_)_|
|_BIND_______|
|_DEFINEBIND_|
|_DEFINERUN__|
|_INVOKEBIND_|
|_INVOKERUN__|
>___________________________________________________________________________>
|_ENCODING(_ _ASCII___)_| |
_NO___
|
|
_I_
|
|_EBCDIC__|
|_EXPLAIN(_|_YES__|_)_|
|_FLAG(_|_W_|_)_|
138

DB2 10 for z/OS

YL&A DB2 10 for z/OS Reference Guide


|_UNICODE_|
|_ONLY_|
|_E_|
|_ccsid___|
|_C_|
>________________INHERITFROMPLAN___________________________________________>
|_IMMEDWRITE_(__NO____)________|
|_ISOLATION(_ _RR_ _)_|
|_YES_____________|
|_RS_|
|_CS_|
|_UR_|
|_NC_|
__NONE__
>____________________________________|________|_____________________________>
|
_NO__
| |_REOPT(_|_ALWAYS_|_)|_OPTHINT__(_'hint-id'__)_|
|_KEEPDYNAMIC(_|_YES_|_)_|
|_ONCE___|
|_AUTO___|
>___________________________________________________________________________>
|
<_,______________
|
|_RELEASE(_ _COMMIT___________)__|
|_PATH(__ _schema-name_ |_)_|
|_DEALLOCATE______|
|_USER________|
|_INHERITFROMPLAN_|
>___________________________________________________________________________>
|
_NOPACKAGE_
|
|
_RUN__
|
|_SQLERROR(_|_CONTINUE__|_)_|
|_VALIDATE(_|_BIND_|_)_|
|_CHECK_____|
>______________________________________________________rounding-block_______>
|
_NO__ ||_GENERIC(_string_)_|
|_EXTENDEDINDICATOR_|_YES_|_|
>___________________________________________________________________________>
|_CONCURRENTACCESSRESOLUTION_(_USECURRENTLYCOMMITTED_)_|
|_WAITFOROUTCOME______|
>___________________________________________________________________________>
|
_NONE__ | |
_NONE__ |
|_AREUSE_|_ERROR_|_| |_ACOMPARE_|_WARN__|_|
|_ERROR_|
enable-block:
>>__ ______________________________________________________________________><
| _ENABLE(*)________________________
|
| |
<_,__________
| <____________________________ |
|_|_ _ENABLE__ __(___ _BATCH____ |_)_|_______________________________|_|
|_DISABLE_|
|_DLIBATCH_|
|
<_,_____________
|
|_DB2CALL__|
|_DLIBATCH(_connection-name_|_)_|
|_CICS_____|
|
<_,______
|
|_IMS______|
|_CICS(___applid_|_)____________|
|_IMSBMP___|
|
<_,_____
|
|_IMSMPP___|
|_IMSBMP(___imsid_|_)___________|
|_REMOTE___|
|
<_,_____
|
|_RRSAF____|
|_IMSMPP(___imsid_|_)___________|
|
<_,________________
|
|_REMOTE(___location-name_ _|_)_|
|_<luname>__|
rounding-block:
>>__ROUNDING__(__CELING______)_____________________________________________><
|_DOWN_____|
|_FLOOR____|
|_HALFDOWN_|
|_HALFEVEN_|
|_UP_______|
DB2 10 for z/OS

139

YL&A DB2 10 for z/OS Reference Guide

-BIND PLAN
>>_BIND_____________________________________________________________________>
|_PLAN(plan-name)_||_OWNER(authorization-id)_||_QUALIFIER(qual-name)_|
_NODEFER(PREPARE)_
>__enable-block__member-block_|__________________|__________________________>
|_DEFER(PREPARE)___| |
_USE______
|
|_ACQUIRE(_|_ALLOCATE_|_)|
>___________________________________________________________________________>
|
_(__REPLACE__)__ ________ _ | |_CACHESIZE(decimal-value)_|
|
|
|_RETAIN_| | |
|_ACTION__|_(ADD)_____________________|_|
>__ ________________________________________________________________________>
|
_NO__
| |_CURRENTSERVER(location-name)_|
|_CURRENTDATA(_|_YES_|_)_|
>__ ________________________________________________________________________>
|_DBPROTOCOL__(___DRDA______)_| |
_1___
|
|_DEGREE(_|_ANY_|_)_|
>__ __________________________________________ _____________________________>
|
_EXPLICIT____
| |
_RUN__
|
|_DISCONNECT(_|_AUTOMATIC___|_)_| |_DYNAMICRULES(_|_BIND_|_)_|
|_CONDITIONAL_|
>___________________________________________________________________________>
|_ENCODING(_ _ASCII___ _)_| |
_NO__
| |
_I_
|
|_EBCDIC__|
|_EXPLAIN(_|_YES_|_)_| |_FLAG(_|_W_|_)_|
|_UNICODE_|
|_E_|
|_ccsid___|
|_C_|
>__ ________________________________________________________________________>
|_IMMEDWRITE(_ _NO__ _)_||_ISOLATION(_ _RR_ _)_||
_NO__
|
|_YES_|
|_RS_|
|_KEEPDYNAMIC(_|_YES_|_)|
|_CS_|
|_UR_|
_NONE___
>_REOPT_(|_ALWAYS_|)________________________________________________________>
|_ONCE___| |_OPTHINT_(_'hint-id'_)_||
<_,_____________
|
|_AUTO___|
|_PATH(__ _schema-name_ |_)_|
|_USER________|
>___________________________________________________________________________>
|
_COMMIT_____
||
_DB2_
||
_RUN__
|
|_RELEASE(_|_DEALLOCATE_|_)_||_SQLRULES(_|_STD_|_)||_VALIDATE(_|_BIND_|_)_|
>__________________________________________________________________________><
|_ROUNDING(___CELING___)__|
|_DOWN_____|
|_FLOOR____|
|_HALFDOWN_|
|_HALFEVEN_|
|_HALFUP___|
|_UP_______|
>___________________________________________________________________________>
|_CONCURRENTACCESSRESOLUTION_(_USECURRENTLYCOMMITTED_)_|
|_WAITFOROUTCOME______|
enable-block:
>>_ _______________________________________________________________________><
| _ENABLE(*)________________________
|
140

DB2 10 for z/OS

YL&A DB2 10 for z/OS Reference Guide


| |
<_,__________
| <___________________________ |
|_|_ _ENABLE__ __(___ _BATCH____ |_)_|_______________________________|_|
|_DISABLE_|
|_DLIBATCH_|
|
<_,_____________
|
|_DB2CALL__|
|_DLIBATCH(_connection-name_|_)_|
|_CICS_____|
|
<_,______
|
|_IMS______|
|_CICS(___applid_|_)____________|
|_IMSBMP___|
|
<_,_____
|
|_IMSMPP___|
|_IMSBMP(___imsid_|_)___________|
|_RRSAF____|
|
<_,_____
|
|_IMSMPP(___imsid_|_)___________|
member-block:
<___________________________________________________________________
<_,________________
|
>>___ _MEMBER(___dbrm-member-name_|_)_ _________________________________|_><
|
|
<_,_____________
| |
|
|_LIBRARY(___dbrm-pds-name_|_)_| |
|
<_,_________________________________________________
|
|_PKLIST(___ __________________collection-id____.package-id_ _|_)_|
|_location-name._||_*___________| |_.*__________|
|_*._____________|

-BIND QUERY
>>__BIND QUERY___________________________________________________________><
|
_NO___
|
|_LOOKUP(_|_YES__|__)_|

-CANCEL THREAD
>>__CANCEL__ _THREAD(token)______________________________________________><
|_DDF THREAD(_ _luwid_ _)_| |_DUMP_| |_LOCAL_| |_NOBACKOUT_|
|_token_|

/CHANGE IMS
>>__/CHANGE__ _SUBSYS__subsystem-name________________________ ___________>
|_SUBSYS__ALL___________________________________|
|_SUBSYS__subsystem-name__OASN__schedule-number_|
>__RESET_________________________________________________________________><

DCLGEN
>>__DCLGEN__TABLE(_ _table-name_ _)__ ___________________ _______________>
|_view-name__|
|_OWNER(owner-name)_|
>__ ___________________ ________________________________________________>
|_AT(location-name)_|
>__LIBRARY(library name_ _______________ __ ___________ _)______________>
|_(member-name)_| |_/password_|
>__ _______________________ __ ________________________ ________________>
|
_ADD_____
| |
|
|_ACTION(_|_REPLACE_|_)_| |_LANGUAGE(___PLI______)_|
|_C______|
|_IBMCOB_|
|_CPP____|
>__ _______________ __ ___________________________ __ _______ __________>
|_NAMES(prefix)_| |_STRUCTURE(structure-name)_| |_APOST_|
|_QUOTE_|
>__ ________________ __ _____________________ __________________________>
DB2 10 for z/OS

141

YL&A DB2 10 for z/OS Reference Guide


|
_NO__
| |_DBCSSYMBOL(_ _G_ _)_|
|_LABEL_|_YES_|__|
|_N_|
>__ ______________________ __ ______________________ ___________________>
|
_YES_
| |
_NO__
|
|_DBCSDELIM(_|_NO__|_)_| |_COLSUFFIX(_|_YES_|_)_|
>__ ____________________________________________________________________><
|
_NO__
||
_STD__
||
_NO_
|
|_INDVAR(_|_YES_|_)_||_RMARGIN_(_|_WIDE_|_)_||_DCLBIT_(_|YES_|_)_|

/DISPLAY IMS
<_,______________
>>__/DISPLAY__ _SUBSYS___subsystem-name_|______ _________________________><
|_SUBSYS__ALL____________________|
|
<_,______________
|
|_OASNSUBSYS___subsystem-name_|__|
|_OASN__SUBSYS__ALL______________|

-DISPLAY ACCEL
_(_*_)________________________
|
<_,______________
|
>>__DISPLAY__ACCEL _|__(___accelerator-name_|___)__|_____________________>
|_DETAIL__|
>________________________________________________________________________>
|_LIST_(__*__________)_______|
|
|
|_ACTIVE_|
|
_LOCAL_
|
|_SCOPE__(_|_GROUP_| )_|
>________________________________________________________________________><
|
|
|_MEMBER(member-name)_|

-DISPLAY ARCHIVE
>>__DISPLAY ARCHIVE______________________________________________________><

-DISPLAY BUFFERPOOL
_(_ACTIVE__)______
>>__DISPLAY BUFFERPOOL__|__________________|_____________________________>
|_(__*__)__________|
|
<_,______
|
|_(____bpname_|__)_|
>__ ________________________ __ ____________________ ___________________>
|
_INTERVAL_
| |
_ACTIVE_
|
|_DETAIL(_|__________|_)_| |_LIST(_|________|_)_|
|_*________|
|_*______|
_ACTIVE_
>__ ________ __(__|________|__)_________________________________________>
|_LSTATS_|
|_*______|
>__ _________________________________ __________________________________>
|
_*_________________
|
|
| <_,_____________ |
|
|_DBNAME(_|___database-name_|_|_)_|
|_name1:name2_______|
|_name*_____________|
>__ ________________________________ __ ___________________ ____________>
142

DB2 10 for z/OS

YL&A DB2 10 for z/OS Reference Guide


|
_*______________
| |_GBPDEP(_ _YES_ _)_|
|
| <_,__________ |
|
|_NO__|
|_SPACENAM(_|___space-name_|_|_)_|
|_name1:name2____|
|_name*__________|
>__ _____________________ _____________________________________________><
|_CASTOWNR(_ _YES_ _)_|
|_NO__|

-DISPLAY DATABASE
<_,_____________
>>__DISPLAY DATABASE__(_ ___database-name_|_____ _)______________________>
|_*_____________________|
|_dbname1:dbname2_______|
|_dbname*_______________|
|_*dbname_______________|
|_*dbname*______________|
|_*dbstring1*dbstring2*_|
>_ _ __________ __________________________________________________________>
| |_USE______|
|
| |_CLAIMERS_|
|
| |_LOCKS____|
|
| |_LPL______|
|
| |_WEPR_____|
|
|
<_,__________
|
|_SPACENAM__(__ ___space-name_|_______________)________________________|
|
|_*__________________________| |______________________| |
|
|_spacename1:spacename2______|
|_USE______||_ONLY_| |
|
|_spacename*_________________|
|_CLAIMERS_|
|
|
|_*spacename_________________|
|_LOCKS____|
|
|
|_*spacename*________________|
|_LPL______|
|
|
|_*spacestring1*spacestring2*|
|_WEPR_____|
|
|_ONLY_________________________________________________________________|
>________________________________________________________________________><
|
<_,_______
|
|
|
|_PART(_ ___integer_|_______ _)_|
|__OVERVIEW__|
|_integer1:integer2_|
>________________________________________________________________________><
|
|_50______
|
|_LIMIT(_|_integer_|_)_|
|_*_______|
>________________________________________________________________________><
|_AFTER_||_ACTIVE_||_RESTRICT___(______)_||_ADVISORY__(__ ___________)_|
| <_,_____ |
| <_,_____ |
|_ACHKP___|_|
|___ICOPY_|_|
|_CHKP______|
|___AUXW____|
|_COPY______|
|___ARBDP___|
|_GRECP_____|
|___AREO*___|
|_LPL_______|
|___AREOR___|
|_RBDP______|
|_RECP______|
|_REORP_____|
|_RO________|
|_STOP______|
DB2 10 for z/OS

143

YL&A DB2 10 for z/OS Reference Guide


|_UT________|
|_UTRO______|
|_UTRW______|
|_UTUT______|
|_UT*_______|
|_WEPR______|

-DISPLAY DDF
>>__DISPLAY DDF_________________________________________________________><
|_ALIAS (alias-name)_| |_DETAIL_|

-DISPLAY FUNCTION SPECIFIC


>>__DISPLAY FUNCTION SPECIFIC___________________________________________>
_(*.*)_____________________________________
>__|___________________________________________|________________________>
|
<_,_________________________________
|
|_(___ _schema.specific-function-name_ _|_)_|
|_schema.partial-name*__________|
>__ ______________________ _____________________________________________><
|
_LOCAL_
|
|_SCOPE__(_|_______|_)_|

|_GROUP_|
-DISPLAY GROUP
>>__DISPLAY GROUP__ ________ ___________________________________________><
|_DETAIL_|

-DISPLAY GROUPBUFFERPOOL
>>__DISPLAY GROUPBUFFERPOOL__ ________________________________ _________>
| _(*)________________________ |
| |
<_,__________________
| |
|_|_(___ _gbpname________ _|_)_|_|
|_structure-name_|
>__ _________________________ __ _______________________________ ____>
|
_*_______
| |_MDETAIL__ __________________ _|
|_TYPE__(__|_GCONN___|__)_|
|
_INTERVAL_
|
|_MCONN___|
|_(_|__________|_)_|
|_NOCACHE_|
|_*________|
>__ _______________________________ __ _________________________ ____><
|_GDETAIL__ __________________ _| |
_NO__
|
|
_INTERVAL_
|
|_CONNLIST__(__|_YES_|__)_|
|_(_|__________|_)_|
|_*________|

-DISPLAY LOCATION
_(*)_____________________________
>>__DISPLAY LOCATION__|_________________________________|_______________>
|
<_,_____________________
| |_DETAIL_|
|_(____ _location-name_____ _|__)_|
|_partial-location*_|
|_<luname>__________|
|_ipaddr____________|

144

DB2 10 for z/OS

YL&A DB2 10 for z/OS Reference Guide

-DISPLAY LOG
>>__DISPLAY LOG_________________________________________________________><

-DISPLAY PROCEDURE
_(*.*)______________________________
>>__DISPLAY PROCEDURE__|____________________________________|___________>
|
<_,_________________________
|
|__(___ _schema.procedure-name_ _|_)_|
|_schema.partial-name*__|
|_procedure-name________|
|_partial-name*_________|
>______________________________________________________________________><
|
_LOCAL_
|
|_SCOPE__(_|_______|_)_|
|_GROUP_|

-DISPLAY PROFILE
>>__DISPLAY PROFILE____________________________________________________><

-DISPLAY RLIMIT
>>__DISPLAY RLIMIT_____________________________________________________><

-DISPLAY THREAD
>>__DISPLAY THREAD___ ___________________________________ ______________>
|
<_,_______________________
|
|_(____ _connection-name_____ _|__)_|
|
|_partial-connection*_|
|
|_(__*__)___________________________|
>__ _______________________ __ _______________________ _______________>
|
_LOCAL__
| |
_ACTIVE____
|
|_SCOPE__(_|________|_)_| |_TYPE(_|_INDOUBT___|_)_|
|_GROUP__|
|_*_________|
|_INACTIVE__|
|_POSTPONED_|
|_PROC______|
|_SYSTEM____|
>__ _______________________________________________ __ ________ ______>
|
<_,_____________________
| |_DETAIL_|
|_ _LOCATION(_ ___ _location-name_____ _|_ _)_ _|
|
|
|_partial-location*_|
|
|
|
|_*_________________________|
|
|
<_,________________
|
|_LUWID(__ _luwid__________ |_)_____________|
|_partial-luwid*_|
|_token__________|
>__ _____________________________ _____________________________________><
|
<_,______
|
|
_512_____
|
|_RRSURID_ _(__rrs-urid|_)_ __|
|_LIMIT(_|_integer_|_)_|
|_( * )__________|
|_*_______|

-DISPLAY TRACE
_(__*__)_______
DB2 10 for z/OS

145

YL&A DB2 10 for z/OS Reference Guide


>>__DISPLAY TRACE__|_______________|__ ______________________ ___________>
|_(__PERFM__)___| |
_LOCAL_
|
|_(__ACCTG__)___| |_SCOPE__(_|_______|_)_|
|_(__STAT__)____|
|_GROUP_|
|_(__AUDIT__)___|
|_(__MONITOR__)_|
>__ ___________________ __ __________________ __________________________>
|_destination block_| |_constraint block_|
>__ _____________________ __ _________________ _________________________><
|_DETAIL(output-type)_| |_COMMENT(string)_|
|_RMID_|
destination block:
<_,_____
>__DEST(__ _GTF_ |_)____________________________________________________>
|_SMF_|
|_SRV_|
|_OPn_|
constraint block:
_*_____________
_*__________________________
| <_,_________ |
| <_,______________________ |
>__PLAN(_|___plan-name_|_|_)__PKGLOC(_|__package-location________|_|_)__>
|_partial-package-location_|
_*______________
| <_,_______
|
>__AUTHID(_|___auth-id_|____|_)_________________________________________>
|_partial-userid_|
_*___________
_*___________
| <_,_______ |
| <_,_______ |
>__CLASS(_|___integer_|_|_)__TNO(_|___integer_|_|_)_____________________>
_*_________________
_*________________
| <_,_____________ |
| <_,________
|
>__LOCATION(_|___location-name_|_|_)__USERID(|___user-id__|_____|_______>
|_<luname>__________|
|_partial-userid_|
|_partial-element___|
|_ipaddr____________|
|_partial-ipaddr____|
_*________________________
| <_,________________
|
>__APPLNAME(_|___application-name_|_____|_)______________________________>
|_partial-application-name_|
_*________________________
| <_,________________
|
>__WRKSTN(_|___workstation-name_|_____|_)________________________________>
|_partial-workstation-name_|
_*_________________________
| <_,__________________
|
>__CONNID(_|___connection-role-id_|_____|_)______________________________>
|_partial-connection-name____|

146

DB2 10 for z/OS

YL&A DB2 10 for z/OS Reference Guide


_*__________________________
| <_,__________________
|
>__CORRID(_|___correlation-role-id_|_____|_)_____________________________>
|_partial-correlation-name____|
_*____________________________
| <_,__________________
|
>__ROLE(___|___correlation-role___|_______|_)____________________________>
|_partial-correlation-role-id__|
|_constraint block 2_|
constraint block 2:
<_,_________
<_,______________
>__XPLAN(____plan-name_|______)__XPKGLOC(___package-location_|_______)_____>
|_partial-plan-name_|
|_partial-pkge-location_|
<_,____________________________
>__XPKGCOL(____package-collection-id ______|__)____________________________>
|_partial-package-collection-id_|
<_,____________________________
>__XPKGPROG(____package-program-name________|__)___________________________>
|_partial-package-program-name__|
<_,____________________________
>__XAUTHID(_____authorization-id____________|__)___________________________>
|_partial-authorization-id______|
<_,_________
<_,_____
>__XLOC(_____location-name_|___________)__XUSERID_(_____userid_|______)____>
|_partial-location-name__|
|_partial-userid_|
|_<luname>_______________|
|_partial <luname>_______|
|_ipaddr_________________|
|_partial-ipaddr_________|
<_,________________
>__XAPPNAME(_____application-name_|_______)________________________________>
|_partial-application-name_|
<_,________________
>__XWRKSTN(_____workstation-name_|_______)_________________________________>
|_partial-workstation-name_|
<_,__________________
>__XCONNID(_____connection-role-id_|_______)_______________________________>
|_partial-connection-name____|
<_,__________________
>__XCORRID(____correlation-role-id_|_______)_______________________________>
|_partial-correlation-name____|
<_,__________________
>__XROLE(_______correlation-role___|_________)_____________________________>
|_partial-correlation-role-id_|

-DISPLAY UTILITY
>>__DISPLAY UTILITY__(_ _utility-id__________ _)___________________________>
|_partial-utility-id*_|
|_*___________________|
>___ _________________________ ___________________________________________><
|
<_,_________
|
|_MEMBER(__member-name|_)_|

DB2 10 for z/OS

147

YL&A DB2 10 for z/OS Reference Guide

DSN TSO
>>__DSN__ __________________________________________________________________>
|
_DSN______________________
|
|_SYSTEM(_|_subsystem-name___________|_)_|
|_group-attachment-name____|
|_subgroup-attachment-name_|
>__ ______________________ __ _______________ ______________________________>
|
_0_______
| |_TEST(integer)_|
|_RETRY(_|_integer_|_)_|
>__ __________________ ____________________________________________________><
|
_YES_
|
|_ASUSER(userid)_|
|_GROUP(_|_NO__|_)_|

DSNC (CICS attachment facility)


>>__DSNC__ _____________ __db2-command_____________________________________><
|_destination_|

DSNC DISCONNECT (CICS attachment facility)


>>__DSNC DISCONNECT__plan-name_____________________________________________><

DSNC DISPLAY (CICS attachment facility)


>>__DSNC DISPLAY__ _PLAN__ ___________ _____________ _______________________>
|
|_plan-name_|
|
|_TRANSACTION__ ________________ _|
|
|_transaction-id_| |
|_STATISTICS______________________|
>_________________________________________________________________________><
|_destination_|

DSNC MODIFY(CICS attachment facility)


>>__DSNC MODIFY__ _DESTINATION__old__new___________________________________><
|_TRANSACTION__transaction-id__integer_|

DSNC STOP (CICS attachment facility)


_QUIESCE_
>>__DSNC STOP__|_FORCE___|_________________________________________________><

DSNC START (CICS attachment facility)


>>__DSNC STRT__ _______ ___________________________________________________><
|_ssid__|

DSNH (TSO CLIST)


>>__DSNH__INPUT(data-set-name)_____________________________________________><
| <_________________ |
|___clist-parameter_|_|

END
>>__END____________________________________________________________________><

FREE PACKAGE
>>__FREE PACKAGE____________________________________________________________>
<_,_________________________________________________________________
148

DB2 10 for z/OS

YL&A DB2 10 for z/OS Reference Guide


>(___________________collection-id_._package-id________________________|__)_>
||_location-name.||_*___________| |_*________| |_.(_ _____________)_| |
|
|_version-id_|
|
|
|_*__________|
|
|_*____________________________________________________________________|
>___________________________________________________________________________><
|
_I_
|
|
_ALL_______
|_FLAG(_|_W_|_)_|
|__PLANMGMTSCOPE(_|___________|___)__________________>
|_E_|
|_INACTIVE__|
|_C_|

FREE PLAN
<_,_________
>>__FREE PLAN__(_ ___plan-name_|_ _)__ _______________ _____________________><
|_*_____________|
|
_I_
|
|_FLAG(_|_W_|_)_|
|_E_|
|_C_|

FREE QUERY
>>__FREE QUERY__FILTER(filter-name)______________________________________>
|_PACKAGE(package-name)_|
|_QUERYID(number)_______|
|_QUERYID(ALL)__________|
>>___________________,_collection-id_,__package-id_,_(_______________)____><
|_location_name_| |_,___________| |_,_________|
|_version-id_|
|_,__________|

-MODIFY DDF
>>__MODIFY DDF__ALIAS(alias-name)____ADD___________________________________>
|
|_DELETE_________________| |
|
|_START__________________| |
|
|_STOP___________________| |
|
|_CANCEL_________________| |
|
|_PORT(port-name)________| |
|
|_SECPORT(secport-name)__| |
|
|_NPORT__________________| |
|
|_NSECPORT_______________| |
|
|_IPV4(ipv4-address)_____| |
|
|_IPV6(ipv6-address)_____| |
|
|_NIPV4__________________| |
|
|_NIPV6__________________| |
|
_BNDOPT_
|
|__PKGREL(_|_COMMIT_|_)__________________________|

MODIFY IRLMPROC, ABEND


_,DUMP___
>>__MODIFY__irlmproc,ABEND_|_________|_____________________________________><
|_,NODUMP_|

MODIFY IRLMPROC, DIAG


>>__MODIFY__irlmproc,DIAG_ _,DELAY_ _______________________________________><
|_,PLOCK_|
DB2 10 for z/OS

149

YL&A DB2 10 for z/OS Reference Guide


|_,ALL___|
|_,NONE__|
|_,HANG__|

MODIFY IRLMPROC, PURGE


>>__MODIFY__irlmproc,PURGE,db2name________________________________________><

MODIFY IRLMPROC, SET


>>__MODIFY__irlmproc,SET__ _,DEADLOCK=nnnn________________________________><
|_,LTE=nnnn____________________|
|_,PVT=nnnn____________________|
|_,MVT=nnnnnU__________________|
|_,TIMEOUT=nnnn,subsystem-name_|
|
_10__
|
|_,TRACE=_|_nnn_|______________|

MODIFY IRLMPROC, STATUS


_,irlmx__
>>__MODIFY__irlmproc,STATUS_|________|____________________________________><
|_,ALLD__|
|_,ALLI__|
|_,MAINT_|
|_,STOR__|
|_,TRACE_|

-MODIFY TRACE (DB2)


_*___________
| <_,_______ |
>>__MODIFY TRACE__(_ _PERFM___ _)__CLASS(_|___integer_|_|_)_______________>
|_ACCTG___|
|_STAT____|
|_AUDIT___|
|_MONITOR_|
_*_______________
| <_,___________ |
>__TNO(integer)__IFCID(_|____ifcid_nbr__|_|_)____________________________>
|_COMMENT(string)_|

REBIND PACKAGE
>>__REBIND PACKAGE__________________________________________________________>
>>_(____________________collection-id__._package-id_ _______________________>
||_location-name._| |_* ___________| |_* ________||_.(______________)_| |
|
|_version-id_|
|
|
|_*__________|
|
|_*_____________________________________________________________________|
>_enable-block____options-block_____________________________________________>
>___________________________________________________________________________>
|_OWNER(auth-id)_|
|_QUALIFIER(qualifier-name)_| |_CURRENTDATA(_YES__)_|
|_NO_|
>___________________________________________________________________________>
|_DBPROTOCOL_(_DRDA_)_||_DEFER(PREPARE)_________| |_DEGREE(_ _1___ _)_|
|_NODEFER(PREPARE)_______|
|_ANY_|
|_DEFER(INHERITFROMPLAN)_|
>___________________________________________________________________________>
150

DB2 10 for z/OS

YL&A DB2 10 for z/OS Reference Guide


|_DYNAMICRULES(__RUN______)_|
|_RELEASE(___COMMIT____________)__|
|_BIND___|
|_DEALLOCATE______|
|_DEFINE_|
|_INHERITFROMPLAN_|
|_INVOKE_|
>___________________________________________________________________________>
|_ENCODING(_ _ASCII___)_| |
_NO___
|
|
_I_
|
|_EBCDIC__|
|_EXPLAIN(_|_YES__|_)_|
|_FLAG(_|_W_|_)_|
|_UNICODE_|
|_ONLY_|
|_E_|
|_ccsid___|
|_C_|
>___________________________________________________________________________>
|_IMMEDWRITE_(__NO________________)_|
|_ISOLATION(_ _RR_ _)_|
|_YES_____________|
|_RS_|
|_INHERITFROMPLAN_|
|_CS_|
|_UR_|
|_NC_|
>___________________________________________________________________________>
|
_NO__
| |
_NONE___
| |_OPTHINT_(_'hint-id'__)_|
|_KEEPDYNAMIC(_|_YES_|_)_| |_REOPT(|_ALWAYS_|)_|
|_ONCE___|
|_AUTO___|
>___________________________________________________________________________>
|
<_,______________
| |_PATHDEFAULT_| |
_RUN__
|
|_PATH(__ _schema-name_ |_)_|
|_VALIDATE(_|_BIND_|_)_|
|_USER________|
>___________________________________________________________________________>
|
_NO__ ||_GENERIC(string)_||_SWITCH_(__PREVIOUS_)_|
|_EXTENDEDINDICATOR_|_YES_|_|
|_ORIGINAL_|
>___________________________________________________________________________>
|_CONCURRENTACCESSRESOLUTION_(_USECURRENTLYCOMMITTED_)_|
|_WAITFOROUTCOME______|
enable-block:
>>__ ______________________________________________________________________><
| _ENABLE(*)________________________
|
| |
<_,__________
| <____________________________ |
|_|_ _ENABLE__ __(___ _BATCH____ |_)_|_______________________________|_|
|_DISABLE_|
|_DLIBATCH_|
|
<_,_____________
|
|_DB2CALL__|
|_DLIBATCH(_connection-name_|_)_|
|_CICS_____|
|
<_,______
|
|_IMS______|
|_CICS(___applid_|_)____________|
|_IMSBMP___|
|
<_,_____
|
|_IMSMPP___|
|_IMSBMP(___imsid_|_)___________|
|_REMOTE___|
|
<_,_____
|
|_RRSAF____|
|_IMSMPP(___imsid_|_)___________|
|
<_,________________
|
|_REMOTE(___location-name_ _|_)_|
|_<luname>__|
options-block:
>___________________________________________________________________________>
|
| |
_YES__ |
|_PLANMGMT_(__BASIC______)_| |__APRETAINDUP_|_NO___|_|
|_EXTENDED__|
|_OFF_______|
>___________________________________________________________________________>
|
_NONE__ | |
_NONE__ |
|_AREUSE_|_ERROR_|_| |_ACOMPARE_|_WARN__|_|
DB2 10 for z/OS

151

YL&A DB2 10 for z/OS Reference Guide


|_ERROR_|

REBIND PLAN
<_,_________
>>__REBIND PLAN__(_ ___plan-name_|_ _)______________________________________>
|_*_____________|
|_OWNER(authorization-id)_|
>__ ________________________________________________________________________>
|_QUALIFIER(qualifier-name)_|
>___________________________________________________________________________>
|
<_,______________________________________________________
|
|_PKLIST(___ ________________ __ _collection-id_ __ _.package-id_ _|_)_|
|
|_location-name._| |_*_____________| |_.*__________|
|
|
|_*._____________|
|
|_NOPKLIST_____________________________________________________________|
>___________________________________________________________________________>
|_NODEFER(PREPARE)_||_ACQUIRE(_ _USE______ )||_CACHESIZE(decimal-value)_|
|_DEFER(PREPARE)___|
|_ALLOCATE_|
>___________________________________________________________________________>
|_CURRENTDATA(_ _NO__ _)_| |_CURRENTSERVER(location-name)_|
|_YES_|
>_____________________________________ _____________________________________>
|_DBPROTOCOL__(__ _DRDA____ __)_| |_DEGREE(_ _1___ _)_|
|_ANY_|
>___________________________________________________________________________>
|_DISCONNECT(_ _EXPLICIT____ _)_| |_DYNAMICRULES(_ _RUN__ _)_|
|_AUTOMATIC___|
|_BIND_|
|_CONDITIONAL_|
>__ ________________________________________________________________________>
|_ENCODING(_ _ASCII___ _)_| |_EXPLAIN(_ _NO__ _)_|
|
_I_
|
|_EBCDIC__|
|_YES_|
|_FLAG(_|_W_|_)_|
|_UNICODE_|
|_E_|
|_ccsid___|
|_C_|
>___________________________________________________________________________>
|_IMMEDWRITE(_ _NO__ _)_||_ISOLATION(_ _RR_ _)_||
_NO__
|
|_YES_|
|_RS_|
|_KEEPDYNAMIC(_|_YES_|_)|
|_CS_|
|_UR_|
>___________________________________________________________________________>
|
_NONE___
||_OPTHINT_(__'hint-id'__)_||
<_,_____________
|
|_REOPT(|_ALWAYS_|_)|
|_PATH(__schema-name__|_)|
|_ONCE___|
|___USER_____ |
|_AUTO___|
>___________________________________________________________________________>
|
| |_RELEASE(_ _COMMIT_____ _)_| |_SQLRULES(_ _DB2_ _)_|
|_PATHDEFAULT_|
|_DEALLOCATE_|
|_STD_|
>________________ __________________________________________________________>
|_VALIDATE(_ _RUN__ _)_|
|_BIND_|
>___________________________________________________________________________>
|_CONCURRENTACCESSRESOLUTION_(_USECURRENTLYCOMMITTED_)_|
|_WAITFOROUTCOME______|
enable-block
>>__ _______________________________________________________________________><
152

DB2 10 for z/OS

YL&A DB2 10 for z/OS Reference Guide


| _ENABLE(*)________________________
|
| |
<_,__________
| <____________________________ |
|_|_ _ENABLE__ __(___ _BATCH____ |_)_|_______________________________|_|
|_DISABLE_|
|_DLIBATCH_|
|
<_,_____________
|
|_DB2CALL__|
|_DLIBATCH(_connection-name_|_)_|
|_CICS_____|
|
<_,______
|
|_IMS______|
|_CICS(___applid_|_)____________|
|_IMSBMP___|
|
<_,_____
|
|_IMSMPP___|
|_IMSBMP(___imsid_|_)___________|
|_RRSAF____|
|
<_,_____
|
|_IMSMPP(___imsid_|_)___________|

REBIND TRIGGER PACKAGE


>>_REBIND TRIGGER PACKAGE(___________________collection-id_._package-id_)_>
|_location-name._| |_*__________| |_*________|
>__________________________________________________________________________>
|_CURRENTDATA(_YES__)_||_ENCODING(_ASCII_)_|
|_EXPLAIN(__YES___)_|
|_NO_|
|_EBCDIC__|
|_NO___|
|_UNICODE_|
|_ONLY_|
|_ccsid___|
>__________________________________________________________________________>
|_PLANMGMT(__BASIC_____)_|
|
_YES_ | |
_I_
|
|_EXTENDED_|
|_APRETAINDUP(_|_NO__|_| |_FLAG(_|_W_|_)|
|_OFF______|
|_E_|
|_C_|
>__________________________________________________________________________>
|_IMMEDWRITE(_ _NO__ _)| |_ISOLATION(__RR__)_||_RELEASE(___COMMIT_____)_|
|_YES_|
|_RS_|
|_DEALLOCATE_|
|_CS_|
|_UR_|
|_NC_|
>__________________________________________________________________________>
|_CONCURRENTACCESSRESOLUTION_(_USECURRENTLYCOMMITTED_)_|
|_WAITFOROUTCOME______|
>__________________________________________________________________________>
|
| |
_NONE___ |
|_PLANMGMT_(__BASIC______)_| |__APRETAINDUP_|_WARN___|_|
|_EXTENDED__|
|_ERROR__|
|_OFF_______|
>__________________________________________________________________________>
|
_NONE__ | |
_NONE__ |
|_AREUSE_|_ERROR_|_| |_ACOMPARE_|_WARN__|_|
|_ERROR_|
>__________________________________________________________________________><
|_SWITCH_(__PREVIOUS__)_|
|_ORIGINAL_|

-RECOVER BSDS
>>__RECOVER BSDS__________________________________________________________><

-RECOVER INDOUBT
>>__RECOVER INDOUBT__ ___________________ __ACTION(_ _COMMIT_ _)___________>
|_(connection-name)_|
|_ABORT__|
<_,______________
>__ _ID(_ ___correlation-id_|_ _)_ ______________________________________><
DB2 10 for z/OS

153

YL&A DB2 10 for z/OS Reference Guide


|
|_*__________________|
|
|
<_,__________
|
|_NID(___network-id_|_)________|
|
<_,_______
|
|_LUWID(__ _luwid_ |_)_________|
|_token_|

-RECOVER POSTPONED
>>__RECOVER POSTPONED__ ________ _________________________________________><
|_CANCEL_|

-REFRESH DB2, EARLY


>>__REFRESH DB2, EARLY____________________________________________________><

-RESET GENERICLU
<_,________________
>>__RESET GENERICLU__ _(___ _luname_______ _|_)_ _________________________><
|
|_netid.luname_|
|
|_(*)______________________|

-RESET INDOUBT
>>__RESET INDOUBT_________________________________________________________>
<_,______
>__ _LUNAME(_ ___luname_|_ _)_ _______ ___________________________________><
|
|_*__________|
|_FORCE_|
|
|
<_,_____________
|
|_LOCATION(___location-name_|_)_____________________|
|
<_,____________________
|
|_IPADDR(_ _______ipaddr..port_____|_ _)_ _______ __|
|
|_*________________________|
|_FORCE_| |
|
<_,_______
|
|_LUWID(__ _luwid_ |_)_ _________________________ __|
|_token_|
|_LOCATION(location-name)_|

RUN
>>__RUN__ _PROGRAM(program-name)__ _________________ _ ___________________>
|
|_PLAN(plan-name)_| |
|_CP__PLAN(plan-name)________________________|
>__ _______________________ __ _________________________ _________________><
|_LIBRARY(library-name)_| |_PARMS(parameter-string)_|

-SET ARCHIVE
>>__SET ARCHIVE__ __ __________ __ _______________________________________><
| |_COUNT__(__integer__)_||_TIME(_ _minutes_ __)_| |
|
|
|_,seconds_|
| |
|
|_,seconds____________| |
|
|_1440________________| |
|
|_NOLIMIT_____________| |
|_DEFAULT____________________________________________|

-SET LOG
>>__SET LOG_______________LOGLOAD(integer)_______________________________>
|_SINGLE_| |
|_CHKTIME(integer)_| |
|_BOTH___| |_CHKTIME(integer)___________________________|
154

DB2 10 for z/OS

YL&A DB2 10 for z/OS Reference Guide


|
|_LOGLOAD(integer)_| |
|_SUSPEND____________________________________|
|_RESUME_____________________________________|
|_NEWLOG_(_data-set-name_)_COPY_(_log-copy_)_|

-SET SYSPARM
>>__SET SYSPARM__ _LOAD(_ _DSNZPARM_________ _)_ ______________________><
|
|_load-module-name_|
|
|_RELOAD_______________________|
|_STARTUP______________________|

SPUFI
>>__SPUFI______________________________________________________________><

/SSR
>>__/SSR__subsystem-command____________________________________________><

-START ACCEL
_(_*_)_____________________________
|
<_,_____________
|
>>__START ACCEL_|_(_ ___accelerator-name_|_____ _)__|__________________>
>______________________________________________________________________>
|
_*_____________
| |
_______
|
|_ACCESS_(_|_MAINT_________|__)_| |_SCOPE_(_|_GROUP_|_)_|
|_EXPLAINONLY___|

/START IMS
>>__/START_____________________________________________________________><
|
|
|
<_,_________________ |
|
| |
|_SUBSYS __subsystem-name_|_|
|_SUBSYS__ALL_______________|

-START DATABASE
<_,_____________
>>__START DATABASE__(_ ___database-name_|_____ _)_______________________>
|_*_____________________|
|_dbname1:dbname2_______|
|_dbname*_______________|
|_*dbname_______________|
|_*dbname*______________|
|_*dbstring1*dbstring2*_|
> ______________________________________________________________________>
|
<_,________
|
|_SPACENAM(_ ___space-name_|________)________|
|_*___________________________|
|_spacename1:spacename2_______|
|_spacename*__________________|
|_*spacename__________________|
|_*spacename*_________________|
|_*spacestring1*spacestring2*_|
> ______________________________________________________________________>
DB2 10 for z/OS

155

YL&A DB2 10 for z/OS Reference Guide


|
<_,____________
| |_CLONE_|
|_PART(_ ___integer______|____)_|
|_integer1:integer2__|
__RW____
>_____ACCESS(_|_RO____|_)______________________________________________><
|_UT____|
|_FORCE_|

-START DB2
>>__START DB2__ _________________________ ______________________________>
|
___DSNZPARM__
|
|
_DSNDECP___
|
|_PARM(_|_module name_|_)_|
|_DECP(_|___________|_)_|
|_decp-name_|
>__ _____________________ __ __________________ ________________________>
|
_*_____
| |
_NO_________
|
|_ACCESS(_|_MAINT_|_)_| |_LIGHT(_|_YES________|_)_|
|_NOINDOUBTS_|
>__ ________________________ __ ________________________ _______________>
|_MSTR(jcl-substitution)_| |_DBM1(jcl-substitution)_|
>__ ________________________ ___________________________________________><
|_DIST(jcl-substitution)_|

-START DDF
>>__START DDF___________________________________________________________><

-START FUNCTION SPECIFIC


>>__START FUNCTION SPECIFIC_____________________________________________>
_(*.*)_____________________________________
>__|___________________________________________|________________________>
|
<_,_________________________________
|
|_(___ _schema.specific-function-name_ _|_)_|
|_schema.partial-name*__________| |
>__ ______________________ _____________________________________________><
|
_LOCAL_
|
|_SCOPE__(_|_______|_)_|
|_GROUP_|

-START admtproc
>>__START__irlmproc,__ _________________________________________________><
|_TRACE=__ON_____|
|_OFF_|

-START irlmproc
<_,___________________________
>>__START__irlmproc,__ ___________________________ |____________________><
|_DEADLOK='iiii,kkkk'_______|
|_IRLMGRP='irlm-group-name__|
|_IRLMID=n__________________|
|_IRLMNM=irlmname___________|
|_LOCKTABL=irlmltnm_________|
|_MAXCSA=nnn________________|
|_MAXUSRS=nnn_______________|
|_PC=_ _YES_ _______________|
|
|_NO__|
|
156

DB2 10 for z/OS

YL&A DB2 10 for z/OS Reference Guide


|_PGPROT=_ _YES_ ___________|
|
|_NO__|
|
|_SCOPE=_ _LOCAL____ _______|
|
|_GLOBAL___|
|
|
|_NODISCON_|
|
|_TRACE=_ _NO__ ____________|
|_YES_|

-START PROCEDURE
_(*.*)_____________________________
>>__START PROCEDURE__|___________________________________|_______________>
|
<_,_________________________
|
|_(___ _schema.procedure-name_ _|_)_|
|_schema.partial-name*__|
|_procedure-name________|
|_partial-name*_________|
>__ ______________________ ______________________________________________><
|
_LOCAL_
|
|_SCOPE__(_|_______|_)_|
|_GROUP_|

-START PROFILE
>>__START PROFILE________________________________________________________><

-START RLIMIT
>>__START RLIMIT__ _______ ______________________________________________><
|_ID=id_|

-START TRACE
>>__START TRACE__(_ _PERFM___ _)__ ______________________ _______________>
|_ACCTG___|
|
_LOCAL_
|
|_STAT____|
|_SCOPE__(_|_______|_)_|
|_AUDIT___|
|_GROUP_|
|_MONITOR_|
>__ ___________________ __ __________________ ___________________________>
|_destination block_| |_constraint block_| |_RMID_|
>__ _________________ ___________________________________________________><
|_COMMENT(string)_| |_filtering block_|
destination block:
<_,_____
>__DEST(__ _GTF_ |_)_____________________________________________________>
|_SMF_|
|_SRV_|
|_OPn_|
|_OPX_|
constraint block:
_*_________________
_*__________________________
| <_,_________
|
| <_,______________________ |
>__PLAN(_|___plan-name_|_____|_)_PKGLOC(_|__package-location_______|_|_)__>
|_partial-plan-name_|
|_partial-package-location_|
<_,__________________________
>___PKGCOL(____package-collection-id ______|__)___________________________>
|_partial-package-collection-id_|
DB2 10 for z/OS

157

YL&A DB2 10 for z/OS Reference Guide


_*_____________________________
| <_,________________________ |
>__PKGPROG(_|__package-program-name______|_|_)____________________________>
|_partial-package-program-name_|
_*_____________
| <_,_______
|
>__AUTHID(_|___auth-id_|____|_)___________________________________________>
|_partial-authid_|
_*___________
_*___________
| <_,_______ |
| <_,_______ |
>__CLASS(_|___integer_|_|_)__TNO(_|___integer_|_|_)_______________________>
_*_________________
| <_,_____________ |
>__LOCATION(_|___location-name_|_|_)______________________________________>
|_<luname>__________|
|_partial-element___|
|_ipaddr____________|
|_partial-ipaddr____|
_*_____________
| <_,_______
|
>__USERID(_|___user-id_|____|_)____________________________________________>
|_partial-userid_|
_*_______________________
| <_,________________
|
>__APPLNAME(_|___application-name_|_____|_)________________________________>
|_partial-application-name_|
_*________________________
| <_,________________
|
>__WRKSTN(_|___workstation-name_|_____|_)__________________________________>
|_partial-workstation-name_|
_*_________________________
| <_,__________________
|
>__CONNID(_|___connection-role-id_|_____|_)________________________________>
|_partial-connection-name____|
_*__________________________
| <_,__________________
|
>__CORRID(_|___correlation-role-id_|_____|_)_______________________________>
|_partial-correlation-name____|
_*____________________________
| <_,__________________
|
>__ROLE(___|___correlation-role___|_______|_)______________________________>
|_partial-correlation-role-id__|
_*__________
| <_,______ |
_*_______
>__IFCID(_|___ifcid__|_|_)_BUFSIZE_(_|_k_bytes_|___________________________>
<_,____________
<_,__________
>__TDATA(__ _CORRELATION_ |_)__AUDTPLCY(_|_policy-name_|_ASID(xdddd)_____>
|_TRACE________|
|_CPU__________|
|_DISTRIBUTED__|
filtering block:
<_,________
<_,_____________
>__XPLAN(____plan-name_|______)__XPKGLOC(___package-location_|_______)_____>
|_partial-plan-name_|
|_partial-pkge-location_|
158

DB2 10 for z/OS

YL&A DB2 10 for z/OS Reference Guide


<_,____________________________
>__XPKGCOL(____package-collection-id ______|__)____________________________>
|_partial-package-collection-id_|
<_,____________________________
>__XPKGPROG(____package-program-name________|__)___________________________>
|_partial-package-program-name__|
<_,____________________________
>__XAUTHID(_____authorization-id____________|__)___________________________>
|_partial-authorization-id______|
<_,_________
<_,_____
>__XLOC(_____location-name_|___________)__XUSERID_(_____userid_|______)____>
|_partial-location-name__|
|_partial-userid_|
|_<luname>_______________|
|_partial <luname>_______|
|_ipaddr_________________|
|_partial-ipaddr_________|
<_,________________
>__XAPPNAME(_____application-name_|_______)________________________________>
|_partial-application-name_|
<_,________________
>__XWRKSTN(_____workstation-name_|_______)_________________________________>
|_partial-workstation-name_|
<_,__________________
>__XCONNID(_____connection-role-id_|_______)_______________________________>
|_partial-connection-name____|
<_,__________________
>__XCORRID(____correlation-role-id_|_______)_______________________________>
|_partial-correlation-name____|
<_,__________________
>__XROLE(_______correlation-role___|_________)_____________________________>
|_partial-correlation-role-id_|

-STOP ACCEL
_(_*_)_____________________________
|
<_,_____________
|
>>__STOP ACCEL__|_(_ ___accelerator-name_|_____ _)__|______________________>
>__________________________________________________________________________>
|
_QUIESCE_______
| |
_LOCAL_
|
|_MODE_(_|_FORCE_________|__)_| |_SCOPE_(_|_GROUP_|_)_|
>__________________________________________________________________________>
|_MEMBER(member-name)_|

/STOP IMS
<_,______________
>>__/STOP__ _SUBSYS____subsystem-name_|_ __________________________________><
|_SUBSYS__ALL________________|

STOP admtproc
>>__STOP____admtproc_______________________________________________________><

-STOP DATABASE
<_,_____________
>>__STOP DATABASE_(___database-name_|________ _)____________________________>
|_*_____________________|
DB2 10 for z/OS

159

YL&A DB2 10 for z/OS Reference Guide


|_dbname1:dbname2_______|
|_dbname*_______________|
|_*dbname_______________|
|_*dbname*______________|
|_*dbstring1*dbstring2*_|
>_______________________________________________________________________)___>
|
<_,__________
|
|_SPACENAM(_ ___space-name_|______________ _)________________________|
|_*___________________________| |
<_,_______
|
|_spacename1:spacename2_______| |_PART(___integer__|_)_|
|_spacename*__________________|
|_int1:int2_|
|_*spacename__________________|
|_*spacename*_________________|
|_*spacestring1*spacestring2*_|
>__________________________________________________________________________><
|_CLONE_| |_AT(COMMIT)_|

-STOP DB2
_MODE(QUIESCE)_
_CASTOUT(YES)_
>>__STOP DB2__|_______________|__|______________|__________________________><
|_MODE(FORCE)___| |_CASTOUT(NO)__|

-STOP DDF
_MODE(QUIESCE)________________
>>__STOP DDF__|______________________________|_____________________________><
|_MODE(FORCE)__________________|
|_MODE(SUSPEND)_ _CANCEL(n)_ __|
|_WAIT(n)___|

-STOP FUNCTION SPECIFIC


>>__STOP FUNCTION SPECIFIC__________________________________________________>
_(*.*)_____________________________________
>__|___________________________________________|____________________________>
|
<_,_________________________________
|
|_(___ _schema.specific-function-name_ _|_)_|
|_schema.partial-name*__________|
>__+_______________________________________________________________________><
|
_QUEUE__
| |
_LOCAL_
|
|_ACTION__(_|_REJECT_|_)_| |_SCOPE__(_|_GROUP_|_)_|

STOP irlmproc
>>__STOP__irlmproc__________________________________________________________>

-STOP PROCEDURE
_(*.*)_____________________________
>>__STOP PROCEDURE__|___________________________________|___________________>
|
<_,_________________________
|
|_(___ _schema.procedure-name_ _|_)_|
|_schema.partial-name*__|
|_procedure-name________|
|_partial-name*_________|
>__ ________________________ __ _____________________ _____________________><
160

DB2 10 for z/OS

YL&A DB2 10 for z/OS Reference Guide


|
_QUEUE__
|
|_ACTION__(_|_REJECT_|_)_|

|
_LOCAL_
|
|_SCOPE__(_|_______|_)_|
|_GROUP_|

-STOP PROFILE
>>__STOP PROFILE___________________________________________________________><

-STOP RLIMIT
>>__STOP RLIMIT___________________________________________________________><

-STOP TRACE
>>__STOP TRACE__(_ _PERFM___ _)____________________________ASID(xdddd)___>
|_ACCTG___|
|
_LOCAL_ | |
|_STAT____|
|_SCOPE__(_|_______|_)_|
|_AUDIT___|
|_GROUP_|
|_MONITOR_|
|_*_______|
<_,________
>___DEST____________|______________________________________________________>
|_GTF_____|
|_constraint block_| |_filtering block_|
|_SMF_____|
|_SRV_____|
|_OPn_____|
>__________________________________________________________________________>
|_RMID_| |_COMMENT(string)_|
constraint block:
_*_________________
_*__________________________
| <_,_________
|
| <_,______________________ |
>__PLAN(_|___plan-name_|_____|_)_PKGLOC(_|__package-location_______|_|_)___>
|_partial-plan-name_|
|_partial-package-location_|
<_,___________________________
>___PKGCOL(____package-collection-id ______|__)____________________________>
|_partial-package-collection-id_|
_*____________________________
| <_,________________________ |
>__PKGPROG(_|__package-program-name______|_|_)_____________________________>
|_partial-package-program-name_|
_*______________
| <_,_______
|
>__AUTHID(_|___auth-id_|____|_)____________________________________________>
|_partial-authid_|
_*___________
_*___________
| <_,_______ |
| <_,_______ |
>__CLASS(_|___integer_|_|_)__TNO(_|___integer_|_|_)________________________>
_*_________________
| <_,_____________ |
>__LOCATION(_|___location-name_|_|_)_______________________________________>
|_<luname>__________|
|_partial-element___|
|_ipaddr____________|
|_partial-ipaddr____|
_*_____________
| <_,_______
|
>__USERID(_|___user-id_|____|_)____________________________________________>
DB2 10 for z/OS

161

YL&A DB2 10 for z/OS Reference Guide


|_partial-userid_|
_*_______________________
| <_,________________
|
>__APPLNAME(_|___application-name_|_____|_)________________________________>
|_partial-application-name_|
_*________________________
| <_,________________
|
>__WRKSTN(_|___workstation-name_|_____|_)__________________________________>
|_partial-workstation-name_|
_*_________________________
| <_,__________________
|
>__CONNID(_|___connection-role-id_|_____|_)________________________________>
|_partial-connection-name____|
_*__________________________
| <_,__________________
|
>__CORRID(_|___correlation-role-id_|_____|_)_______________________________>
|_partial-correlation-name____|
_*____________________________
| <_,__________________
|
>__ROLE(___|___correlation-role___|_______|_)______________________________>
|_partial-correlation-role-id__|
_*_______________
| <_,___________ |
>__AUDTPLCY(_|___policy-name_|_|___________________________________________>
filtering block:
<_,________
<_,_____________
>__XPLAN(____plan-name_|______)__XPKGLOC(___package-location_|_______)_____>
|_partial-plan-name_|
|_partial-pkge-location_|
<_,____________________________
>__XPKGCOL(____package-collection-id ______|__)____________________________>
|_partial-package-collection-id_|
<_,____________________________
>__XPKGPROG(____package-program-name________|__)___________________________>
|_partial-package-program-name__|
<_,____________________________
>__XAUTHID(_____authorization-id____________|__)___________________________>
|_partial-authorization-id______|
<_,_________
<_,_____
>__XLOC(_____location-name_|___________)__XUSERID_(_____userid_|______)____>
|_partial-location-name__|
|_partial-userid_|
|_<luname>_______________|
|_partial <luname>_______|
|_ipaddr_________________|
|_partial-ipaddr_________|
<_,________________
>__XAPPNAME(_____application-name_|_______)________________________________>
|_partial-application-name_|
<_,________________
>__XWRKSTN(_____workstation-name_|_______)_________________________________>
|_partial-workstation-name_|
<_,__________________
>__XCONNID(_____connection-role-id_|_______)_______________________________>
|_partial-connection-name____|
162

DB2 10 for z/OS

YL&A DB2 10 for z/OS Reference Guide


<_,__________________
>__XCORRID(____correlation-role-id_|_______)_______________________________>
|_partial-correlation-name____|
<_,__________________
>__XROLE(_______correlation-role___|_________)_____________________________>
|_partial-correlation-role-id_|

-TERM UTILITY
>>__TERM UTILITY__(_ _utility-id________ _)________________________________><
|_partial-utility-id*_|
|_*___________________|

TRACE IMS
>>__/TRACE__SET_ _ON__ ___ _________________________________________________>
|_OFF_|
|
_ALL__
|
|_TABLE_|_SUBS_|__|
>__ ___________________ ___________________________________________________><
|
_NOLOG_
|
|_OPTION_|_LOG___|__|

TRACE CT
_,WRAP___
>>__TRACE CT,____ _WTRSTART=parmlibmem_|_________|________________________><
|
|_,NOWRAP_|
|
|_WTRSTOP=jobname________________________|
|_ON,__COMP=irlmnm__ __________________ _|
|
|_,SUB=(_ _DBM_ _)_| |
|
|_EXP_|
|
|
|_INT_|
|
|
|_SLM_|
|
|
|_XCF_|
|
|
|_XIT_|
|
|_OFF____________________________________|

DB2 10 for z/OS

163

YL&A DB2 10 for z/OS Reference Guide

SQL Control Statements


SQL Control Statement
>>____assignment-statement_________________________________________________><
|_CALL statement_______|
|_CASE statement_______|
|_compound-statement___|
|_FOR statement________|
|_GET DIAGNOSTICS stmt_|
|_GOTO statement_______|
|_IF statement_________|
|_ITERATE statement____|
|_LEAVE statement______|
|_LOOP statement_______|
|_REPEAT statement_____|
|_RESIGNAL statement___|
|_RETURN statement_____|
|_SIGNAL statement_____|
|_WHILE statement______|

Assignment
>>______________SET____assignment-clause___________________________________><
|_label:_|
assignment-clause:
>_____SQL-parameter-name__=_CURRENT SERVER_________________________________><
| |_SQL-variable-name__| |_CURRENT PACKAGESET____|
|
|
|_CURRENT PACKAGE PATH__|
|
|
<_,________________________________
|
|_____SQL-parameter-name__=_expression__|_______________________________|
| |_SQL-variable-name_| |_NULL______|
|
|
<_,__________________
<_,__________
|
|_(____SQL-parameter-name_|_)_=_(__expression__|____________________|
|_SQL-variable-name_|
||_NULL______|
|
|_VALUES___expression_________|
||_NULL_________|
|
| <_,__________
|
|_(_expression__|_)_|
|_NULL_____|

CALL
>>__CALL__procedure-name____________________________________________________>
>__________________________________________________________________________><
|_(____________________________________________)_|
| <_,________________________________ |
|_____SQL-variable-name______________|_|
|_SQL-parameter-name___________|
|_expression___________________|
|_NULL_________________________|

CASE
>__CASE_____________searched-case-statement-when-clause_____________________>
164

DB2 10 for z/OS

YL&A DB2 10 for z/OS Reference Guide


|_simple-case-statement-when-clause___|
>____________________________________________END CASE_______________________>
|
<____________________________ |
|_ELSE____SQL-procedure-statement__;_|_|
searched-case-statement-when-clause:
<_________________________________________________________________
<____________________________ |
>____WHEN__search-condition__THEN____SQL-procedure-statement__;_|_|_________>
simple-case-statement-when-clause:
>__expression_______________________________________________________________>
<___________________________________________________________
<____________________________ |
>____WHEN__expression__THEN____SQL-procedure-statement__;_|_|_______________>

Compound
_NOT ATOMIC_
>>______________BEGIN__|____________|_______________________________________>
|_label:_|
>___________________________________________________________________________>
| <_________________________________ |
|_____SQL-variable-declaration____;_|_|
|_condition-declaration____|
|_return-codes-declaration_|
>___________________________________________________________________________>
| <_____________________________ |
|___DECLARE-CURSOR-statement__;_|_|
<____________________________
>____________________________________SQL-procedure-statement__;_|___________>
| <________________________ |
|___handler-declaration__;_|_|
>__END_____________________________________________________________________><
|_label_|
SQL-variable-declaration:
>>__DECLARE_________________________________________________________________>
<_,________________
_DEFAULT NULL__________
>__SQL-variable-name_|_data-type__|_______________________|________________><
|
|_DEFAULT__constant_|
|
|_RESULT_SET_LOCATOR VARYING___________|
condition-declaration:
>>__DECLARE__condition-name__CONDITION__FOR___string-constant______________><
|_SQLSTATE____________|
|_VALUE_|
return-codes-declaration:
_DEFAULT '00000'_______
>>__DECLARE__ _SQLSTATE__CHAR(5)__|_______________________|_______________><
|
|__DEFAULT__constant____| |
|
_DEFAULT 0_____________
|
|_SQLCODE__INTEGER__|_ ___________________ _|__|
|_DEFAULT__constant
statement-declaration:
>>__DECLARE__statement-name__STATMENT______________________________________><
handler-declaration:
DB2 10 for z/OS

165

YL&A DB2 10 for z/OS Reference Guide


>>__DECLARE____CONTINUE____HANDLER__FOR_____________________________________>
|_EXIT_____|
>____specific-condition-value_______SQL-procedure-statement________________><
|_general-condition-value_|
specific-condition-value:
<_,_____________________________
_VALUE_
|
>>_____SQLSTATE__|_______|__string__|______________________________________><
|_condition-name______________|
general-condition-value:
>>____SQLEXCEPTION_________________________________________________________><
|_SQLWARNING___|
|_NOT FOUND____|

FOR
>>__________FOR____________________________________________________________><
|_label:_|
|_for-loop-name_AS_||
_WITHOUT HOLD_
|
|_csr-name_CURSOR_|______________|_FOR_|
|_WITH HOLD__|
<______________________
>_select-statement__DO__SQL-procedure-statement_|_;__END FOR_______________><
|_label:_|

GET DIAGNOSTICS
>>__GET DIAGNOSTICS__SQL-variable-name__=__ROW_COUNT_______________________><

GOTO
>>_____________GOTO__target-label__________________________________________><
|_label:_|

IF
<____________________________
>>__IF__search-condition__THEN____SQL-procedure-statement__;_|_____________>
<____________________________________________________
>_______________________________________________________|__________________>
|
<_________________________
|
|_ELSEIF__search-condition__THEN____SQL-procedure-statement__;_|_|
>______________END IF______________________________________________________><
|
<____________________________ |
|_ELSE____SQL-procedure-statement__;_|_|

ITERATE
>>_____________ITERATE__target-label_______________________________________><
|_label:_|

LEAVE
>>_____________LEAVE____target-label_______________________________________><
|_label:_|

LOOP
<____________________________
>>______________LOOP____SQL-procedure-statement__;_|__END LOOP_____________><
|_label:_|
|_label_|
166

DB2 10 for z/OS

YL&A DB2 10 for z/OS Reference Guide

REPEAT
<___________________________
>>______________REPEAT____SQL-procedure-statement__;_|______________________>
|_label:_|
>__UNTIL__search-condition__END REPEAT_____________________________________><
|_label_|

RESIGNAL
>>______________RESIGNAL____________________________________________________>
|_label:_|
>___________________________________________________________________________>
|
_VALUE_
|
|__SQLSTATE__|_______|__sqlstate-string-constant_________________________|
|
|_SQL-variable-name_______|||_signal-information_|
|
|_SQL-parameter-name____| |
|_SQL-condition-name____________________________|
signal-information:
>>__SET MESSAGE_TEXT _=__diagnostic-string-expression_______________________>

RETURN
>>______________RETURN______________________________________________________>
|_label:_|
|_expression___________________________________|
|_NULL_________________________________________|
|___________________________________fullselect_|
| <____________________________ |
|_WITH_common-table-expresssion_|_|

SIGNAL
>>______________SIGNAL______________________________________________________>
|_label:_|
>___________________________________________________________________________>
|
_VALUE_
|
|__SQLSTATE__|_______|__sqlstate-string-constant_________________________|
|
|_SQL-variable-name_______|||_signal-information_|
|
|_SQL-parameter-name_____||
|_SQL-condition-name____________________________|
signal-information:
>>__SET MESSAGE_TEXT _=__diagnostic-string-expression_______________________>

WHILE
>>__________WHILE_search-condition_DO_SQL-procedure-statement_;_END WHILE___>
|_label:_|
|_label_|

SQL Procedure statement


>>__SQL-control-statement__________________________________________________><
ALLOCATE CURSOR statement
ALTER DATABASE statement
ALTER FUNCTION statement (external scalar, external table, sourced, SQL
scalar, or SQL table)
DB2 10 for z/OS

167

YL&A DB2 10 for z/OS Reference Guide


ALTER INDEX statement
ALTER PROCEDURE statement (external, SQL-external, or SQL-native)
ALTER SEQUENCE statement
ALTER STOGROUP statement
ALTER TABLE statement
ALTER TABLESPACE statement
ALTER TRUSTED CONTEXT statement
ALTER VIEW statement
ASSOCIATE LOCATORS statement
CALL statement
CLOSE statement
COMMENT statement
COMMIT statement
CONNECT statement
CREATE ALIAS statement
CREATE DATABASE statement
CREATE FUNCTION statement (external scalar,external table,sourced)
CREATE GLOBAL TEMPORARY TABLE statement
CREATE INDEX statement
CREATE PROCEDURE statement (external)
CREATE ROLE statement
CREATE SEQUENCE statement
CREATE STOGROUP statement
CREATE SYNONYM statement
CREATE TABLE statement
CREATE TABLESPACE statement
CREATE TRUSTED CONTEXT statement
CREATE TYPE statement
CREATE VIEW statement
DECLARE CURSOR statement
DECLARE GLOBAL TEMPORARY TABLE statement
DELETE statement
DROP statement
EXCHANGE statement
EXECUTE statement
EXECUTE IMMEDIATE statement
FETCH statement
GET DIAGNOSTICS statement
GRANT statement
INSERT statement
LABEL statement
LOCK TABLE statement
MERGE statement
OPEN statement
PREPARE statement
REFRESH TABLE statement
RELEASE statement
RELEASE SAVEPOINT statement
RENAME statement
REVOKE statement
ROLLBACK statement
SAVEPOINT statement
SELECT INTO statement
SET CONNECTION statement
SET special-register statement
168

DB2 10 for z/OS

YL&A DB2 10 for z/OS Reference Guide


TRUNCATE statement
UPDATE statement
VALUES INTO statement

DB2 10 for z/OS

169

YL&A DB2 10 for z/OS Reference Guide

Explain Tables
PLAN_TABLE

Contains information about access paths for queries that were explained or hints.
Column name
QUERYNO

QBLOCKNO
APPLNAME

PROGNAME

PLANNO
METHOD

170

Description
A number intended to identify the statement being explained. For a
row produced by an EXPLAIN statement, specify the number in the
QUERYNO clause. For a row produced by non-EXPLAIN statements,
specify the number using the QUERYNO clause, which is an optional
part of the SELECT, INSERT, UPDATE, MERGE, and DELETE
statement syntax. Otherwise, DB2 assigns a number based on the line
number of the SQL statement in the source program. FETCH
statements do not each have an individual QUERYNO assigned to
them. Instead, DB2 uses QUERYNO of the DECLARE CURSOR
statement for all corresponding FETCH statements for that cursor.
When the values of QUERYNO are based on the statement number in
the source program, values greater than 32,767 are reported as 0.
Hence, in a very long program, the value is not guaranteed to be
unique. If QUERYNO is not unique, use the value of TIMESTAMP,
which is always unique.
When the SQL statement is embedded in a non-inline SQL function or
native SQL procedure, if the QUERYNO clause is specified, then its
value is used by DB2. Otherwise DB2 assigns a number based on the
line number of the SQL statement in the non-line SQL function, or
native SQL procedure.
A number that identifies each query block within a query. The value of
the numbers are not in any particular order, nor are they consecutive.
The name of the application plan for the row. Applies only to
embedded EXPLAIN statements executed from a plan or to
statements explained when binding a plan. Blank if not applicable.
When the SQL statement is embedded in a non-inline SQL function or
native SQL procedure, then this column is not used.
The name of the program or package containing the statement being
explained. For statements explained dynamically, such as with QMF
or SPUFI, associated plan/package is listed. Blank if not applicable.
If SQL statement is embedded in a non-inline SQL function or native
SQL procedure, this column is not used and is blank.
The number of the step in which the query indicated in QBLOCKNO
was processed. Indicates the order in which the steps were executed.
Join method used for the step:
0 = First table accessed, continuation of previous table accessed, or
not used.
1 = Nested loop join. For each row of the present composite table,
matching rows of a new table are found and joined.
2 = Merge scan join. The present composite table and the new tables
are scanned in the order of the join columns, and matching rows are
joined.
3 = Sorts needed by ORDER BY, GROUP BY, SELECT DISTINCT,
UNION, a quantified predicate, or an IN predicate. This step does not
access a new table.
4 = Hybrid join. The current composite table is scanned in the order of
DB2 10 for z/OS

YL&A DB2 10 for z/OS Reference Guide

CREATOR
TNAME

TABNO
ACCESSTYPE

MATCHCOLS
ACCESSCREATOR
DB2 10 for z/OS

the join-column rows of the new table. The new table is accessed
using list prefetch.
Creator of the new table accessed in this step; blank if METHOD is 3.
The name of a table, materialized query table, created or declared
temporary table, materialized view, or materialized table expression.
The value is blank if METHOD is 3. The column can also contain the
name of a table in the form DSNWFQB(qblockno).
DSNWFQB(qblockno) is used to represent the intermediate result of a
UNION ALL, an INTERSECT ALL, an EXCEPT ALL, or an outer join
that is materialized. If a view is merged, the name of the view does not
appear. UDSN_DIM_TBLX(qblockno) is used to represent the work
file of a star join dimension table.
IBM use only.
The method of accessing the new table:
DI = By an intersection of multiple DOCID lists to return the final
DOCID list.
DU = By a union of multiple DOCID lists to return the final DOCID list.
DX = By an XML index scan of the index named in ACCESSNAME to
return a DOCID list.
E = By direct row using a row change timestamp column.
H = By hash access. IF an overflow condition occurs, the hash
overflow index that is identified by ACCESSCREATOR and
ACCESNAME is used.
HN = By hash access using an IN predicate, or an IN predicate that
DB2 generates. If a hash overflow condition occurs, the hash overflow
index that is identified in ACCESSCREATOR and ACCESSNAME is
used.
IN = By an index scan when the matching predicate contains an IN
predicate and the IN-list is accessed through an in-memory table.
I = By an index (identified in ACCESSCREATOR and
ACCESSNAME).
I1 = By a one-fetch index scan.
M = By a multiple index scan (followed by MX, MI, MH, or MU).
MH = By the hash overflow index named in ACCESSNAME.MX = By
an index scan on the index named in ACCESSNAME. When the
access method MX follows the access method DX, DI, or DU, the
table is accessed by the DOCID index using the DOCID list returned
by DX, DI, or DU.
MI = By an intersection of multiple indexes.
MU = By a union of multiple indexes.
N = By an index scan when the matching predicate contains the IN
keyword or by an index scan when DB2 rewrites a query using the IN
keyword.
NR = Range list access.
O = By a work file scan, as a result of a subquery.
P = By a dynamic pair-wise index scan.
R = By a table space scan.
RW = By a work file scan of the result of a materialized user-defined
table function.
V = By buffers for an INSERT statement within a SELECT.
Blank = Not applicable to the current row.
For ACCESSTYPE I, I1, N, NR, MX, or DX, the number of index keys
used in an index scan; otherwise, 0.
For ACCESSTYPE I, I1, N, NR, MX, or DX, the creator of the index;
171

YL&A DB2 10 for z/OS Reference Guide


ACCESSNAME
INDEXONLY
SORTN_UNIQ
SORTN_JOIN
SORTN_ORDERBY
SORTN_GROUPBY
SORTC_UNIQ
SORTC_JOIN
SORTC_ORDERBY
SORTC_GROUPBY
TSLOCKMODE

TIMESTAMP
REMARKS
PREFETCH

COLUMN_FN_EVAL
172

otherwise, blank.
For ACCESSTYPE I, I1, H, MH, N, NR, MX, or DX, the name of the
index; for ACCESSTYPE P, DSNPJW(mixopseqno) is the starting
pair-wise join leg in MIXOPSEQNO; otherwise, blank.
Whether access to an index alone is enough to carry out the step, or
whether data, too, must be accessed. Y = Yes; N = No.
Whether new table is sorted to remove duplicate rows. Y=Yes; N= No.
Whether new table is sorted for join method 2 or 4. Y = Yes; N = No.
Whether the new table is sorted for ORDER BY. Y = Yes; N = No.
Whether the new table is sorted for GROUP BY. Y = Yes; N = No.
Whether composite table is sorted to remove duplicate rows. Y = Yes;
N = No.
Whether composite table is sorted for join method 1, 2, or 4. Y = Yes;
N = No.
Whether composite table is sorted for an ORDER BY clause or a
quantified predicate. Y = Yes; N = No.
Whether composite table is sorted for a GROUP BY clause. Y = Yes;
N = No.
An indication of the mode of lock to be acquired on the new table or its
table space or table space partitions. If the isolation can be
determined at bind time, the values are:
IS = Intent share lock
IX = Intent exclusive lock
S = Share lock
U = Update lock
X = Exclusive lock
SIX = Share with intent exclusive lock
N = UR isolation; no lock
If the isolation cannot be determined at bind time, the lock mode
determined by the isolation at runtime is shown by the following
values.
NS = For UR isolation, no lock; for CS, RS, or RR, an S lock.
NIS = For UR isolation, no lock; for CS, RS, or RR, an IS lock.
NSS = For UR isolation, no lock; for CS or RS, an IS lock; for RR, an
S lock.
SS = For UR, CS, or RS isolation, an IS lock; for RR, an S lock.
The data in this column is right-justified. For example, IX appears as a
blank followed by I followed by X. If the column contains a blank, no
lock is acquired.
If the access method in the ACCESSTYPE column is DX, DI, or DU,
no latches are acquired on the XML index page, and no lock is
acquired on the new base table data page or row, nor on the XML
table and the corresponding table spaces. The value of
TSLOCKMODE is blank in this case.
Deprecated, use EXPLAIN_TIME instead.
Can insert any character string of 254 or fewer characters.
Whether data pages are to be read in advance by prefetch:
D = Optimizer expects dynamic prefetch
S = Pure sequential prefetch
L = Prefetch through a page list
U = List prefetch with an unsorted RID list
Blank = Unknown at bind time or no prefetch
When a SQL aggregate function is evaluated:
DB2 10 for z/OS

YL&A DB2 10 for z/OS Reference Guide

MIXOPSEQ

VERSION

COLLID

ACCESS_DEGREE

ACCESS_PGROUP_ID

JOIN_DEGREE

JOIN_PGROUP_ID

SORTC_PGROUP_ID

SORTN_PGROUP_ID
DB2 10 for z/OS

R = While the data is being read from the table or index


S = While performing a sort to satisfy a GROUP BY clause
Blank = After data retrieval after any sorts
The sequence number of a step in a multiple index operation:
1, 2, . . . n = For the steps of the multiple index procedure
(ACCESSTYPE is MX, MI, MU, DX, DI, or DU), the sequence number
of the OR predicate in the SQL statement (ACCESSTYPE is NR)
0 = For any other rows
The version identifier for the package. Applies only to an embedded
EXPLAIN statement executed from a package or to a statement that is
explained when binding a package. Blank if not applicable.
When the SQL statement is embedded in a non-inline SQL function or
native SQL procedure, this column is not used and is blank.
The collection ID:
DSNDYNAMICSQLCACHE: The row originates from the dynamic
statement cache.
DSNEXPLAINMODEYES: The row originates from an application that
specifies YES for the value of the CURRENT EXPLAIN MODE special
register.
DSNEXPLAINMODEEXPLAIN: The row originates from an application
that specifies EXPLAIN for the value of the CURRENT EXPLAIN
MODE special register.
When the SQL statement is embedded in a non-inline SQL function of
native SQL procedure, this column is not used and is blank.
Number of parallel tasks or operations activated by a query. This value
is determined at bind time; the actual number of parallel operations
used at execution time could differ. Contains 0 if there is a host
variable. This column contains the null value if the plan or package
was bound using a plan table with fewer than 43 columns. Otherwise,
it can contain null if the method that it refers to does not apply.
The identifier of the parallel group for accessing the new table. A
parallel group is a set of consecutive operations, executed in parallel,
that have the same number of parallel tasks. This value is determined
at bind time; it could change at execution time. This column contains
the null value if the plan or package was bound using a plan table with
fewer than 43 columns. Otherwise, it can contain null if the method
that it refers to does not apply.
The number of parallel operations or tasks used in joining the
composite table with the new table. This value is determined at bind
time and can be 0 if there is a host variable. The actual number of
parallel operations or tasks used at execution time could be different.
This column contains the null value if the plan or package was bound
using a plan table with fewer than 43 columns. Otherwise, it can
contain null if the method that it refers to does not apply.
The identifier of the parallel group for joining the composite table with
the new table. This value is determined at bind time; it could change at
execution time. This column contains the null value if the plan or
package was bound using a plan table with fewer than 43 columns.
Otherwise, it can contain null if method that it refers to does not apply.
The parallel group identifier for the parallel sort of the composite table.
This column contains the null value if the plan or package was bound
using a plan table with fewer than 43 columns. Otherwise, it can
contain null if the method that it refers to does not apply.
The parallel group identifier for the parallel sort of the new table. This
173

YL&A DB2 10 for z/OS Reference Guide

PARALLELISM_MODE

MERGE_JOIN_COLS

CORRELATION_
NAME

PAGE_RANGE
JOIN_TYPE

GROUP_MEMBER
IBM_SERVICE_DATA
WHEN_OPTIMIZE

QBLOCK_TYPE

174

column contains the null value if the plan or package was bound using
a plan table with fewer than 43 columns. Otherwise, it can contain null
if the method that it refers to does not apply.
The kind of parallelism, if any, that is used at bind time:
I = Query I/O parallelism
C = Query CP parallelism
X = Sysplex query parallelism
This column contains the null value if the plan or package was bound
using a plan table with fewer than 43 columns. Otherwise, it can
contain null if the method that it refers to does not apply, or if the plan
or package was bound prior to version 10.
The number of columns that are joined during a merge scan join
(Method = 2). Contains the null value if the plan or package was
bound using a plan table with fewer than 43 columns. Otherwise, it
can contain null if the method that it refers to does not apply.
The correlation name of a table or view that is specified in the
statement. If there is no correlation name, the column is blank. This
column contains the null value if the plan or package was bound using
a plan table with fewer than 43 columns. Otherwise, it can contain null
if the method that it refers to does not apply.
Whether the table qualifies for page range screening, so that plans
scan only the partitions that are needed. Y = Yes; blank = No.
The type of an outer join:
F = Full outer join
L = Left outer join
P = Pair-wise join
S = Star join
Blank = Inner join or no join
RIGHT OUTER JOIN converts to a LEFT OUTER JOIN when you use
it, so that JOIN_TYPE contains L.
The member name of the DB2 that executed EXPLAIN. The column is
blank if the DB2 subsystem was not in a data sharing environment
when EXPLAIN was executed.
IBM use only.
When the access path was determined:
blank = At bind time, using a default filter factor for any host variables,
parameter markers, or special registers.
B = At bind time, using a default filter factor for any host variables,
parameter markers, or special registers; however, the statement is
reoptimized at runtime using input variable values for input host
variables, parameter markers, or special registers. The bind option
REOPT(ALWYAS), REOPT(ONCE), or REOPT(AUTO), must be
specified for reoptimization to occur.
R = At runtime, using input variables for any host variables, parameter
markers, or special registers. The bind option REOPT(ALWAYS),
REOPT(ONCE), or REOPT(AUTO) must be specified for this to occur.
For each query block, the type of SQL operation performed. For the
outermost query, the column identifies the statement type. Possible
values:
SELECT = SELECT
INSERT = INSERT
UPDATE = UPDATE
MERGE = MERGE
DELETE = DELETE
DB2 10 for z/OS

YL&A DB2 10 for z/OS Reference Guide

OPTHINT
HINT_USED

PRIMARY_
ACCESSTYPE

PARENT_QBLOCK
TABLE_TYPE

TABLE_ENCODE
DB2 10 for z/OS

SELUPD = SELECT with FOR UPDATE OF


DELCUR = DELETE WHERE CURRENT OF CURSOR
UPDCUR = UPDATE WHERE CURRENT OF CURSOR
CORSUB = Correlated subquery
TRUNCA = TRUNCATE
NCOSUB = Noncorrelated subquery
TABLEX = Table expression
TRIGGR = WHEN clause on CREATE TRIGGER
UNION = UNION
UNIONA = UNION ALL
INTERS = INTERSECT
INTERA = INTERSECT ALL
EXCEPT = EXCEPT
EXCEPTA = EXCEPT ALL
A string that you use to identify this row as an optimization hint for
DB2. DB2 uses this row as input when choosing an access path.
If DB2 used one of your optimization hints, it puts the identifier for that
hint (the value in OPTHINT) in this column.
When a hint that is stored in the SYSIBM.SYSQUERYPLAN catalog
table is used, the value of this column is SYSQUERYPLAN:query-id,
where query-id is the value of the QUERYID column for the hint in the
SYSQUERYPLAN catalog table.
Indicates whether direct row access will be attempted first:
D = DB2 will try to use direct row access. If it cannot use direct row
access at runtime, it uses the access path described in the
ACCESSTYPE column of PLAN_TABLE.
T = The base table or result file is materialized into a work file, and the
work file is accessed via sparse index access. If a base table is
involved, ACCESSTYPE indicates how the base table is accessed.
Blank = DB2 will not try to use direct row access. The value of the
ACCESSTYPE column provides information on the method of
accessing the table.
Number that indicates the QBLOCKNO of the parent query.
The type of new table:
B = Buffers for SELECT from INSERT, SELECT from UPDATE,
SELECT from MERGE, or SELECT from DELETE statement.
C = Common table expression
F = Table function
I = The new table is generated from an IN-LIST predicate. If the INLIST predicate is selected as the matching predicate, it will be
accessed as an in-memory table.
M = Materialized query table
Q = Temporary intermediate result table (not materialized). For the
name of the view or nested table expression, a value of Q indicates
that the materialization was virtual and not actual. Materialization can
be virtual when the view or nested table expression definition contains
a UNION ALL that is not distributed.
R = Recursive common table expression
S = Subquery (correlated or non-correlated)
T = Table
W = Work file
The value of the column is null if the query uses GROUP BY, ORDER
BY, or DISTINCT, which requires an implicit sort.
The encoding scheme of the table. If the table has a single CCSID set,
175

YL&A DB2 10 for z/OS Reference Guide

TABLE_SCCSID
TABLE_MCCSID
TABLE_DCCSID
ROUTINE_ID
CTREF
STMTTOKEN
PARENT_PLANNO

BIND_EXPLAIN_ONLY
SECTNOI

EXPLAIN_TIME

MERGC
MERGN

possible values are:


A = ASCII
E = EBCDIC
U = Unicode
M = The table contains multiple CCSID sets.
SBCS CCSID value of the table. If TABLE_ENCODE is M, value is 0.
Mixed CCSID value of the table. If TABLE_ENCODE is M, the value
is0. IF MIXED=NO in the application defaults module, the value is -2.
DBCS CCSID value of the table. If TABLE_ENCODE is M, the value is
0. IF MIXED=NO in the application defaults module, the value is -2.
IBM use only.
If the referenced table is a common table expression, the value is the
top-level query block number.
A user-specified statement token.
Corresponds to the plan number in the parent query block where a
correlated subquery is involved. Or, for non-correlated subqueries,
corresponds to the plan number in the parent query block that
represents the work file for the subquery.
Identifies whether the row was inserted by the BIND command with
the EXPLAIN(ONLY) option.
The section number of the statement. The value is taken from the
same column in SYSPACKSTMT or SYSSTMT tables and can be
used to join tables to reconstruct the access path for the statement.
This column is applicable only for static statements. The default value
of -1 indicates EXPLAIN information that was captured in DB2 10 for
z/OS or earlier versions of DB2.
The time when the EXPLAIN information was captured:
All cached statements: When the statement entered the cache, in the
form of a full-precision timestamp value.
Non-cached static statements: When the statement was bound, in the
form of a full-precision timestamp value.
Non-cached dynamic statements: When EXPLAIN was executed, in
the form of a value equivalent to a CHAR(16) representation of the
time appended by 4 zeroes.
Indicates whether the composite table is consolidated before the join.
Y = Yes
N = NO
Indicates whether the new table is consolidated before the join.
Y = Yes
N = NO

DSN_COLDIST_TABLE

The column distribution table contains non-uniform column group statistics that are
obtained dynamically by the DB2 optimizer.
Column name

Description

QUERYNO

A number intended to identify the statement being explained. For a row


produced by an EXPLAIN statement, specify the number in the
QUERYNO clause. For a row produced by non-EXPLAIN statements,
specify the number using the QUERYNO clause, which is an optional part
of the SELECT, INSERT, UPDATE, MERGE, and DELETE statement

176

DB2 10 for z/OS

YL&A DB2 10 for z/OS Reference Guide


syntax. Otherwise, DB2 assigns a number based on the line number of
the SQL statement in the source program.
FETCH statements do not each have an individual QUERYNO assigned
to them. Instead, DB2 uses the QUERYNO of the DECLARE CURSOR
statement for all corresponding FETCH statements for that cursor.
When the values of QUERYNO are based on the statement number in the
source program, values greater than 32,767 are reported as 0. Hence, in
a very long program, the value is not guaranteed to be unique. If
QUERYNO is not unique, use the value of TIMESTAMP, which is always
unique. When the SQL statement is embedded in a non-inline SQL
function or native SQL procedure, if the QUERYNO clause is specified,
then its value is used by DB2. Otherwise DB2 assigns a number based on
the line number of the SQL statement in the non-line SQL function, or
native SQL procedure.
The application plan name. When the SQL statement is embedded in a
non-inline SQL function or native SQL procedure, this column is not used
and is blank.
The program name (binding an application) or the package name (binding
a package). Applies only to embedded EXPLAIN statements and to
statements explained as the result of binding a plan or package. A blank
indicates that the column is not applicable.
When the SQL statement is embedded in a non-inline SQL function or
native SQL procedure, this column is not used and is blank.

APPLNAME
PROGNAME

COLLID

EXPLAIN_TIME

The collection ID:


DSNDYNAMICSQLCACHE: The row originates from the dynamic
statement cache.
DSNEXPLAINMODEYES: The row originates from an application that
specifies YES for the value of the CURRENT EXPLAIN MODE special
register.
DSNEXPLAINMODEEXPLAIN: The row originates from an application
that specifies EXPLAIN for the value of the CURRENT EXPLAIN MODE
special register.
When the SQL statement is embedded in a non-inline SQL function of
native SQL procedure, this column is not used and is blank.
The member name of the DB2 subsystem that executed EXPLAIN. The
column is blank if the DB2 subsystem was not in a data sharing
environment when EXPLAIN was executed.
The EXPLAIN timestamp.

SCHEMA

The schema of the table that contains the column.

TBNAME

The name of the table that contains the column.

NAME

Name of the column. If the value of NUMCOLUMNS is greater than 1, this


name identifies the first column name of the set of columns associated
with the statistics.
Contains the data of a frequently occurring value in the column. Statistics
are not collected for an index on a ROWID column. If the value has a noncharacter data type, the data might not be printable.
The type of statistics:
C = Cardinality
F = Frequent value
H = Histogram

GROUP_MEMBER

COLVALUE
TYPE

DB2 10 for z/OS

177

YL&A DB2 10 for z/OS Reference Guide


CARDF
COLGROUPCOLNO

NUMCOLUMNS
FREQUENCYF
QUANTILENO
LOWVALUE
HIGHVALUE

For TYPE=C, the number of distinct values for the column group. For
TYPE=H, the number of distinct values for the column group in a quantile
indicated by the value of the QUANTILENO column.
The identity of the set of columns associated with the statistics. If the
statistics are only associated with a single column, the field contains a
zero length. Otherwise, the field is an array of SMALLINT column number
with a dimension equal to the value in the NUMCOLUMNS column. This is
an updateable column.
Identifies the number of columns associated with the statistics.
The percentage of rows in the table with the value that is specified in the
COLVALUE column when the number is multiplied by 100. For example,
a value of 1 indicates 100%. A value of .153 indicates 15.3%.
The ordinary sequence number of a quantile in the whole consecutive
value range, from low to high. This column is not updateable.
For TYPE=H, this is the lower bound for the quantile indicated by the
value of the QUANTILENO column. Not used if the value of the TYPE
column is not H. This column is not updateable.
For TYPE=H, this is the higher bound for the quantile indicated by the
value of the QUANTILENO column. This column is not used if the value of
the TYPE column is not H. This column is not updateable.

DSN_DETCOST_TABLE
Contains information about detailed cost estimation of the mini-plans in a query.
Column name

Description

QUERYNO

QBLOCKNO

A number intended to identify the statement being explained. For a row


produced by an EXPLAIN statement, specify the number in the
QUERYNO clause. For a row produced by non-EXPLAIN statements,
specify the number using the QUERYNO clause, which is an optional part
of the SELECT, INSERT, UPDATE, MERGE, and DELETE statement
syntax. Otherwise, DB2 assigns a number based on the line number of
the SQL statement in the source program.
FETCH statements do not each have an individual QUERYNO assigned
to them. Instead, DB2 uses the QUERYNO of the DECLARE CURSOR
statement for all corresponding FETCH statements for that cursor.
When the values of QUERYNO are based on the statement number in the
source program, values greater than 32,767 are reported as 0. Hence, in
a very long program, the value is not guaranteed to be unique. If
QUERYNO is not unique, use the value of TIMESTAMP, which is always
unique. When the SQL statement is embedded in a non-inline SQL
function or native SQL procedure, if the QUERYNO clause is specified,
then its value is used by DB2. Otherwise DB2 assigns a number based on
the line number of the SQL statement in the non-line SQL function, or
native SQL procedure.
A number used to identify each query block within a query.

PLANNO

A number used to identify each mini-plan within a query block.

APPLNAME

The application plan name.


When the SQL statement is embedded in a non-inline SQL function or
native SQL procedure, this column is not used and is blank.

PROGNAME

The program name (binding an application) or the package name (binding

178

DB2 10 for z/OS

YL&A DB2 10 for z/OS Reference Guide

OPENIO

a package). Applies only to embedded EXPLAIN statements and to


statements explained as the result of binding a plan or package. A blank
indicates that the column is not applicable. When the SQL statement is
embedded in a non-inline SQL function or native SQL procedure, this
column is not used and is blank.
The Do-at-open I/O cost for the non-correlated subquery.

OPENCPU

The Do-at-open CPU cost for the non-correlated subquery.

OPENCOST

The Do-at-open total cost for the non-correlated subquery.

ONECOMPROWS

The number of rows qualified after applying local predicates.

IMFF

The filter factor of matching predicates only.

IMFFADJ

The filter factor of matching and screening predicates.

DMCOLS

The number of data manager columns.

DMROWS

The number of data manager rows returned (after all stage 1 predicates
are applied).

RDSROW

The number of RDS rows returned (after all stage 1 and stage 2
predicates are applied).

SNCOLS

The number of columns as sort input for a new table.

SNROWS

The number of rows as sort input for a new table.

SNRUNS

The number of runs generated for a sort of a new table.

SNMERGES

The number of merges needed during a sort.

SNCCOLS

The number of columns as sort input for a composite table.

SCROWS

The number of rows as sort input for a composite table.

SCRECSZ

The record size for a composite table.

SCPAGES

The page size for a composite table.

SCRUNS

The number of runs generated during the sort of a composite table.

SCMERGES

The number of merges needed during a sort of a composite table.

COMPCARD

The total composite cardinality.

COMPCOST

The total cost.

EXPLAIN_TIME

The EXPLAIN timestamp.

GROUP_MEMBER

The member name of the DB2 subsystem that executed EXPLAIN. The
column is blank if the DB2 subsystem was not in a data sharing
environment when EXPLAIN was executed.

UNCERTAINTY

Describes the uncertainty factor of inner table index access. It is


aggregated from uncertainty of inner table probing predicates. A larger
value indicates a higher uncertainty. 0 indicates no uncertainty or
uncertainty not considered.

UNCERTAINTY_1T

Describes the uncertainty factor of ONECOMPROWS column of the table.

DB2 10 for z/OS

179

YL&A DB2 10 for z/OS Reference Guide


It is aggregated from all local predicates on the table. A larger value
indicates a higher uncertainty. 0 indicates no uncertainty or uncertainty
not considered.
SECTNOI

The section number of the statement. The value is taken from the same
column in SYSPACKSTMT or SYSSTMT tables and can be used to join
tables to reconstruct the access path for the statement. This column is
applicable only for static statements. The default value of -1 indicates
EXPLAIN information that was captured in DB2 10 for z/OS or earlier
versions of DB2.

VERSION

The version identifier for the package. Applies only to an embedded


EXPLAIN statement executed from a package or to a statement that is
explained when binding a package. A blank indicates that the column is
not applicable. When the SQL statement is embedded in a non-inline SQL
function or native SQL procedure, this column is not used and is blank.

DSN_FILTER_TABLE
Contains information about how predicates are used during query processing.
Column name

Description

QUERYNO

QBLOCKNO

A number intended to identify the statement being explained. For a row


produced by an EXPLAIN statement, specify the number in the QUERYNO
clause. For a row produced by non-EXPLAIN statements, specify the
number using the QUERYNO clause, which is an optional part of the
SELECT, INSERT, UPDATE, MERGE, and DELETE statement syntax.
Otherwise, DB2 assigns a number based on the line number of the SQL
statement in the source program.
FETCH statements do not each have an individual QUERYNO assigned to
them. Instead, DB2 uses the QUERYNO of the DECLARE CURSOR
statement for all corresponding FETCH statements for that cursor.
When the values of QUERYNO are based on the statement number in the
source program, values greater than 32,767 are reported as 0. Hence, in a
very long program, the value is not guaranteed to be unique. If QUERYNO
is not unique, use the value of TIMESTAMP, which is always unique. When
the SQL statement is embedded in a non-inline SQL function or native SQL
procedure, if the QUERYNO clause is specified, then its value is used by
DB2. Otherwise DB2 assigns a number based on the line number of the
SQL statement in the non-line SQL function, or native SQL procedure.
A number used to identify each query block within a query.

PLANNO

A number used to identify each mini-plan within a query block.

APPLNAME

The application plan name.


When the SQL statement is embedded in a non-inline SQL function or
native SQL procedure, this column is not used and is blank.

PROGNAME

The program name (binding an application) or the package name (binding


a package). Applies only to embedded EXPLAIN statements and to
statements explained as the result of binding a plan or package. A blank
indicates that the column is not applicable.
When the SQL statement is embedded in a non-inline SQL function or
native SQL procedure, this column is not used and is blank.

180

DB2 10 for z/OS

YL&A DB2 10 for z/OS Reference Guide


COLLID

The collection ID:


DSNDYNAMICSQLCACHE: The row originates from the dynamic
statement cache.
DSNEXPLAINMODEYES: The row originates from an application that
specifies YES for the value of the CURRENT EXPLAIN MODE special
register.
DSNEXPLAINMODEEXPLAIN: The row originates from an application that
specifies EXPLAIN for the value of the CURRENT EXPLAIN MODE special
register.
When the SQL statement is embedded in a non-inline SQL function of
native SQL procedure, this column is not used and is blank.

ORDERNO

The sequence number of evaluation. Indicates the order in which the


predicate is applied within each stage.

PREDNO

A number used to identify a predicate within a query.

STAGE

Indicates at which stage the predicate is evaluated. The possible values


are:

Matching

Screening

Stage 1

Stage 2
The EXPLAIN timestamp.

EXPLAIN_TIME
GROUP_MEMBER

The member name of the DB2 subsystem that executed EXPLAIN. The
column is blank if the DB2 subsystem was not in a data sharing
environment when EXPLAIN was executed.

SECTNOI

The section number of the statement. The value is taken from the same
column in SYSPACKSTMT or SYSSTMT tables and can be used to join
tables to reconstruct the access path for the statement. This column is
applicable only for static statements. The default value of -1 indicates
EXPLAIN information that was captured in DB2 10 for z/OS or earlier
versions of DB2.

COLLID

The collection ID:


DSNDYNAMICSQLCACHE: The row originates from the dynamic
statement cache.
DSNEXPLAINMODEYES: The row originates from an application that
specifies YES for the value of the CURRENT EXPLAIN MODE special
register.
DSNEXPLAINMODEEXPLAIN: The row originates from an application that
specifies EXPLAIN for the value of the CURRENT EXPLAIN MODE special
register.
When the SQL statement is embedded in a non-inline SQL function of
native SQL procedure, this column is not used and is blank.

VERSION

The version identifier for the package. Applies only to an embedded


EXPLAIN statement executed from a package or to a statement that is
explained when binding a package. A blank indicates that the column is not
applicable. When the SQL statement is embedded in a non-inline SQL
function or native SQL procedure, this column is not used and is blank.

PUSHDOWN

Whether the predicate is pushed down into the Index Manager or Data

DB2 10 for z/OS

181

YL&A DB2 10 for z/OS Reference Guide


Manager subcomponents for evaluation:
I = The Index Manager subcomponent evaluates the predicate.
D = The Data Manager subcomponent evaluates the predicate.
Blank = The predicate is not pushed down for evaluation.

DSN_FUNCTION_TABLE
Contains information about the cost of user-defined functions used in a SQL statement.
Column name
QUERYNO

APPLNAME

PROGNAME

COLLID

GROUP_MEMBER
EXPLAIN_TIME

182

Description
A number intended to identify the statement being explained. For a row
produced by an EXPLAIN statement, specify the number in the
QUERYNO clause. For a row produced by non-EXPLAIN statements,
specify the number using the QUERYNO clause, which is an optional part
of the SELECT, INSERT, UPDATE, MERGE, and DELETE statement
syntax. Otherwise, DB2 assigns a number based on the line number of
the SQL statement in the source program.
FETCH statements do not each have an individual QUERYNO assigned
to them. Instead, DB2 uses the QUERYNO of the DECLARE CURSOR
statement for all corresponding FETCH statements for that cursor.
When the values of QUERYNO are based on the statement number in the
source program, values greater than 32,767 are reported as 0. Hence, in
a very long program, the value is not guaranteed to be unique. If
QUERYNO is not unique, use the value of TIMESTAMP, which is always
unique. When the SQL statement is embedded in a non-inline SQL
function or native SQL procedure, if the QUERYNO clause is specified,
then its value is used by DB2. Otherwise DB2 assigns a number based on
the line number of the SQL statement in the non-line SQL function, or
native SQL procedure.
The name of the application plan for the row. Applies only to embedded
EXPLAIN statements executed from a plan or to statements explained
when binding a plan. Blank if not applicable.
When the SQL statement is embedded in a non-inline SQL function or
native SQL procedure, then this column is not used.
The name of the program or package containing the statement being
explained. For statements explained dynamically, such as with QMF or
SPUFI, the associated plan/package is listed. Blank if not applicable.
When the SQL statement is embedded in a non-inline SQL function or
native SQL procedure, this column is not used and is blank.
The collection ID:
DSNDYNAMICSQLCACHE: The row originates from the dynamic
statement cache.
DSNEXPLAINMODEYES: The row originates from an application that
specifies YES for the value of the CURRENT EXPLAIN MODE special
register.
DSNEXPLAINMODEEXPLAIN: The row originates from an application
that specifies EXPLAIN for the value of the CURRENT EXPLAIN MODE
special register.
When the SQL statement is embedded in a non-inline SQL function of
native SQL procedure, this column is not used and is blank.
The member name of the DB2 that executed EXPLAIN, or blank.
The time at which the statement is processed. This time is the same as
the BIND_TIME column in PLAN_TABLE.
DB2 10 for z/OS

YL&A DB2 10 for z/OS Reference Guide


SCHEMA_NAME
FUNCTION_NAME
SPEC_FUNC_ID
FUNCTION_TYPE
VIEW_CREATOR
VIEW_NAME
PATH
FUNCTION_TEXT

FUNC_VERSION
SECURE
SECTNOI

VERSION

The schema name of the function invoked in the explained statement.


The name of the function invoked in the explained statement.
The specific name of the function invoked in the explained statement.
The type of function invoked in the explained statement:
SU = Scalar function
TU = Table function
If the function specified in the FUNCTION_NAME column is referenced in
a view definition, the creator of the view. Otherwise, blank.
If the function specified in the FUNCTION_NAME column is referenced in
a view definition, the name of the view. Otherwise, blank.
The value of the SQL path that was used to resolve the schema name of
the function.
The text of the function reference (the function name and parameters). If
the function reference is more than 1,500 bytes, this column contains the
first 1,500 bytes. For functions specified in fixed notation,
FUNCTION_TEXT contains only the function name. For example, for a
function named /, which overloads the SQL divide operator, if the function
reference is A/B, FUNCTION_TEXT contains only /, not A/B.
For a version of a non-inline SQL scalar function, this column contains the
version identifier. For all other cases, this column contains a zero length
string. A version of a non-inline SQL scalar function
Indicates whether the user-defined function is secure.
The section number of the statement. The value is taken from the same
column in SYSPACKSTMT or SYSSTMT tables and can be used to join
tables to reconstruct the access path for the statement. This column is
applicable only for static statements. The default value of -1 indicates
EXPLAIN information that was captured in DB2 10 for z/OS or earlier
versions of DB2.
The version identifier for the package. Applies only to an embedded
EXPLAIN statement executed from a package or to a statement that is
explained when binding a package. A blank indicates that the column is
not applicable. When the SQL statement is embedded in a non-inline SQL
function or native SQL procedure, this column is not used and is blank.

DSN_KEYTGTDIST_TABLE
Contains non-uniform index expression statistics obtained dynamically by the DB2 optimizer.
Column name

Description

QUERYNO

A number intended to identify the statement being explained. For a row


produced by an EXPLAIN statement, specify the number in the
QUERYNO clause. For a row produced by non-EXPLAIN statements,
specify the number using the QUERYNO clause, which is an optional part
of the SELECT, INSERT, UPDATE, MERGE, and DELETE statement
syntax. Otherwise, DB2 assigns a number based on the line number of
the SQL statement in the source program.
FETCH statements do not each have an individual QUERYNO assigned
to them. Instead, DB2 uses the QUERYNO of the DECLARE CURSOR
statement for all corresponding FETCH statements for that cursor.
When the values of QUERYNO are based on the statement number in the
source program, values greater than 32,767 are reported as 0. Hence, in
a very long program, the value is not guaranteed to be unique. If
QUERYNO is not unique, use the value of TIMESTAMP, which is always

DB2 10 for z/OS

183

YL&A DB2 10 for z/OS Reference Guide


unique. When the SQL statement is embedded in a non-inline SQL
function or native SQL procedure, if the QUERYNO clause is specified,
then its value is used by DB2. Otherwise DB2 assigns a number based on
the line number of the SQL statement in the non-line SQL function, or
native SQL procedure.
APPLNAME

The application plan name.


When the SQL statement is embedded in a non-inline SQL function or
native SQL procedure, this column is not used and is blank.

PROGNAME

The program name (binding an application) or the package name (binding


a package). Applies only to embedded EXPLAIN statements and to
statements explained as the result of binding a plan or package. A blank
indicates that the column is not applicable.
When the SQL statement is embedded in a non-inline SQL function or
native SQL procedure, this column is not used and is blank.

COLLID

EXPLAIN_TIME

The collection ID:


DSNDYNAMICSQLCACHE: The row originates from the dynamic
statement cache.
DSNEXPLAINMODEYES: The row originates from an application that
specifies YES for the value of the CURRENT EXPLAIN MODE special
register.
DSNEXPLAINMODEEXPLAIN: The row originates from an application
that specifies EXPLAIN for the value of the CURRENT EXPLAIN MODE
special register.
When the SQL statement is embedded in a non-inline SQL function of
native SQL procedure, this column is not used and is blank.
The member name of the DB2 subsystem that executed EXPLAIN. The
column is blank if the DB2 subsystem was not in a data sharing
environment when EXPLAIN was executed.
The EXPLAIN timestamp.

IXSCHEMA

The qualifier of the index.

IXNAME

The name of the index.

KEYSEQ

The numeric position of the key-target in the index.

KEYVALUE

Contains the data of a frequently occurring value. Statistics are not


collected for an index on a ROWID column. If the value has a noncharacter data type, the data might not be printable.
The type of statistics:
C = Cardinality
F = Frequent value
H = Histogram
For TYPE=C, the number of distinct values for the column group. For
TYPE=H, the number of distinct values for the column group in a quantile
indicated by the value of the QUANTILENO column.
Contains a value that identifies the set of keys that are associated with the
statistics. If the statistics are associated with more than a single key, if
contains an array of SMALLINT key numbers with a dimension that is
equal to the value in NUMKEYS. If the statistics are only associated with
a single key, it contains 0.
The number of keys that are associated with the statistics.

GROUP_MEMBER

TYPE

CARDF
KEYGROUPKEYNO

NUMKEYS
184

DB2 10 for z/OS

YL&A DB2 10 for z/OS Reference Guide


FREQUENCYF

The percentage of rows in the table with the value that is specified in the
KEYVALUE column when the number is multiplied by 100. For example, a
value of 1 indicates 100%. A value of .153 indicates 15.3%.
The ordinary sequence number of a quantile in the whole consecutive
value range, from low to high. This column is not updateable.
For TYPE=H, this is the lower bound for the quantile indicated by the
value of the QUANTILENO column. Not used if the value of the TYPE
column is not H. This column is not updateable.
For TYPE=H, this is the higher bound for the quantile indicated by the
value of the QUANTILENO column. This column is not used if the value of
the TYPE column is not H. This column is not updateable.

QUANTILENO
LOWVALUE
HIGHVALUE

DSN_PGRANGE_TABLE

Contains information about qualified partitions for all page range scans in a query.
Column name

Description

QUERYNO

QBLOCKNO

A number intended to identify the statement being explained. For a row


produced by an EXPLAIN statement, specify the number in the QUERYNO
clause. For a row produced by non-EXPLAIN statements, specify the
number using the QUERYNO clause, which is an optional part of the
SELECT, INSERT, UPDATE, MERGE, and DELETE statement syntax.
Otherwise, DB2 assigns a number based on the line number of the SQL
statement in the source program.
FETCH statements do not each have an individual QUERYNO assigned to
them. Instead, DB2 uses the QUERYNO of the DECLARE CURSOR
statement for all corresponding FETCH statements for that cursor.
When the values of QUERYNO are based on the statement number in the
source program, values greater than 32,767 are reported as 0. Hence, in a
very long program, the value is not guaranteed to be unique. If QUERYNO
is not unique, use the value of TIMESTAMP, which is always unique. When
the SQL statement is embedded in a non-inline SQL function or native SQL
procedure, if the QUERYNO clause is specified, then its value is used by
DB2. Otherwise DB2 assigns a number based on the line number of the
SQL statement in the non-line SQL function, or native SQL procedure.
A number used to identify each query block within a query.

TABNO

The table number.

RANGE

The sequence number of the current page range.

FIRSTPART

The starting partition in the current page range.

LASTPART

The ending partition in the current page range.

NUMPARTS

The number of partitions in the current page range.

EXPLAIN_TIME

The EXPLAIN timestamp.

GROUP_MEMBER

The member name of the DB2 subsystem that executed EXPLAIN. The
column is blank if the DB2 subsystem was not in a data sharing
environment when EXPLAIN was executed.

SECTNOI

The section number of the statement. The value is taken from the same
column in SYSPACKSTMT or SYSSTMT tables and can be used to join
tables to reconstruct the access path for the statement. This column is

DB2 10 for z/OS

185

YL&A DB2 10 for z/OS Reference Guide


applicable only for static statements. The default value of -1 indicates
EXPLAIN information that was captured in DB2 10 for z/OS or earlier
APPLNAME

The application plan name.


When the SQL statement is embedded in a non-inline SQL function or
native SQL procedure, this column is not used and is blank.

PROGNAME

The program name (binding an application) or the package name (binding


a package). Applies only to embedded EXPLAIN statements and to
statements explained as the result of binding a plan or package. A blank
indicates that the column is not applicable.
When the SQL statement is embedded in a non-inline SQL function or
native SQL procedure, this column is not used and is blank.
The collection ID:
DSNDYNAMICSQLCACHE: The row originates from the dynamic
statement cache.
DSNEXPLAINMODEYES: The row originates from an application that
specifies YES for the value of the CURRENT EXPLAIN MODE special
register.
DSNEXPLAINMODEEXPLAIN: The row originates from an application that
specifies EXPLAIN for the value of the CURRENT EXPLAIN MODE special
register.
When the SQL statement is embedded in a non-inline SQL function of
native SQL procedure, this column is not used and is blank.
The version identifier for the package. Applies only to an embedded
EXPLAIN statement executed from a package or to a statement that is
explained when binding a package. A blank indicates that the column is not
applicable. When the SQL statement is embedded in a non-inline SQL
function or native SQL procedure, this column is not used and is blank.

COLLID

VERSION

DSN_PGROUP_TABLE
Contains information about the parallel groups in a query.
Column name
QUERYNO

QBLOCKNO
PLANNAME
186

Description
A number intended to identify the statement being explained. For a row
produced by an EXPLAIN statement, specify the number in the QUERYNO
clause. For a row produced by non-EXPLAIN statements, specify the number
using the QUERYNO clause, which is an optional part of the SELECT,
INSERT, UPDATE, MERGE, and DELETE statement syntax. Otherwise, DB2
assigns a number based on the line number of the SQL statement in the
source program.
FETCH statements do not each have an individual QUERYNO assigned to
them. Instead, DB2 uses the QUERYNO of the DECLARE CURSOR statement
for all corresponding FETCH statements for that cursor.
When the values of QUERYNO are based on the statement number in the
source program, values greater than 32,767 are reported as 0. Hence, in a
very long program, the value is not guaranteed to be unique. If QUERYNO is
not unique, use the value of TIMESTAMP, which is always unique. When the
SQL statement is embedded in a non-inline SQL function or native SQL
procedure, if the QUERYNO clause is specified, then its value is used by DB2.
Otherwise DB2 assigns a number based on the line number of the SQL
statement in the non-line SQL function, or native SQL procedure.
A number used to identify each query block within a query.
The application plan name.
DB2 10 for z/OS

YL&A DB2 10 for z/OS Reference Guide


COLLID

The collection ID:


DSNDYNAMICSQLCACHE: Originates from the dynamic statement cache.
DSNEXPLAINMODEYES: The row originates from an application that specifies
YES for the value of the CURRENT EXPLAIN MODE special register.
DSNEXPLAINMODEEXPLAIN: The row originates from an application that
specifies EXPLAIN for the value of the CURRENT EXPLAIN MODE special
register.
When the SQL statement is embedded in a non-inline SQL function of native
SQL procedure, this column is not used and is blank.
The program name (binding an application) or the package name (binding a
package). Applies only to embedded EXPLAIN statements and to statements
explained as the result of binding a plan or package. A blank indicates that the
column is not applicable.
When the SQL statement is embedded in a non-inline SQL function or native
SQL procedure, this column is not used and is blank.
The explain timestamp.
The version identifier for the package. Applies only to an embedded EXPLAIN
statement executed from a package or to a statement that is explained when
binding a package. A blank indicates that the column is not applicable. When
the SQL statement is embedded in a non-inline SQL function or native SQL
procedure, this column is not used and is blank.
The parallel group identifier within the current query block.
The plan number of the first contributing mini-plan associated within this
parallel group.
The plan number of the last mini-plan associated with this parallel group.
The estimated CPU cost of this parallel group in milliseconds.
The estimated total I/O cost of this parallel group in milliseconds.
The estimated elapsed time for each parallel task for this parallel group.
The degree of parallelism for this parallel group determined at bind time. The
maximum parallelism degree if the table space is large is 255; otherwise, 64.
The parallel mode:
I = I/O parallelism
C = CPU parallelism
X = Multiple CPU Sysplex parallelism (highest level)
N = No parallelism
The reason for downgrading parallelism mode.
The number of CPUs currently online when preparing the query.
The total number of CPUs in Sysplex. LOCALCPU and TOTALCPU are
different only for the DB2 coordinator in a Sysplex.
The table number of the table that on which partitioning is performed.
Value is Y if the table space is large in this group.
The partitioning type:
L = Logical partitioning
P = Physical partitioning
Indicates what operations this parallel group contains: table access, join, or
sort (A, AJ, or AJS).
The ordering requirement of this parallel group:
N = No order. Results need no ordering.
T = Natural order. Ordering is required but results already ordered if accessed
via index.
K = Key order. Ordering achieved by sort. Results ordered by sort key. This
value applies only to parallel sort.
The input/output format style of this parallel group. Blank for I/O parallelism.

PROGNAME

EXPLAIN_TIME
VERSION

GROUPID
FIRSTPLAN
LASTPLAN
CPUCOST
IOCOST
BESTTIME
DEGREE
MODE

REASON
LOCALCPU
TOTALCPU
FIRSTBASE
LARGETS
PARTKIND
GROUPTYPE
ORDER

STYLE
DB2 10 for z/OS

187

YL&A DB2 10 for z/OS Reference Guide

RANGEKIND

NKEYCOLS
LOWBOUND
HIGHBOUND
LOWKEY
HIGHKEY
FIRSTPAGE
LASTPAGE
APPLNAME
SECTNOI

For other modes:


RIRO = Records IN, Records OUT
WIRO = Work file IN, Records OUT
WIWO = Work file IN, Work file OUT
The range type:
K = Key range
L = IN-list elements partitioning
P = Page range
R = Record range partitioning
The number of interesting key columns that is, the number of columns that
will participate in the key operation for this parallel group.
The low bound of the parallel group.
The high bound of the parallel group.
The low key of range if partitioned by key range.
The high key of range if partitioned by key range.
The fist page in range if partitioned by page range.
The last page in range if partitioned by page range.
The application plan name.
When the SQL statement is embedded in a non-inline SQL function or native
SQL procedure, this column is not used and is blank.
The section number of the statement. The value is taken from the same
column in SYSPACKSTMT or SYSSTMT tables and can be used to join tables
to reconstruct the access path for the statement. This column is applicable only
for static statements. The default value of -1 indicates EXPLAIN information
that was captured in DB2 10 for z/OS or earlier versions of DB2.

DSN_PREDICAT_TABLE
Contains information about all the predicates in a query.
Column name
QUERYNO

QBLOCKNO
APPLNAME

188

Description
A number intended to identify the statement being explained. For a row
produced by an EXPLAIN statement, specify the number in the
QUERYNO clause. For a row produced by non-EXPLAIN statements,
specify the number using the QUERYNO clause, which is an optional part
of the SELECT, INSERT, UPDATE, MERGE, and DELETE statement
syntax. Otherwise, DB2 assigns a number based on the line number of
the SQL statement in the source program.
FETCH statements do not each have an individual QUERYNO assigned
to them. Instead, DB2 uses the QUERYNO of the DECLARE CURSOR
statement for all corresponding FETCH statements for that cursor.
When the values of QUERYNO are based on the statement number in the
source program, values greater than 32,767 are reported as 0. Hence, in
a very long program, the value is not guaranteed to be unique. If
QUERYNO is not unique, use the value of TIMESTAMP, which is always
unique. When the SQL statement is embedded in a non-inline SQL
function or native SQL procedure, if the QUERYNO clause is specified,
then its value is used by DB2. Otherwise DB2 assigns a number based on
the line number of the SQL statement in the non-line SQL function, or
native SQL procedure.
A number used to identify each query block within a query.
The application plan name.
When the SQL statement is embedded in a non-inline SQL function or
native SQL procedure, this column is not used and is blank.
DB2 10 for z/OS

YL&A DB2 10 for z/OS Reference Guide


PROGNAME

PREDNO
TYPE

LEFT_HAND_SIDE

LEFT_HAND_PNO

LHS_TABNO
LHS_QBNO
RIGHT_HAND_SIDE

DB2 10 for z/OS

The program name (binding an application) or the package name (binding


a package). Applies only to embedded EXPLAIN statements and to
statements explained as the result of binding a plan or package. A blank
indicates that the column is not applicable.
When the SQL statement is embedded in a non-inline SQL function or
native SQL procedure, this column is not used and is blank.
A number used to identify a predicate within a query.
A string used to indicate the type or the operation of the predicate. The
possible values are:
AND
OR
EQUAL
RANGE
BETWEEN
IN
LIKE
NOT LIKE
EXISTS
NOTEXIST
SUBQUERY
HAVING
OTHERS
If the left-hand side (LHS) of the predicate is a table column
(LHS_TABNO > 0, this column indicates the column name. Other possible
values are:
VALUE
COLEXP
NONCOLEXP
CORSUB
NONCORSUB
SUBQUERY
EXPRESSION
Blanks
If the LHS of the predicate is a table column (LHS_TABNO > 0), then this
column indicates the column name. Other possible values are:
VALUE
COLEXP
NONCOLEXP
CORSUB
NONCORSUB
SUBQUERY
EXPRESSION
blanks
If the LHS of the predicate is a table column, this column indicates a
number that uniquely identifies the corresponding table reference within a
query.
If the LHS of the predicate is a table column, this column indicates a
number that uniquely identifies the corresponding table reference within a
query.
If the right-hand side (RHS) of the predicate is a table column
(RHS_TABNO > 0), this column indicates the column name. Other
possible values are:
VALUE
COLEXP
189

YL&A DB2 10 for z/OS Reference Guide

RIGHT_HAND_PNO
RHS_TABNO
RHS_QBNO
FIULTER_FACTOR
BOOLEAN_TERM
SEARCHARG
AFTER_JOIN

ADDED_PRED

REDUNDANT_
PRED
DIRECT_ACCESS
KEYFIELD
EXPLAIN_TIME
MARKER
PARENT_PNO
NEGATION
LITERALS
CLAUSE

GROUP_MEMBER
ORIGIN

190

NONCOLEXP
CORSUB
NONCORSUB
SUBQUERY
EXPRESSION
Blanks
If the predicate is a compound predicate (AND/OR), this column indicates
the second child predicate. However, this column is not reliable when the
predicate tree consolidation happens.
If the RHS of the predicate is a table column, this column indicates a
number that uniquely identifies the corresponding table reference within a
query.
If the RHS of the predicate is a subquery, this column indicates a number
that uniquely identifies the corresponding query block within a query.
The estimated filter factor.
Whether this predicate can be used to determine the truth value of the
whole WHERE clause.
Whether this predicate can be processed by data manager (DM) stage 1.
If it cannot, the relational data service (RDS) stage 2 needs to be used to
take care of it, which is more costly.
Indicates the predicate evaluation phase:
A = After join
D = During join
Blank = Not applicable
Whether the predicate is generated by transitive closure, which means
DB2 can generate additional predicates to provide more information for
access path selection, when the set of predicates that belong to a query
logically imply other predicates.
Whether the predicate is a redundant predicate, which means evaluation
of other predicates in the query already determines the result that the
predicate provides.
Whether the predicate is direct access, which means one can navigate
directly to the row through ROWID.
Whether the predicate includes the index key column of the involved
table.
The EXPLAIN timestamp.
Whether the predicate includes host variables, parameter markers, or
special registers.
The parent predicate number. If this predicate is a root predicate within a
query block, this column is 0.
Whether the predicate is negated via NOT.
The literal value or literal values separated by colon symbols.
The clause where the predicate exists:
HAVING = HAVING clause
ON = ON clause
WHERE = WHERE clause
SELECT = The SELECT clause
The member name of the DB2 that executed EXPLAIN. The column is
blank if the DB2 subsystem was not in a data sharing environment when
EXPLAIN was executed.
Indicates the origin of the predicate.
Blank = generated by DB2
C = column mask
DB2 10 for z/OS

YL&A DB2 10 for z/OS Reference Guide


R = row permission
U = specified by the user
Describes the uncertainty factor of a predicates estimated filter factor. A
bigger value indicates a higher degree of uncertainty. Value zero indicates
no uncertainty or uncertainty not considered.
The section number of the statement. The value is taken from the same
column in SYSPACKSTMT or SYSSTMT tables and can be used to join
tables to reconstruct the access path for the statement. This column is
applicable only for static statements. The default value of -1 indicates
EXPLAIN information that was captured in DB2 10 for z/OS or earlier
versions of DB2.
The collection ID:
DSNDYNAMICSQLCACHE: The row originates from the dynamic
statement cache.
DSNEXPLAINMODEYES: The row originates from an application that
specifies YES for the value of the CURRENT EXPLAIN MODE special
register.
DSNEXPLAINMODEEXPLAIN: The row originates from an application
that specifies EXPLAIN for the value of the CURRENT EXPLAIN MODE
special register.
When the SQL statement is embedded in a non-inline SQL function of
native SQL procedure, this column is not used and is blank.
The version identifier for the package. Applies only to an embedded
EXPLAIN statement executed from a package or to a statement that is
explained when binding a package. A blank indicates that the column is
not applicable. When the SQL statement is embedded in a non-inline SQL
function or native SQL procedure, this column is not used and is blank.

UNCERTAINTY
SECTNOI

COLLID

VERSION

DSN_PTASK_TABLE
Contains information about the parallel tasks in a query.
Column name

Description

QUERYNO

QBLOCKNO

A number intended to identify the statement being explained. For a row


produced by an EXPLAIN statement, specify the number in the QUERYNO
clause. For a row produced by non-EXPLAIN statements, specify the
number using the QUERYNO clause, which is an optional part of the
SELECT, INSERT, UPDATE, MERGE, and DELETE statement syntax.
Otherwise, DB2 assigns a number based on the line number of the SQL
statement in the source program.
FETCH statements do not each have an individual QUERYNO assigned to
them. Instead, DB2 uses the QUERYNO of the DECLARE CURSOR
statement for all corresponding FETCH statements for that cursor.
When the values of QUERYNO are based on the statement number in the
source program, values greater than 32,767 are reported as 0. Hence, in a
very long program, the value is not guaranteed to be unique. If QUERYNO
is not unique, use the value of TIMESTAMP, which is always unique. When
the SQL statement is embedded in a non-inline SQL function or native SQL
procedure, if the QUERYNO clause is specified, then its value is used by
DB2. Otherwise DB2 assigns a number based on the line number of the
SQL statement in the non-line SQL function, or native SQL procedure.
A number used to identify each query block within a query.

APPLNAME

The application plan name.

DB2 10 for z/OS

191

YL&A DB2 10 for z/OS Reference Guide


When the SQL statement is embedded in a non-inline SQL function or
native SQL procedure, this column is not used and is blank.
PROGNAME

The program name (binding an application) or the package name (binding


a package). Applies only to embedded EXPLAIN statements and to
statements explained as the result of binding a plan or package. A blank
indicates that the column is not applicable.
When the SQL statement is embedded in a non-inline SQL function or
native SQL procedure, this column is not used and is blank.

LPTNO

The parallel task number.

KEYCOLID

The key columns ID (KEY range only).

DPSI

Indicates whether a data partition secondary index (DPSI) is used.

LPTLOKEY

Low key value for this key column for this parallel task (KEY range only).

LPTHIKEY

High key value for this key column for this parallel task (KEY range only).

LPTLOPAG

Low page information if partitioned by page range.

LPTLHIPAG

High page information if partitioned by page range.

LPTLOPG#

Lower bound page number for this parallel task (page range or DPSI
enabled only).

LPTHIPG#

The upper bound page number for this parallel task (page range or DPSI
enabled only).

LPTLOPT#

The lower bound partition number for this parallel task (page range or DPSI
enabled only).

KEYCOLDT

The data type for this key column (KEY range only).

KEYCOLPREC

The precision/length for this key column (KEY range only).

KEYCOLSCAL

The scale for this key column (KEY range with decimal data type only).

EXPLAIN_TIME

The EXPLAIN timestamp.

GROUP_MEMBER

The member name of the DB2 that executed EXPLAIN. The column is
blank if the DB2 subsystem was not in a data sharing environment when
EXPLAIN was executed.

SECTNOI

The section number of the statement. The value is taken from the same
column in SYSPACKSTMT or SYSSTMT tables and can be used to join
tables to reconstruct the access path for the statement. This column is
applicable only for static statements. The default value of -1 indicates
EXPLAIN information that was captured in DB2 10 for z/OS or earlier
versions of DB2.

COLLID

The collection ID:


DSNDYNAMICSQLCACHE: The row originates from the dynamic
statement cache.
DSNEXPLAINMODEYES: The row originates from an application that
specifies YES for the value of the CURRENT EXPLAIN MODE special
register.
DSNEXPLAINMODEEXPLAIN: The row originates from an application that

192

DB2 10 for z/OS

YL&A DB2 10 for z/OS Reference Guide


specifies EXPLAIN for the value of the CURRENT EXPLAIN MODE special
register.
When the SQL statement is embedded in a non-inline SQL function of
native SQL procedure, this column is not used and is blank.
VERSION

The version identifier for the package. Applies only to an embedded


EXPLAIN statement executed from a package or to a statement that is
explained when binding a package. A blank indicates that the column is not
applicable. When the SQL statement is embedded in a non-inline SQL
function or native SQL procedure, this column is not used and is blank.

DSN_QUERY_TABLE
Contains information about an SQL statement and displays the statement before and after
query transformation in XML.
Column name

Description

QUERYNO

A number intended to identify the statement being explained. For a row


produced by an EXPLAIN statement, specify the number in the QUERYNO
clause. For a row produced by non-EXPLAIN statements, specify the
number using the QUERYNO clause, which is an optional part of the
SELECT, INSERT, UPDATE, MERGE, and DELETE statement syntax.
Otherwise, DB2 assigns a number based on the line number of the SQL
statement in the source program.
FETCH statements do not each have an individual QUERYNO assigned to
them. Instead, DB2 uses the QUERYNO of the DECLARE CURSOR
statement for all corresponding FETCH statements for that cursor.
When the values of QUERYNO are based on the statement number in the
source program, values greater than 32,767 are reported as 0. Hence, in a
very long program, the value is not guaranteed to be unique. If QUERYNO
is not unique, use the value of TIMESTAMP, which is always unique. When
the SQL statement is embedded in a non-inline SQL function or native SQL
procedure, if the QUERYNO clause is specified, then its value is used by
DB2. Otherwise DB2 assigns a number based on the line number of the
SQL statement in the non-line SQL function, or native SQL procedure.

TYPE

The type of the data in the NODE_DATA column.

QUERY_STAGE

The stage during query transformation when this row is populated.

SEQNO

Sequence number for this row if NODE_DATA exceeds size of its column.

NODE_DATA

The XML data containing the SQL statement and its query block, table, and
column information.

EXPLAIN_TIME

The EXPLAIN timestamp.

QUERY_ROWID

The ROWID of the statement.

GROUP_MEMBER

The member name of the DB2 subsystem that executed EXPLAIN. The
column is blank if the DB2 subsystem was not in a data sharing
environment when EXPLAIN was executed.

HASHKEY

The hash value of the contents in NODE_DATA.

HASH_PRED

When NODE_DATA contains an SQL statement, this column indicates


whether the statement contains a parameter marker literal, a non-

DB2 10 for z/OS

193

YL&A DB2 10 for z/OS Reference Guide


parameter marker literal, or no predicates.
SECTNOI

The section number of the statement. The value is taken from the same
column in SYSPACKSTMT or SYSSTMT tables and can be used to join
tables to reconstruct the access path for the statement. This column is
applicable only for static statements. The default value of -1 indicates
EXPLAIN information that was captured in DB2 10 for z/OS or earlier

APPLNAME

The application plan name.When the SQL statement is embedded in a noninline SQL function or native SQL procedure, this column is not used and is
blank.
The program name (binding an application) or the package name (binding
a package). Applies only to embedded EXPLAIN statements and to
statements explained as the result of binding a plan or package. A blank
indicates that the column is not applicable.When the SQL statement is
embedded in a non-inline SQL function or native SQL procedure, this
column is not used and is blank.

PROGNAME

COLLID

VERSION

The collection ID:


DSNDYNAMICSQLCACHE: The row originates from the dynamic
statement cache.
DSNEXPLAINMODEYES: The row originates from an application that
specifies YES for the value of the CURRENT EXPLAIN MODE special
register.
DSNEXPLAINMODEEXPLAIN: The row originates from an application that
specifies EXPLAIN for the value of the CURRENT EXPLAIN MODE special
register.
When the SQL statement is embedded in a non-inline SQL function of
native SQL procedure, this column is not used and is blank.
The version identifier for the package. Applies only to an embedded
EXPLAIN statement executed from a package or to a statement that is
explained when binding a package. A blank indicates that the column is not
applicable. When the SQL statement is embedded in a non-inline SQL
function or native SQL procedure, this column is not used and is blank.

DSN_SORTKEY_TABLE
Contains information about sort keys for all the sorts required by a query.
Column name

Description

QUERYNO

A number intended to identify the statement being explained. For a row


produced by an EXPLAIN statement, specify the number in the QUERYNO
clause. For a row produced by non-EXPLAIN statements, specify the
number using the QUERYNO clause, which is an optional part of the
SELECT, INSERT, UPDATE, MERGE, and DELETE statement syntax.
Otherwise, DB2 assigns a number based on the line number of the SQL
statement in the source program.
FETCH statements do not each have an individual QUERYNO assigned to
them. Instead, DB2 uses the QUERYNO of the DECLARE CURSOR
statement for all corresponding FETCH statements for that cursor.
When the values of QUERYNO are based on the statement number in the
source program, values greater than 32,767 are reported as 0. Hence, in a
very long program, the value is not guaranteed to be unique. If QUERYNO
is not unique, use the value of TIMESTAMP, which is always unique. When
the SQL statement is embedded in a non-inline SQL function or native SQL
procedure, if the QUERYNO clause is specified, then its value is used by

194

DB2 10 for z/OS

YL&A DB2 10 for z/OS Reference Guide

QBLOCKNO

DB2. Otherwise DB2 assigns a number based on the line number of the
SQL statement in the non-line SQL function, or native SQL procedure.
A number used to identify each query block within a query.

PLANNO

A number used to identify each mini-plan within a query block.

APPLNAME

The application plan name.When the SQL statement is embedded in a noninline SQL function or native SQL procedure, this is blank.
The program name (binding an application) or the package name (binding
a package). Applies only to embedded EXPLAIN statements and to
statements explained as the result of binding a plan or package. A blank
indicates that the column is not applicable.When the SQL statement is
embedded in a non-inline SQL function or native SQL procedure, this
column is not used and is blank.
The collection ID:
DSNDYNAMICSQLCACHE: The row originates from the dynamic
statement cache.
DSNEXPLAINMODEYES: The row originates from an application that
specifies YES for the value of the CURRENT EXPLAIN MODE special
register.
DSNEXPLAINMODEEXPLAIN: The row originates from an application that
specifies EXPLAIN for the value of the CURRENT EXPLAIN MODE special
register.
When the SQL statement is embedded in a non-inline SQL function of
native SQL procedure, this column is not used and is blank.

PROGNAME

COLLID

SORTNO

The sequence number of the sort.

ORDERNO

The sequence of the sort key.

EXPTYPE

The type of the sort key. The possible values are:

TEXT

COL
EXP
QRY
Sort key text; can be a column name, a scalar subquery, or Record ID.

TABNO

Number that uniquely identifies corresponding table reference within query.

COLNO

A number that uniquely identifies the corresponding column within a query.


Applicable only when the sort key is a column.

DATATYPE

The data type of the sort key. The possible values are:
HEXADECIMAL
CHARACTER
PACKED FIELD
FIXED(31)
FIXED(15)
DATE
TIME
VARCHAR
PACKED FLD
FLOAT
TIMESTAMP
UNKNOWN DATA TYPE

DB2 10 for z/OS

195

YL&A DB2 10 for z/OS Reference Guide


LENGTH

The length of the sort key.

CCSID

IBM internal use only.

ORDERCLASS

IBM internal use only.

EXPLAIN_TIME

The EXPLAIN timestamp.

GROUP_MEMBER

The member name of the DB2 subsystem that executed EXPLAIN. The
column is blank if the DB2 subsystem was not in a data sharing
environment when EXPLAIN was executed.

SECTNOI

The section number of the statement. The value is taken from the same
column in SYSPACKSTMT or SYSSTMT tables and can be used to join
tables to reconstruct the access path for the statement. This column is
applicable only for static statements. The default value of -1 indicates
EXPLAIN information that was captured in DB2 10 for z/OS or earlier

VERSION

The version identifier for the package. Applies only to an embedded


EXPLAIN statement executed from a package or to a statement that is
explained when binding a package. A blank indicates that the column is not
applicable. When the SQL statement is embedded in a non-inline SQL
function or native SQL procedure, this column is not used and is blank.

DSN_SORT_TABLE
Contains information about sort operations required for a query.
Column name

Description

QUERYNO

QBLOCKNO

A number intended to identify the statement being explained. For a row


produced by an EXPLAIN statement, specify the number in the QUERYNO
clause. For a row produced by non-EXPLAIN statements, specify the
number using the QUERYNO clause, which is an optional part of the
SELECT, INSERT, UPDATE, MERGE, and DELETE statement syntax.
Otherwise, DB2 assigns a number based on the line number of the SQL
statement in the source program.
FETCH statements do not each have an individual QUERYNO assigned to
them. Instead, DB2 uses the QUERYNO of the DECLARE CURSOR
statement for all corresponding FETCH statements for that cursor.
When the values of QUERYNO are based on the statement number in the
source program, values greater than 32,767 are reported as 0. Hence, in a
very long program, the value is not guaranteed to be unique. If QUERYNO
is not unique, use the value of TIMESTAMP, which is always unique. When
the SQL statement is embedded in a non-inline SQL function or native SQL
procedure, if the QUERYNO clause is specified, then its value is used by
DB2. Otherwise DB2 assigns a number based on the line number of the
SQL statement in the non-line SQL function, or native SQL procedure.
A number used to identify each query block within a query.

PLANNO

A number used to identify each mini-plan within a query block.

APPLNAME

The application plan name.

PROGNAME

The program name (binding an application) or the package name (binding


a package).

196

DB2 10 for z/OS

YL&A DB2 10 for z/OS Reference Guide


COLLID

The collection ID:


DSNDYNAMICSQLCACHE: The row originates from the dynamic
statement cache.
DSNEXPLAINMODEYES: The row originates from an application that
specifies YES for the value of the CURRENT EXPLAIN MODE special
register.
DSNEXPLAINMODEEXPLAIN: The row originates from an application that
specifies EXPLAIN for the value of the CURRENT EXPLAIN MODE special
register.
When the SQL statement is embedded in a non-inline SQL function of
native SQL procedure, this column is not used and is blank.

SORTC

SORTNO

Reasons for sort of composite table, using a bitmap of the following values:
G = Group By
O = Order By
J = Join
U = Uniqueness
Reasons for sort of composite table. Using a bitmap of following values:
G = Group By
O = Order By
J = Join
U = Uniqueness
The sequence of the sort.

KEYSIZE

The sum of the lengths of the sort keys.

ORDERCLASS

IBM internal use only.

EXPLAIN_TIME

The EXPLAIN timestamp.

GROUP_MEMBER

The member name of the DB2 subsystem that executed EXPLAIN. The
column is blank if the DB2 subsystem was not in a data sharing
environment when EXPLAIN was executed.

SECTNOI

The section number of the statement. The value is taken from the same
column in SYSPACKSTMT or SYSSTMT tables and can be used to join
tables to reconstruct the access path for the statement. This column is
applicable only for static statements. The default value of -1 indicates
EXPLAIN information that was captured in DB2 10 for z/OS or earlier

VERSION

The version identifier for the package. Applies only to an embedded


EXPLAIN statement executed from a package or to a statement that is
explained when binding a package. A blank indicates that the column is not
applicable. When the SQL statement is embedded in a non-inline SQL
function or native SQL procedure, this column is not used and is blank.

SORTN

DSN_STATEMENT_CACHE_TABLE
Contains information about the SQL statements in the statement cache.
Column name
STMT_ID
STMT_TOKEN
COLLID

DB2 10 for z/OS

Description
An EDM unique token.
A user-provided identification string.
The collection ID:
DSNDYNAMICSQLCACHE: The row originates from the dynamic
statement cache.

197

YL&A DB2 10 for z/OS Reference Guide

PROGRAM_NAME
INV_DROPALT
INV_REVOKE
INV_LRU
INV_RUNSTATS
CACHED_TS
USERS
COPIES
LINES
PRIMAUTH
CURSQLID
BIND_QUALIFIER
BIND_ISO

BIND_CDATA
BIND_DYNRL
BIND_DEGRE
BIND_SQLRL
BIND_CHOLD
STAT_TS
STAT_EXEC
STAT_GPAG
STAT_SYNR
STAT_WRIT
STAT_EROW
STAT_PROW
STAT_SORT
STAT_INDX
STAT_RSCN
STAT_PGRP
STAT_ELAP
198

DSNEXPLAINMODEYES: The row originates from an application that


specifies YES for the value of the CURRENT EXPLAIN MODE special
register.
DSNEXPLAINMODEEXPLAIN: The row originates from an application
that specifies EXPLAIN for the value of the CURRENT EXPLAIN MODE
special register.
When the SQL statement is embedded in a non-inline SQL function of
native SQL procedure, this column is not used and is blank.
Name of package or DBRM that performed the initial PREPARE.
Invalidated by DROP/ALTER.
Invalidated by REVOKE.
Removed from cache by LRU.
Invalidated by RUNSTATS.
Timestamp when statement was cached.
Number of current users of statement. These are the users that have
prepared or executed the statement during their current unit of work.
Number of copies of statement owned by all threads in the system.
Precompiler line number from the initial PREPARE.
Primary authorization ID of the user that did the initial PREPARE.
CURRENT SQLID of the user that did the initial prepare.
Bind object qualifier for unqualified table names.
ISOLATION bind option:
UR = Uncommitted read
CS = Cursor stability
RS = Read stability
RR =Repeatable read
DATA CURRENTDATA bind option:
Y = CURRENTDATA(YES)
N = CURRENTDATA(NO)
DYNAMICRULES bind option:
B = DYNAMICRULES(BIND)
R = DYNAMICRULES(RUN)
CURRENT DEGREE value:
A = ANY
1=1
CURRENT RULES value:
D = DB2
S = SQL
Cursor WITH HOLD bind option:
Y = Initial PREPARE was done for a cursor WITH HOLD
N = Initial PREPARE was not done for a cursor WITH HOLD
Timestamp of stats when IFCID 318 is started.
This column is deprecated. Use STAT_EXECB instead.
This column is deprecated. Use STAT_GPAGB instead.
This column is deprecated. Use STAT_SYNRB instead.
This column is deprecated. Use STAT_WRITB instead.
This column is deprecated. Use STAT_EROWB instead.
This column is deprecated. Use STAT_PROWB instead.
This column is deprecated. Use STAT_SORTB instead.
This column is deprecated. Use STAT_INDXB instead.
This column is deprecated. Use STAT_RSCNB instead.
This column is deprecated. Use STAT_PGRPB instead.
Accumulated elapsed time used for statement.
DB2 10 for z/OS

YL&A DB2 10 for z/OS Reference Guide


STAT_CPU
STAT_SUS_SYNIO
STAT_SUS_LOCK
STAT_SUS_SWIT
STAT_SUS_GLCK
STAT_SUS_OTHR
STAT_SUS_OTHW
STAT_RIDLIMT
STAT_RIDSTOR
EXPLAIN_TS
SCHEMA
STMT_TEXT
STMT_ROWID
BIND_RO_TYPE

BIND_RA_TOT
GROUP_MEMBER
STAT_GPAGB
STAT_SYNRB
STAT_WRITB
STAT_EROWB
STAT_PROWB
STAT_SORTB
STAT_EXECB
STAT_INDXB
STAT_RSCNB
STAT_PGRPB
STAT_RIDLIMTB
STAT_RIDSTORB
LITERAL_REPL

STAT_SUS_LATCH
STAT_SUS_PLATCH
STAT_SUS_DRAIN
STAT_SUS_CLAIM
STAT_SUS_LOG

DB2 10 for z/OS

Accumulated CPU time used for statement.


Accumulated wait time for synchronous I/O.
Accumulated wait time for lock and latch requests.
Accumulated wait time for synchronous execution unit switch.
Accumulated wait time for global locks.
Accumulated wait time for read activity done by another thread.
Accumulated wait time for write activity done by another thread.
This column is deprecated. Use STAT_RIDLMTB instead.
This column is deprecated. Use STAT_RIDSTORB instead.
When the statement cache table is populated.
CURRENT SCHEMA value.
Statement text.
Statement ROWID.
The current specification of the REOPT option for the statement:
N = REOPT(NONE)
1 = REOPT(ONCE) or its equivalent
A = REOPT(AUTO) or its equivalent
0 = The current plan is deemed optimal and there is no need for
REOPT(AUTO)
The total number of REBIND commands that have been issued for the
dynamic statement because of the REOPT(AUTO) option.
The name of the DB2 data-sharing member that inserted this row. This
column is null if the subsystem is not configured for data-sharing.
The number of getpage operations that are performed
The number of synchronous buffer reads that are performed
The number of buffer write operations that are performed
The number of rows that are examined
The number of rows that are processed
The number of sorts that are performed
The number of times this statement has been run. For a statement with a
cursor, this is the number of OPENs.
The number of index scans that are performed
The number of table space scans that are performed
The number of parallel groups that are created
The number of times a RID list was not used because the number of
RIDs would have exceeded DB2 limits.
The number of time a RID list was not used because there is not enough
storage available to hold the list of RIDs.
Identifies cached statements where literal values are replaced by the &
symbol:
R = The statement is prepared with CONCENTRATE STATEMENTS
WITH LITERALS behavior and the literal constants in the statement have
been replaced with &.
D = This statement is a duplicate statement instance with different literal
reusability criteria.
Blank = Literal values are not replaced.
The accumulated wait time for latch requests
The accumulated wait time for page latch requests
The accumulated wait time for a drain lock requests
The accumulated wait time for claim count requests
The accumulated wait time for the log writer requests

199

YL&A DB2 10 for z/OS Reference Guide

DSN_STATEMNT_TABLE
Contains information about the estimated cost of specified SQL statements.
Column name
QUERYNO

APPLNAME

PROGNAME

COLLID

GROUP_MEMBER
EXPLAIN_TIME
STMT_TYPE

200

Description
A number intended to identify the statement being explained. For a row
produced by an EXPLAIN statement, specify the number in the
QUERYNO clause. For a row produced by non-EXPLAIN statements,
specify the number using the QUERYNO clause, which is an optional part
of the SELECT, INSERT, UPDATE, MERGE, and DELETE statement
syntax. Otherwise, DB2 assigns a number based on the line number of
the SQL statement in the source program.
FETCH statements do not each have an individual QUERYNO assigned
to them. Instead, DB2 uses the QUERYNO of the DECLARE CURSOR
statement for all corresponding FETCH statements for that cursor.
When the values of QUERYNO are based on the statement number in the
source program, values greater than 32,767 are reported as 0. Hence, in
a very long program, the value is not guaranteed to be unique. If
QUERYNO is not unique, use the value of TIMESTAMP, which is always
unique. When the SQL statement is embedded in a non-inline SQL
function or native SQL procedure, if the QUERYNO clause is specified,
then its value is used by DB2. Otherwise DB2 assigns a number based on
the line number of the SQL statement in the non-line SQL function, or
native SQL procedure.
The name of the application plan for the row. Applies only to embedded
EXPLAIN statements executed from a plan or to statements explained
when binding a plan. Blank if not applicable.
When the SQL statement is embedded in a non-inline SQL function or
native SQL procedure, then this column is not used.
The name of the program or package containing the statement being
explained. For statements explained dynamically, such as with QMF or
SPUFI, the associated plan/package is listed. Blank if not applicable.
When the SQL statement is embedded in a non-inline SQL function or
native SQL procedure, this column is not used and is blank.
The collection ID:
DSNDYNAMICSQLCACHE: The row originates from the dynamic
statement cache.
DSNEXPLAINMODEYES: The row originates from an application that
specifies YES for the value of the CURRENT EXPLAIN MODE special
register.
DSNEXPLAINMODEEXPLAIN: The row originates from an application
that specifies EXPLAIN for the value of the CURRENT EXPLAIN MODE
special register.
When the SQL statement is embedded in a non-inline SQL function of
native SQL procedure, this column is not used and is blank.
The member name of the DB2 that executed EXPLAIN, or blank.
The time at which the statement is processed. This time is the same as
the BIND_TIME column in PLAN_TABLE.
The type of statement being explained:
SELECT = SELECT
INSERT = INSERT
UPDATE = UPDATE
DELETE = DELETE
MERGE = MERGE
DB2 10 for z/OS

YL&A DB2 10 for z/OS Reference Guide

COST_CATEGORY

PROCMS

PROCSU

REASON

STMT_ENCODE

TOTAL_COST
SECTNOI

VERSION

TRUNCA = TRUNCATE
SELUPD = SELECT with FOR UPDATE OF
DELCUR = DELETE WHERE CURRENT OF CURSOR
UPDCUR = UPDATE WHERE CURRENT OF CURSOR
Whether DB2 was forced to use default values when making its estimates:
A = DB2 had enough information to make a cost estimate without using
default values.
B = Some condition exists for which DB2 was forced to use default values.
See the values in REASON to determine why DB2 was unable to put this
estimate in cost category A.
The estimated processor cost in milliseconds for the SQL statement,
rounded up to the next integer value. The maximum value for this cost is
2,147,483,647 milliseconds, which is equivalent to approximately 24.8
days. If the estimated value exceeds this maximum, the column reports
the maximum value.
The estimated processor cost in service units for the SQL statement,
rounded up to the next integer value. The maximum value for this cost is
2,147,483,647 service units. If the estimated value exceeds this
maximum, the column reports the maximum value.
Reasons for putting an estimate into cost category B:
HAVING CLAUSE: A subselect in SQL statement contains a HAVING
HOST VARIABLES: The statement uses host variables, parameter
markers, or special registers.
REFERENTIAL CONSTRAINTS: Referential constraints of the type
CASCADE or SET NULL exist on the target table of a DELETE statement.
TABLE CARDINALITY: cardinality statistics are missing for one or more of
the tables used in the statement.
UDF: The statement uses user-defined functions.
TRIGGERS: Triggers are defined on the target table of an INSERT,
UPDATE, or DELETE statement.
MATERIALIZATION: Statistics are missing because the statement uses
materialized views or nested table expressions.
The encoding scheme of the statement. If the statement represents a
single CCSID set, possible values are:
A = ASCII
E = EBCDIC
U = Unicode
If the statement has multiple CCSID sets, the column value is M.
Cverall estimated cost of the statement. Should be used only for reference
Section number of the statement. Taken from the same column in
SYSPACKSTMT or SYSSTMT tables and can be used to join tables to
reconstruct the access path for the statement. This column is applicable
only for static statements. Default of -1 indicates EXPLAIN information that
was captured in DB2 10 for z/OS or earlier versions of DB2.
The version identifier for the package. Applies only to an embedded
EXPLAIN statement executed from a package or to a statement that is
explained when binding a package. A blank indicates that the column is
not applicable. When the SQL statement is embedded in a non-inline SQL
function or native SQL procedure, this column is not used and is blank.

DSN_STRUCT_TABLE
Contains information about the query blocks in a query.
Column name
DB2 10 for z/OS

Description

201

YL&A DB2 10 for z/OS Reference Guide


QUERYNO

QBLOCKNO
APPLNAME
PROGNAME

PARENT
ROWCOUNT
ATOPEN
CONTEXT

ORDERNO
DOATOPEN_PARENT
QBLOCK_TYPE

202

A number intended to identify the statement being explained. For a row


produced by an EXPLAIN statement, specify the number in the
QUERYNO clause. For a row produced by non-EXPLAIN statements,
specify the number using the QUERYNO clause, which is an optional
part of the SELECT, INSERT, UPDATE, MERGE, and DELETE
statement syntax. Otherwise, DB2 assigns a number based on the line
number of the SQL statement in the source program.
FETCH statements do not each have an individual QUERYNO assigned
to them. Instead, DB2 uses the QUERYNO of the DECLARE CURSOR
statement for all corresponding FETCH statements for that cursor.
When the values of QUERYNO are based on the statement number in
the source program, values greater than 32,767 are reported as 0.
Hence, in a very long program, the value is not guaranteed to be
unique. If QUERYNO is not unique, use the value of TIMESTAMP,
which is always unique. When the SQL statement is embedded in a
non-inline SQL function or native SQL procedure, if the QUERYNO
clause is specified, then its value is used by DB2. Otherwise DB2
assigns a number based on the line number of the SQL statement in the
non-line SQL function, or native SQL procedure.
A number used to identify each query block within a query.
The application plan name. When the SQL statement is embedded in a
non-inline SQL function or native SQL procedure, this column is not
used and is blank.
The program name (binding an application) or the package name
(binding a package). Applies only to embedded EXPLAIN statements
and to statements explained as the result of binding a plan or package.
A blank indicates that the column is not applicable.
When the SQL statement is embedded in a non-inline SQL function or
native SQL procedure, this column is not used and is blank.
arent query block number of current query block in structure of SQL text;
this is the same as the PARENT_QBLOCKNO in the PLAN_TABLE.
The estimated number of rows returned by RDS (query cardinality).
Whether the query block is moved up for do-at-open processing. The
value is Y if done-at-open or N otherwise.
This column indicates the context of the current query block. The
possible values are:
TOP LEVEL
UNION
UNION ALL
PREDICATE
TABLE EXP
UNKNOWN
This column is currently not used.
The parent query block number of the current query block. Do-at-open
parent if the query block is done-at-open, this value may differ from the
PARENT_QBLOCKNO in the PLAN_TABLE.
The type of the current query block:
SELECT
INSERT
UPDATE
DELETE
SELUPD
DELCUR
UPDCUR
DB2 10 for z/OS

YL&A DB2 10 for z/OS Reference Guide

EXPLAIN_TIME
GROUP_MEMBER
ORIGIN

SECTNOI

COLLID

VERSION

CORSUB
NCOSUB
TABLEX
TRIGGR
UNION
UNIONA
CTE
This column is equivalent to the QBLOCK_TYPE column in
PLAN_TABLE, except for CTE.
The EXPLAIN timestamp.
The member name of the DB2 subsystem that executed EXPLAIN. The
column is blank if the DB2 subsystem was not in a data sharing
environment when EXPLAIN was executed.
Indicates the origin of the query block
Blank = generated by DB2
C = column mask
R = row permission
U = specified by the user
The section number of the statement. The value is taken from the same
column in SYSPACKSTMT or SYSSTMT tables and can be used to join
tables to reconstruct the access path for the statement. This column is
applicable only for static statements. Default of -1 indicates EXPLAIN
information was captured in DB2 10 for z/OS or earlier versions of DB2.
The collection ID:
DSNDYNAMICSQLCACHE: The row originates from the dynamic
statement cache.
DSNEXPLAINMODEYES: The row originates from an application that
specifies YES for the value of the CURRENT EXPLAIN MODE special
register.
DSNEXPLAINMODEEXPLAIN: The row originates from an application
that specifies EXPLAIN for the value of the CURRENT EXPLAIN MODE
special register.
When the SQL statement is embedded in a non-inline SQL function of
native SQL procedure, this column is not used and is blank.
The version identifier for the package. Applies only to an embedded
EXPLAIN statement executed from a package or to a statement that is
explained when binding a package. A blank indicates that the column is
not applicable. When the SQL statement is embedded in a non-inline
SQL function or native SQL procedure, this column is blank.

DSN_VIEWREF_TABLE
Contains information about all views and materialized query tables used to process a query.
Column name

Description

QUERYNO

A number intended to identify the statement being explained. For a row


produced by an EXPLAIN statement, specify the number in the QUERYNO
clause. For a row produced by non-EXPLAIN statements, specify the
number using the QUERYNO clause, which is an optional part of the
SELECT, INSERT, UPDATE, MERGE, and DELETE statement syntax.
Otherwise, DB2 assigns a number based on the line number of the SQL
statement in the source program.
FETCH statements do not each have an individual QUERYNO assigned to
them. Instead, DB2 uses the QUERYNO of the DECLARE CURSOR

DB2 10 for z/OS

203

YL&A DB2 10 for z/OS Reference Guide


statement for all corresponding FETCH statements for that cursor.
When the values of QUERYNO are based on the statement number in the
source program, values greater than 32,767 are reported as 0. Hence, in a
very long program, the value is not guaranteed to be unique. If QUERYNO
is not unique, use the value of TIMESTAMP, which is always unique. When
the SQL statement is embedded in a non-inline SQL function or native SQL
procedure, if the QUERYNO clause is specified, then its value is used by
DB2. Otherwise DB2 assigns a number based on the line number of the
SQL statement in the non-line SQL function, or native SQL procedure.
APPLNAME

The application plan name.


When the SQL statement is embedded in a non-inline SQL function or
native SQL procedure, this column is not used and is blank.

PROGNAME

The program name (binding an application) or the package name (binding


a package). Applies only to embedded EXPLAIN statements and to
statements explained as the result of binding a plan or package. A blank
indicates that the column is not applicable.
When the SQL statement is embedded in a non-inline SQL function or
native SQL procedure, this column is not used and is blank.

VERSION

The version identifier for the package. Applies only to an embedded


EXPLAIN statement executed from a package or to a statement that is
explained when binding a package. A blank indicates that the column is not
applicable. When the SQL statement is embedded in a non-inline SQL
function or native SQL procedure, this column is not used and is blank.

CREATOR

Authorization ID of the owner of the object.

NAME

Name of the object.

TYPE

The type of the object:

MQTUSE

V = View

R = MQT that has been used to replace the base table for rewrite

M = MQT
IBM internal use only.

EXPLAIN_TIME

The EXPLAIN timestamp.

GROUP_MEMBER

The member name of the DB2 subsystem that executed EXPLAIN. The
column is blank if the DB2 subsystem was not in a data sharing
environment when EXPLAIN was executed.

SECTNOI

The section number of the statement. The value is taken from the same
column in SYSPACKSTMT or SYSSTMT tables and can be used to join
tables to reconstruct the access path for the statement. This column is
applicable only for static statements. The default value of -1 indicates
EXPLAIN information that was captured in DB2 10 for z/OS or earlier

204

DB2 10 for z/OS

YL&A DB2 10 for z/OS Reference Guide

DSNZPARMs
Parameter

Description

Acceptable values (defaults


appear in bold)

Updatable
online?

ABEXP
ABIND
ACCESS_
CNTL_
MODULE
ACCUMACC

EXPLAIN processing
Auto BIND
DB2 access control
routine load module

YES, NO
YES, NO
1-8 Char (install), DSNX@XAC
(migration)

Yes
Yes
No

DDF/RRSAF
accumulation data
Aggregation fields
JCL procedure used to
start administrative
scheduler
Authorization exit limit
ASCII coded character
set (graphic)
Allocation units
Start names
ASCII coded character
set (mixed)
Application encoding

NO, 265535

Yes

010
1-8, ssnADMT

Yes
No

032676; 10
065533

Yes

BLK, TRK, CYL


ALL, spacenames
065533

Yes

ASCII, EBCDIC, UNICODE,


ccsid
134 char
134 char
09999
116; 1,3,4
NO, YES
NO, YES
065533

YES, NO
NO, YES, list, *
YES, NO
04096; 1024

No
No
No
Yes

0255; 5
BINDADD, BIND
819228672
1254; 4
NO, YES
0,1

No
Yes
Yes
Yes
Yes
Yes

02MB; 5M

No

02 MB; 5M

No

ACCUMUID
ADMTPROC
AEXITLIM
AGCCSID
ALCUNIT
ALL/dbname
AMCCSID
APPENSCH
ARCPFX1
ARCPFX2
ARCRETN
ARCWRTC
ARCWTOR
ARC2FRST
ASCCSID

Copy 1 prefix
Copy 2 prefix
Retention period
WTOR route code
Write to operator
Read copy 2 archive
ASCII coded character
set (single-byte)
Assistant
Audit trace
Use protection
Plan authorization
cache
Backout duration
Bind new package
Block size
IMS BMP timeout
Cache dynamic SQL
Free cached dynamic
statements to relieve
DBM1 below-the-barstorage
Package authorization
cache
Routine authorization

ASSIST
AUDITST
AUTH
AUTHCACH
BACKODUR
BINDNV
BLKSIZE
BMPTOUT
CACHEDYN
CACHEDYN_
FREELOCAL
CACHEPAC
CACHERAC
DB2 10 for z/OS

Yes
Yes
Yes
Yes
Yes
Yes

205

YL&A DB2 10 for z/OS Reference Guide


CATALOG
CATDDACL
CATDMGCL
CATDSTCL
CATXDACL
CATXMGCL
CATXSTCL
CDSSRDEF
CHARSET
CHECK_
FASTREPLICATION
CHECK_
SETCHKP
CHGDC
CHKFREQ

cache
Catalog alias
SMS class for catalog
and directory table
spaces
SMS class for catalog
and directory table
spaces
SMS class for catalog
and directory table
spaces
SMS class for catalog
and directory indexes
SMS class for catalog
and directory indexes
SMS class for catalog
and directory indexes
Current degree
CCSID used
Type of replication
used to copy objects
CHECK DATA and
CHECK LOB place
inconsistent objects in
CHECK PENDING
DROP support
Number of log records
created between
checkpoints

CHKLOGR

Number of log records


created between
checkpoints

CHKMINS

Number of minutes
between log
checkpoints

CHKTYPE

Interval between
checkpoints
DDF threads
Compact data
IBM service
Compress SPT01
directory table space
Max remote connected
Contract thread
storage
Coordinator
Max users
DBADM can create

CMTSTAT
COMPACT
COMPAT
COMPRESS_
SPT01
CONDBAT
CONTSTOR
COORDNTR
CTHREAD
DBACRVW
206

18 char; DSNCAT
Valid SMS class, blank

Yes
Yes

Valid SMS class, blank

Yes

Valid SMS class, blank

Yes

Valid SMS class, blank

Yes

Valid SMS class, blank

Yes

Valid SMS class, blank

Yes

1, ANY
ALPHANUM, KATAKANA (if
SCCSID = 930 or 5026)
PREFERRED, REQUIRED

Yes

YES, NO

Yes

1, 2, 3
1000-16000000 (CHKTYPE=
LOGRECS), NOTUSED,
(CHKTYPE= MINUTES), 5 ,
99999999 (CHKTYPE=BOTH)
1000-16000000 (CHKTYPE=
LOGRECS), NOTUSED
(CHKTYPE= MINUTES),
99999999 (CHKTYPE=BOTH)
NOTUSED
(CHKTYPE=LOGRECS),
1-60, 5
(CHKTYPE= MINUTES),
1-439 (CHKTYPE=BOTH)
LOGRECS, MINUTES, BOTH

Yes
Yes

ACTIVE, INACTIVE
NO, YES
OFF
YES, NO

No
Yes

Yes

025000; 64
NO, YES

Yes
Yes

NO, YES
12000; 70
YES, NO

No
Yes
Yes

Yes

Yes

Yes

Yes

DB2 10 for z/OS

YL&A DB2 10 for z/OS Reference Guide


view for other authid
Date format
Local date length
DB2 sort or DFSORT
Serviceability
parameter
DDF startup option
Deallocate period

DATE
DATELEN
DB2SORT
DB2SUPLD
DDF
DEALLCT

ISO, USA, EUR, JIS, LOCAL


0, 10254
ENABLE, DISABLE

Yes

NO, AUTO, COMMAND


01439 min, 059 sec,
NOLIMIT
DEC15, DEC31, 15, 31
NO, YES
,.
ROUND_CELING,
ROUND_DOWN,
ROUND_FLOOR,
ROUND_HALF_DOWN,
ROUND_HALF_EVEN,
ROUND_HALF_UP,
ROUND_HALF_EVEN
ASM, C, CPP, COBOL, COB2,
IBMCOB, FORTRAN, PL1
IBMUSER, authid
DEFAULT, ,
NO, YES

No
Yes

Describe for static


SQLWARN1 and 5 for
non-scrollable cursors
Level ID update
frequency
DL/I batch timeout
Default Partition
Segsize
Data sharing
Data set maximum
Dist SQL string
delimiter
Data set stats time
Vary DS control
interval
Use for dynamic rules
Minimum size of EDM
skeleton pool in KB

NO, YES
NO, YES

Yes
Yes

032767; ON

Yes

1254; 6
0,4,12,..64(multiples of4), 32

Yes
Yes

Yes, No, blank


132767; 20000
,

No
Yes

11440; 5
YES, NO

Yes
Yes

YES, NO
5120-2097152, 10240K

Yes

Maximum size below


2GB bar for EDM
EDM DBD cache
EDM statement cache
size
DROP support
Enable index ANDing

0-2097152

Yes

5000K2097152K
01048576K; 113386K

Yes
Yes

1, 2, 3
ON, OFF

Yes
Yes

DECARTH
DECDIV3
DECIMAL
DEF_
DECFLOAT_
ROUND_
MODE

Decimal arithmetic
Minimum divide scale
Decimal point
Decfloat rounding
mode

DEFLANG

Language default

DEFLTID
DELIM
DEL_
CFSTRUCTS_
ON_RESTART
DESCSTAT
DISABSCL

Unknown authid
String delimiter
Delete coupling facility
structures on restart

DLDFREQ
DLITOUT
DPSEGSZ
DSHARE
DSMAX
DSQLDELI
DSSTIME
DSCVI
DYNRULS
EDM_
SKELETON_
POOL
EDMPOOL
EDMDBDC
EDMSTMTC
EDPROP
EN_PJSJ
DB2 10 for z/OS

No

No

No

207

YL&A DB2 10 for z/OS Reference Guide


ENSCHEME
EVALUNC
EXTRAREQ
EXTRASRV
EXTSEC
FCCOPYDDN

FLASHCOPY
FLASHCOPY_COPY
FLASHCOPY_
LOAD
FLASHCOPY_PPRC
FLASHCOPY_
REBUILD_
INDEX
FLASHCOPY_
REORG_
INDEX
FLASHCOPY_
REORG_TS
GCCSID
GRPNAME
HONOR_
KEEPDICTIONARY
IDAUTH_
MODULE
IDBACK
IDFORE
IDTHTOIN
IDXBPOOL
IGNSORTN
IMMEDWRI
IMPDSDEF
IMPDSSIZE
208

Default encoding
scheme
Predicate evaluation
with UR and RS
Extra blocks requestor
Extra blocks server
Extended security
Default for
FCCOPYDDN of
FLASHCOPY clause
for utilities
Default setting for
FLASHCOPY for
utilities
FLASHCOPY clause
used by default for
COPY utility
FLASHCOPY clause
used by default for
LOAD utility
FLASHCOPY behavior
with PPRC
FLASHCOPY clause
used by default for
REBUILD INDEX utility
FLASHCOPY clause
used by default for
REORG INDEX utility
FLASHCOPY clause
used by default for
REORG
TABLESPACE utility
EBCDIC coded
character set (graphic
byte)
Group name
Honor
KEEPDICTIONARY on
LOAD or REORG
DB2 connection
authorization exit
routine
Max batch connect
Max TSO connect
Idle thread timeout
Default buffer pool for
user indexes
Ignore SORTNUM in
utilities
Immediate write
Define datasets
Max DSSIZE for
implicit

EBCDIC, ASCII

YES, NO

Yes

0100
0100
NO, YES
Valid DB2 utilities template,
HLQ.&DB.&SN.N&DS.D&JU.
T&TL

Yes
Yes
Yes
Yes

NO, YES, CONSISTENT

Yes

NO, YES

Yes

NO, YES

Yes

NO, YES

Yes

NO, YES

Yes

NO, YES

Yes

NO, YES

Yes

065533

18 char; DSNCAT
YES, NO

No
Yes

18 char; DSN3@ATH

No

12000; 40
12000; 40
09999
BP0BPx

Yes
Yes
Yes
Yes

YES, NO

Yes

NO, YES, PH1


YES, NO
1,2,4,8,16,32,64

Yes
Yes
Yes
DB2 10 for z/OS

YL&A DB2 10 for z/OS Reference Guide


IMPLICIT_
TIMEZONE
IMPTKMOD
IMPTSCMP
INDEX_IO_
PARALLELISM
INLISTP
IRLMAUT
IRLMPRC

Default value for time


zone
Trackmod for implicit
Use data compression
I/O parallelism enable
for index insertion I/O
IN list elements
Auto start
Proc name

IRLMRWT
IRLMSID
IRLMSWT
IX_TB_PART_
CONV_EXCLUDE
IXQTY

Resource timeout
Subsystem name
Time to autostart
Exclude trailing
columns
Indexspace default
size
Postpone backward log
processing
Locale LC_CTYPE
Maximum LE tokens
Default length for inline
LOBs
User LOB value
storage
User LOB value
storage
Long-running reader
threshold
Current maintenance
types for MQTs
Maximum number of
automatic bind
requests processed
simultaneously
Recording max
Max remote active
Max open cursors

LBACKOUT
LC_CTYPE
LEMAX
LOB_INLINE_
LENGTH
LOBVALA
LOBVALS
LRDRTHLD
MAINTYPE
MAX_
CONCURRENT_
PKG_OPS
MAXARCH
MAXDBAT
MAX_NUM_
CUR
MAX_ST_
PROC
MAXKEEPD

Max number of stored


procedures
Max kept dynamic
statements
Maximum number of
data sets concurrently
open for LOB file
references
RID pool size
Read tape units
Max temp/stage agent
Max temp storage in
work files for RIDs

MAXOFILR

MAXRBLK
MAXRTU
MAXTEMPS
MAXTEMPS_
RID
DB2 10 for z/OS

CURRENT, SESSION, 12:59


to +14:00
YES, NO
YES, NO
YES, NO

15000; 50
YES, NO
IRLMPROC, IRLM procedure
name
13600; 30
IRLM, IRLM name
13600; 120
NO, YES

Yes
No
No

04194304

Yes

AUTO, YES, NO

No

Valid locale, 050 char


050; 20
0-32680

No
Yes

12097152; 2048

Yes

1510002; 2048

Yes

01439 minutes, 10

Yes

NONE, SYSTEM, USER, ALL

Yes

10

Yes

101000
01999; 64
099999; 500

No
Yes
Yes

099999; 2000

Yes

065535; 5000

Yes

0 to value of MAX USERS, 100

Yes

0, 16K1000000K; 400MB
199; 2
0214748364
NONE, NOLIMIT, or 1 to
329166

Yes
Yes
Yes
Yes

Yes
Yes
Yes

No
No
Yes
Yes

209

YL&A DB2 10 for z/OS Reference Guide


MAXTYPE1
MCCSID
MEMBNAME
MGEXTSZ
MINSTOR
MIXED
MON
MXDTCACH
MONSIZE
NPGTHRSH
NUMLKTS
NUMLKUS
OJPERFEH
OPTHINTS
OPTIOWGT
OTC_LICENSE
OUTBUFF
PADIX
PADNTSTR
PARA_EFF
PARAMDEG
PCLOSEN
PCLOSET
PLANMGMT
PLANMGMT
SCOPE
POOLINAC
PRIQTY
PROTECT
PTASKROL
QUERY_
ACCELERATION
QUIESCE
RANDOMATT
REALSTORAGE_
MANAGEMENT
REALSTORAGE_
210

Max type 1 inactive


EBCDIC coded
character set (mixed
byte)
Member name
Optimize extent sizing
Thread management
Mixed data
Monitor trace
Maximum size of
memory for data
caching
Monitor size
Use of index after table
growth
Locks per table space
Locks per user
Outer join performance
Optimization hints
Use formula for
balancing I/O and CPU
Accept terms of onetime change license
Output buffer
Pad index by default
Pad null-terminated
strings
Parallelism efficiency
Degree of parallelism
RO switch checkpoints
RO switch time
Default plan
management policy
Default plan
management scope
Pool thread timeout
Primary quantity
Archive logs protected
with RACF
Include accounting
traces for parallel tasks
Default for
CURRENT QUERY
ACCELERATION
special register
Quiesce period
DB2 member can be
used for randomized
group attach
Whether DB2 manages
real storage
Maximum GB or real

0MAX REMOTE CON value


065533

Yes

18 char; DSN1
YES, NO
YES, NO
NO, YES
NO, YES
0-512, 20

No
Yes
Yes

No
Yes

256K-1MB
0, 1, n

No
Yes

050000; 2000
0100000; 10000
YES, NO
NO, YES
ENABLE, DISABLE

Yes
Yes
No
Yes
Yes

YES, none

No

40K400MB; 400K
YES, NO
YES, NO

No
Yes
Yes

0-100, 50
0no upper limit
132767; 5
132767; 10
OFF, ON, BASIC, EXTENDED

Yes
Yes
Yes
Yes
Yes

ALL, STATIC, DYNAMIC

Yes

09999; 120
Blank, 19999999
NO, YES

Yes
Yes
Yes

YES, NO

Yes

NONE, ENABLE,
ENABLE_WITHFAILBACK

Yes

0999; 5
YES, NO

Yes
Yes

ON, OFF, AUTO

Yes

NOLIMIT, 1-65535

Yes
DB2 10 for z/OS

YL&A DB2 10 for z/OS Reference Guide


MAX
REC_FAST
REPLICATION
RECALL
RECALLD
REFSHAGE
REORG_LIST_
PROCESSING
REORG_PART_
SORT_NPI

and auxiliary storage


DB2 can consume
Use FLASHCOPY with
recover
Recall database
Recall delay
Current refresh age
Default for PARALLEL
option on REORG
Default for sorting
nonpartitioned index
during REORG
Restart or defer
Recovery/restore

NONE, PREFERRED,
REQUIRED
YES, NO
032767; 120
0, ANY
PARALLEL, SERIAL

Yes

DISABLE, ENABLE

Yes

RESTART, DEFER
YES, NO

Yes

Maximum tape units

NOLIMIT, 1255

Yes

NO, YES

Yes

199; 2
0254
NO, YES
NO, YES, SQLSTMT

Yes
Yes
Yes
Yes

18 char; DSNRGCOL
18 char; DSNRGFDB
NO, YES
APPL, ACCEPT, REJECT

No
No
No
No

Non-alphanumeric char

No

YES, NO
NO, YES

No
No

RGFNMORT

Restrictions during
ALTER TABLE ALTER
COLUMN if DATA
CAPTURE CHANGES
is used
Resync interval
Retained lock timeout
Varchar from index
Revoked privileges are
also revoked from
dependents
Registration owner
Registration database
Control all applications
Unregistered DDL
default
ART/ORT escape
character
Require full names
Install DD control
support
OBJT registration table

No

RGFNMPRT

APPL registration table

RLF
RLFAUTH
RLFERR

RLF auto start


Resource authid
RLST access error

RLFERRD

RLST access error

RLFTBL
ROUTCDE
RRF

RLST name suffix


WTO route codes
Store data in reordered
row format(RRF)

117 char;
DSN_REGISTER_OBJT
117 char;
DSN_REGISTER_APPL
NO, YES
SYSIBM, authid
NOLIMIT, NORUN,
150000000
NOLIMIT, NORUN,
150000000
01, 2 alphanumeric char
1, 114 route codes
ENABLE, DISABLE

RESTART
RESTORE_
RECOVER_
FROMDUMP
RESTORE_
TAPEUNITS
RESTRICT_ALT_
COL_FOR_DCC

RESYNC
RETLWAIT
RETVLCFK
REVOKE_DEP_
PRIVILEGES
RGFCOLID
RGFDBNAM
RGFDEDPL
RGFDEFLT
RGFESCP
RGFFULLQ
RGFINSTL

DB2 10 for z/OS

No
Yes
Yes
Yes

No
No
Yes
Yes
Yes
Yes
No
Yes
211

YL&A DB2 10 for z/OS Reference Guide


RRULOCK
SCCSID
SECADM1

U lock for RR/RS


EBCDIC coded
character set (singlebyte)
Security administrator

SECADM1_
TYPE
SECADM1_INPUT_
STYLE
SECADM2

Type of security
administrator
Setting passed as hex
string or character
Second security
administrator

SECADM2_INPUT_
STYLE
SECADM2_
TYPE
SECQTY

Setting passed as hex


string or character
Type of security
administer
Secondary quantity

SEPARATE_
SECURITY

Separate DB2 security


administration from
system administration
Sequential cache
Utility cache option

SEQCACH
SEQPRES
SIGNON_MODULE
SIMULATED_CPU_
COUNT
SIMULATED_CPU_
SPEED
SITETYP
SJTABLES
SKIPUNCI
SMF89
SMFACCT
SMFCOMP
SMFSTAT
SMSDCFL
SMSDCIX
SPT01_INLINE_
LENGTH
SQLDELI
SRTPOOL
SSID
STARJOIN
STATCLUS
212

Number of CPUs being


simulated
Microseconds of
execution time for CPU
being simulation
Site type
Number of tables in
star join
Skip uncommitted
inserts
Measured usage
pricing
SMF accounting
Compression SMF
SMF statistics
SMS data class for file
table space
SMS data class for
index table space
Max inline length of
LOB in SPT01
SQL string delimiter
Sort pool size
Subsystem name
Enabling star join
Type of clustering

NO, YES
0-65533

Yes

SECADM, If type is AUTHID


then 1-8 characters, If type is
ROLE then SQL identifier
AUTHID, ROLE

Yes

CHAR, HEX

Yes

SECADM, If type is AUTHID


then 1-8 characters, If type is
ROLE then SQL identifier
CHAR, HEX

Yes

AUTHID, ROLE

Yes

Blank (clist calculated),


19999999
NO, YES

Yes

BYPASS, SEQ (deprecated)


NO, YES
OFF, 1-255

Yes
Yes
No
Yes

OFF, 1-2147483647

Yes

LOCALSITE,
RECOVERYSITE
1255; 10

No

YES, NO

Yes

YES, NO

Yes

NO, YES(1), list (15,7,8), *


OFF, ON
YES (1,3,4), NO, list(15) , *
Blank, 18 char

No
Yes
No
Yes

Blank, 18 char

Yes

NOINLINE, 1-32138

Yes

Default, ,
240K64000K; 10000K
DSN, SSID
Disable, enable, 1, 232768
ENHANCED, STANDARD

Yes

Yes
Yes

Yes

Yes

Yes

Yes

DB2 10 for z/OS

YL&A DB2 10 for z/OS Reference Guide


statistics to be
collected
Collect historical
statistics
Time to write RTS stats
Runstats aggregates
partition-level statistics
Statistics time
Standard SQL
language
Max abend count
Timeout value
Suppress Logrec
recording during soft
errors
Single volume
Statistics sync
System admin 1
System admin 2
System operator 1
System operator 2
System-level backups

STATHIST
STATSINT
STATROLL
STATIME
STDSQL
STORMXAB
STORTIME
SUPERRS
SVOLARC
SYNCVAL
SYSADM
SYSADM2
SYSOPR1
SYSOPR2
SYSTEM_
LEVEL_
BACKUPS
TBSBP8K

Default 8K BP for user


data
Default 16K BP for
user data
Default 32K BP for
user data
Default buffer pool for
user data
Default buffer pool for
XML table spaces
TCP/IP already verified
TCP/IP keep alive
Time format
Local time length
Trace auto start
Trace size
Remote tracker site
usage
Default allocation for
table space
Timestamp archives
Number of active
copies
Number of archive
copies
Number of BSDSs
Unicode CCSID
(graphic)

TBSBP16K
TBSBP32K
TBSBPOOL
TBSBPXML
TCPALVER
TCPKPALV
TIME
TIMELEN
TRACSTR
TRACTBL
TRKRSITE
TSQTY
TSTAMP
TWOACTV
TWOARCH
TWOBSDS
UGCCSID

DB2 10 for z/OS

SPACE, NONE, ALL,


ACCESSPATH
11440 min; 30
YES, NO

Yes

11440 min; 1
NO, YES

Yes

0225
51800 sec; 180
YES, NO

Yes
Yes
Yes

YES, NO
NO, 059
SYSADM, authid
SYSADM, authid
SYSOPR, authid
SYSOPR; authid
YES, NO

Yes
Yes
Yes
Yes
Yes
Yes
Yes

Any 8K buffer pool; BP8K0

Yes

Any 16K buffer pool; BP16K0

Yes

Any 32K buffer pool; BP32K0

Yes

BP0BPx

Yes

Any 16K bufferpool, BP16K

Yes

NO, YES
ENABLE, DISABLE, 165524
ISO, JIS, USA, EUR, LOCAL
0, 8254
NO, YES (13), list (19)
4K396K; 64K
NO, YES

Yes
Yes

No
No
No

04194304

Yes

NO, YES
2, 1

Yes
No

2, 1

No

YES, NO
1208

No

Yes
Yes

213

YL&A DB2 10 for z/OS Reference Guide


UIFCIDS
UMCCSID
UNION_
COLNAME_7
UNIT
UNIT2
URCHKTH
URLGWTH
USCCSID
UTIL_TEMP_
STORCLAS
UTILS_DUMP_
CLASS_NAME
UTIMOUT
UTSORTAL
VOLTDEVT
WFDBSEP

WLMENV
XLKUPDT
XML_RANDOMIZE_
DOCID
XMLVALA
XMLVALS
ZOSMETRICS

Unicode IFCIDS
Unicode CCSID
(Mixed)
Use Version 7 behavior
for union results
Device type 1
Device type 2
UR check frequency
UR log write check
Unicode CCSID
(single-byte)
Storage class name for
shadow data sets
Dump class name
Utility timeout
DB2 uses RTS to
determine sort work
data set sizes
Temporary unit name
Declared temporary
tables will use work
files with non-zero
SECQTY
WLM environment
X lock for searched
U/D
Generate XML DOCID
values randomly
Upper limit for storage
for per user for XML
values
Upper limit for system
storage for XML values
Enables DB2 to gather
z/OS metrics

YES, NO
1208

Yes

YES, NO

Yes

TAPE, any device


Device or unit name
0255, 5
0K1000K
1208

Yes
Yes
Yes
Yes

Blank, valid SMS management


class name
Blank, valid DFSMS dump
class name
1254; 6
YES, NO

Yes

SYSDA, valid name


YES, NO

Yes
No

Valid name (118 char)


YES, NO

Yes
Yes

NO, YES

Yes

1-2097152, 204,800

Yes

1-51200, 10240

Yes

YES, NO

No

Yes
Yes
Yes

Bind Parameters
Option
Valid values
Plan
Pckg
Trigr
Qry
ACQUIRE
USE, ALLOCATE
X
Whether to acquire resources specified in the DBRM at first access or allocation
ACTION
REPLACE, ADD
X, BO
X, BO
REPLACE(RPLVER)
X, BO
REPLACE(RETAIN)
X, BO
Whether object (plan or package) replaces an existing object with same name or is new
ACOMPARE
NO, NONE, WARN, ERROR
X
X
X
Determines whether the new access paths are different from the older access paths
APRETAINDUP
YES, NO
RO
RO
Whether or not DB2 retains an old package copy when access paths of the old copy are identical to
214

DB2 10 for z/OS

YL&A DB2 10 for z/OS Reference Guide


Option
Valid values
Plan
Pckg
Trigr
Qry
the incoming copy. Applies to PLANMGMT(BASIC) or PLANMGMT(EXTENDED).
APREUSE
NO, NONE, ERROR
Specifies whether DB2 tries to reuse previous access paths for SQL statements in a package
CACHESIZE
Value of PLAN AUTH CACHE; decimal X
Size (in bytes) of the authorization cache acquired in the EDM pool for the plan
COPY
Collection-id, package-id, COPYVER
X, BO
Determines that you are copying an existing package and names the package
CONCURRENT
WAITFOROUTCOME,
X
X
X
ACCESS
USECURRENTLYCOMMITTED
RESOLUTION
Default depends on SKIPUNCI setting
Determines which concurrent access resolution option to use for statements in a package.
CURRENTDATA
YES, NO
X
X
X
Whether to require data currency for RO and ambiguous cursors when isolation level is CS
CURRENT
Location-name
X
SERVER
Determines the location to connect to before running the plan
DBPROTOCOL
DRDA
X
X
Protocol to use when connecting to a remote site that is identified by a three-part name
DEFER
DEFER(PREPARE),
X
X
NODEFER(PREPARE),
DEFER(INHERITFROMPLAN)
Whether to defer preparation of dynamic SQL statements that refer to remote objects or to prepare
them immediately.
DEFER(PREPARE) is assumed for REOPT(AUTO, ALWAYS and ONCE)
DEGREE
1, ANY
X
X
Whether to attempt to run a query using parallel processing to maximize performance
DEPLOY
(collection-id.package-id),
X
COPYVER(version-id)
Deploys a native SQL procedure
DISCONNECT
EXPLICIT, AUTOMATIC,
X
CONDITIONAL
Determines which remote connections to destroy during commit operations
DYNAMICRULES RUN, BIND,DEFINEBIND(PKG ONLY),
X
X
DEFINERUN (PKG ONLY),
INVOKEBIND(PKG ONLY),
INVOKERUN(PKG ONLY)
DEFINEBIND, DEFINERUN,
X
INVOKEBIND, INVOKERUN
Determines which values apply at runtime for dynamic SQL attributes
ENABLE/
BATCH, CICS, DB2CALL, DLIBATCH,
X
X
DISABLE
IMS, IMSBMP, IMSMPP, RRSAF , *
REMOTE
X
Determines which connections can use the plan or package
ENCODING
ASCII, EBCDIC, UNICODE, ccsid
X
X
Application encoding for all static statements in the plan or package (defaults to installed selection)
EXPLAIN
NO, YES, ONLY
X
X
X
Whether to populate the PLAN_TABLE with information about the SQL statements
EXTENDED
NO, YES
X
INDICATOR
Determines if DB2 recognizes extended indicator variables when associated package is run
DB2 10 for z/OS

215

YL&A DB2 10 for z/OS Reference Guide


Option
Valid values
Plan
Pckg
Trigr
Qry
FILTER
filter-name
X
X
FQ
Allows you delete a set of queries in the SYSIBM.SYSQUERY table under a {tag} value specified by
the SYSQUERY.USERFILTER column. Also works with FREE QUERY
FLAG
I, W, E, C
X
X
X
Determines what messages to display
GENERIC
string
X
X
Specifies one or more bind options that are supported by the target server, but are not supported by
DB2 for z/OS as options for BIND PACKAGE or REBIND PACKAGE.
IMMEDIATE
NO, YES, INHERITFROMPLAN
X
X
Whether immediate writes will be done for updates made to GBP-dependent page sets/partitions
ISOLATION
RR, RS, CS, UR, NC
X
X
X
Determines how far to isolate an application from the effects of other running applications
KEEPDYNAMIC
NO, YES
X
X
Determines whether DB2 keeps dynamic SQL statements after commit points
LIBRARY
dbrm-pds-name (can be multiple for
X, BO
X, BO
PLAN)
Determines which partitioned data set to search for DBRMs listed in the member option
LOOKUP
NO, YES
BQ
Determines whether a query has matching access plan hint information in the
SYSIBM.SYSQUERYPLAN table.
MEMBER
dbrm-member-name
X, BO
X, BO
Determines what DBRMs to include in the plan or package
OPTHINT
Hint-id
X
X
Controls whether query optimization hints are used for static SQL
OPTIONS
COMPOSITE, COMMAND
X, BC
Specifies which bind options to use for the new package
OWNER
Authorization-id
X
X
Determines the authorization ID or the owner of the object (plan or package)
PACKAGE
Location-name.collection-id.package-id
X
(version-id)
(*) Rebind Only
X,RO
Determines which package or packages to bind or rebind
PATH
Schema-name, USER, (schema-name,
X
X
(USER))
SQL path that DB2 uses to resolve unqualified UDTs, functions, and stored procedure names
PATHDEFAULT
Mutually exclusive with PATH
X
X
Resets PATH for package or plan to SYSIBM, SYSFUN, SYSPROC, or plan/package qualifier
PKLIST or
(Location-name.collection-id.packageX
NOPKLIST
id...), PKLIST only
Determines which package to include for the package list in the plan
PLAN
Plan-name
X
(*)
X, RO
Determines which plan or plans to bind or rebind
PLANMGMT
OFF, BASIC, EXTENDED
X
X
Retains, during a rebind operation, all relevant package information (metadata, query text,
dependencies, authorizations, access paths, and so on) in catalog tables and in the directory.
QUALIFIER
Qualifier-name
X
X
Determines the implicit qualifier for unqualified names of objects in the plan or package
QUERYID
number, ALL
X
X
FQ
Frees entries from SYSIBM.SYSQUERY with same value ( or ALL), and corresponding entries in
216

DB2 10 for z/OS

YL&A DB2 10 for z/OS Reference Guide


Option
Valid values
Plan
Pckg
Trigr
Qry
SYSIBM.SYSQUERYPLAN table or SYSIBM.SYSQUERYOPTS table.
RECORD
YES, NO
X
TEMPORAL
HISTORY
Whether changes to data in a system-period temporal table that are made by static or dynamic SQL
statements cause changes to corresponding history table of the system-period temporal table.
RELEASE
COMMIT, DEALLOCATE,
X
X
X
INHERITFROMPLAN
Determines when to release resources that the program uses, either at commit or at termination
REOPT
ONCE, ALWAYS, AUTO, NONE
X
X
If access path is determined at runtime (host variables, parameter markers, special registers)
ROUNDING
CEILING, DOWN, FLOOR
X
X
HALFDOWN, HALFEVEN, HALFUP,
UP
Specifies the rounding mode at bind time
SQLERROR
NOPACKAGE, CONTINUE,CHECK
X
Whether to create a package if the package contains an SQL error
SQLRULES
DB2, STD
X
Whether a Type 2 connection can be made according to DB2 rules for an existing connection
SWITCH
PREVIOUS, ORGINAL
X
X
Restores all previous or original package information in the catalog tables and directory to that of the
specified package copy
VALIDATE
RUN, BIND
X
X
Whether to recheck at runtime not found and not authorized errors found at bind time
BO = BIND only, BC = BIND COPY, RO = REBIND only, FQ=FREE QUERY, BQ = BIND QUERY
BOLD/UNDERSCORE = default

DB2 10 for z/OS

217

YL&A DB2 10 for z/OS Reference Guide

DB2 Limits
Identifier Length Limits
Item
External-java-routine-name
Name of an alias, auxiliary table, collection, clone
table, constraint, correlation, cursor (except for
DECLARE CURSOR WITH RETURN or the
EXEC SQL utility), distinct type (both parts of
two-part name), function (both parts of two-part
name), host identifier, index, JARs, parameter,
procedure, role, schema, sequence, specific,
statement, storage group, savepoint, SQL
condition, SQL label, SQL parameter, SQL
variable, synonym, table, trigger, view, XML
attribute name, XML element name
Name of an authID or name of a security label.
Routine version identifier
Name of a column
Name of cursor that is created with DECLARE
CURSOR WITH RETURN
Name of cursor created with EXEC SQL utility
Name of a location
Name of buffer pool name, catalog, database,
plan, program, table space
Name of package

Name of a profile created with CREATE/ALTER


TRUSTED CONTEXT

Limit
1305 bytes
128 bytes

8 bytes
64 EBCDIC bytes, and UTF-8 representation of
the name must not exceed 122 bytes.
30 bytes
30 bytes
8 bytes
16 bytes
8 bytes
8 bytes (Only 8 EBCDIC characters are used
for packages that are created with the BIND
PACKAGE command. 128 bytes can be used
for packages that are created as a result of the
CREATE FUNCTION (SQL scalar) statement,
the CREATE PROCEDURE (SQL - native)
statement, or the CREATE TRIGGER
statement.)
127 bytes

Numeric Limits
Item
Smallest SMALLINT value
Largest SMALLINT value
Smallest INTEGER value
Largest INTEGER value
Smallest BIGINT value
Largest BIGINT value
Smallest REAL value
Largest REAL value
Smallest positive REAL value
Largest negative REAL value
218

Limit
-32768
32767
-2147483648
2147483647
-9223372036854775808
9223372036854775807
About -7.2*10(75)
About 7.2*10(75)
About 5.4*10(-79)
About -5.4*10(-79)
DB2 10 for z/OS

YL&A DB2 10 for z/OS Reference Guide


Item
Smallest FLOAT value
Largest FLOAT value
Smallest positive FLOAT value
Largest negative FLOAT value
Smallest DECIMAL value
Largest DECIMAL value
Largest DECIMAL precision
Smallest DECFLOAT(16) value
Largest DECFLOAT(16) value
Smallest positive DECFLOAT(16) value
Largest negative DECFLOAT(16) value
Smallest DECFLOAT(34) value
Largest DECFLOAT(34) value
Smallest positive DECFLOAT(34) value
Largest negative DECFLOAT(34) value
Coefficient length for DECFLOAT values
Max Exponent (Emax) for DECFLOAT
Min Exponent (Emin) for DECFLOAT
Bias for DECFLOAT values

Limit
About -7.2*10(75)
About 7.2*10(75)
About 5.4*10(-79)
About -5.4*10(-79)
1 - 10(31)
10(31) - 1
31
384
-9.99999999999999910
384
9.99999999999999910
-383
1.00000000000000010
-383
-1.00000000000000010
6144
-9.99999999999999999999999999999999910
6144
9.99999999999999999999999999999999910
-6143
1.00000000000000000000000000000000010
-6143
-1.00000000000000000000000000000000010
DECFLOAT(16) 16 digits; DECFLOAT(34) 34 digits
DECFLOAT(16) is 384; DECFLOAT(34) is 6144
DECFLOAT(16) is -383; DECFLOAT(34) is -6143
DECFLOAT(16) is 398; DECFLOAT(34) is 6176

String Length Limits


Item
Max length of CHAR
Max length of GRAPHIC
Max length of BINARY
Max length of VARCHAR

Limit
255 bytes
127 DBCS characters
255 bytes
4046 bytes for 4-KB pages
8128 bytes for 8-KB pages
16320 bytes for 16-KB pages
32704 bytes for 32-KB pages

Max length of VARCHAR indexed by an XML index


Max length of VARGRAPHIC

100 bytes after conversion to UTF-8


2023 DBCS characters for 4-KB pgs
4064 DBCS characters for 8-KB pgs
8160 DBCS characters for 16-KB pgs
16352 DBCS characters for 32-KB pgs
32704 bytes
2 147 483 647 bytes (2GB - 1 byte)
1 073 741 824 DBCS characters
2 147 483 647 bytes (2GB - 1 byte)
32704 UTF-8 bytes
32704 hexadecimal digits
32704 UTF-8 bytes
32704 hexadecimal digits
4000 UTF-8 bytes
2 147 483 647 bytes (2GB - 1 byte)
1 073 741 824 DBCS characters
2 147 483 647 bytes (2GB - 1 byte)
4000 bytes after conversion to UTF-8
1000 bytes

Max length of VARBINARY


Max length of CLOB
Max length of DBCLOB
Maxlength of BLOB
Max length of a character constant
Max length of a hexadecimal character constant
Max length of a graphic string constant
Max length of a hexadecimal graphic string constant
Max length of a text string used for a scalar expression
Max length of a concatenated character string
Max length of a concatenated graphic string
Max length of a concatenated binary string
Max length of XML pattern text
Max length of an XML element or attribute name in an
XML document
DB2 10 for z/OS

219

YL&A DB2 10 for z/OS Reference Guide


Item
Maximum length of a namespace uri
Maximum length of a namespace prefix
Largest depth of an internal XML tree

Limit
1000 bytes
998 bytes
128 levels

Datetime Limits
Item
Smallest DATE value (shown in ISO format)
Largest DATE value (shown in ISO format)
Smallest TIME value (shown in ISO format)
Largest TIME value (shown in ISO format)
Smallest TIMESTAMP WITHOUT TIME ZONE value
Largest TIMESTAMP WITHOUT TIME ZONE value
Smallest TIMESTAMP WITH TIME ZONE value
Largest TIMESTAMP WITH TIME ZONE value
TIMSTAMP precision range
TIME ZONE hour range
TIME ZONE minute range

Limit
0001-01-01
9999-12-31
00.00.00
24.00.00
0001-01-01-00.00.00.000000000000
9999-12-31-24.00.00.000000000000
0001-01-01-00.00.00.000000000000 +00:00
9999-12-31-24.00.00.000000000000 +00:00
0 to 12
-12 to 14
0 to 59

DB2 Limits on SQL Statements


Item
Max number of columns in a table or view
(depending on complexity of the view) or
columns returned by a table function.
Max number of base tables in a view,
SELECT, UPDATE, INSERT, or DELETE
Max number of rows that can be inserted with
a single INSERT or MERGE statement
Max row and record sizes for a table
Max number of volume IDs in a storage group
Max number of partitions in a partitioned
tablespace or partitioned index
Max sum of the lengths of limit key values of a
partition boundary
Max size of a partition (tablespace or index)

Maximum size of a non-partitioned index for a


partitioned table space

220

Limit
750 or fewer (including hidden columns)
749 if the table is a dependent
225
32767
Dependent on type of table created
133
64 for tablespaces that are not defined with
LARGE or a DSSIZE > 2GB 4096, depending on
DSSIZE or LARGE and the page size
765 UTF-8 bytes
For tablespaces that are not defined with LARGE
or a DSSIZE greater than 2GB:
4GB, for 1 to 16 partitions
2GB, for 17 to 32 partitions
1GB, for 33 to 64 partitions
For tablespaces that are defined with LARGE:
4GB, for 1 to 4096 partitions
For tablespaces defined with a DSSIZE > 2GB:
64GB, depending on the page size, (1 to 256
partitions for 4KB, 1 to 512 partitions for 16KB, 1 to
1024 partitions for 32KB, and 1 to 2048 for 32KB)
For 5-byte EA table space:
16TB for 4KB pages
32TB for 8KB pages
64TB for 16KB pages
128TB for 32KB pages
DB2 10 for z/OS

YL&A DB2 10 for z/OS Reference Guide


Item
Max length of an index key

Max number of bytes used in the partitioning


of a partitioned index
Maxnumber of expressions in an index key
Max number of columns in an index key
Max number of tables in a FROM clause
Max number of subqueries in a statement
Max total length of host and indicator variables
pointed to in an SQLDA
Longest host variable used for insert or update

Longest SQL statement


Maxnumber of elements in a select list
Max num of predicates WHERE or HAVING
Max total length of columns of a query
operation requiring a sort key (SELECT
DISTINCT, ORDER BY, GROUP BY, UNION,
EXCEPT and INTERSECT, without ALL, and
DISTINCT keyword for aggregate functions)
Max total length of columns of a query
operation requiring a sort and evaluating
column functions (DISTINCT and GROUP BY)
Maxlength of a sort key
Max length of a table check constraint
Max number of bytes that can be passed in a
single parameter of an SQL CALL statement
Max number of stored procedures, triggers,
and user-defined functions that an SQL
statement can implicitly or explicitly reference
Max length of the SQL path
Max length of a WLM environment name in a
CREATE/ALTER PROCEDURE/FUNCTION,
Max number of XPath level in XMLPATTERN
clause of the CREATE INDEX statement.

Limit
For LARGE tablespaces: 16TB
Partitioning index: 255-n
Nonpartitioning index padded 2000-n
Nonpartitioning index not padded 2000-n-2m
N=number of columns in the key that allow nulls,
and m is number of varying length columns in key
255 (This maximum limit is subject to additional
limitations, depending on the number of partitions
in the table space. The number of partitions * (106
+ limit key size) must be less than 65394.)
64
64
225 or less, depending on complexity of statement
224
32767 bytes
2 147 483 647 bytes (2GB - 1 byte) for a LOB,
subject to the limitations imposed by the
application environment and host language
32704 bytes for a non-LOB
2 147 483 647 bytes (2GB - 1 byte) for a LOB,
subject to the limitations imposed by the
application environment and host language
2097152 bytes
750 or fewer, depending on whether the select list
is for the result table of a static scrollable cursor
Limited by storage
4000 bytes

32600 bytes
16000 bytes
3800 bytes
32765 bytes for a non-LOB
2 147 483 647 bytes (2GB - 1 byte) for a LOB,
subject to the limitations imposed by the
application environment and host language
64 nesting levels
2048 bytes
32 bytes
50 nesting levels

DB2 System Limits


DB2 10 for z/OS

221

YL&A DB2 10 for z/OS Reference Guide


Item
Max number of concurrent DB2 or application
agents
Largest non-LOB table or tablespace
Largest simple or segmented table space
Largest log space
Largest active log data set
Largest archive log data set
Max number of active log copies
Maxnumber of archive log copies
Max number of active log data sets (each copy)
Max number of archive log volumes (each copy)
Max number of databases accessible to an
application or end user
Largest EDM pool
Max number of databases
Max number of implicitly created databases
Max number of rows per page
Maxnumber of implicitly created databases
Maxnumber of indexes on declared global
temporary tables
Max simple or segmented data set size
Max partitioned data set size
Max LOB data set size
Max number of rows that can be inserted with a
single INSERT statement
Max number of table spaces that can be defined
in a work file database
Max number of tables and triggers that can be
defined in a work file database

222

Limit
Limited by EDM pool size, buffer pool size, and
amount of storage used by each DB2 or agent
128 TB
64 GB
48
2 bytes
4 GB 1 byte
4 GB 1 byte
2
2
93
10000
Limited by system storage and EDM pool size
The installation parameter maximum depends
on available space
65271
10000
255 for all tablespaces except catalog and
directory(maximum of 127)
60000
10000
2GB
See "maximum size of a partition"
64GB
32767 rows
500
11767

DB2 10 for z/OS

YL&A DB2 10 for z/OS Reference Guide

SQL Communication Area (SQLCA)


Assembler,
COBOL, or
PL/I Name
SQLCAID

C
Name
sqlcaid

Data
type
CHAR(8)

SQLCABC
SQLCODE

sqlcabc
SQLCODE

INTEGER
INTEGER

SQLERRML

sqlerrml

SMALLINT

SQLERRMC

sqlerrmc

VARCHAR(70)

SQLERRP

sqlerrp

CHAR(8)

SQLERRD(1)

sqlerrd[0]

INTEGER

SQLERRD(2)

sqlerrd[1]

INTEGER

DB2 10 for z/OS

Purpose
eye catcher for storage dumps, containing the
text 'SQLCA'. Sixth byte is L if line number
information is returned from parsing a dynamic
statement or a native SQL procedure. Is not set
when processing an external SQL procedure.
Contains the length of the SQLCA: 136.
Contains the SQL return code.
0 = Successful execution
Positive = Successful execution, but with an
exception condition.
Negative = Error condition.
Length indicator for SQLERRMC, in the range 0
through 70.0 means that the value of
SQLERRMC is not pertinent.
Contains one or more tokens, separated by
X'FF', that are substituted for variables in the
descriptions of error conditions. It may contain
truncated tokens. A message length of 70 bytes
indicates a possible truncation.
Provides a product signature and, in the case of
an error, diagnostic information such as the
name of the module that detected the error.
First three characters are 'DSN' .
For a sensitive static cursor, contains the
number of rows in a result table when the
cursor position is after the last row (that is,
when SQLCODE is equal to +100). Can also
contain an internal error code.
For a sensitive static cursor, contains the
number of rows in a result table when the
cursor position is after the last row (that is,
when SQLCODE is equal to +100). Can also
contain an internal error code.

223

YL&A DB2 10 for z/OS Reference Guide


Assembler,
COBOL, or
PL/I Name
SQLERRD(3)

C
Name
sqlerrd[2]

Data
type
INTEGER

SQLERRD(4)

sqlerrd[3]

INTEGER

224

Purpose
Contains the number of rows that qualified to be
deleted, inserted, or updated after an INSERT,
MERGE, UPDATE, or DELETE statement. The
number excludes rows affected by either
triggers or referential integrity constraints. The
number excludes rows affected by triggers,
referential integrity constraints, or inserted rows
that are the result of processing a FOR
PORTION OF clause for a BUSINESS_TIME
period.For the OPEN of a cursor for a SELECT
with a data change statement or for a SELECT
INTO, SQLERRD(3) contains the number of
rows affected by the embedded data change
statement. The value is 0 if the SQL statement
fails, indicating that all changes made in
executing the statement canceled. For a
DELETE statement the value will be -1 if the
operation is a mass delete from a table in a
segmented table space and the DELETE
statement did not include selection criteria. If
the delete was against a view, neither the
DELETE statement nor the definition of the view
included selection criteria. For a TRUNCATE
statement, the value will be -1. For a REFRESH
TABLE statement, SQLERRD(3) contains the
number of rows inserted into the materialized
query table. For a rowset-oriented FETCH,
contains the number of rows fetched. For
SQLCODES -911 and -913, SQLERRD(3)
contains the reason code for the timeout or
deadlock. When an error is encountered in
parsing a dynamic statement, or when parsing,
binding, or executing a native SQL procedure,
SQLERRD(3) will contain the line number
where the error was encountered. The sixth
byte of SQLCAID must be L for this to be a
valid line number. This value will be meaningful
only if the statement source contains new line
control characters. This information is not
returned for an external SQL procedure.
Generally contains timerons, a short floatingpoint value that indicates a rough relative
estimate of resources required. It does not
reflect an estimate of the time required. When
preparing a dynamically defined SQL
statement, you can use this field as an indicator
of the relative cost of the prepared SQL
statement. For a particular statement, this
number can vary with changes to the statistics
in the catalog. It is also subject to change
between releases of DB2 for z/OS.
DB2 10 for z/OS

YL&A DB2 10 for z/OS Reference Guide


Assembler,
COBOL, or
PL/I Name
SQLERRD(5)

C
Name
sqlerrd[4]

Data
type
INTEGER

SQLERRD(6)
SQLWARN0

sqlerrd[5]
SQLWARN0

INTEGER
CHAR(1)

SQLWARN1

SQLWARN1

CHAR(1)

SQLWARN2

SQLWARN2

CHAR(1)

SQLWARN3

SQLWARN3

CHAR(1)

SQLWARN4

SQLWARN4

CHAR(1)

SQLWARN5

SQLWARN5

CHAR(1)

SQLWARN6

SQLWARN6

CHAR(1)

SQLWARN7

SQLWARN7

CHAR(1)

SQLWARN8

SQLWARN8

CHAR(1)

DB2 10 for z/OS

Purpose
Contains the position or column of a syntax
error for a PREPARE or EXECUTE
IMMEDIATE statement.
Internal error code.
W if at least one other indicator also contains a
W; otherwise, contains a blank.
W if the value of a string column was truncated
when assigned to a host variable. Contains an
N for non-scrollable cursors and S for scrollable
cursors after the OPEN CURSOR or
ALLOCATE CURSOR statement. If subsystem
parameter DISABSCL is set to YES, the field
will not be set to N for non-scrollable cursors.
W if null values were eliminated from the
argument of a column function; not necessarily
set to W for the MIN function because its results
are not dependent on the elimination of null
values.
W if the number of result columns is larger than
the number of host variables. Z if fewer locators
were provided in the ASSOCIATE LOCATORS
statement than the stored procedure returned.
W if a prepared UPDATE or DELETE statement
does not include a WHERE clause. For
scrollable cursor, D for sensitive dynamic
cursors, I for insensitive cursors, and S for
sensitive cursors after the OPEN CURSOR or
ALLOCATE CURSOR statement; blank if not
scrollable. If DSNZPARM DISABSCL is set to
YES, set to N for non-scrollable cursors.
W if the SQL statement was not executed
because it is not a valid SQL statement in DB2
for z/OS. Character value of 1 (read only), 2
(read and delete), or 4 (read, delete, and
update) to reflect capability of the cursor after
the OPEN CURSOR or ALLOCATE CURSOR
statement. If DISABSCL is set to YES, the field
will not be set to N for non-scrollable cursors.
W if addition of a month or year duration to a
DATE or TIMESTAMP value results in invalid
day. Indicates that the value of the day was
changed to the last day of the month to make
the result valid.
W if one or more nonzero digits were eliminated
from the fractional part of a number used as the
operand of a decimal multiply or divide
operation.
W if a character that could not be converted
was replaced with a substitute character.

225

YL&A DB2 10 for z/OS Reference Guide


Assembler,
COBOL, or
PL/I Name
SQLWARN9

C
Name
SQLWARN9

Data
type
CHAR(1)

SQLWARNA

SQLWARNA

CHAR(1)

SQLSTATE

sqlstate

CHAR(5)

Purpose
W if arithmetic exceptions were ignored during
COUNT or COUNT_BIG processing. Z if the
stored procedure returned multiple result sets.
W if at least one character field of the SQLCA
or the SQLDA names or labels is invalid due to
a character conversion error.
A return code for the outcome of the most
recent execution of an SQL statement.

The REXX SQLCA


Variable
SQLCODE
SQLERRMC
SQLERRP
SQLERRD.1
SQLERRD.2
SQLERRD.3

SQLERRD.4

SQLERRD.5
226

Contents
The SQL return code.
One or more tokens, separated by X'FF', that are substituted for variables in the
descriptions of error conditions. It may contain truncated tokens. A message length
of 70 bytes indicates a possible truncation.
A product signature and, in the case of an error, diagnostic information such as the
name of the module that detected the error. For DB2 for z/OS, the product
signature is DSN.
For a sensitive static cursor, contains the number of rows in a results table when
the cursor position is after the last row (that is, when SQLCODE is equal to +100)
Can also contain an internal error code.
For a sensitive static cursor, contains the number of rows in a results table when
the cursor position is after the last row (that is, when SQLCODE is equal to +100)
Can also contain an internal error code.
Contains the number of rows that qualified for the operation after an SQL data
change statement (but not rows deleted as a result of CASCADE delete). For the
OPEN of a cursor for a SELECT with an SQL data change statement or for a
SELECT INTO, SQLERRD(3) contains the number of rows affected by the
embedded data change statement. Set to 0 if the SQL statement fails, indicating
that all changes made in executing the statement were canceled. Set to -1 for a
mass delete from a table in a segmented table space, for a truncate operation, or a
delete from a view when neither the DELETE statement nor the definition of the
view included selection criteria. For rowset-oriented FETCH statements, contains
the number of rows returned in the rowset. For SQLCODES -911 and -913,
SQLERRD(3) contains the reason code for the timeout or deadlock. After
successful execution of the REFRESH TABLE statement, SQLERRD(3) contains
the number of rows inserted into the materialized query table. When an error is
encountered in parsing a dynamic statement, or when parsing, binding, or
executing a native SQL procedure, SQLERRD(3) will contain the line number
where the error was encountered. The sixth byte of SQLCAID must be L for this to
be a valid line number. This value will be meaningful only if the statement source
contains new line control characters. Not returned for an external SQL procedure.
Generally contains timerons, a short floating-point value that indicates a rough
relative estimate of resources required. This value does not reflect an estimate of
the time required to execute the SQL statement. After you prepare an SQL
statement, you can use this field as an indicator of the relative cost of the prepared
SQL statement. For a particular statement, this number can vary with changes to
the statistics in the catalog. Subject to change between releases of DB2 for z/OS.
The position or column of a syntax error for a PREPARE or EXECUTE
DB2 10 for z/OS

YL&A DB2 10 for z/OS Reference Guide


Variable

Contents
IMMEDIATE statement.
An internal error code.
Blank if all other indicators are blank; W if at least one indicator also contains a W.
W if the value of a string column was truncated when assigned to a host variable.
W if null values were eliminated from the argument of a column function; not
necessarily set to W for the MIN function because its results are not dependent on
the elimination of null values.
W if the number of result columns is larger than the number of host variables. Z if
the ASSOCIATE LOCATORS statement contains fewer locators than the stored
procedure returned.
W if a prepared UPDATE or DELETE statement does not include a WHERE
clause. For a scrollable cursor, contains a D for sensitive dynamic cursors, I for
insensitive cursors, and S for sensitive cursors after the OPEN CURSOR or
ALLOCATE CURSOR statement, blank if not scrollable.
W if the SQL statement was not executed because it is not a valid SQL statement
in DB2 for z/OS. Character value of 1 (read only), 2 (read and delete), or 4 (read,
delete, and update) to reflect capability of the cursor after the OPEN CURSOR or
ALLOCATE CURSOR statement.
W if the addition of a month or year duration to a DATE or TIMESTAMP value
results in an invalid day (for example, June 31). Indicates that the value of the day
was changed to the last day of the month to make the result valid.
W if one or more nonzero digits were eliminated from the fractional part of a
number that was used as the operand of a decimal multiply or divide operation.
W if a character that could not be converted was replaced with substitute character.
W if arithmetic exceptions were ignored during COUNTor COUNT_BIG processing.
Z if the stored procedure returned multiple result sets.
W if at least one character field of the SQLCA is invalid due to a character
conversion error.
A return code for the outcome of the most recent execution of an SQL statement.

SQLERRD.6
SQLWARN.0
SQLWARN.1
SQLWARN.2
SQLWARN.3
SQLWARN.4

SQLWARN.5

SQLWARN.6
SQLWARN.7
SQLWARN.8
SQLWARN.9
SQLWARN.10
SQLSTATE

GET DIAGNOSTICS
Statement Information
Item
DB2_GET_DIAGNOSTICS
_DIAGNOSTICS
DB2_LAST_ROW
DB2_NUMBER_
PARAMETER_MARKERS
DB2_NUMBER_RESULT_
SETS
DB2_NUMBER_ROWS

DB2 10 for z/OS

Description
After a GET DIAGNOSTICS statement, if any
error or warning occurred, this item contains all
of the diagnostics as a single string
After a multiple-row FETCH statement, contains
a value of +100 if the last row in the table is in
the rowset that was returned.
After a PREPARE statement, contains number
of parameter markers in the prepared statement.
After a CALL statement that invokes a stored
procedure, this item contains the number of
result sets that are returned by the procedure.
After an OPEN or FETCH statement for which
the size of the result table is known, this item
contains the number of rows in the result table.
After a PREPARE statement, this item contains

Data type
VARCHAR(32672)
INTEGER
INTEGER
INTEGER
DECIMAL(31,0)

227

YL&A DB2 10 for z/OS Reference Guide


Item

DB2_RETURN_STATUS
DB2_SQL_ATTR
_CURSOR_HOLD
DB2_SQL_ATTR_
CURSOR_ROWSET
DB2_SQL_ATTR
_CURSOR_SCROLLABLE
DB2_SQL_ATTR
_CURSOR_SENSITIVITY
DB2_SQL_ATTR
_CURSOR_TYPE
MORE
NUMBER

ROW_COUNT

Description
the estimated number of rows in the result table
for the prepared statement. For SENSITIVE
DYNAMIC cursors, this item contains the
approximate number of rows.
After CALL statement that invokes an SQL
procedure, this item contains the return status if
the procedure contains a RETURN statement.
After ALLOCATE or OPEN statement, indicates
whether the cursor can be held open across
multiple units of work (Y or N).
After ALLOCATE or OPEN statement, indicates
whether the cursor can use rowset positioning
(Y or N).
After ALLOCATE or OPEN statement, indicates
whether the cursor is scrollable (Y or N).
After ALLOCATE or OPEN statement, indicates
whether the cursor shows updates made by
other processes (sensitivity A, I, or S).
After ALLOCATE or OPEN statement, indicates
whether the cursor is declared static (S for
INSENSITIVE or SENSITIVE STATIC) or
dynamic (D for SENSITIVE DYNAMIC).
After any SQL statement, indicates whether
some conditions items were discarded because
of insufficient storage (Y or N).
After any SQL statement, contains the number of
condition items. If no warning or error occurred,
or if no previous SQL statement has been
executed, the number that is returned is 1.
After DELETE, INSERT, UPDATE, or FETCH,
contains the number of rows that are deleted,
inserted, updated, or fetched. After PREPARE,
this item contains the estimated number of result
rows in the prepared statement.

Data type

INTEGER
CHAR(1)
CHAR(1)
CHAR(1)
CHAR(1)
CHAR(1)

CHAR(1)
INTEGER

DECIMAL(31,0)

Conditional Data Types


Item
CATALOG_NAME
CONDITION_NUMBER
CURSOR_NAME
DB2_ERROR_CODE1
DB2_ERROR_CODE2
DB2_ERROR_CODE3
DB2_ERROR_CODE4
DB2_INTERNAL
_ERROR_POINTER
DB2_LINE_NUMBER
228

Description
The server name of the table that owns a
constraint that caused an error, or that
caused an access rule or check violation.
Number of the condition.
Name of a cursor in an invalid cursor state.
This item contains an internal error code
This item contains an internal error code
This item contains an internal error code.
This item contains an internal error code.
For some errors, a negative value that is an
internal error pointer.
Line number where an error is encountered

Data type
VARCHAR(128)
INTEGER
VARCHAR(128)
INTEGER
INTEGER
INTEGER
INTEGER
INTEGER
INTEGER
DB2 10 for z/OS

YL&A DB2 10 for z/OS Reference Guide


Item
DB2_MESSAGE_ID
DB2_MODULE_
DETECTING _ERROR
DB2_ORDINAL_TOKEN_n
DB2_REASON_CODE
DB2_RETURNED_SQLCODE
DB2_ROW_NUMBER
DB2_TOKEN_COUNT
MESSAGE_TEXT
RETURNED_SQLSTATE
SERVER_NAME

Description
in parsing a dynamic statement.
Message ID that corresponds to the
message that is contained in the CHAR(10)
MESSAGE_TEXT diagnostic item.
After any SQL statement, indicates which
module detected the error
After any SQL statement, contains the nth
token, where n is a value from 1 to 100.
After any SQL statement, reason code for
errors with reason code token in message
text.
After any SQL statement, contains the
SQLCODE for the condition.
After any SQL statement that involves
multiple rows, contains the row number on
which DB2 detected the condition.
After any SQL statement, contains the
number of tokens available for the condition.
After any SQL statement, contains message
text associated with the SQLCODE.
After any SQL statement, contains the
SQLSTATE for the condition.
After a CONNECT, DISCONNECT, or SET
CONNECTION statement, contains the
name of the server specified in statement.

Data type
INTEGER
CHAR(8)
VARCHAR(515)
INTEGER
INTEGER
DECIMAL(31,0)
INTEGER
VARCHAR(32672)
CHAR(5)
VARCHAR(128)

Connection Information
Item
DB2_AUTHENTICATION_TYPE
DB2_AUTHORIZATION_ID
DB2_CONNECTION_STATE
DB2_CONNECTION_STATUS
DB2_ENCRYPTION_TYPE

DB2_SERVER_CLASS_NAME
DB2_PRODUCT_ID

DB2 10 for z/OS

Description
Authentication type (S, C, T or blank).
Authorization ID used by connected server.
Indicates whether connection is unconnected
(-1), local (0), or remote (1).
Indicates whether updates can be committed
for the current unit of work (1=Yes, 2= No).
One of the following values indicating the
level of encryption for the connection:
A = Only Authentication tokens (authid and
password) are encrypted
D = All data for the connection is encrypted
After a CONNECT or SET CONNECTION
statement, contains DB2 server class name.
Contains the DB2 product signature.

Data type
CHAR(1)
VARCHAR(128)
INTEGER
INTEGER
CHAR(1)

VARCHAR(128)
VARCHAR(8)

229

YL&A DB2 10 for z/OS Reference Guide

Predicates
Predicate Type
COL = value
COL = noncol expr
COL IS NULL
COL op value
COL op noncol expr
COL BETWEEN value1 AND value2
COL BETWEEN noncol expr1 AND noncol expr2
value BETWEEN COL1 AND COL2
COL BETWEEN COL1 AND COL2
COL BETWEEN expression1 AND expression2
COL LIKE 'pattern'
COL IN (list)
COL <> value
COL <> noncol expr
COL IS NOT NULL
COL NOT BETWEEN value1 AND value2
COL NOT BETWEEN noncol expr1 AND noncol expr2
value NOT BETWEEN COL1 AND COL2
COL NOT IN (list)
COL NOT LIKE char
COL LIKE '%char'
COL LIKE '_char'
COL LIKE host variable
T1.COL = T2 col expr
T1.COL op T2 col expr
T1.COL <> T2 col expr
T1.COL1 = T1.COL2
T1.COL1 op T1.COL2
T1.COL1 <> T1.COL2
COL=(noncor subq)
COL = ANY (noncor subq)
COL = ALL (noncor subq)
COL op (noncor subq)
COL op ANY (noncor subq)
COL op ALL (noncor subq)
COL <> (noncor subq)
COL <> ANY (noncor subq)
COL <> ALL (noncor subq)
COL IN (noncor subq)
(COL1,...COLn) IN (noncor subq)
COL NOT IN (noncor subq)
(COL1,...COLn) NOT IN (noncor subq)
COL = (cor subq)
COL = ANY (cor subq)
COL = ALL (cor subq)
COL op (cor subq)
COL op ANY (cor subq)
COL op ALL (cor subq)
230

Indexable
Y
Y
Y
Y
Y
Y
Y
N
N
Y
Y
Y
N
N
Y
N
N
N
N
N
N
N
Y
Y
Y
N
N
N
N
Y
Y
N
Y
Y
Y
N
N
N
Y
Y
N
N
N
Y
N
N
N
N

Stage 1
Y
Y
Y
Y
Y
Y
Y
N
N
Y
Y
Y
Y
Y
Y
Y
Y
N
Y
Y
Y
Y
Y
Y
Y
Y
N
N
N
Y
Y
N
Y
Y
Y
Y
N
N
Y
Y
N
N
N
Y
N
N
N
N
DB2 10 for z/OS

YL&A DB2 10 for z/OS Reference Guide


COL <> (cor subq)
COL <> ANY (cor subq)
COL <> ALL (cor subq)
COL IN (cor subq)
(COL1,...COLn) IN (cor subq)
COL NOT IN (cor subq)
(COL1,...COLn) NOT IN (cor subq)
COL IS DISTINCT FROM value
COL IS NOT DISTINCT FROM value
COL IS DISTINCT FROM noncol expr
COL IS NOT DISTINCT FROM noncol expr
T1.COL1 IS DISTINCT FROM T2.COL2
T1.COL1 IS NOT DISTINCT FROM T2.COL2
T1.COL1 IS DISTINCT FROM T2 col expr
T1.COL1 IS NOT DISTINCT FROM T2 col expr
COL IS DISTINCT FROM (noncor subq)
COL IS NOT DISTINCT FROM (noncor subq)
COL IS NOT DISTINCT FROM (cor subq)
EXISTS (subq)
NOT EXISTS (subq)
expression = value
expression <> value
expression op value
expression op (subq)
XMLEXISTS
NOT XMLEXISTS

DB2 10 for z/OS

N
N
N
Y
N
N
N
N
Y
N
Y
N
N
N
Y
N
Y
N
N
N
N
N
N
N
Y
N

N
N
N
Y
N
N
N
Y
Y
Y
Y
N
N
Y
Y
Y
Y
N
N
N
N
N
N
N
N
N

231

YL&A DB2 10 for z/OS Reference Guide

IFCIDS
Trace Type

Class IFCID

Description

ACCOUNTING

ALL ACCOUNTING

106

SYSTEM PARAMETERS IN EFFECT

200

UDF ENTRY/EXIT SIGNAL

239

OVERFLOW FOR PACKAGE ACCOUNTING

200

UDF ENTRY/EXIT SIGNAL

232

DB2 THREAD ENTRY/EXIT SIGNAL

BEGINNING OF A READ I/O OPERATION

CC AFTER READ I/O OPERATION

BEGINNING OF SYNCHRONOUS WRITE I/O

CC OF SYNC OR ASYNC WRITE I/O

32

BEGIN OF WAIT FOR LOG MANAGER

33

END OF WAIT FOR LOG MANAGER

44

LOCK SUSPEND OR IDENTIFY CALL IRLM

45

LOCK RESUME

51

SHARED LATCH RESUME. SERVICEABILITY

52

SHARED LATCH WAIT. SERVICEABILITY

56

EXCL. LATCH WAIT. SERVICEABILITY

57

EXCL. LATCH RESUME. SERVICEABILITY

117

BEGIN THREAD WAIT TIME FOR LOG I/O

118

END THREAD WAIT TIME FOR LOG I/O

127

AGENT READY TO SUSPEND PAGE WAIT

128

PAGE REQUESTOR RESUMED BY I/O INIT.

170

SUSPEND FOR SYNC EXEC.N UNIT SWITCH

171

RESUME AGENT WAITING DB2 SERV. TASK

174

BEGIN ARCHIVE LOG MODE (QUIESCE)

175

END ARCHIVE LOG MODE (QUIESCE)

213

BEGIN OF WAIT FOR CLAIM REQUEST

214

END OF WAIT FOR CLAIM REQUEST

215

BEGIN OF WAIT FOR DRAIN REQUEST

216

END OF WAIT FOR DRAIN REQUEST

226

BEGIN OF SUSPEND FOR PAGE LATCH

227

END OF SUSPEND FOR PAGE LATCH

242

BEGIN WAIT FOR SCHED. STORED PROC.

243

END WAIT FOR SCHED. STORED PROC.

2
3

232

DB2 10 for z/OS

YL&A DB2 10 for z/OS Reference Guide


Trace Type

Class IFCID

MESSAGES FOR LONG-RUNNING URS.

151

USER-DEFINED ACCOUNTING TRACE

187

ENTRY TO AND EXIT FROM IFI

200

DB2 THREAD ENTRY/EXIT SIGNAL

232

FOR PACKAGE/DBRM LEVEL ACCOUNTING

240

EVENT SIGNAL FOR PACKAGE ACCOUNTING

BEGINNING OF A READ I/O OPERATION

CC AFTER READ I/O OPERATION

BEGINNING OF SYNCHRONOUS WRITE I/O

CC OF SYNC OR ASYNC WRITE I/O

32

BEGIN OF WAIT FOR LOG MANAGER

33

END OF WAIT FOR LOG MANAGER

44

LOCK SUSPEND OR IDENTIFY CALL IRLM

45

LOCK RESUME

51

SHARED LATCH RESUME. SERVICEABILITY

52

SHARED LATCH WAIT. SERVICEABILITY

56

EXCL. LATCH WAIT. SERVICEABILITY

57

EXCL. LATCH RESUME. SERVICEABILITY

117

BEGIN THREAD WAIT TIME FOR LOG I/O

118

END THREAD WAIT TIME FOR LOG I/O

127

AGENT READY TO SUSPEND PAGE WAIT

128

PAGE REQUESTOR RESUMED BY I/O INIT.

170

SUSPEND FOR SYNC EXEC.N UNIT SWITCH

171

RESUME AGENT WAITING DB2 SERV. TASK

174

BEGIN ARCHIVE LOG MODE (QUIESCE)

175

END ARCHIVE LOG MODE (QUIESCE)

213

BEGIN OF WAIT FOR CLAIM REQUEST

214

END OF WAIT FOR CLAIM REQUEST

215

BEGIN OF WAIT FOR DRAIN REQUEST

216

END OF WAIT FOR DRAIN REQUEST

226

BEGIN OF SUSPEND FOR PAGE LATCH

227

END OF SUSPEND FOR PAGE LATCH

241

BEGIN/END SUSPENSION OF PACK/DBRM

242

BEGIN WAIT FOR SCHED. STORED PROC.

243

END WAIT FOR SCHED. STORED PROC.

10

339

PACKAGE DETAIL

140

AUTHORIZATION FAILURES

AUDIT
DB2 10 for z/OS

Description

313

233

YL&A DB2 10 for z/OS Reference Guide


Trace Type

Class IFCID

Description

141

EXPLICIT GRANT AND REVOKES

142

CREATES, ALTERS, DROPS AUDIT

143

FIRST ATTEMPTED WRITE AUDITED OBJ.

144

FIRST ATTEMPTED READ AUDITED OBJ.

145

AUDIT LOG RECORD OF SOME SQL STMTS

55

ISSUANCE OF SET CURRENT SQLID

83

END IDENTIFY REQUEST

87

ENDING OF SIGNON REQUEST

169

DISTRIBUTED AUTHID TRANSLATION

312

DCE SECURITY

23

UTILITY START INFORMATION

24

UTILITY OBJECT OR PHASE CHANGE

25

UTILITY END INFORMATION

219

LISTDEF DATA SET INFORMATION

220

UTILITY OUTPUT DATA SET INFORMATION

146

USER-DEFINED AUDIT TRACE

11

361

AUDIT ADMINISTRATIVE AUTHORITIES

SYSTEM SERVICES

DATABASE SERVICES

106

SYSTEM PARAMETERS IN EFFECT

124

CURRENT SQL STATEMENT

129

VSAM CI'S DB2 RECOVER LOG

147

SUMMARY THREAD STATUS RECORD

148

DETAILED THREAD STATUS RECORD

149

LOCK INFORMATION FOR A RESOURCE

150

LOCK INFORMATION FOR AN AGENT IFCID

202

SYSTEM PARAMETERS

230

DATA SHARING GLOBAL STATISTICS

254

GROUP BUFFER POOL USAGE

306

LOG RECORD RETRIEVAL

316

PREPARED STMT. CACHE STATISTICS

317

PREPARED STMT. CACHE STMT. TEXT

232

DB2 THREAD ENTRY EXIT SIGNAL

BEGINNING OF A READ I/O OPERATION

CC AFTER READ I/O OPERATION

BEGINNING OF SYNCHRONOUS WRITE I/O

CC OF SYN OR ASYNC WRITE I/O

MONITOR

234

DB2 10 for z/OS

YL&A DB2 10 for z/OS Reference Guide


Trace Type

Class IFCID

BEGIN OF WAIT FOR LOG MANAGER

33

END OF WAIT FOR LOG MANAGER

44

LOCK SUSPEND OR IDENTIFY CALL IRLM

45

LOCK RESUME

51

SHARED LATCH RESUME. SERVICEABILITY

52

SHARED LATCH WAIT. SERVICEABILITY

56

EXCL. LATCH WAIT. SERVICEABILITY

57

EXCL. LATCH RESUME. SERVICEABILITY

117

BEGIN THREAD WAIT TIME FOR LOG I/O

118

END THREAD WAIT TIME FOR LOG I/O

127

AGENT READY TO SUSPEND PAGE WAIT

128

PAGE REQUESTOR RESUMED BY I/O INIT.

170

SUSPEND FOR SYNC EXEC. UNIT SWITCH

171

RESUME AGENT WAITING DB2 SERV. TSK

174

BEGIN ARCHIVE LOG MODE (QUIESCE)

175

END ARCHIVE LOG MODE (QUIESCE)

213

BEGIN OF WAIT FOR CLAIM REQUEST

214

END OF WAIT FOR CLAIM REQUEST

215

BEGIN OF WAIT FOR DRAIN REQUEST

216

END OF WAIT FOR DRAIN REQUEST

226

BEGIN OF SUSPEND FOR PAGE LATCH

227

END OF SUSPEND FOR PAGE LATCH

242

BEGIN WAIT FOR SCHED. STORED PROC.

243

END WAIT FOR SCHED. STORED PROC.

155

USER-DEFINED MONITOR TRACE

187

ENTRY OR EXIT TO IFI

185

DATA CAPTURE INFORMATION

232

DB2 THREAD ENTRY/EXIT SIGNAL

232

FOR PACKAGE/DBRM-LEVEL ACCOUNTING

240

EVENT SIGNAL FOR PACKAGE ACCOUNTING

BEGINNING OF A READ I/O OPERATION

CC AFTER READ I/O OPERATION

BEGINNING OF SYNCHRONOUS WRITE I/O

CC OF SYN OR ASYNC WRITE I/O

32

BEGIN OF WAIT FOR LOG MANAGER

33

END OF WAIT FOR LOG MANAGER

44

LOCK SUSPEND OR IDENTIFY CALL IRLM

DB2 10 for z/OS

Description

32

235

YL&A DB2 10 for z/OS Reference Guide


Trace Type

PERFORMANCE

236

Class IFCID

Description

45

LOCK RESUME

51

SHARED LATCH RESUME. SERVICEABILITY

52

SHARED LATCH WAIT. SERVICEABILITY

56

EXCL. LATCH WAIT. SERVICEABILITY

57

EXCL. LATCH RESUME. SERVICEABILITY

117

BEGIN THREAD WAIT TIME FOR LOG I/O

118

END THREAD WAIT TIME FOR LOG I/O

127

AGENT READY TO SUSPEND PAGE WAIT

128

PAGE REQUESTOR RESUMED BY I/O INIT.

170

SUSPEND FOR SYNC EXEC. UNIT SWITCH

171

RESUME AGENT WAITING DB2 SERV. TSK

174

BEGIN ARCHIVE LOG MODE (QUIESCE)

175

END ARCHIVE LOG MODE (QUIESCE)

213

BEGIN OF WAIT FOR CLAIM REQUEST

214

END OF WAIT FOR CLAIM REQUEST

215

BEGIN OF WAIT FOR DRAIN REQUEST

216

END OF WAIT FOR DRAIN REQUEST

226

BEGIN OF SUSPEND FOR PAGE LATCH

227

END OF SUSPEND FOR PAGE LATCH

241

BEGIN/END SUSPENSION OF PACK/DBRM

242

BEGIN WAIT FOR SCHED. STORED PROC.

243

END WAIT FOR SCHED. STORED PROC.

124

ENABLE STATEMENT LEVEL ACCOUNTING

10

339

PACKAGE DETAIL

29

316

CACHED STATEMENT STATISTICS

318

CACHED STATEMENT STATISTICS

400

STATIC SQL IN EDM POOK STATISTICS

401

STATIC SQL IN EDM POOK STATISTICS

SYSTEM SERVICES

DATABASE SERVICES

31

EDM POOL FULL CONDITION

42

A CHECKPOINT STARTED

43

A CHECKPOINT ENDED

76

BEGINNING OF END OF MEMORY REQUEST

77

ENDING OF AN END OF MEMORY REQUEST

78

BEGINNING OF AN END OF TASK REQUEST

79

ENDING OF AN END OF TASK REQUEST

DB2 10 for z/OS

YL&A DB2 10 for z/OS Reference Guide


Trace Type

Class IFCID

DB2 10 for z/OS

Description

102

DETECTION OF SHORT ON STORAGE

103

SETTING OFF OF SHORT ON STORAGE

105

INTERNAL DBID OBID TO DB/TS

106

SYSTEM PARAMETERS IN EFFECT

107

DATA SET OPEN/CLOSE INFORMATION

153

USER-DEFINED EXCEPT-CONDITION TRACE

ALL ACCOUNTING

68

BEGINNING OF A ROLLBACK REQUEST

69

ENDING OF A ROLLBACK REQUEST

70

BEGIN COMMIT PHASE 2 REQUEST

71

END COMMIT PHASE 2 REQUEST

72

BEGINNING OF CREATE THREAD REQUEST

73

ENDING OF A CREATE THREAD REQUEST

74

BEGINNING OF TERM. THREAD REQUEST

75

ENDING OF A TERM. THREAD REQUEST

80

BEGINNING OF AN ESTABLISH EXIT REQ.

81

ENDING OF AN ESTABLISH EXIT REQUEST

82

BEGIN IDENTIFY REQUEST

83

END IDENTIFY REQUEST

84

BEGIN PHASE 1 COMMIT REQUEST

85

END PHASE 1 COMMIT REQUEST

86

BEGINNING OF SIGNON REQUEST

87

ENDING OF SIGNON REQUEST

88

BEGINNING OF A SYNC REQUEST

89

ENDING OF A SYNC REQUEST

106

SYSTEM PARAMETERS IN EFFECT

174

BEGIN ARCHIVE LOG MODE (QUIESCE)

175

END ARCHIVE LOG MODE (QUIESCE)

22

MINIPLANS GENERATED

53

END OF DESCR., COMMIT, RLBCK OR ERR

55

ISSUANCE OF SET CURRENT SQLID

58

END OF SQL STATEMENT EXECUTION

59

START OF FETCH SQL STATEMENT EXEC.

60

START OF SELECT SQL STATEMENT EXEC.

61

START OF INSERT, UPDATE, DELETE SQL

62

START OF DDL STATEMENT EXECUTION

63

SQL STATEMENT TO BE PARSED


237

YL&A DB2 10 for z/OS Reference Guide


Trace Type

Class IFCID

238

Description

64

START PREPARE SQL STATEMENT EXEC.

65

START OPEN CURSOR STATIC/DYN SQL

66

START CLOSE CURSOR STATIC/DYN SQL

92

START AN ACCESS METHOD SERVICES

95

SORT STARTED

96

SORT ENDED

97

ACCESS METHOD SERVICES CMD COMPL.

106

SYSTEM PARAMETERS IN EFFECT

112

ATTRIBUTES PLAN AFTER THREAD ALLOC.

177

SUCCESSFUL PACKAGE ALLOCATION

233

START/END CALL TO USER ROUTINE

237

SET CURRENT DEGREE INFORMATION

272

ASSOCIATE LOCATORS INFORMATION

273

ALLOCATE CURSOR INFORMATION

324

FUNCTION RESOLUTION INFORMATION

325

START/END TRIGGER ACTIVATION

350

COMPLETE SQL STATEMENT

BEGINNING OF A READ I/O OPERATION

COMPLETION CODE AFTER READ I/O

BEGINNING OF SYNCHRONOUS WRITE I/O

CC OF SYN OR ASYNC WRITE I/O

10

BEGINNING OF ASYNC WRITE I/O

29

START EDM I/O REQ. LOAD DBD OR CT

30

END OF EDM I/O REQUEST

105

INTERNAL DBID OBID TO DB/TS

106

SYSTEM PARAMETERS IN EFFECT

107

DATA SET OPEN/CLOSE INFORMATION

127

AGENT READY TO SUSPEND PAGE WAIT

128

PAGE REQUESTOR RESUMED BY I/O INIT.

226

BEGIN OF SUSPEND FOR PAGE LATCH

227

END OF SUSPEND FOR PAGE LATCH

32

BEGIN OF WAIT FOR LOG MANAGER

33

END OF WAIT FOR LOG MANAGER

34

LOG MANAGER WAIT FOR READ I/O BEGIN

35

LOG MANAGER WAIT FOR READ I/O END

36

LOG MANAGER WAIT FOR NON-I/O BEGIN

37

LOG MANAGER WAIT FOR NON-I/O END


DB2 10 for z/OS

YL&A DB2 10 for z/OS Reference Guide


Trace Type

Class IFCID

DB2 10 for z/OS

Description

38

LOG MGR WAIT ACT. LOG WRITE BEGIN

39

LOG MGR WAIT ACT. LOG WRITE I/O END

40

LOG MANAGER ARCHIVE WRITE I/O BEGIN

41

LOG MANAGER ARCHIVE WRITE I/O END

104

LOG DATA SET MAPPING

106

SYSTEM PARAMETERS IN EFFECT

114

START ARCHIVE READ I/O WAIT

115

END READ ARCHIVE I/O WAIT ON DASD

116

END READ ARCHIVE I/O WAIT ON TAPE

117

BEGIN ARCHIVE READ

118

END ARCHIVE READ

119

BSDS WRITE I/O BEGINNING

120

BSDS WRITE I/O END

228

START ARCHIVE ALLOCATION WAIT

229

END ARCHIVE ALLOCATION WAIT

20

LOCKING SUMMARY

44

LOCK SUSPEND OR AN ID. CALL TO IRLM

45

LOCK RESUME

105

INTERNAL DBID OBID TO DB/TS

106

SYSTEM PARAMETERS IN EFFECT

107

DATA SET OPEN/CLOSE INFORMATION

172

UNITS OF WORK INVOLVED IN DEADLOCK

196

LOCK TIMEOUT DETAILS

213

BEGINNING OF WAIT FOR DRAIN LOCK

214

END OF WAIT FOR DRAIN LOCK

218

SUMMARY OF LOCK AVOIDANCE TECHNIQUE

337

LOCK ESCALATION OCCURRED

21

DETAIL LOCK REQ.ON RETURN FROM IRLM

105

INTERNAL DBID OBID TO DB/TS

106

SYSTEM PARAMETERS IN EFFECT

107

DATA SET OPEN/CLOSE INFORMATION

199

BUFFER POOL DATA SET STATISTICS

223

DETAIL OF LOCK AVOIDANCE TECHNIQUE

13

INPUT TO HASH SCAN

14

END OF HASH SCAN

15

INPUT MATCH./NON-MATCH.INDEX SCAN

16

INPUT TO THE FIRST INSERT


239

YL&A DB2 10 for z/OS Reference Guide


Trace Type

Class IFCID

10

11

240

Description

17

INPUT TO SEQUENTIAL SCAN

18

END INDEX SCAN, INSERT, SEQ. SCAN

105

INTERNAL DBID OBID TO DB/TS

106

SYSTEM PARAMETERS IN EFFECT

107

DATA SET OPEN/CLOSE INFORMATION

125

RID LIST PROCESSING USAGE

221

PARALLEL DEGREE FOR PARALLEL GROUP

222

PARALLEL GROUP ELAPSED TIME

231

PARALLEL GROUP COMPLETION

305

TABLE CHECK CONSTRAINTS

311

TEMPORARY TABLES

26

WORK FILE OBTAINED FOR SORT

27

NUMBER OF ORDERED RECORDS SORT RUN

28

DETAILED SORT INFORMATION

95

SORT STARTED

96

SORT ENDED

106

SYSTEM PARAMETERS IN EFFECT

23

UTILITY START INFORMATION

24

UTILITY OBJECT OR PHASE CHANGE

25

UTILITY END INFORMATION

90

COMMAND TEXT OF ENTERED DB2 COMMAND

91

COMPLETION STATUS OF A DB2 COMMAND

105

INTERNAL DBID OBID TO DB/TS

106

SYSTEM PARAMETERS IN EFFECT

107

DATA SET OPEN/CLOSE INFORMATION

108

BEGINNING OF BIND/REBIND

109

END OF BIND/REBIND

110

BEGINNING OF FREE PLAN

111

END OF FREE PLAN

201

STATUS BEF/AFT ALTER BUFFERPOOL

256

ATTRIBUTES BEF/AFT ALTER BUFFERPOOL

46

AGENT BEGIN EXEC. UNIT SWITCH

47

NEW SRB EXECUTION UNIT STARTED

48

NEW SRB EXECUTION UNIT COMPLETED

49

BEGIN NEW TCB

50

END NEW TCB

51

SHARED LATCH RESUME


DB2 10 for z/OS

YL&A DB2 10 for z/OS Reference Guide


Trace Type

Class IFCID

SHARED LATCH WAIT

56

EXCLUSIVE LATCH WAIT

57

EXCLUSIVE LATCH RESUME

93

SUSPEND WAS CALLED

94

EVENT RESUMED

106

SYSTEM PARAMETERS IN EFFECT

113

ATTRIBUTES PLAN AFTER AGENT ALLOC.

98

BEGIN GETMAIN/FREEMAIN (NONPOOL)

99

END GETMAIN/FREEMAIN (NONPOOL)

100

BEGIN GETMAIN/FREEMAIN (POOL)

101

END GETMAIN/FREEMAIN (POOL)

106

SYSTEM PARAMETERS IN EFFECT

11

RESULTS OF A VALIDATION EXIT CALL

12

RESULTS EDIT EXIT CALL ENCODE RECRD

19

RESULTS EDIT EXIT CALL DECODE A ROW

105

INTERNAL DBID OBID TO DB/TS

106

SYSTEM PARAMETERS IN EFFECT

107

DATA SET OPEN/CLOSE INFORMATION

67

START OF ACCOUNTING COLLECTION

106

SYSTEM PARAMETERS IN EFFECT

121

ENTRY ALLOCATING DB2 CONNECTION

122

EXIT ALLOCATING DB2 CONNECTION

15

154

USER-DEFINED ROUTINE COND. PERF.

16

157

DRDS INTER. WITH RDS RDI CALL TYPES

158

DRDS INTER. WITH CONVERSATION MGR

159

DRDS REQUESTING LOCATION DATA

160

REQUESTING AGENT DATA

161

SERVING AGENT DATA

162

DISTRIB TRANS. MGR REQ. AGENT DATA

163

DISTRIB TRANS. MGR RESP. AGENT DATA

167

CONVERSATION ALLOC. REQUEST QUEUED

183

DRDS RDS/SCC INTERFACE DATA

211

INFORMATION ABOUT CLAIMS

212

INFORMATION ABOUT DRAINS

213

BEGINNING OF WAIT FOR DRAIN LOCK

214

END OF WAIT FOR DRAIN LOCK

215

BEGIN OF WAIT OF CLAIM COUNT TO 0

12

13

14

17

DB2 10 for z/OS

Description

52

241

YL&A DB2 10 for z/OS Reference Guide


Trace Type

Class IFCID

END OF CLAIM COUNT TO GO TO 0

249

EDM POOL DBD INVALIDATION

250

GROUP BUFFER POOL CON/DISCON

251

P-LOCK OPERATIONS

256

ALTER BUFFERPOOL COMMAND

257

DETAILS OF IRLM NOTIFY REQUEST

261

GROUP BUFFER POOL CHECKPOINT

262

GBPOOLT CASTOUT THRESHOLD PROCESSIN

267

BEGIN CF STRUCT REBLD/EXPAND/CONTR

268

END CF STRUCTURE REBLD/EXPAND/CONTR

255

BUFFER REFRESH DUE TO XI

259

P-LOCK REQUEST/NEGOTIATION REQUEST

263

PAGE SET AND PARTITION CASTOUT DATA

314

AUTHORIZATION EXIT PARAMETERS

327

LANGUAGE ENVIRONMENT RUN-TIME INFO

22

314

AUTHORIZATION EXIT PARAMETERS

SYSTEM SERVICES

DATABASE SERVICES

105

INTERNAL DBID OBID TO DB/TS

106

SYSTEM PARAMETERS IN EFFECT

202

BUFFER POOL ATTRIBUTES

225

SYSTEM STORAGE STATISTICS FOR DBM1

152

USER-DEFINED STATISTICS TRACE

172

UNITS OF WORK INVOLVED IN DEADLOCK

196

LOCK TIMEOUT DETAILS

250

CONNECT/DISCONNECT FROM GBP

258

DATA SET EXTEND INFORMATION.

330

ACTIVE LOG SHORTAGE

337

LOCK ESCALATION OCCURRED

191

DATA CAPTURE FOR DDIS ERRORS

192

DDM LEVEL 6A HEADER ERRORS

193

UOW DISPOSITION/SQLCODE MISMATCH

194

INVALID SNA FMH-5 RECEIVED

195

FIRST FAILURE DATA CAPTURE FOR DRDS

203

HEURISTIC DECISION OCCURRED

204

PARTNER COLD START DETECTED

205

INCORRECT LOGNAME/SYNC. PARMS

20

21

STATISTICS

242

Description

216

DB2 10 for z/OS

YL&A DB2 10 for z/OS Reference Guide


Trace Type

DB2 10 for z/OS

Class IFCID

Description

206

SNA COMPARE STATES PROTOCOL ERROR

207

HEURISTIC DAMAGE OCCURRED

208

SNA SYNC POINT PROTOCOL ERROR

209

SYNC POINT COMMUNICATION FAILURE

210

LOG NAME CHANGED ON WARM START

235

CONDITIONAL RESTART DATA LOSS

236

EXCHANGE LOG NAMES PROTOCOL ERROR

238

DB2 RESTART ERROR

267

START OF CF STRUCTURE REBUILD

268

END OF CF STRUCTURE REBUILD

230

DATA SHARING GLOBAL STATISTICS

225

STORAGE USAGE DETAILS

326

WLM DELAY MONITOR SUPPORT

199

DATA SET I/O STATISTICS

243

YL&A DB2 10 for z/OS Reference Guide

Exceptions
Status
code
ACHKP

Status name

Affected objects

Corrective action(s)

Auxiliary
CHECK
pending

Base table
space, LOB table
spaces

AUXW

Auxiliary
warning

Base table space

1. Update or delete invalid LOBs and XML objects


using SQL.
2. Run CHECK DATA with appropriate SCOPE
option to verify the validity of LOBs and XML
objects.
1. Update or delete invalid LOBs and XML using
SQL.
2. If an orphan LOB or a version mismatch exists
between the base table and the auxiliary index,
use REPAIR to delete the LOB from the LOB
table space.
3. Run CHECK DATA to verify the validity of LOBs
and XML objects.
1. Update or delete invalid LOBs and XML using
SQL.
2. If an orphan LOB or a version mismatch exists
between the base table and the auxiliary index,
use REPAIR to delete the LOB from the LOB
table space.
3. Run CHECK LOB to verify the validity of the
LOBs and XML objects.
Check and correct RI constraints using CHECK
DATA.

LOB table space

CHECKP

CHECK
pending

Table space,
base table space

Partitioning
index, nonpartitioning index,
index on auxiliary
table
LOB table space

COPY

COPY
pending

DBETE

Database
exception
table (DBET)
error

GRECP

Group buffer
pool (GBP)

244

Table space,
table space
partition
Table space,
partition, index,
index partition,
logical index
partition
Table space,
index space

If a table space is in both REORG-pending and


CHECK-pending (or auxiliary CHECK-pending)
status, run REORG first and then use CHECK
DATA.
1. Run CHECK INDEX on the index.
2. If errors, run REBUILD INDEX.

Run CHECK LOB. If errors:


1. Correct defects found in LOB table space with
REPAIR.
2. Run CHECK LOB again.
Take an image copy (best action), use START
DATABASE(db) SPACENAM(ts) ACCESS
FORCE, or run REPAIR and reset COPY flag.
Contact IBM support.

RECOVER the object, or use the START


DATABASE command.
DB2 10 for z/OS

YL&A DB2 10 for z/OS Reference Guide

ICOPY

recover
pending
Informational
COPY
pending

Partitioned index,
non-partitioned
index, index on
auxiliary table
NOT LOGGED
table space

Copy the affected index.

START DATABASE ACCESS R/W or R/O


Run RECOVER or REBUILD INDEX utility.
Run LOAD REPLACE.
DROP the object.
Run REBUILD on affected index

LPL

Logical page
list

Table spaces,
index space

ARDBP

Advisory
REBUILD
pending
REBUILD
pending

Index

RBDP
RBDP*

PSRBD

Physical or
logical index
partition
Logical partitions
of non-partitioned
secondary
indexes
Non-partitioned
secondary index,
index on auxiliary
table

Copy the affected table space.

Run REBUILD or RECOVER on the affected index


partition.
Run REBUILD INDEX PART or RECOVER on the
affected logical partitions.
Run REBUILD INDEX ALL, RECOVER, or
REBUILD INDEX.
Note: The following actions also reset the
REBUILD status.

RECP

RECOVER
pending

Table space
Table space
partition
Index on auxiliary
table
Index space

Any

LOAD REPLACE with table space or partition


REPAIR SET INDEX with NORBDPEND on
index part (however, this action doesnt correct
inconsistencies)
Start database ACCESS FORCE (however, this
action doesnt correct inconsistencies)
REORG INDEX SORTDATA on the index
Run the RECOVER utility on the affected object.
Recover the logical partition.
Run REBUILD INDEX, RECOVER INDEX, or
REORG SORTDATA.
Run one of the following utilities on the affected
index space:
REBUILD INDEX
RECOVER INDEX
REORG INDEX SORTDATA
The following actions also reset the RECOVER
status:

DB2 10 for z/OS

LOAD REPLACE with table space or partition


REPAIR SET TABLESPACE or INDEX with
245

YL&A DB2 10 for z/OS Reference Guide

REFP

Refresh
pending

Table space,
index space

REORP

REORG
pending

Table space

Partitioned table
space

AREO*

AREOR

Advisory
REORG

Advisory
REORG

RESTP

Restart
pending

STOPE

Stop error

WEPR

Write error
page range

246

NORCVRPEND on index part (however, this


action doesnt correct inconsistencies)
Start database ACCESS FORCE (however, this
action doesnt correct inconsistencies)
Run a LOAD REPLACE. The object will also be in
RECP or RBDP status and will need appropriate
action taken.
Perform one of the following:
LOAD REPLACE on entire table space
REORG TABLESPACE SHRLEVEL NONE
REORG TABLESPACE PART n:m SHRLEVEL
NONE
REORG TABLESPACE REFERENCE or
CHANGE
For rows <= 32 K:
Run REORG TABLESPACE SHRLEVEL NONE
SORTDATA.

Table space

For rows > 32 K:


1. Run REORG TABLESPACE UNLOAD ONLY.
2. Run LOAD TABLESPACE FORMAT UNLOAD.
Run one of the following utilities:

Index space

REORG TABLESPACE
LOAD REPLACE
REPAIR TABLESPACE
Run one of the following utilities:

Table space

REORG TABLESPACE
LOAD REPLACE
REORG INDEX
REPAIR INDEX
Run one of the following utilities:

Index space

REORG TABLESPACE
REPAIR TABLESPACE
Run one of the following utilities:

Table space,
partition, index
space, physical
index partition
Table space,
index space
Page range in
error

REORG TABLESPACE
LOAD REPLACE
REBUILD INDEX
REPAIR INDEX
Objects are unavailable until back-out work is
complete or until restart is canceled and a
conditional restart or cold start is performed.
RECOVER the table space or index space.
Run a RECOVER utility on affected data.

DB2 10 for z/OS

YL&A DB2 10 for z/OS Reference Guide

Determining Partition From Page Number


Use these charts to determine the partition number from a page number displayed in
a console message. You first need to know the type of data sets for the table space
(EA or non EA-enabled), along with the page size and DSSIZE (if EA-enabled). Use
this information to determine how many leading bits of a RID are used to represent
the partition number. Convert the hex representation of leading portion of the page
number to binary, and then the appropriate number of bits to decimal. Partition
numbers begin with zero.
EA-Enabled Table Spaces (Defined as LARGE or with DSSIZE)
DSSIZE

1GB
1GB
1GB
1GB
2GB
2GB
2GB
2GB
4GB
4GB
4GB
4GB
8GB
8GB
8GB
8GB
16GB
16GB
16GB
16GB
32GB
32GB
32GB
32GB
64GB
64GB
64GB
64GB

Page Leading Example Page


Size Bits
Number (First 4
used for RID bytes)
Part
Number
4KB 14 bits
X01000004
8KB 15 bits
X01000004
16KB 16 bits
X01000004
32KB 17 bits
X01000004
4KB 13 bits
X01000004
8KB 14 bits
X00040040
16KB 15 bits
X00040040
32KB 16 bits
X00040040
4KB 12 bits
X01000004
8KB 13 bits
X06000007
16KB 14 bits
X007C0005
32KB 15 bits
X007C0005
4KB 11 bits
X3FFFFFFF
8KB 12 bits
X3FFFFFFF
16KB 13 bits
X3FFFFFFF
32KB 14 bits
X3FFFFFFF
4KB 10 bits
X3FFFFFFF
8KB 11 bits
X06000007
16KB 12 bits
X3FFFFFFF
32KB 13 bits
X06000007
4KB 9 bits
X06000007
8KB 10 bits
X06000007
16KB 11 bits
X03F00009
32KB 12 bits
X03F00009
4KB 8 bits
XFFFFFFFF
8KB 9 bits
XFFFFFFFF
16KB 10 bits
XFFFFFFFF
32KB 11 bits
XFFFFFFFF

DB2 10 for z/OS

Example Partition Number Partition Part


in Binary
Number

B00000001000000
B000000010000000
B0000000100000000
B00000001000000000
B0000000100000
B00000000000001
B000000000000010
B0000000000000100
B000000010000
B0000011000000
B00000000011111
B000000000111110
B00111111111
B001111111111
B0011111111111
B00111111111111
B0011111111
B00000110000
B001111111111
B0000011000000
B000001100
B0000011000
B00000011111
B000000111111
B11111111
B111111111
B1111111111
B11111111111

64
128
256
512
32
1
2
4
16
192
31
62
511
1023
2047
4095
255
48
1023
192
12
24
31
63
255
511
1023
2047

65
129
257
513
33
2
3
5
17
193
32
63
512
1024
2048
4096
256
49
1024
193
13
25
32
64
256
512
1024
2048

247

YL&A DB2 10 for z/OS Reference Guide

Non EA-Enabled Table Spaces


Number
of Parts

Page RID
Size Type

1 to 16
1 to 16
1 to 16
1 to 16
17 to 32
17 to 32
17 to 32
17 to 32
33 to 64
33 to 64
33 to 64
33 to 64
1 to 4096
1 to 4096
1 to 4096
1 to 4096

4KB
8KB
16KB
32KB
4KB
8KB
16KB
32KB
4KB
8KB
16KB
32KB
4KB
8KB
16KB
32KB

248

4 byte
4 byte
4 byte
4 byte
4 byte
4 byte
4 byte
4 byte
4 byte
4 byte
4 byte
4 byte
5 byte
5 byte
5 byte
5 byte

Leading Example Page


Bits
Number (First 3
used
or 4 RID bytes)
for Part
Number
4 bits
X000004
5 bits
XE80005
6 bits
X1E0007
7 bits
X1E0007
5 bits
X1E0007
6 bits
X1E0007
7 bits
X010008
8 bits
X010008
6 bits
X1F8009
7 bits
X1F8009
8 bits
X1F8009
9 bits
X1F8009
12 bits X00100004
13 bits X00100004
14 bits X1FFE000B
15 bits X1FFE000B

Example Partition
Number in Binary

Partition Part
Number

B0000
B01111
B000111
B0001111
B00011
B000111
B0000000
B00000001
B000111
B0001111
B00011111
B000111111
B000000000001
B0000000000010
B00011111111111
B000111111111111

0
15
7
15
3
7
0
1
7
15
31
63
1
2
2047
4095

1
16
8
16
4
8
1
2
8
16
32
64
2
3
2048
4096

DB2 10 for z/OS

YL&A DB2 10 for z/OS Reference Guide

Catalog Tables
SYSIBM.IPLIST
Allows multiple IP addresses to be specified for a given LOCATION. Insert rows into this table
when you want to define a remote DB2 data sharing group. The same value for the IPADDR
column cannot appear in both the SYSIBM.IPNAMES table and the SYSIBM.IPLIST table.
Rows in this table can be inserted, updated and deleted.
Column Name
LINKNAME

Data Type
VAHCHAR(24)

IPADDR

VARCHAR(254)

IBMREQD

CHAR(1)

Description
This column is associated with the value specified in the
LINKNAME column in the SYSIBM.LOCATIONS table and the
SYSIBM.IPNAMES table. The values of the other columns in the
SYSIBM.IPNAMES table apply to the server identified by the
LINKNAME column in this row.

This column contains an IPv4 or IPv6 address, or


domain name of a remote TCP/IP host of the server. If
WLM Domain Name Server workload balancing is
used, this column must contain the member specific
domain name. If Dynamic VIPA workload balancing is
used, this column must contain the member specific
Dynamic VIPA address. The IPADDR column must be
specified as follows:

An IPv4 address must be left justified and is


represented as a dotted decimal address. For
example, '123.456.78.912' would be interpreted as an
IPv4 address.

An IPv6 address must be left justified and is


represented as a colon hexadecimal address. An
example of an IPv6 address is
2001:0DB8:0000:0000:0008:0800:200C:417A, which
can also be expressed in compressed form as
2001:DB8::8:800:200C:417A.

A domain name is converted to an IP address by the


domain name server where a resulting IPv4 or IPv6
address is determined.
A value of Y means row came from MRM tape.

SYSIBM.IPNAMES
Defines the remote DRDA servers DB2 can access using TCP/IP. Rows in this table can be
inserted updated, and deleted.
Column Name
LINKNAME

Data Type
VARCHAR(24)

SECURITY_OUT

CHAR(1)

Description
The value specified in this column must match the value
specified in the LINKNAME column of the associated row in
SYSIBM.LOCATIONS.
Defines the DRDA security option that is used when local DB2
SQL applications connect to any remote server associated with
this TCP/IP host:
A

DB2 10 for z/OS

already verified. Outbound connection requests contain


249

YL&A DB2 10 for z/OS Reference Guide


Column Name

Data Type

Description
an auth ID and no password.
D
userid and and security-sensitive data encryption.
Outbound connection requests contain an authorization ID and
no password.
E

userid, password, and security sensitive data encryption.


Outbound connection requests contain an auth ID and
password.

RACF PassTicket. Outbound connection requests


contain a userid and a RACF PassTicket.

P
CHAR(1)

IBMREQD

CHAR(1)

IPADDR

VARCHAR(254)

password. Outbound connection requests contain an


auth ID and a password.
Controls outbound auth ID translation. Outbound translation is
performed when an auth ID is sent by DB2 to a remote server.
O
An outbound ID is subject to translation.
SYSIBM.USERNAMES table are used to perform ID
Translation. No translation or come from checking is
performed on inbound IDs.
S
SYSIBM.USERNAMES table is used to obtain system
AUTHID used to establish a trusted connection.
Blank No translation occurs.
A value of Y indicates that the row came from the basic
machine-readable material (MRM) tape
Contains the IP address or domain name of a remote TCP/IP
host. IPADDR column must be specified as follows:

An IPv4 address must be left justified and is


represented as a dotted decimal address. i.e.,
'123.456.78.91' would be interpreted as an IPv4
address.

An IPv6 address must be left justified and is


represented as a colon hexadecimal address. An
example of an IPv6 address is
2001:0DB8:0000:0000:0008:0800:200C:417A, which
can also be expressed in compressed form as
2001:DB8::8:800:200C:417A.

A domain name is converted to an IP address by the


domain name server where a resulting IPv4 or IPv6
address is determined. call. TCP/IP domain names are
not case sensitive.

SYSIBM.LOCATIONS
Contains a row for every accessible remote server. Can be inserted, updated, and deleted.
Column Name
LOCATION

Data Type
VARCHAR(128)

LINKNAME

VARCHAR(128)

250

Description
A unique location name for the accessible server. This is the
name by which the remote server is known to local DB2 SQL
applications.
Identifies the VTAM or TCP/IP attributes associated with this
location. For any LINKNAME specified, one or both of the
following statements must be true:
DB2 10 for z/OS

YL&A DB2 10 for z/OS Reference Guide


Column Name

Data Type

IBMREQD

CHAR(1)

PORT

VARCHAR(96)

Description

A row exists in SYSIBM.LUNAMES whose LUNAME


matches the value specified in the
SYSIBM.LOCATIONS LINKNAME column. This row
specifies the VTAM communication attributes for the
remote location.

A row exists in SYSIBM.IPNAMES whose LINKNAME


matches the value specified in the
SYSIBM.LOCATIONS LINKNAME column. This row
specifies the TCP/IP communication attributes for the
remote location.
A value of Y indicates that the row came from the basic machinereadable material (MRM) tape.
TCP/IP is used for outbound DRDA connections when the
following statement is true:
A row exists in SYSIBM.IPNAMES, where the LINKNAME column
matches the value specified in the SYSIBM.LOCATIONS
LINKNAME column.

TPN

VARCHAR(192)

DBALIAS

VARCHAR(128)

TRUSTED

CHAR(1)

SECURE

CHAR(1)

DB2 10 for z/OS

If the above-mentioned row is found, the value of the PORT


column is interpreted as follows:

If PORT is blank ,the default DRDA port (446)is used.

f PORT is nonblank, the value specified for PORT can


take one of two forms:
o
If the value in PORT is left justified with 1-5
numeric characters, the value is assumed to
be the TCP/IP port number of the remote
database server.
o
Any other value is assumed to be a TCP/IP
service name, which can be converted to a
TCP/IP port number using the TCP/IP
getservbyname socket call. TCP/IP service
names are not case sensitive.
Used only when the local DB2 begins an SNA conversation with
another server. When used, TPN indicates the SNA LU 6.2
transaction program name (TPN) that will allocate the
conversation. A length of zero for the column indicates the default
TPN. For DRDA conversations, this is the DRDA default, which is
X'07F6C4C2'. For DB2 private protocol conversations, this column
is not used. For an SQL/DS server, TPN should contain the
resource ID of the SQL/DS machine.
Database alias. The name associated with the server. This name
is used to access a remote database server. If DBALIAS is balnk
the location name is used to access the remote database server.
This column does not change the name of any database objects
send to the remote site that contains the location qualifier.
Whether connection to remote server can be trusted. Restricted to
TCP/IP only. Is ignored for connections using SNA.
Y
Location is trusted. Access to the remote location requires
trusted context defined at the remote location.
N
Location is not trusted.
Use of the Secure Socket Layer (SSL) protocol for outbound
DRDA connections when local DB2 applications connects to the
remote database server using TCP/IP.
251

YL&A DB2 10 for z/OS Reference Guide


Column Name

Data Type

Description
Y
Indicates a secure connection using SSL is required for the
outbound DRDA connection.
N
Indicates a secure connection is not required for the
outbound DRDA connection.

SYSIBM.LULIST
Allows multiple LU names to be specified for a given LOCATION. Can be inserted, updated,
and deleted.
Column Name
LINKNAME

Data Type
VARCHAR(24)

LUNAME

VARCHAR(24)

IBMREQD

CHAR(1)

Description
The value of the LINKNAME column in the SYSIBM.LOCATIONS
table with which this row is associated. This is also the value of
the LUNAME column in the SYSIBM.LUNAMES table. The values
of the other columns in the SYSIBM.LUNAMES row apply to the
LU identified by the LUNAME column in this row of
SYSIBM.LULIST.
The VTAM logical unit name (LUNAME) of the remote database
system. This LUNAME must not exist in the LUNAME column of
SYSIBM.LUNAMES.
A value of Y indicates that the row came from the basic machinereadable material (MRM) tape.

SYSIBM.LUMODES
Each row of the table provides VTAM with conversation limits for a specific combination of
LUNAME and MODENAME. Can be inserted, updated, and deleted.
Column Name
LUNAME
MODENAME
CONVLIMIT

Data Type
VARCHAR(24)
VARCHAR(24)
SMALLINT

IBMREQD

CHAR(1)

Description
LU name of the server involved in the CNOS processing.
Name of a logon mode description in the VTAM logon mode table.
Maximum number of active conversations between the local DB2 and
the other system for this mode. Used to override the number in the
DSESLIM parameter of the VTAMAPPL definition statement for this
mode.
A value of Y indicates that the row name from the basic machinereadable material (MRM) tape.

SYSIBM.LUNAMES
The table must contain a row for each remote SNA client or server that communicates with
DB2. Can be inserted, updated, and deleted.
Column Name
LUNAME

SYSMODENAME
252

Data Type
VARCHAR(24)

VARCHAR(24)

Description
Name of the LU for one or more accessible systems. A blank
string indicates the row applies to clients whose LU name is not
specifically defined in this table.
All other column values for a given row in this table are for clients
and servers associated with the row s LU name.
Mode used to establish inter-system conversations. blank
indicates default mode IBMDB2LM (DB2 private protocol access
DB2 10 for z/OS

YL&A DB2 10 for z/OS Reference Guide


Column Name

Data Type

SECURITY_IN

CHAR(1)

SECURITY_OUT

CHAR(1)

ENCRYPTPSWDS

CHAR(1)

MODESELECT

CHAR(1)

USERNAMES

CHAR(1)

GENERIC

CHAR(1)

DB2 10 for z/OS

Description
and for collecting sysplex balancing information from remote data
sharing groups). If private protocols are used to access a remote
DB2 LU or if remote LU is a member of a DB2 data sharing group,
use a separate mode other than default mode.
Defines security options accepted by this DB2 when an SNA client
connects to DB2:
V verify. An incoming connection request must include one
of the following: a userid and password, a userid and RACF
PassTicket, or a Kerberos security ticket.
A already verified. A request does not need a password,
although a password is checked if it is sent. An incoming
connection request is accepted if it includes any of the
following: a userid, a userid and password, a userid and
RACF PassTicket, or a Kerberos security ticket.
Defines security option used when local DB2 SQL applications
connect to any remote server associated with this LUNAME:
A already verified. Outbound connection requests contain an
auth ID and no password..
R RACF PassTicket. Outbound connection requests contain a
userid and a RACF PassTicket .The servers LU name is
used as the RACF PassTicket application name.
P password. Outbound connection requests contain an
authorization ID and a password.
Only applies to DB2 for z/OS partners. Provided to support
connectivity to prior releases of DB2 unable to support RACF
PassTickets. For connections between DB2 V5 and later, use
SECURITY_OUT='R' option instead of ENCRYPTPSWDS='Y'
N Passwords are not in internal RACF encrypted format(default).
Y For outbound requests , encrypted password is extracted from
RACF and sent to the server .For inbound requests ,the
password is treated as encrypted.
Whether to use the SYBIBM.MODESELECT table:
N Use default modes:IBMDB2LM (for DB2 private protocol) and
IBMRDB (for DRDA).
Y Searches SYSIBM.MODESELECT for appropriate mode
name.
Controls inbound and outbound authorization ID translation, and
come from checking. Inbound translation and come from
checking are performed when an authorization ID is received from
a remote client. Outbound translation is performed when an
authorization ID is sent by DB2 to a remote server.
When I,O,or B is specified in this column, rows in the
SYSIBM.USERNAMES table are used to perform ID translation.
I
An inbound ID is subject to translation and come from
checking. No translation is performed on outbound IDs.
O
No translation or come from checking is performed o
inbound IDs. An outbound ID is subject to translation.
B
An inbound ID is subject to translation and come from
checking. An outbound ID is subject to translation.
blank No translation occurs.
Whether DB2 should use its real LU name or generic LU name to
identify itself to the partner LU, which is identified by this row.
253

YL&A DB2 10 for z/OS Reference Guide


Column Name

Data Type

IBMREQD

CHAR(1)

Description
N The real VTAMLU name of this DB2 subsystem
Y The VTAM generic LU name of this DB2 subsystem
A value of Y indicates that the row came from the basic machinereadable material (MRM)tape.

SYSIBM.MODESELECT
Associates a mode name with any conversation created to support an outgoing SQL request.
Each row represents one or more combinations of LUNAME, authorization ID, and application
plan name. Rows in this table can be inserted, updated, and deleted.
Column Name
AUTHID

Data Type
VARCHAR(128)

PLANNAME

VARCHAR(24)

LUNAME
MODENAME

VARCHAR(24)
VARCHAR(24)

IBMREQD

CHAR(1)

Description
Authorization ID of the SQL request. Blank (the default)
indicates that the MODENAME specified for the row is to
apply to all authorization IDs.
Plan name associated with the SQL request. Blank (the
default) indicates that the MODENAME specified for the row
is to apply to all plan names.
LU name associated with the SQL request.
Name of the logon mode in the VTAM logon mode table to be
used in support of the outgoing SQL request. If blank,
IBMDB2LM is used for DB2 private protocol connections and
IBMRDB is used for DRDA connections.
Whether the row came from the basic machine-readable
material (MRM) tape: N=No; Y=Yes

SYSIBM.AUDITPOLICIES
Contains one row for each audit policy. A user with SECADM authority has the privilege to
select from, insert, update, or delete from this catalog table. A user with SQLADM, system
DBADM, DATAACCESS, ACCESSCTRL, SYSCTRL or SYSADM authority has the privilege to
select from this catalog table.
Column Name
AUDITPOLICY
NAME

Data Type
VARCHAR(128)
NOT NULL

Description
Name of the audit policy.

OBJECTSCHEMA

VARCHAR(128)
NOT NULL
WITH DEFAULT
VARCHAR(128)
NOT NULL
WITH DEFAULT

Schema of the audited object. The object schema only


applies to categories, OBJMAINT and EXECUTE.

OBJECTNAME

OBJECTTYPE

254

CHAR(1)
NOT NULL
WITH DEFAULT

Name of object. Applies to categories, OBJMAINT and


EXECUTE. Can be specified using an SQL LIKE predicate.
If object name is specified using an SQL LIKE predicate, it
has to be specified as a delimited identifier. The escape
character to be used for the SQL LIKE predicate is
obtained from RGFESCP subsystem paramater. If not
specified, the default escape character is '+'.
Type of object for categories OBJMAINT and EXECUTE:
A
Alias
C
Clone table
P
Implicit table created for XML columns
DB2 10 for z/OS

YL&A DB2 10 for z/OS Reference Guide


Column Name

Data Type

Description
T
Table
blank All of the above object types

CREATEDTS

TIMESTAMP
NOT NULL
WITH DEFAULT
TIMESTAMP
NOT NULL
WITH DEFAULT
CHAR(1)
NOT NULL
WITH DEFAULT
CHAR(1)
NOT NULL
WITH DEFAULT

The time when the row was inserted.

ALTEREDTS
CHECKING
VALIDATE

OBJMAINT

CHAR(1)
NOT NULL
WITH DEFAULT

EXECUTE

CHAR(1)
NOT NULL
WITH DEFAULT

CONTEXT

CHAR(1)
NOT NULL
WITH DEFAULT

SECMAINT

CHAR(1)
NOT NULL
WITH DEFAULT

SYSADMIN

VARCHAR(128)
NOT NULL
WITH DEFAULT

DB2 10 for z/OS

The time when the row was last updated.


If authorization and authentication failures are audited:
A
Audit all failures (Authorization and authentication)
Blank Audit none
if auditing is enabled for when a trusted connection is
established or used by a different user:
A
Audit all
Blank Audit none
Indicates if auditing is enabled for when the table that is
identified by OBJECTSCHEMA, OBJECTNAME, and
OBJECTTYPE columns is altered or dropped:
A
Audit when the specified table is altered or dropped
Blank Audit none
Indicates if auditing is enabled for when the table identified
that is by the OBJECTSCHEMA, OBJECTNAME, and
OBJECTTYPE columns is accessed during the first
operation performed by each unit of work. Also, records
bind time information about SQL statements that involve
tables that are identified by the OBJECTSCHEMA,
OBJECTNAME, and OBJECTTYPE.
A Audit when the specified table is accessed
during the first operation of any kind performed
by each unit of work of a utility or application process.
C Audit when the specified table is accessed
during the first insert, update, or delete
operation performed by each unit of work.
Blank
Audit none
Indicates if auditing is enabled for the start of a utility, a
change to a utility object or phase, and the end of utility:
A
Audit all utilities
Blank Audit none
Indicates if auditing is enabled for when a grant or
revoke is made or a trusted context is created or altered:
A
Audit all utilities
Blank Audit none
Indicates if auditing is enabled for when an operation is
performed using an administrative authority to perform
system administration tasks:
Blank Audit none
*
Audit all the authorities
I
Installation SYSADM
L
SYSCTRL
O
SYSOPR
R
Installation SYSOPR
255

YL&A DB2 10 for z/OS Reference Guide


Column Name

Data Type

DBADMIN

VARCHAR(128)
NOT NULL
WITH DEFAULT

COLLID

VARCHAR(128)
NOT NULL
WITH DEFAULT

DB2START

CHAR(1)
NOT NULL
WITH DEFAULT

IBMREQD

CHAR(1)
NOT NULL

Description
S
SYSADM
The value of SYSADMIN can be a concatenated string of
all supported values.
Indicates if auditing is enabled for when an operation is
performed using an administrative authority to perform
database administration tasks:
Blank
Audit none
*
Audit all the authorities
B
System DBADM
C
DBCTRL
D
DBADM
E
SECADM
G
ACCESSCTRL
K
SQLADM
M
DBMAINT
P
PACKADM
T
DATAACCESS
Value of DBADMIN can be a concatenated string of
all supported values.
Name of the package collection. The package collection
only applies to column DBADMIN. The package collection
can be used to specify the collection name for auditing
PACKADM authority. If specified, all packages in that
collection are audited. If the collection name is not
specified, packages in all collections are audited.
Indicates if audit policies are to be started automatically
during DB2 start up. Up to 8 audit policies can be specified.
Y
Audit policy will be started automatically during
DB2 start up
N
Audit policy will not be started automatically during
DB2 start up
A value of Y indicates that the row came from the basic
machine-readable material (MRM) tape.

SYSIBM.SYSAUTOALERTS
Contains one row for each recommendation from autonomic procedures.
Column Name
ALERT_ID

HISTORY_ENTRY_ID
ACTION
TARGET_QUALIFIER
TARGET_OBJECT
256

Data Type
BIGINT
NOT NULL
GENERATED
ALWAYS
AS IDENTITY
BIGINT
NOT NULL
VARCHAR(32)
NOT NULL
VARCHAR(128)
NOT NULL
VARCHAR(128)

Description
The ID of the alert described in this row.

ID of the entry in the ADMIN_UTLPROCEDURES_HIST


procedure that produced this alert.
Type of action requested by this alert.
Qualifier name of DB2 object (database name) to which
alert applies.
Name of DB2 object (table space name) to which alert
DB2 10 for z/OS

YL&A DB2 10 for z/OS Reference Guide


Column Name
TARGET_PARTITION

Data Type
NOT NULL
SMALLINT
NOT NULL

OPTIONS

VARCHAR(4000)

CREATEDTS
DURATION

TIMESTAMP
NOT NULL
WITH DEFAULT
INTEGER

STATUS

VARCHAR(32)

STARTTS

TIMESTAMP

ENDTS

TIMESTAMP

RETURN_CODE

INTEGER

ERROR_MESSAGE

VARCHAR(1331)

OUTPUT

CLOB(2M)

ROWID

ROWID
NOT NULL
GENERATED
ALWAYS

Description
applies.
Partition number of the DB2 object to which this alert
applies. Zero, if this alert applies to all partitions or if the
object is not partitioned.
Options specified when the corresponding action is run:
USE PROFILE
Use the options specified in the profile
TABLE
Options only apply for this table
COLUMNS
Options only apply for these columns
SAMPLE
Sampling is allowed
The timestamp when the alert was issued.
An estimate of the time, in seconds, needed to run the
corresponding action. If this column contains NULL, the
execution plan might overwrite the time window.
Status of the actual planned task. Valid values are:
OPEN
The alert is not yet resolved
INPROGRESS
The alert execution is in progress
COMPLETED
The alert execution is complete
Timestamp for when alert execution started. Contains
NULL if the task execution has not yet started.
The timestamp for when the alert execution ended.
Contains NULL if the task execution has not yet ended.
The return code that is written directly by the autonomic
stored procedure that resolved the alert. This column
contains NULL if the alert is not yet resolved, if the
autonomic stored procedure failed, or if the autonomic
stored procedure does not write any return code. A
RETURN_CODE of 0 is expected in case of a successful
execution.
Error message that indicates why alert was not resolved
successfully. Contains NULL if alert is not yet resolved, or
if autonomic stored procedure that executes the alert does
not write any error message. No ERROR_MESSAGE text
is expected in case of a successful execution.
Output written directly by the autonomic stored procedure
that executes the planned task. Contains NULL if the task
is not yet executed, if the execution failed, or if the
autonomic stored procedure does not write any output.
The ROWID value for the CLOB column of this table.

SYSIBM.SYSAUTOALERTS_OUT
An auxiliary table for the OUTPUT column of the SYSIBM.SYSAUTOALERTS table.
Column Name
OUTPUT

Data Type
CLOB(2M)

Description
The output of the autonomic stored procedure.

SYSIBM.SYSAUTORUNS_HIST
Contains one row for each time an autonomic procedures has been run.
DB2 10 for z/OS

257

YL&A DB2 10 for z/OS Reference Guide


Column Name
HISTORY_ENTRY_ID

STARTTS
ENDTS
OUTPUT
ERROR_MESSAGE

Data Type
BIGINT
NOT NULL
GENERATED
ALWAYS
AS IDENTITY
VARCHAR(128)
NOT NULL
TIMESTAMP
TIMESTAMP
CLOB(2M)
VARCHAR(1331)

RETURN_CODE

INTEGER

ROWID

ROWID
NOT NULL
GENERATED
ALWAYS

PROC_NAME

Description
The ID of the entry in the history table.

Name of autonomic stored procedure that produced this


entry.
Timestamp when the autonomic stored procedure started.
Timestamp when the autonomic stored procedure ended.
The output of the autonomic stored procedure.
An error message that indicates why the autonomic stored
procedure was not successful. No ERROR_MESSAGE
text is expected in case of a successful execution.
Return code written directly by the autonomic stored
procedure. Contains NULL if autonomic stored procedure
execution failed, or if autonomic stored procedure does
not write any return code. A RETURN_CODE of 0 is
expected in case of a successful execution
The ROWID value for the OUTPUT column of this table.

SYSIBM.SYSAUTORUNS_HISTOU
An auxiliary table for the OUTPUT column of the SYSIBM.SYSAUTORUNS_HIST table.
Column Name
OUTPUT

Data Type
CLOB(2M)

Description
The output of the autonomic stored procedure.

SYSIBM.SYSAUTOTIMEWINDOWS
Contains one row for each time period during which autonomic procedures can be run.
Column Name
WINDOW_ID

DB2_SSID

Data Type
BIGINT
NOT NULL
GENERATED
ALWAYS
AS IDENTITY
CHAR(4)

MONTH_WEEK

CHAR(1)
NOT NULL

MONTH

INTEGER

DAY

INTEGER

258

Description
The ID of the time window described in this row.

DB2 member name on which the planned tasks have to be run. If


NULL, the tasks in time window can be run on any DB2 member.
Indicates how the value of the DAY column is interpreted:
M
Value of the DAY column is interpreted as a day of the
month
W
Value of the DAY column is interpreted as a
day of the week
Month in which the time window applies. The value will be from 1
(January) to 12 (December). If this column contains NULL, the
time window applies to all months. If MONTH_WEEK is 'W', this
column must be NULL.
Day of the month or day of the week for which the time window
DB2 10 for z/OS

YL&A DB2 10 for z/OS Reference Guide


Column Name

Data Type

FROM_TIME

TIME

TO_TIME

TIME

ACTION

VARCHAR(256)

MAX_TASKS

INTEGER

Description
applies. If this column contains NULL, the time window applies to
every day of the month or to every day of the week (depending on
the value of the MONTH_WEEK column).
Time of day at which time window begins. If this column contains
NULL, no limitation on time exists. This column contains NULL if
TO_TIME column contains NULL.
Time of day at which time window ends. If this column contains
NULL, no limitation on time exists. This column will contain NULL
if FROM_TIME column contains NULL.
Comma-separated list of actions allowed during this time window.
If column contains NULL, all actions are allowed
Number of concurrent actions allowed during time window. If
NULL, any number of actions are allowed concurrently.

SYSIBM.SYSAUXRELS
Contains one row for each auxiliary table created for a LOB column..
Column Name
TBOWNER
TBNAME
COLNAME
PARTITION

Data Type
VARCHAR(128)
VARCHAR(128)
VARCHAR(128)
SMALLINT

AUXTBOWNER
AUXTBNAME
AUXRELOBID

VARCHAR(128)
VARCHAR(128)
INTEGER

IBMREQD

CHAR(1)

RELCREATED

CHAR(1)

Description
Schema of the base table.
Name of the base table.
Name of the LOB column in the base table.
Partition number if the base tablespace is partitioned. Otherwise,
the value is 0.
Schema of the owner of the auxiliary table.
Name of the auxiliary table.
Internal identifier of the relationship between the base table and
the auxiliary table.
Whether the row came from the basic machine-readable material
(MRM) tape: N=No; Y=Yes
Release of DB2 is used to create object. Blank if pre-9.

SYSIBM.SYSCHECKDEP
Contains one row for each reference to a column in a table check constraint.
Column Name
TBOWNER
TBNAME
CHECKNAME
COLNAME
IBMREQD

Data Type
VARCHAR(128)
VARCHAR(128)
VARCHAR(128)
VARCHAR(128)
CHAR(1)

Description
Schema of towner of table on which check constraint is defined.
Name of the table on which the check constraint is defined.
Name of the check constraint.
Name of the column that the table check constraint refers to.
Whether the row came from the basic machine-readable material
(MRM) tape: N=No; Y=Yes

SYSIBM.SYSCHECKS
Contains one row for each table check constraint.
Column Name
TBOWNER

Data Type
VARCHAR(128)

CREATOR
DBID

VARCHAR(128)
SMALLINT

DB2 10 for z/OS

Description
Schema of the owner of the table on which the table check
constraint is defined.
Authorization ID of the creator of the table check constraint.
Internal identifier of the database for table check constraint.
259

YL&A DB2 10 for z/OS Reference Guide


Column Name
OBID
TIMESTAMP
RBA
IBMREQD

Data Type
SMALLINT
TIMESTAMP
CHAR(6)
CHAR(1)

TBNAME
CHECKNAME
CHECKCONDITION
RELCREATED
PERIOD

VARCHAR(128)
VARCHAR(128)
VARCHAR(7400)
CHAR(1)
CHAR(1)
NOT NULL
WITH DEFAULT

Description
Internal identifier of the table check constraint.
Time when the table check constraint was created.
The log RBA when the table check constraint was created.
Whether the row came from the basic machine-readable
material (MRM) tape: N =No, Y=Yes
Name of the table on which the check constraint is defined.
Table check constraint name.
Text of the table check constraint.
Release of DB2 is used to create the object. Blank if pre-9.
The type of period associated with the check constraint:
B: BUSINESS_TIME check constraint
S: SYSTEM_TIME check constraint
Blank: Not applicable

SYSIBM.SYSCHECKS2
Contains one row for each table check constraint.
Column Name
TBOWNER

Data Type
VARCHAR(128)

TBNAME
CHECKNAME
PATHSCHEMAS

VARCHAR(128)
VARCHAR(128)
VARCHAR(2048)

IBMREQD

CHAR(1)

RELCREATED

CHAR(1)

Description
Schema of the owner of the table on which the table check
constraint is defined.
Name of the table on which the check constraint is defined.
Table check constraint name.
SQL path at the time the table check constraint was created.
The path is used to resolve unqualified cast function names
that are used in the constraint definition.
A value of Y indicates that the row came from the basic
machine-readable material (MRM) tape.
Release of DB2 is used to create the object. Blank if pre-9.

SYSIBM.SYSCOLAUTH
Records the UPDATE or REFERENCES privileges that are held by users on individual columns
of a table or view.
Column Name
GRANTOR

Data Type
VARCHAR(128)

GRANTEE

VARCHAR(128)

GRANTEETYPE

CHAR(1)

CREATOR
TNAME
COLNAME

VARCHAR(128)
VARCHAR(18)
VARCHAR(128)

260

Description
AuthID of the user who granted the privileges. Could also be
PUBLIC or PUBLIC* .
Authorization ID of the user who holds the privilege or the name of
an application plan or package that uses the privilege. PUBLIC for
a grant to PUBLIC. PUBLIC followed by an asterisk for a grant to
PUBLIC AT ALL LOCATIONS.
Type of grantee:
Blank: An authorization ID
L: Role
P: An application plan or a package. The grantee is a package if
COLLID is not blank.
Schema of owner of table or view on which update privilege is held.
Name of the table or view.
Name of the column to which the UPDATE privilege applies.
DB2 10 for z/OS

YL&A DB2 10 for z/OS Reference Guide


Column Name
IBMREQD

Data Type
CHAR(1)

Description
A value of Y indicates that the row came from the basic
machine-readable material (MRM) tape.

COLLID

CHAR(128)

CONTOKEN

CHAR(8)

PRIVILEGE

CHAR(1)

GRANTEDTS
GRANTORTYPE

TIMESTAMP
CHAR(1)

If GRANTEE is a package, its collection name. Otherwise, the


value is blank.
If GRANTEE is a package, the consistency token of the DBRM
from which the package was derived. Otherwise, the value is blank.
Indicates which privilege this row describes:
R
Row pertains to the REFERENCES privilege.
Blank Row pertains to the UPDATE privilege.
Time when the GRANT statement was executed.
Indicates the type of grantor
L
Role
Blank Authoriation ID that is not a role

SYSIBM.SYSCOLDIST
Contains one or more rows for the first key column of an index key. Can be inserted, updated,
and deleted.
Column Name
STATSTIME

Data Type
TIMESTAMP

IBMREQD

CHAR(1)

TBOWNER
TBNAME
NAME

VARCHAR(128)
VARCHAR(128)
VARCHAR(128)

COLVALUE

VARCHAR(2000)

TYPE

CHAR(1)

CARDF

FLOAT

COLGROUPCOLNO

VARCHAR(254)

NUMCOLUMNS

SMALLINT

DB2 10 for z/OS

Description
If RUNSTATS updated the statistics, the date and time when
the last invocation of RUNSTATS updated the statistics.
A value of Y indicates that the row came from the basic
machine-readable material (MRM) tape.
Schema of the table that contains the column.
Name of the table that contains the column.
Name of the column. If NUMCOLUMNS is greater than 1 this
name identifies the first column name of the set of columns
associated with the statistics.
Data of a frequently occurring value. Statistics are not
collected for an index on a ROWID column. If the value has a
non-character data type, the data might not be printable.
The type of statistics gathered:
C Cardinality
F Frequent value
H Histogram Statistics
N Nonpadded frequent value
For TYPE='C', the number of distinct values for the column
group. For TYPE='H', the number of distinct values for the
column group in a quantile indicated by QUANTILENO.
Identifies the set of columns associated with the statistics. If
the statistics are only associated with a single column, the
field contains a zero length. Otherwise, the field is an array of
SMALLINT column numbers with a dimension equal to the
value in NUMCOLUMNS. This is an updatable column.
Number of columns associated with the statistics.

261

YL&A DB2 10 for z/OS Reference Guide


Column Name
FREQUENCYF

Data Type
FLOAT

QUANTILENO

SMALLINT

LOWVALUE

VARCHAR(2000)

HIGHVALUE

VARCHAR(2000)

Description
Gives the percentage of rows in the table with the value
specified in COLVALUE when the number is multiplied by
100. i.e., a value of 1 indicates 100%.153 indicates 15.3%.
When TYPE=H, this is the percentage of rows in table which
falls in the quantile indicated by QUANTILENO whose range
is limited by [LOWVALUE, HIGHVALUE].
Statistics are not collected for an index on a ROWID column.
Ordinary sequence number of a quantile in the whole
consecutive value range, from low to high. Not updatable.
TYPE=H, the lower bound for the quantile indicated by
QUANTILENO. Not used if TYPE is not H. Not updatable.
TYPE=H the higher bound for the quantile indicated by
QUANTILENO. Not used if TYPE is not H. Not updatable.

SYSIBM.SYSCOLDISTSTATS
Contains zero or more rows per partition for the first key column of a partitioning index. Can be
inserted, updated, and deleted.
Column Name
STATSTIME

Data Type
SMALLINT
TIMESTAMP

IBMREQD

CHAR(1)

PARTITION

SMALLINT

TBOWNER
TBNAME
NAME

VARCHAR(128)
VARCHAR(128)
VARCHAR(128)

COLVALUE

VARCHAR(2000)

TYPE

CHAR(1)

CARDF

FLOAT

COLGROUPCOLNO

VARCHAR(254)

NUMCOLUMNS

SMALLINT

262

Description
Not used
If RUNSTATS updated the statistics, the date and time
when the last invocation of RUNSTATS updated the
statistics.
A value of Y indicates that the row came from the basic
machine-readable material (MRM) tape.
Partition number for the tablespace that contains the table in
which the column is defined.
Schema of the owner of the table that contains the column.
Name of the table that contains the column.
Name of the column. If NUMCOLUMNS is greater than 1,
this name identifies the first column name of the set of
columns associated with the statistics.
Contains the data of a frequently occurring value. FOR BIT
DATA the value has a non-character data type, the data
may not be printable.
The type of statistics gathered:
C
Cardinality
F
Frequent value
H
Historgram statistics
N
Non-padded frequent value
TYPE is C, value is the number of distinct values for the
column group. TYPE is N or F, the value is the number of
rows or keys in the partition for which the FREQUENCYF
value applies. TYPE is H, the number of distinct values for
the column group in a quantile indicated by QUANTILENO.
Set of columns associated with the statistics. If the statistics
are only associated with a single column, the field contains
a zero length. Otherwise, the field is an array of SMALLINT
column numbers with a dimension equal to the value in
NUMCOLUMNS. This is an updatable column.
Number of columns associated with the statistics.
DB2 10 for z/OS

YL&A DB2 10 for z/OS Reference Guide


Column Name
FREQUENCYF

Data Type
FLOAT

QUANTILENO

SMALLINT

LOWVALUE

VARCHAR(2000)

HIGHVALUE

VARCHAR(2000)

Description
Percentage of rows in the table with value specified in
COLVALUE when the number is multiplied by 100. i.e., a
value of 1 indicates 100%. A value of .153 indicates 15.3%.
When TYPE=H, this is the percentage of rows in table
which falls in the quantile indicated by QUANTILENO whose
range is limited by [LOWVALUE, HIGHVALUE].
Statistics are not collected for an index on a ROWID
Ordinary sequence number of a quantile in the whole
consecutive value range, from low to high. This column is
not updatable.
For TYPE=H, this is the lower bound for the quantile
indicated by QUANTILENO. Not used if TYPE is not H.
This column is not updatable.
For TYPE=H this is the higher bound for the quantile
indicated by QUANTILENO. Not used if TYPE is not H.
This column is not updatable.

SYSIBM.SYSCOLDIST_HIST
Contains rows from SYSCOLDIST. Can be inserted, updated, and deleted.
Column Name
STATSTIME

Data Type
TIMESTAMP

TBOWNER
TBNAME
NAME

VARCHAR(128)
VARCHAR(128)
VARCHAR(128)

COLVALUE

VARCHAR(2000)

TYPE

CHAR(1)

CARDF

FLOAT(8)

COLGROUPCOLNO

VARCHAR(254)

NUMCOLUMNS

SMALLINT

DB2 10 for z/OS

Description
If RUNSTATS updated the statistics, the date and time when
the last invocation of RUNSTATS updated the statistics.
Schema of the table that contains the column.
Name of the table that contains the column.
Name of the column .If NUMCOLUMNS is greater than 1, this
name identifies the first column name of the set of columns
associated with the statistics.
Contains the data of a frequently occurring value. Statistics
are not collected for an index on a ROWID column. If the
value has non-character data type, data may not be printable.
The type of statistics gathered:
C
Cardinality
F
Frequent value
H
Histogram Statistics
N
Nonpadded frequent value
TYPE='C', number of distinct values for the column group.
When TYPE='H', this is he number of distinct values for the
column group in a quantile indicated by QUANTILENO. Value
is -1 if statistics have not been gathered.
Set of columns associated with the statistics. If the statistics
are only associated with a single column, the field contains a
zero length. Else is an array of SMALLINT column numbers
with a dimension equal to the value in NUMCOLUMNS.
Number of columns associated with the statistics.

263

YL&A DB2 10 for z/OS Reference Guide


Column Name
FREQUENCYF

Data Type
FLOAT(8)

Description
Gives the percentage of rows in the table with the value
specified in COLVALUE when the number is multiplied by
100. For example, a value of 1 indicates 100%. A value of
.153 indicates 15.3%.
When TYPE=H, this is the percentage of rows in table which
falls in the quantile indicated by QUANTILENO whose range
is limited by [LOWVALUE, HIGHVALUE].
Statistics are not collected for an index on a ROWID column.
The value is -1 if statistics have not been gathered.
A value of Y indicates that the row came from the basic
machine-readable material (MRM) tape.
Ordinary sequence number of a quantile in the whole
consecutive value range, from low to high. Not updatable.

IBMREQD

CHAR(1)

QUANTILENO

SMALLINT

LOWVALUE

VARCHAR(2000)

TYPE=H, the lower bound for the quantile indicated by


QUANTILENO. Not used if TYPE is not H. Not updatable.

HIGHVALUE

VARCHAR(2000)

TYPE=H the higher bound for the quantile indicated by


QUANTILENO. Not used if TYPE is not H. Not updatable.

SYSIBM.SYSCOLSTATS
Contains partition statistics for selected columns. Can be inserted, updated, and deleted.
Column Name
HIGHKEY

Data Type
VARCHAR(2000)

HIGH2KEY

VARCHAR(2000)

LOWKEY

VARCHAR(2000)

LOW2KEY

VARCHAR(2000)

COLCARD
STATSTIME

INTEGER
TIMESTAMP

264

Description
Highest value of the column within the partition. Blank if statistics
have not been gathered or the column is an indicator column, a
node ID column, or a column of an XML table. If the column has
a non-character data type, the data might not be printable. If the
partition is empty, the value is a string of length 0.
Second highest value of the column within the partition. Blank if
statistics have not been gathered or the column is an indicator
column, a node ID column, or a column of an XML table. If the
column has a non-character data type, the data might not be
printable. If the partition is empty, the value is a string of length 0.
Lowest value of the column within the partition. Blank if statistics
have not been gathered or the column is an indicator column, a
node ID column, or a column of an XML table. If the column has
a non-character data type, the data might not be printable. If the
partition is empty, the value is a string of length 0.
Second lowest value of the column within the partition. Blank if
statistics have not been gathered or the column is an indicator
column, a node ID column, or a column of an XML table. If the
column has a non-character data type, the data might not be
printable. If the partition is empty, the value is a string of length 0.
Number of distinct column values in the partition.
If RUNSTATS updated the statistics, the date and time when the
last invocation of RUNSTATS updated the statistics. If the value
is '0001-01-02.00.00.00.000000', which indicates that an ALTER
TABLE statement was executed to change the length of a
VARCHAR column, RUNSTATS should be run to update the
statistics before they are used.
DB2 10 for z/OS

YL&A DB2 10 for z/OS Reference Guide


Column Name
IBMREQD

Data Type
CHAR(1)

PARTITION

SMALLINT

TBOWNER
TBNAME
NAME
COLCARDDATA
STATS_FORMAT

VARCHAR(128)
VARCHAR(128)
VARCHAR(128)
VARCHAR(1000)
CHAR(1)

Description
Whether the row came from the basic machine-readable material
(MRM) tape: N=No, Y=Yes
Partition number for the tablespace that contains the table in
which the column is defined.
Schema or qualifier of the table that contains the column.
Name of the table that contains the column.
Name of the column.
Internal use only.
The type of statistics gathered:
Blank
Statistics have not been collected or varchar column
statistical values are padded
N
Varchar column statistical values are not padded
This is an updatable column

SYSIBM.SYSCOLUMNS
Contains one row for every column of each table and view.
Column Name
NAME
TBNAME
TBCREATOR
COLNO
COLTYPE

Data Type
VARCHAR(128)
VARCHAR(128)
VARCHAR(128)
SMALLINT
CHAR(8)

LENGTH

SMALLINT

DB2 10 for z/OS

Description
Name of the column.
Name of the table or view that contains the column.
Schema of the table or view that contains the column.
Numeric place of the column in the table or view
The type of the column specified in the definition of the column:
INTEGER
Large integer
SMALLINT
Small integer
FLOAT
Floating-point
CHAR
Fixed-length character string
VARCHAR
Varying-length character string
LONGVAR
Varying-length character string (prior to V9)
DECIMAL
Decimal
GRAPHIC
Fixed-length graphic string
VARGRAPHIC Varying-length graphic string
LONGVARG
Varying-length graphic string (prior to V9)
DATE
Date
TIME
Time
TIMESTMP
Timestamp
TIMESTZ
Timestamp with time zone
BLOB
Binary large object
CLOB
Character large object
DBCLOB
Double Byte Character Large Objects
ROWID
ROWID Data Type
DISTINCT
Distinct Type
XML
XML data type
BIGINT
Big integer
BINARY
Fixed-length binary string
VARBIN
Varying-length binary string
DECFLOAT
Decimal floating point
Length attribute of the column or, in the case of a decimal column,
its precision. The number does not include the internal prefixes
that are used to record the actual length and null state, where
applicable.
INTEGER
4
265

YL&A DB2 10 for z/OS Reference Guide


Column Name

Data Type

SCALE

SMALLINT

NULLS

CHAR(1)

266

Description
SMALLINT
2
BIGINT
8
FLOAT
4 or 8
CHAR
Length of string
VARCHAR
Maximum length of string
LONGVAR
Maximum length of string (prior to V9)
DECIMAL
Precision of number
GRAPHIC
Number of DBCS characters
VARGRAPHIC Maximum number of DBCS char.(prior to V9)
LONGVARG Maximum number of DBCS characters
BINARY
Length of String
VARBINARY Maximum length of string
DATE
4
TIME
3
TIMESTAMP WITHOUT TIME ZONE
The integral part of ((p+1)/2)+7 where p is the
precision of the timestamp
TIMESTAMP WITH TIME ZONE
The integral part of ((p+1)/2)+9 where p is the
precision of the timestamp
LOB
4 The length of the field that is stored in the base
table. The maximum length of the LOB column is
found in LENGTH2
INLINE LOB Greater than 4 For a table, a field of length 4
plus the inline length (in bytes) is stored in the
base table. The maximum length of the LOB
column is found in LENGTH2
BLOB
4 The length of the field that is stored in the
base table. The maximum length of the LOB
column is found in LENGTH2
CLOB
4 The length of the field that is stored in the
base table. The maximum length of the CLOB
column is found in LENGTH2
DBCLOB
4 The length of the field that is stored in the
base table. The maximum length of the CLOB
column is found in LENGTH2
ROWID
17 The maximum length of the stored portion
of the identifier
DISTINCT
The length of the source data type
XML
6
DECFLOAT
8 or 16
If the column type is DECIMAL, this value represents the scale. If
the column type is timestamp or timestamp with time zone, this
value represents the number of fractional second digits.
Otherwise the value is 0. If the column is a timestamp type, the
LENGTH is 10 and the SCALE is 0, the number of fractional
second digits is 6.
Whether the column can contain null values:
N = No
Y = Yes
The value can be N for a view column that is derived from an
expression or a function. Nevertheless, such a column allows
nulls when an outer select list refers to it.
DB2 10 for z/OS

YL&A DB2 10 for z/OS Reference Guide


Column Name
HIGH2KEY

Data Type
VARCHAR(2000)

LOW2KEY

VARCHAR(2000)

UPDATES

CHAR(1)

IBMREQD

CHAR(1)

REMARKS
DEFAULT

VARCHAR(762)
CHAR(1)

DB2 10 for z/OS

Description
Second highest value of the column. Blank if statistics have not
been gathered, or the column is an indicator column or a column
of an auxiliary table. If the column has a non-character data type,
the data might not be printable. If the table is empty, the value is a
string of length 0. This is an updatable column.
Second lowest value of the column. Blank if statistics have not
been gathered, or the column is an indicator column or a column
of an auxiliary table. If the column has a non-character data type,
the data might not be printable. If the table is empty, the value is a
string of length 0. This is an updatable column.
Whether the column can be updated:
N = No
Y = Yes
The value is N if the column is:
* Derived from a function or expression.
* A column that is defined with the AS IDENTITY and
GENERATED ALWAYS attributes.
The value can be Y for columns of a read-only view.
A value of Y indicates that the row came from the basic machinereadable material (MRM) tape.
A character string provided by user with COMMENT ON
The contents of this column are meaningful only if the TYPE
column for the associated SYSTABLES row indicates that this is
for a table(T) or a created temporary table (G).
Default indicator:
A
The column has a row ID data type (COLTYPE=ROWID)
and the GENERATED ALWAYS attribute
B
Column default value depends on data type of the column.
Data Type
Default Value
Numeric
0
Fixed-length char/graphic string
Blanks
Fixed-length binary string
Hexidecimal
Varying-length string
A string length of 0
Date
Current date
Time
Current time
Timestamp
Current timestamp
Timestamp with time zone
Current timestamp
with timezone
D
Column has a row ID data type (COLTYPE=ROWID
and the GENERATED BY DEFAULT attribute.
E
Column is defined with the FOR EACH ROW ON
UPDATE and GENERATED ALWAYS attributes.
F
Column is defined with the FOR EACH ROW ON
UPDATE and GENERATED BY DEFAULT attributes.
I
Column is defined with the AS IDENTITY and
GENERATED ALWAYS attributes.
J
Column is defined with the AS IDENTITY and
GENERATED BY DEFAULT attributes.
K
Column is defined for the implicit DOCID column for a
base table that contains XML data.
L
Column is defined with AS SECURITY LABEL attribute
N
Column has no default value.
Q
Column is defined with the AS ROW BEGIN attribute.
267

YL&A DB2 10 for z/OS Reference Guide


Column Name

Data Type

KEYSEQ

SMALLINT

FOREIGNKEY

CHAR(1)

268

Description
R
Column is defined with the AS ROW END attribute.
S
Column has a default value of the SQL auth ID of the
process at the time a default value is used.
U
Column has a default value that is the value of the
SESSION_USER special register at the time a
default value is used.
Y
If NULLS column is Y, column has a default value of null.
If NULLS column is N, default value depends on the data
type of the column.
Data Type
Default Value
Numeric
0
Fixed-length char string Blanks
Fixed length graphic
Blanks
Fixed length binary
Hexadecimal
Varying-length string
A string length of 0
Date
Current date
Time
Current time
Timestamp
Current timestamp
Timestamp with time zone
Current timestamp with
Time zone
Y Column defined with AS TRANSACTION START ID attribute.
1 Column has a default value that is the string constant
found in the DEFAULTVALUE column of this table row.
2 Column has a default value that is the floating-point constant
found in the DEFAULTVALUE column of this table row.
3 Column has a default value that is the decimal constant
found in the DEFAULTVALUE column of this table row.
4 Column has a default value that is the integer constant
found in the DEFAULTVALUE column of this table row.
5 Column has a default value that is the hexadecimal character
string found in the DEFAULTVALUE column of this table row.
6 Column has a default value that is the UX string found in
the DEFAULTVALUE column of this table row.
7 Column has a graphic data type and has a default value
that is the character string constant found in the
DEFAULTVALUE column of this table row.
8 Column has a character data type and has a default value
that is the graphic string constant found in the
DEFAULTVALUE column of this table row.
9 Column has a default value that is the DECFLOAT constant
found in the DEFAULTVALUE column of this table row.
The column's numeric position within the table's primary key. The
value is 0 if it is not part of a primary key.
Applies to character or CLOB columns, where it indicates the
subtype of the data:
B
BIT data
M
MIXED data
S
SBCS data
blank Indicates one of the following subtypes:

MIXED data if the encoding scheme is UNICODE, or


if the encoding scheme is not UNICODE and the value
DB2 10 for z/OS

YL&A DB2 10 for z/OS Reference Guide


Column Name

Data Type

FLDPROC

CHAR(1)

LABEL

VARCHAR(90)

STATSTIME

TIMESTAMP

DEFAULTVALUE

VARCHAR(1536)

COLCARDF

FLOAT

DB2 10 for z/OS

Description
of MIXED DATA on installation panel DSNTIPS is YES

SBCS data if the encoding scheme is not UNICODE


and the value of MIXED DATA on the installation panel
DSNTIPS is NO. For views defined prior to Version 7,
subtype information is not available and the default
(MIXED or SBCS) is used.
This is an updatable column.
Whether the column has a field procedure:
N
No
Y
Yes
Blank The column is for a view defined prior to V7. Views
defined after V7 contain Y or N.
The column label provided by the user with a LABEL ON
Statement; otherwise it is an empty string.
If RUNSTATS updated the statistics, the date and time when the
last invocation of RUNSTATS updated the statistics. The default
value is '0001-01-01.00.00.00.000000'. If the value is '0001-0102.00.00.00.000000', which indicates that an ALTER TABLE
statement was executed to change the length of a VARCHAR
column, RUNSTATS should be run to update the statistics before
they are used. This is an updatable column..
This field is meaningful only if the column being described is for a
table (the TYPE column of the associated SYSTABLES row is T
for table or G for created temporary table).
When the DEFAULT column is 1, 2, 3, 4, 5, 6, 7, 8, or 9, this field
contains the default value of the column.
If the default value is a string constant or a hexadecimal constant
(DEFAULT is 1, 5, 6, 7, or 8 respectively), the value is stored
without delimiters.
If the default value is a numeric constant (DEFAULT is 2, 3, 4, or
9), the value is stored as specified by the user, including sign and
decimal point representation, or special constant values, as
appropriate for the constant.
When the DEFAULT column is S or U and the default value was
specified when a new column was defined with the ALTER
TABLE statement, this field contains the value of the CURRENT
SQLID or SESSION_USER special register at the time the
ALTER TABLE statement was executed. Remember that this
default value applies only to rows that existed before the ALTER
TABLE statement was executed.
When the DEFAULT column is L and the column was added as a
new column with the ALTER TABLE statement, this field contains
the security label of the user at the time the ALTER TABLE
statement was executed. Remember that this default value
applies only to rows that existed before the ALTER TABLE
statement was executed.
Estimated number of distinct values in the column. For an
indicator column, this is the number of LOBs that are not null and
have a length greater than zero. The value is -1 if statistics have
not been gathered. The value is -2 for the first column of an index
of an auxiliary table. This is an updatable column.

269

YL&A DB2 10 for z/OS Reference Guide


Column Name
COLSTATUS

Data Type
CHAR(1)

LENGTH2

INTEGER

DATATYPEID

INTEGER

SOURCETYPEID

INTEGER

TYPESCHEMA

VARCHAR(128)

TYPENAME

VARCHAR(128)

CREATEDTS

TIMESTAMP

STATS_FORMAT

CHAR(1)

PARTKEY_
COLSEQ

SMALLINT

PARTKEY_
ORDERING

CHAR(1)

ALTERDTS

TIMESTAMP

CCSID

INTEGER

CCSID of the column. 0 if the object was created prior to V8 or is


not a string column

HIDDEN

INTEGER

RELCREATED
HASHKEY_
COLSEQ

CHAR(1)
SMALLINT

CONTROL_ID

INTEGER

Indicates whether the column is hidden.


P
Partically hidden
N
Not hidden
The release of DB2 that is used to create the object.
The column's numeric position within the table's hash key. The
value is 0 if the column is not part of the hash key. This column is
applicable only if the table that use hash organization.
Internal identifier of the column access control mask defined for
this column. 0 if no column access control mask is defined for the

270

Description
Indicates the status of the definition of a column:
I
The definition is incomplete because a LOB table
space, auxiliary table, or index on an auxiliary
table has not been created for the column.
Blank The definition is complete.
Maximum length of the data retrieved from the column.
Possible values are:
0
Not a LOB or ROWID column
40
For a ROWID column, the length of the returned value
1 to 2 147 483 647 bytes
For a LOB column, the maximum length
For a built-in data type, the internal ID of the built-in type. For a
distinct type, the internal ID of the distinct type. If the column was
created prior to Version 6, the value is 0.
For a built-in data type, 0. For a distinct type, the internal ID of the
built-in data type upon which the distinct type is based. If the
column was created prior to Version 6, the value is 0.
If COLTYPE is 'DISTINCT', the schema of the distinct type.
Otherwise, the value is 'SYSIBM'.
If COLTYPE is 'DISTINCT', the name of the distinct type.
Otherwise, the value is the same as the value of the COLTYPE
column. TYPENAME is set only for columns created in V6 or later.
The value for columns created earlier is not filled in.
Timestamp when the column was created. The value is
'0001-01-01.00.00.00.000000' if the column was created prior to
migration to Version 6.
Type of statistics gathered:
Blank
Statistics have not been collected or varchar column
statistical columns are padded
N
Varchar column statistical values are padded
This is an updateable column
The numeric position of the column within the partitioning key of
the table. The value is 0 if it is not part of the partitioning key. This
column is applicable only if the table uses table-controlled
partitioning.
Order of the column in the partitioning key
A
Ascending
D
Descending
Blank Column is not used as part of a partitioning key
Timestamp when the alter occurred.

DB2 10 for z/OS

YL&A DB2 10 for z/OS Reference Guide


Column Name

Data Type

Description
column.

XML_TYPEMOD
_ID

INTEGER

The ID of the XML type modifier. It is set to 0 if the column is not


an XML column or has no XML type modifier.

PERIOD

CHAR(1)

GENERATED_
ATTRIBUTE

CHAR(1)

Indicates whether the column is the start or the end of the period
for a SYSTEM_TIME or BUSINESS_TIME period:
B
Column is the start of period BUSINESS_TIME.
C
Column is the end of period BUSINESS_TIME.
S
Column is the start of period SYSTEM_TIME.
T
Column is the end of period SYSTEM_TIME.
blank Column is not used as start or the end of a period.
Indicates the columns generated attribute:
A
Column is defined as GENERATED_ALWAYS.
D
Column is defined as GENERATED BY DEFAULT.
blank Not applicable or the value of the DEFAULT column is A,
D, E, F, I, or J or defined from a prior release of DB2.

SYSIBM.SYSCOLUMNS_HIST
Contains rows from SYSCOLUMNS. Can be inserted, updated, and deleted.
Column Name
NAME
TBNAME
TBCREATOR
COLNO
COLTYPE

Data Type
VARCHAR(128)
VARCHAR(128)
VARCHAR(128)
SMALLINT
CHAR(8)

LENGTH
DB2 10 for z/OS

SMALLINT

Description
Name of the column.
Name of the table or view that contains the column.
Schema or qualifier of the table or view that contains the column.
Numeric place of the column in the table or view
The type of the column specified in the definition of the column:
INTEGER
Large integer
SMALLINT
Small integer
FLOAT
Floating-point
CHAR
Fixed-length character string
VARCHAR
Varying-length character string
LONGVAR
Varying-length character string (prior to V9)
DECIMAL
Decimal
GRAPHIC
Fixed-length graphic string
VARGRAPHIC Varying-length graphic string
LONGVARG
Varying-length graphic string (prior to V9)
DATE
Date
TIME
Time
TIMESTMP
Timestamp
TIMESTZ
Timestamp with time zone
BLOB
Binary large object
CLOB
Character large object
DBCLOB
Double Byte Character Large Objects
ROWID
ROWID Data Type
DISTINCT
Distinct Type
XML
XML data type
BIGINT
Big integer
BINARY
Fixed-length binary string
VARBIN
Varying-length binary string
DECFLOAT
Decimal floating point
Length attribute of the column or, in the case of a decimal column,
271

YL&A DB2 10 for z/OS Reference Guide


Column Name

Data Type

LENGTH2

INTEGER

NULLS

CHAR(1)

HIGH2KEY

VARCHAR
(2000)

LOW2KEY

VARCHAR
(2000)

272

Description
its precision. The number does not include the internal prefixes
that are used to record the actual length and null state, where
applicable.
INTEGER
4
SMALLINT
2
FLOAT
4 or 8
CHAR
Length of string
VARCHAR
Maximum length of string
LONGVAR
Maximum length of string
DECIMAL
Precision of number
GRAPHIC
Number of DBCS characters
VARG
Maximum number of DBCS characters
LONGVARG Maximum number of DBCS characters
DATE
4
TIME
3
TIMESTAMP WITHOUT TIME ZONE
The integral part of ((p+1)/2)+7 where p is the
precision of the timestamp
TIMESTAMP WITH TIME ZONE
The integral part of ((p+1)/2)+9 where p is the
precision of the timestamp
BLOB
4 The length of the field that is stored in the
base table. The maximum length of the LOB
column is found in LENGTH2
CLOB
4 The length of the field that is stored in the
base table. The maximum length of the CLOB
column is found in LENGTH2
DBCLOB
4 The length of the field that is stored in the
base table. The maximum length of the CLOB
column is found in LENGTH2
ROWID
17 The maximum length of the stored portion
of the identifier.
DISTINCT
The length of the source data type
XML
6
BIGINT
8
BINARY
Length of String
VARBIN
Maximum length of string
DECFLOAT
8 or 16
Maximum length of the data retrieved from the column. Possible
values are:
0 Not a LOB or ROWID column
40 For a ROWID column, the length of the returned value
2 to 2 147 483 647 bytes
For a LOB column, the maximum length.
Whether the column can contain null values:
N=No
Y=Yes
Second highest value of the column. Blank if statistics have not
been gathered, or the column is an indicator column or a column
of an auxiliary table. If the column has a non-character data type,
the data might not be printable.
Second lowest value of the column. Blank if statistics have not
been gathered, or the column is an indicator column or a column
DB2 10 for z/OS

YL&A DB2 10 for z/OS Reference Guide


Column Name

Data Type

STATSTIME

TIMESTAMP

COLCARDF

FLOAT

IBMREQD

CHAR(1)

STATS_FORMAT

CHAR(1)

Description
of an auxiliary table. If the column has a non-character data type,
the data might not be printable.
If RUNSTATS updated the statistics, the date and time when the
last invocation of RUNSTATS updated the statistics.
Estimated number of distinct values in the column. For an
indicator column, this is the number of LOBs that are not null and
have a length greater than zero. The value is -1 if statistics have
not been gathered. The value is -2 for the first column of an index
of an auxiliary table.
Whether the row came from the basic machine-readable material
(MRM) tape: N=No ,Y=Yes
The type of statistics gathered:
Blank
Statistics have not been collected or varchar column
statistical values are padded
N
Varchar column statistical values are not padded
This is an updatable column

SYSIBM.SYSCONSTDEP
Records dependencies on check constraints or user-defined defaults for a column.
Column Name
BNAME
BSCHEMA
BTYPE

Data Type
VARCHAR(128)
VARCHAR(128)
CHAR(1)

DTBNAME
DTBCREATOR

VARCHAR(128)
CHAR(8)

DCONSTNAME

VARCHAR(128)

DTYPE

CHAR(1)

IBMREQD

CHAR(1)

DTBOWNER

VARCHAR(128)

OWNERTYPE

CHAR(1)

Description
Name of the object on which the dependency exists.
Schema of the object on which the dependency exists.
Type of object on which the dependency exists:
F=Function instance
Name of the table to which the dependency applies.
Schema of the owner of the table to which the dependency
applies.
If DTYPE = 'C', the unqualified name of the check constraint. If
DTYPE = 'D', a column name.
Type of object:
C
Check constraint
D
User-defined default constant
Whether the row came from the basic machine-readable material
(MRM) tape: N=No, Y=Yes
Authorization ID of the owner of the table or a zero length string
for tables that were created in a DB2 release prior to Version 9.
Indicates the type of owner:
blank
Authorization ID
R
Role

SYSIBM.SYSCONTEXT
Contains one row for each trusted context.
Column name
NAME
CONTEXTID
DEFINER
DEFINERTYPE

DB2 10 for z/OS

Data Type
VARCHAR(128)
INTEGER
VARCHAR(128)
CHAR(1)

Description
Name of the trusted context.
Internal context ID.
Authorization ID or role that defined the trusted context.
The type of the definer:
L
Role
blank
Authorization ID
273

YL&A DB2 10 for z/OS Reference Guide


SYSTEMAUTHID

VARCHAR(128)

DEFAULTROLE
OBJECTOWNERTYPE

VARCHAR(128)
CHAR(1)

CREATEDTS
ALTEREDTS
ENABLED

TIMESTAMP
TIMESTAMP
CHAR(1)

ALLOWPUBLIC

CHAR(1)

AUTHENTICATEPUBLIC

CHAR(1)

RELCREATED
IBMREQD

CHAR(1)
CHAR(1)

REMARKS

VARCHAR(762)

DEFAULTSECURITYLABEL

VARCHAR(24)

The DB2 primary authorization ID that is used to establish


the connection. For remote requests, SYSTEMAUTHID is
derived from the system user ID that is provided by an
external entity, such as a middleware server.
For local requests, SYSTEMAUTHID depends on one of
the following sources of the address space:
BATCH
USER parameter on JOB statement
RRSAF
USER parameter on JOB statement or
RACF user
TSO
TSO logon ID
Name of the trusted context default role.
Specification of ROLE AS OBJECT OWNER on the trusted
context
L
ROLE AS OBJECT OWNER is specified. A
role owns any object created in the trusted
context.
blank ROLE AS OBJECT OWNER not specified. An
authorization ID owns any object created in the
trusted context.
The time when the trusted context is created.
The time when the trusted context is last altered.
The status of the trusted context:
Y
Enabled
N
Disabled
Whether the connection is allowed to be reused for
PUBLIC:
Y
Connection reuse is allowed
N
Connection reuse is not allowed
Whether authentication is required for PUBLIC when
ALLOWPUBLIC is Y:
Y
Authentication token is required for PUBLIC.For
local requests, the token is the password. For
remote requests, the token can be a password,
a RACF passticket, or a KERBEROS token
N
Authentication is not required
The release of DB2 that is used to create the object.
A value of Y indicates that the row came from the basic
machine-readable material (MRM) tape.
A character string that is provided using the COMMENT
statement.
Name of the context default RACF security label.

SYSIBM.SYSCONTEXTAUTHIDS
Contains one row for each authorization ID with which the trusted context can be used.
Column name
CONTEXTID
AUTHID

Data type
INTEGER
VARCHAR(128)

AUTHENTICATE

CHAR(1)

274

Description
The internal trusted context ID.
The primary authorization ID that can reuse a connection
in the identified trusted context.
Whether authentication is required for the authorization ID
in the AUTHID column:
DB2 10 for z/OS

YL&A DB2 10 for z/OS Reference Guide


Y

ROLE

VARCHAR(128)

CREATEDTS
IBMREQD

TIMESTAMP
CHAR(1)

SECURITYLABEL

VARCHAR(24)

Authentication token is required for the


authorization ID. For local requests, the token
is the password. For remote requests, the token
can be a password, a RACF passticket, or a
KERBEROS token
N
Authentication is not required
Role for auth ID in the AUTHID column. The role
supersedes default role defined for the trusted context.
tTime when auth ID is added to the trusted context.
A value of Y indicates that the row came from the basic
machine-readable material (MRM) tape.
RACF security label for AUTHID. The security label
supersedes the default security label, if any, that is defined
for the context.

SYSIBM.SYSCONTROLS
Contains one row for each row permission and column mask.
Column name
SCHEMA
NAME
OWNER
OWNERTYPE

Data type
VARCHAR(128)
VARCHAR(128)
VARCHAR(128)
CHAR(1)

TBSCHEMA

VARCHAR(128)

TBNAME

VARCHAR(128)

TBCORRELATION

VARCHAR(128)

COLNAME

VARCHAR(128)

COLNO

SMALLINT

CONTROL_ID

CONTROL_TYPE

INTEGER
NOT NULL
GENERATED
ALWAYS
AS IDENTITY
CHAR(1)

ENFORCED

CHAR(1)

IMPLICIT

CHAR(1)

ENABLE
DB2 10 for z/OS

CHAR(1)

Description
Schema of the row permission or column mask.
Name of the row permission or column mask.
Owner of the row permission or column mask.
Indicates the type of the owner:
blank
An authorization ID
L
Role
Schema of the table for which the row permission or
column mask is defined.
Name of the table for which the row permission or
column mask is defined.
If specified, the correlation name of the table for which
the row permission or column mask is defined.
Otherwise, the value is an empty string.
Column name for which the column mask is defined.
Blank if this is a row permission.
Column number for which the column mask is defined. 0
if this is a row permission.
Internal access control ID.

Type of the access control object:


R Row permission
M Column mask
Type of the access enforced by the row permission.
Column mask always has a value of 'A'.
A All access
Whether the row permission was implicitly created:
N Row permission was explicitly created or is a
column mask
Y Row permission was implicitly creat
Whether row permission or column mask is enabled for
275

YL&A DB2 10 for z/OS Reference Guide

STATUS

CHAR(1)

CREATEDTS

TIMESTAMP

RELCREATED

CHAR(1)

ALTEREDTS

TIMESTAMP

REMARKS
IBMREQD

VARCHAR(762)
CHAR(1)

ENVID
ROWID
RULETEXT

INTEGER
ROWID
CLOB(2MB)

DESCRIPTOR

BLOB(2MB)

access control:
N Not enabled
Y Enabled
Status of the row permission or column mask definition:
blank Definition of the row permission or column mask
is complete.
R
An error occurred when an attempt was made to
regenerate the row permission or column mask.
Timestamp when row permission or column mask was
created.
Release of DB2 when row permission or column mask
was created.
Timestamp when row permission or column mask was
last changed.
Character string provided by COMMENT ON statement.
A value of Y indicates that the row came from the basic
machine-readable material (MRM) tape.
Internal identifier of the environment.
Row identifier to support LOB columns in the table.
The source text of the search condition or expression
portion of the CREATE PERMISSION or CREATE MASK
statement.
Note: The lowercase letters in ordinary tokens are folded
to uppercase in the text. However, lowercase letters in
ordinary tokens are folded to uppercase in a C or Java
program only if the appropriate precompiler option is
specified.
Internal description of the row permission or column
mask

SYSIBM.SYSCOPY
Contains information needed for recovery.
Column Name
DBNAME
TSNAME
DSNUM

Data Type
CHAR(8)
CHAR(8)
INTEGER

ICTYPE

CHAR(1)

276

Description
Name of the database.
Name of the target tablespace or index space.
Data set number within the tablespace. For partitioned
tablespaces, this value corresponds to the partition number for
a single partition copy, or 0 for a copy of an entire partitioned
tablespace or index space.
Type of operation:
A
ALTER
B
REBUILD INDEX
C
CREATE
D
CHECK DATA LOG(NO) (no log records for the range
are available for RECOVER utility)
E
RECOVER (to current point)
F
COPY FULL YES
I
COPY FULL NO
L
SQL (type of operation)
M
MODIFY RECOVERY utility
DB2 10 for z/OS

YL&A DB2 10 for z/OS Reference Guide


Column Name

Data Type

START_RBA

CHAR(6)

FILESEQNO
DEVTYPE
IBMREQD

INTEGER
CHAR(8)
CHAR(1)

DSNAME

CHAR(44)

SHRLEVEL

CHAR(1)

DSVOLSER

VARCHAR(1784)

TIMESTAMP

TIMESTAMP

ICBACKUP

CHAR(2)

DB2 10 for z/OS

Description
P
RECOVER TOCOPY or RECOVER TORBA (partial
recovery point)
Q
QUIESCE
R
LOAD REPLACE LOG(YES)
S
LOAD REPLACE LOG(NO)
V
REPAIR VERSIONS utility
W
REORG LOG(NO)
X
REORG LOG(YES)
Y
LOAD LOG(NO)
Z
LOAD LOG(YES)
T
TERM UTILITY command (terminated utility)
A 48-bit positive integer that contains the LRSN of a point in the
DB2 recovery log.
* ICTYPE I or F, starting point for all updates since image copy
was taken
* ICTYPE P,point after log-apply phase of point-in-time
recovery
* ICTYPE Q, point after all data sets have been successfully
quiesced
* For ICTYPE R or S, end of log before start of the LOAD utility
and before any data is changed
* For ICTYPE T, end of the log when the utility is terminated
* For other values of ICTYPE, the end of the log before the
start of the RELOAD phase of the LOAD or REORG utility.
Tape file sequence number of the copy.
Device type the copy is on.
Whether the row came from the basic machine-readable
material (MRM) tape: N=No, Y=Yes
For ICTYPE='P' (RECOVER TOCOPY only), 'I', or 'F',
DSNAME contains the data set name. Otherwise, DSNAME
contains the name of the database and tablespace or index
space in the form, database-name.space-name, or DSNAME is
blank for any row migrated from a DB2 release prior to V4.
SHRLEVEL parameter on COPY (for ICTYPE F or I only):
C
Change
R
Reference
blank Does not describe an image copy or was migrated from
Version 1 Release 1 of DB2.
The volume serial numbers of the data set. A list of 6-byte
numbers separated by commas. Blank if t data set is cataloged.
The date and time when the row was inserted. This is the date
and time recorded in ICDATE and ICTIME. The use of
TIMESTAMP is recommended over that of ICDATE and
ICTIME, because the latter two columns may not be supported
in later DB2 releases.
Specifies the type of image copy contained in the data set:
Blank
LOCALSITE primary copy (first data set named with
COPYDDN)
FC
FlashCopy copy
LB
LOCALSITE backup copy (second data set named
with COPYDDN)
RP
RECOVERYSITE primary copy (first data set named
with RECOVERYDDN)
277

YL&A DB2 10 for z/OS Reference Guide


Column Name

Data Type

ICUNIT

CHAR(1)

STYPE

CHAR(1)

278

Description
RB
RECOVERYSITE backup copy (second data set
named with RECOVERYDDN)
Indicates the media that the image copy data set is stored on:
D
DASD
T
Tape
blank
Medium is neither tape nor DASD, the image copy is
from a DB2 release prior to Version 2 Release 3, or
ICTYPE is not 'I' or 'F'.
When ICTYPE=A, the values are:
A
A partition was added to a table.
B
The MEMBER CLUSTER value was changed.
C
A column was added to a table and an index in different
commit scopes.
D
DSSIZE attribute of the table space was altered.
E
Data set numbers of a base table and its associated
clone table are exchanged.
F
Page size attribute of table space or index was altered.
G
An index was regenerated
I
Inline attribute of LOB column was altered by REORG.
L
Logging attribute was altered to LOGGED.
M
MAXPARTITIONS attribute was altered.
N
An index was altered to not padded
O
Logging attribute was altered to NOT LOGGED.
P
An index was altered to padded
R
A table was altered to rotate partitions.
S
The SEGSIZE attribute of the table space was altered.
V
A column in a table was altered for a numeric data type
change and the column is in an index.
Z
A column that is in the key of an index that was
versioned prior to DB2 Version 8 was altered.
When ICTYPE=C, the values are:
L
Logging attribute was altered to LOGGED.
O
Logging attribute was altered to NOT LOGGED.
When ICTYPE=E, the values are:
B
RECOVER utility with the BACKOUT keyword.
blank RECOVER utility without the BACKOUT keyword.
When ICTYPE=F, the values are:
C
DFSMS concurrent copy (I instance of table space)
J
DFSMS concurrent copy (J instance of tablespace)
N
A FlashCopy copy is not consistent
Q
Sequential copy is consistent
S
LOAD REPLACE(NO)
T
FlashCopy is consistent
U
Sequential copy is not consistent
V
ALTER INDEX NOT PADDED
W
REORG LOG(NO)
X
REORG LOG(YES)
blank DB2 image copy
When ICTYPE=L, the values are:
M
Mass DELETE, TRUNCATE TABLE, or DROP TABLE.
The LOWDSNUM column contains the table OBID of the
affected table.
The MERGECOPY utility, when used to merge an embedded
DB2 10 for z/OS

YL&A DB2 10 for z/OS Reference Guide


Column Name

Data Type

PIT_RBA

CHAR(6)

GROUP_ NAME

CHAR(8)

DB2 10 for z/OS

Description
copy with subsequent incremental copies, also produces a
record that contains ICTYPE=F and the STYPE of the original
image copy (R, S, W, or X).
When ICTYPE = M and the MODIFY RECOVERY utility was
executed to delete SYSCOPY and/or SYSLGRNX records, the
value is R.
When ICTYPE=P, the values are:
B Recover to a point in time with the BACKOUT YES option
was run
C Recover to a point in time without using logonly with
consistency.
L Recover to a point in time using logonly without
consistency.
M Recover to a point in time using logonly with consistency.
blank Recover to a point in time without using logonly
without consistency.
blank Recover to a point in time without using logonly
without consistency.
When ICTYPE=Q and option WRITE(YES) is in effect when the
quiesce point is taken, the value is W.
When ICTYPE=R or S, the values are:
A Resetting REORG pending status
T First materializing the default value for a row change
timestamp column
When ICTYPE=T, this field indicates which COPY utility was
terminated by the TERM UTILITY command or the START
DATABASE command with the ACCESS(FORCE) option. The
values are:
F COPY FULL YES
I
COPY FULL NO
When ICTYPE=W or X, the values are:
A
Resetting REORG pending status or REBALANCE
H
The hash organization attributes of the table were altered.
T
First materializing the default value for a row change
timestamp column
For other values of ICTYPE, the value is blank.
When ICTYPE=P, this field contains the LRSN for the point in
the DB2 log. (The LRSN is the RBA in a non-data-sharing
Environment). For other ICTYPEs, this field is
X'000000000000'.
When ICTYPE=P, this field indicates the stop location of a
point-in-time recovery. If a record contains ICTYPE=P and
PIT_RBA=X'000000000000', the copy pending status is active
and a full image copy is required. If such a record is
encountered during fallback processing of RECOVER, the
recover job fails, and a point-in-time recovery is required.
PIT_RBA can be zero if the point-in-time recovery is completed
by the fall-back processing of RECOVER, or if CTYPE=P from
a prior release of DB2.
When ICTYPE=F or I and SHRLEVEL=C, this column contains
the current RBA or LRSN that corresponds to the point in the
DB2 log when the SHRLEVEL CHANGE copy completes.
The DB2 data-sharing member name of the DB2 subsystem
279

YL&A DB2 10 for z/OS Reference Guide


Column Name

Data Type

OTYPE

CHAR(1)

LOWDSNUM

INTEGER

HIGHDSNUM

INTEGER

COPYPAGESF

FLOAT(8)

NPAGESF

FLOAT(8)

CPAGESF
JOBNAME
AUTHID
OLDEST_VERSION

FLOAT(8)
CHAR(8)
CHAR(8)
SMALLINT

LOGICAL_PART
LOGGED

INTEGER
CHAR(1)

TTYPE

CHAR(8)

Description
that performed the operation. This column is blank if the DB2
subsystem was not in a DB2 data-sharing environment at the
time the operation was performed.
Type of object that the recovery information is for:
I
Index space
T Tablespace
Partition number of the lowest partition in the range for
SYSCOPY records created for REORG and LOAD REPLACE
for resetting a REORG pending status. Version number of an
index for SYSCOPY records created for a COPY (ICTYPE=F)
of an index space (OTYPE=I). (An index is versioned when a
VARCHAR column in the index key is lengthened.) When
ICTYPE = F or I, DSNUM = 0 and OTYPE is not equal to I,
LOWDSNUM = 1.
Partition number of the highest partition in the range. This
column is valid only for SYSCOPY records created for REORG
and LOAD REPLACE for resetting REORG pending
status.When ICTYPE = F or I, DSNUM = 0 and OTYPE is not
equal to I, HIGHDSNUM is the number of the highest partition
that is copied.
Number of pages written to the copy data set. For inline copies,
this number might include pages appearing more than once in
the copy data set.
The number of pages in the table space or index at the time of
COPY. This number might include pre-formatted pages that are
not actually copied.
Total number of changed pages.
Job name of the utility.
Authorization ID of the utility.
When ICTYPE= B, F, I, S, W, or X, the version number of the
oldest format of data for an object. For other values of ICTYPE,
the value is -1.
Logical partition number.
Indicates the logging attribute of the table space at the time the
SYSCOPY record is written:
Y indicates the table space is LOGGED
N indicates that the table spaces is NOT LOGGED
Blank indicates that the row was inserted prior to Version
9. For a non-LOB table spaces or an index space,
blank indicates that the logging attribute is LOGGED.
when ICTYPE=A and STYPE=B, this column indicates if
the previous value for the MEMBER CLUSTER attribute
is being used:
Y
The previous member cluster attribute of the table space
is being used.
N
The previous member cluster attribute of the table space
is not being used.
When ICTYPE=A and STYPE=D, this column indicates
the previous DSSIZE attribute value for the table space in
units of G, M, or K.

280

DB2 10 for z/OS

YL&A DB2 10 for z/OS Reference Guide


Column Name

Data Type

Description
When ICTYPE=A and STYPE=F, this column indicates
the previous page size attribute value for the table space
in units of K.
When ICTYPE=A and STYPE=I, this column indicates
that the inline length of a LOB column was altered:
D
Indicates that REORG decremented the inline length of
the LOB column
I
Indicates that REORG incremented the inline length of
the LOB column
When ICTYPE=A and STYPE=M, this column indicates either
the previous value of the MAXPARTITIONS attribute for the
table space or the type of table space conversion that was
performed on the table space.
I
The table space was converted from a single-table
simple table space to a partition-by-growth universal
table space.
n
The previous value of the MAXPARTITIONS attribute for
the table space.
S
The table space was converted from single-table
segmented table space to a partition-by-growth universal
table space.
When ICTYPE=A and STYPE=S, this column indicates either
the previous value of the SEGSIZE attribute for the table space
or the type of table space conversion that was performed on the
table space.
n
The previous value of the SEGSIZE attribute for the table
space.
P
The table space was converted from a partitioned table
space to a range-partitioned universal table space.
When ICTYPE=E, this column indicates if the full recovery reset
the object:
blank The full recovery reset the object
N
The full recovery did not reset the object
When ICTYPE=F and STYPE=N, Q, T, or U, this column
indicates the utility that made the FlashCopy:
C
COPY
D
CHECK DATA
L
LOAD
P
REPAIR
R
REORG TABLESPACE
S
REORG INDEX
T
COPYTOCOPY
When ICTYPE=I, TTYPE of S indicates that the directory pages
for the index image copy are at the front of each partition and
are indicated with a 'V' or '8'.
When ICTYPE=P, R, S, W, X, this column indicates the row

DB2 10 for z/OS

281

YL&A DB2 10 for z/OS Reference Guide


Column Name

Data Type

Description
format for the table space or partition.
RRF Indicates that the row format is the reordered row format
BRF Indicates that the row format is the basic row format
When ICTYPE=M and STYPE=R, this column indicates
whether the MODIFY RECOVERY utility deleted rows from
SYSIBM.SYSLGRNX.
blank MODIFY RECOVERY deleted rows from
SYSIBM.SYSLGRNX.
N
MODIFY RECOVERY did not delete rows from
SYSIBM.SYSLGRNX.
When ICTYPE=T, TTYPE of B indicates that a broken page
was detected during copy.

INSTANCE

SMALLINT

RELCREATED

CHAR(1)

When ICTYPE=W or X and SYTYPE=H, this column indicates


the prior value of HASHDATAPAGES.
When STYPE = E and ICTYPE = A, INSTANCE indicates the
data set instance number of a base object after an EXCHANGE
statement completes. The value of the INSTANCE column for
the last data exchange will match the value of the INSTANCE
column for the SYSIBM.SYSTABLESPACE table.
For an image copy, INSTANCE indicates the instance number
of the current base objects (table and index).
The release of DB2 that is used to create the object. Blank if
created prior to Version 9

SYSIBM.SYSCTXTTRUSTATTRS
Contains one row for each list of attributes for a given trusted context.
Column Name
CONTEXTID
NAME

282

Data Type
INTEGER
VARCHAR(128)

Description
The internal trusted context ID.
Name of the trust attribute. Possible values
including the following attributes:

An IPv4 address is represented as a


dotted decimal IP address. An example
of an IPv4 address is 9.112.46.111

An IPv6 address is represented as a


colon hexadecimal address. An example
of an IPv6 address is
2001:0DB8:0000:0000:0008:0800:200C:
417A, which can also be expressed in a
compressed form as
2001:DB8::8:800:200C:417A
A domain name which is converted to an
IP address by the domain name server
where a resulting IPv4 or IPv6 address is
determined.
A job or started task name for local
applications.
A network access security zone name in
DB2 10 for z/OS

YL&A DB2 10 for z/OS Reference Guide


VALUE
CREATEDTS
IBMREQD

VARCHAR(254)
TIMESTAMP
CHAR(1)

the RACF SERVAUTH class.


The value of the trust attribute.
The time when the attribute is created.
A value of Y indicates that the row came from the
basic machine-readable material (MRM) tape.

SYSIBM.SYSDATABASE
Contains one row for each database, except for database DSNDB01.
Column Name
NAME
CREATOR
STGROUP

Data Type
VARCHAR(24)
VARCHAR(128)
VARCHAR(128)

BPOOL

CHAR(8)

DBID

SMALLINT

IBMREQD

CHAR(1)

CREATEDBY

VARCHAR(128)

TYPE

CHAR(1)

GROUP_MEMBER

VARCHAR(24)

CREATEDTS

TIMESTAMP

ALTEREDTS

TIMESTAMP

ENCODING_
SCHEME

CHAR(1)

SBCS_CCSID

INTEGER

DB2 10 for z/OS

Description
Database name.
Authorization ID of the owner of the database.
Name of the default storage group of the database;
blank for a system database.
Name of the default buffer pool of the tablespace; blank
for a system tablespace.
Internal identifier of the database. If there were 32511
databases or more when this database was created, the
DBID is a negative number.
A value of Y indicates that the row came from the basic
machine-readable material (MRM) tape.
Primary authorization ID of the user who created the
database.
Type of database:
blank Not a work file database or a TEMP database.
W
A work file database. The database is
DSNDB07, or it was created with the
WORKFILE clause and used as a work file
database by a member of a DB2 data-sharing
group.
The DB2 data-sharing member name of the DB2
subsystem that use this work file database. This column
is blank if the work file database was not created in a
DB2 data-sharing environment, or if the database is not
a work file database as indicated by the TYPE column.
Time when the CREATE statement was executed for the
database.
For DSNDB04 and DSNDB06, the value is
'1985-04-01.00.00.00.000000'.
Time when the most recent ALTER DATABASE
statement was applied. If no ALTER DATABASE
statement has been applied, ALTEREDTS has the value
of CREATEDTS.
Default encoding scheme for the database:
E
EBCDIC
A
ASCII
U
UNICODE
blank For DSNDB04, a work file database, and a
TEMP database.
Default SBCS CCSID for the database. For a TEMP
database or a database created in a DB2 release prior to
Version 5, the value is 0.
283

YL&A DB2 10 for z/OS Reference Guide


Column Name
DBCS_CCSID

Data Type
INTEGER

MIXED_CCSID

INTEGER

INDEXBP
IMPLICIT

CHAR(8)
CHAR(1)

CREATORTYPE

CHAR(1)

RELCREATED

CHAR(1)

Description
Default DBCS CCSID for the database. For a TEMP
database or a database created in a DB2 release prior to
Version 5, the value is 0.
Default mixed CCSID for the database. For a TEMP
database or database created in a DB2 release
prior to Version 5, the value is 0.
Name of the default buffer pool for indexes.
Indicates whether the database was implicitly created:
Y The database was implicitly created
N The database was explicitly created
Indicates the type of creator:
blank Authorization ID
L
Role
The release of DB2 that is used to create the object.

SYSIBM.SYSDATATYPES
Contains one row for each distinct type defined to the system.
Column Name
SCHEMA
OWNER
NAME
CREATEDBY
SOURCESCHEMA
SOURCETYPE
METATYPE
DATATYPEID
SOURCETYPEID

Data Type
VARCHAR(128)
VARCHAR(128)
VARCHAR(128)
VARCHAR(128)
VARCHAR(128)
VARCHAR(128)
CHAR(1)
INTEGER
INTEGER

LENGTH

INTEGER

SCALE

SMALLINT

SUBTYPE

CHAR(1)

CREATEDTS
ENCODING_SCHEME

TIMESTAMP
CHAR(1)

IBMREQD

CHAR(1)

284

Description
Schema of the distinct type.
Owner of the distinct type.
Name of the distinct type.
Schema under which the distinct type was created.
Schema of the source data type.
Name of the source type.
The class of data type: T Distinct type.
Internal identifier of the distinct type.
Internal ID of the built-in data type upon which the distinct
type is sourced.
Maximum length or precision of a distinct type that is
sourced on the IBM-defined DECIMAL data type.
Scale for a distinct type that is based on the IBM-defined
DECIMAL type. Number of fractional second digits for a
distinct type that is based on the IBM-defined timestamp or
timestamp with time zone type. For all other distinct types,
the value is 0. If the value is a timestamp, the LENGTH is
10 and the SCALE is 0, the number of fractional second
digits is 6.
Subtype of the distinct type, which is based on the subtype
of the source type:
B
The subtype is FOR BIT DATA.
S
The subtype is FOR SBCS DATA.
M
The subtype is FOR MIXED DATA.
blank The source type is not a character type.
Time when the distinct type was created.
Encoding scheme of the distinct type:
A
ASCII
E
EBCDIC
U
UNICODE
A value of Y indicates that the row came from the basic
machine-readable material (MRM) tape.
DB2 10 for z/OS

YL&A DB2 10 for z/OS Reference Guide


Column Name
REMARKS

Data Type
VARCHAR(762)

OWNERTYPE

CHAR(1)

RELCREATED
INLINE_LENGTH

CHAR(1)
INTEGER

Description
A character string provided by the user with the COMMENT
ON statement.
Indicates the type of owner:
blank
Authorization ID
L
Role
The release of DB2 that is used to create the object.
The inline length attribute of the type if it is based on a LOB
source type:
-1
This type does not specify INLINE LENGTH
greater than or equal to 0
The inline length attribute (in byte) of the type if it is
based on a LOB source type

SYSIBM.SYSDBAUTH
Records the privileges that are held by users over databases.
Column Name
GRANTOR

Data Type
VARCHAR(128)

GRANTEE

VARCHAR(128)

NAME
GRANTEETYPE

VARCHAR(24)
CHAR(1)

AUTHHOWGOT

CHAR(1)

CREATETABAUTH

CHAR(1)

CREATETSAUTH

CHAR(1)

DBADMAUTH

CHAR(1)

DBCTRLAUTH

CHAR(1)

DB2 10 for z/OS

Description
Authorization ID or role of the user who granted the privileges.
Could also be PUBLIC.
Application ID of the user who holds the privilege. Could also be
PUBLIC for a grant to PUBLIC.
Database name.
Indicates the type of owner:
blank
Authorization ID
L
Role
Authorization level of the user from whom the privileges were
received. This authorization level is not necessarily the highest
authorization level of the grantor.
blank Not applicable
C DBCTL
D DBADM
E SECADM
G ACCESSCTRL
L SYSCTRL
M DBMAINT
S SYSADM
Whether the GRANTEE can create tables within the database:
blank Privilege is not held
G
Privilege held with the GRANT option
Y
Privilege is held without the GRANT option
Whether the GRANTEE can create tablespaces within the
database:
blank Privilege is not held
G
Privilege held with the GRANT option
Y
Privilege is held without the GRANT option
Whether the GRANTEE has DBADM authority over the
database:
blank Privilege is not held
G
Privilege held with the GRANT option
Y
Privilege is held without the GRANT option
Whether the GRANTEE has DBCTRL authority over the
database:
285

YL&A DB2 10 for z/OS Reference Guide


Column Name

Data Type

DBMAINTAUTH

CHAR(1)

DISPLAYDBAUTH

CHAR(1)

DROPAUTH

CHAR(1)

IMAGCOPYAUTH

CHAR(1

LOADAUTH

CHAR(1)

REORGAUTH

CHAR(1)

RECOVERDBAUTH

CHAR(1)

REPAIRAUTH

CHAR(1)

STARTDBAUTH

CHAR(1)

STATSAUTH

CHAR(1)

286

Description
blank Privilege is not held
G
Privilege held with the GRANT option
Y
Privilege is held without the GRANT option
Whether the GRANTEE has DBMAINT authority over the
database:
blank Privilege is not held
G
Privilege held with the GRANT option
Y
Privilege is held without the GRANT option
Whether the GRANTEE can issue the DISPLAY command for
the database:
blank Privilege is not held
G
Privilege held with the GRANT option
Y
Privilege is held without the GRANT option
Whether the GRANTEE can issue the ALTER DATABASE and
DROP DATABASE statement:
blank Privilege is not held
G
Privilege held with the GRANT option
Y
Privilege is held without the GRANT option
Whether the GRANTEE can use the COPY, MERGECOPY,
MODIFY, and QUIESCE utilities on the database:
blank Privilege is not held
G
Privilege held with the GRANT option
Y
Privilege is held without the GRANT option
Whether the GRANTEE can use the LOAD utility to load tables
in the database:
blank Privilege is not held
G
Privilege held with the GRANT option
Y
Privilege is held without the GRANT option
Whether the GRANTEE can use the REORG utility to reorganize
tablespaces and indexes in the database:
blank Privilege is not held
G
Privilege held with the GRANT option
Y
Privilege is held without the GRANT option
Whether the GRANTEE can use the RECOVER and REPORT
utilities on tablespaces in the database:
blank Privilege is not held
G
Privilege held with the GRANT option
Y
Privilege is held without the GRANT option
Whether the GRANTEE can use the DIAGNOSE and REPAIR
utilities on tablespaces and indexes in the database:
blank Privilege is not held
G
Privilege held with the GRANT option
Y
Privilege is held without the GRANT option
Whether the GRANTEE can use the START command against
the database:
blank Privilege is not held
G
Privilege held with the GRANT option
Y
Privilege is held without the GRANT option
Whether the GRANTEE can use the CHECK and RUNSTATS
utilities against the database:
blank Privilege is not held
G
Privilege held with the GRANT option
Y
Privilege is held without the GRANT option
DB2 10 for z/OS

YL&A DB2 10 for z/OS Reference Guide


Column Name
STOPAUTH

Data Type
CHAR(1)

IBMREQD

CHAR(1)

GRANTEDTS
GRANTORTYPE

TIMESTAMP
CHAR(1)

Description
Whether the GRANTEE can issue the STOP command against
the database:
blank Privilege is not held
G
Privilege held with the GRANT option
Y
Privilege is held without the GRANT option
A value of Y indicates that the row came from the basic
machine-readable material (MRM) tape.
Time when the GRANT statement was executed.
Indicates the type of owner:
blank
Authorization ID
L
Role

SYSIBM.SYSDBRM
Contains one row for each DBRM of each application plan.
Column Name
NAME
TIMESTAMP
PDSNAME
PLNAME
PLCREATOR

QUOTE

Data Type
VARCHAR(24)
CHAR(8)
CHAR(132)
VARCHAR(24)
VARCHAR(128)
CHAR(8)
CHAR(6)
CHAR(1)

COMMA

CHAR(1)

HOSTLANG

CHAR(1)

IBMREQD

CHAR(1)

CHARSET

CHAR(1)

MIXED

CHAR(1)

DEC31

CHAR(1)

DB2 10 for z/OS

Description
Name of the DBRM.
Consistency token.
Name of the partitioned data set of which the DBRM is a member.
Name of the application plan of which this DBRM is a part.
Authorization ID of the owner of the application plan.
Not used.
Not used.
SQL string delimiter for the SQL statements in the DBRM:
N Apostrophe
Y Quotation mark
Decimal point representation for SQL statements in the DBRM:
N Period
Y Comma
The host language used
B Assembler language
C OS/VS COBOL
D C
F Fortran
P PL/I
2 VS COBOL II or IBM COBOL Release 1 (formerly called
COBOL/370)
3 IBM COBOL (Release 2 or subsequent releases)
4 C++
value of Y indicates that the row came from the basic
machine-readable material (MRM) tape.
Indicates whether the system CCSID for SBCS data was 290
(Katakana) when the program was precompiled:
A
No
K
Yes
Indicates if mixed data was in effect when the application program
was precompiled.
N No
Y Yes
Indicates whether DEC31 was in effect when the program was
precompiled.
Blank No
287

YL&A DB2 10 for z/OS Reference Guide


Column Name

Data Type

VERSION
PRECOMPTS
PLCREATOR
TYPE

VARCHAR(122)
TIMESTAMP
CHAR(1)

RELCREATED

CHAR(1)

Description
Y
Yes
Version identifier for the DBRM.
Time when the DBRM was precompiled.
Indicates the type of creator:
blank Authorization ID
L
Role
The release of DB2 that is used to create the object.

SYSIBM.SYSDEPENDENCIES
Records the dependencies between objects.
Column Name
BNAME

Data Type
VARCHAR(128)

BSCHEMA

VARCHAR(128)

BCOLNAME

VARCHAR(128)

BCOLNO

SMALLINT

BTYPE

CHAR(1)

BOWNER

VARCHAR(128)

BOWNERTYPE

CHAR(1)

DNAME
DSCHEMA

VARCHAR(128)
VARCHAR(128)

DCOLNAME

VARCHAR(128)

DCOLNO

SMALLINT

DTYPE

CHAR(1)

288

Description
Name of the object on which another object is dependent.
If BTYPE is F, the name is the specific name of the
function.
If BTYPE is W or Z, the name is the name of the table for
which the period is defined.
Schema or qualifier of the object on which another object is
dependent.
Column name of the object on which another object is
dependent.
Column number of the object on which another object is
dependent.
The type of object that is identified by BNAME, BSCHEMA, and
BCOLNAME:
A Alias
C Column
F Function
M Materialized query table
S Synonym
T Table
V View
W SYSTEM_TIME period
Z BUSINESS_TIME period
Authorization ID of the owner of the object on which another
object is dependent.
Type of creator of the object on which another object is
dependent:
L
Role
blank Authorization ID that is not a role
Name of the object that has dependencies on another object.
Schema or qualifier of the object that has dependencies on
another object.
Column name of the object that has dependencies on another
object.
Column number of the object that has dependencies on another
object.
Type of the object that is identified by DNAME, DSCHEMA, and
DCOLNAME:
C Generated column
I Index
X Row permission
DB2 10 for z/OS

YL&A DB2 10 for z/OS Reference Guide


DOWNER

VARCHAR(128)

DOWNERTYPE

CHAR(1)

IBMREQD

CHAR(1)

BVERSION
DVERSTION

VARCHAR(122)
VARCHAR(122)

Y Column mask
Authorization ID of the owner of the object that has dependencies
on another object.
Type of creator of the object that has dependencies on another
object:
L
Role
blank Authorization ID if not a role
A value of Y indicates that the row came from the basic machinereadable material (MRM) tape.
Version defined by BNAME, BSCHEME and BCOLNAME
Version defined by DNAME, DSCHEME and DCOLNAME

SYSIBM.SYSDUMMY1
Contains one row in an EBCDIC table space.
Column Name
IBMREQD

Data Type
CHAR(1)

Description
A value of Y indicates that the row came from the basic
machine-readable material (MRM) tape.

SYSIBM.SYSDUMMYA
Contains one row in ASCII table space.
Column Name
IBMREQD

Data Type
CHAR(1)

Description
A value of Y indicates that the row came from the basic
machine-readable material (MRM) tape.

SYSIBM.SYSDUMMYE
Contains one row in an EBCDIC table space.
Column Name
IBMREQD

Data Type
CHAR(1)

Description
A value of Y indicates that the row came from the basic
machine-readable material (MRM) tape.

SYSIBM.SYSDUMMYU
Contains one row in a UNICODE table space.
Column Name
IBMREQD

Data Type
CHAR(1)

Description
A value of Y indicates that the row came from the basic
machine-readable material (MRM) tape.

SYSIBM.SYSENVIRONMENT
Records the environment variables when an object is created.
Column Name
ENVID

Data Type
INTEGER

CURRENT_SCHEMA
RELCREATED
PATHSCHEMAS
APPLICATION_

VARCHAR(128)
CHAR(1)
VARCHAR(2048)
INTEGER

DB2 10 for z/OS

Description
Internal identifier of the
environment.
The current schema.
The release when the environment information is created.
The schema path.
The CCSID of the application environment.
289

YL&A DB2 10 for z/OS Reference Guide


ENCODING_CCSID
ORIGINAL_
ENCODING_CCSID
DECIMAL_POINT

INTEGER

The original CCSID of the statement text string.

CHAR(1)

The decimal point indicator:


C Comma
P Period
The minimum divide scale:
N
The usual rules apply for decimal division in SQL
Y
Retain at lease three digits to the right of the decimal
point after any decimal division.
The string delimiter that is used in COBOL string constants:
A
Apostrophe (')
Q Quote (")
The SQL string delimiter that is used in string constants:
A
Apostrophe (')
Q Quote (")
Uses mixed DBCS data:
N
No mixed data
Y
Mixed data
The rules that are to be used for CURRENT PRECISION
and when both operands in a decimal operation have a
precision of 15 or less:
1
DEC15 specifies that the rules do not allow a
precision greater than 15 digits
2
DEC31 specifies that the rules allow a precision of
up to 31 digits
The date format:
I
ISO - yyyy-mm-dd
J JIS - yyyy-mm-dd
U USA - mm/dd/yyyy
E EUR - dd.mm.yyyy
L Locally defined by an installation exit routine
The time format:
I
ISO - hh.mm.ss
J
JIS - hh.mm.ss
U
USA - hh:mm AM or hh:mm PM
E
EUR - hh.mm.ss
L
Locally defined by an installation
exit routine
The floating point format:
I
IEEE floating point format
S
System/390 floating point format
The host language:
ASM
C
CPP
IBMCOB
PLI
FORTRAN
The character set:
A
Alphanumeric
FOLD is only applicable when HOST_LANGUAGE is C or
CPP. Otherwise FOLD is blank.

MIN_DIVIDE_SCALE

CHAR(1)

STRING_DELIMITER

CHAR(1)

SQL_STRING_
DELIMITER

CHAR(1)

MIXED_DATA

CHAR(1)

DECIMAL_
ARITHMETIC

CHAR(1)

DATE_FORMAT

CHAR(1)

TIME_FORMAT

CHAR(1)

FLOAT_FORMAT

CHAR(1)

HOST_LANGUAGE

CHAR(8)

CHARSET

CHAR(1)

FOLD

CHAR(1)

290

DB2 10 for z/OS

YL&A DB2 10 for z/OS Reference Guide


N

IBMREQD

CHAR(1)

ROUNDING

CHAR(1)

Lower case letters in SBCS ordinary identifiers are


not folded to uppercase
Y
Lower case letters in SBCS ordinary identifiers are
folded to uppercase blank Not applicable
A value of Y indicates that the row came from the basic
machine-readable material (MRM) tape.
The rounding mode that is used when arithmetic and casting
operations are performed on DECFLOAT data:
C ROUND_CEILING
D ROUND_DOWN
F ROUND_FLOOR
G ROUND_HALF_DOWN
E ROUND_HALF_EVEN
H ROUND_HALF_UP
U ROUND_UP

SYSIBM.SYSFIELDS
Contains one row for every column that has a field procedure.
Column Name
TBCREATOR
TBNAME
COLNO
NAME
FLDTYPE

Data Type
VARCHAR(128)
VARCHAR(128)
SMALLINT
VARCHAR(128)
VARCHAR(24)

LENGTH

SMALLINT

SCALE
FLDPROC

SMALLINT
VARCHAR(24)

WORKAREA

SMALLINT

IBMREQD

CHAR(1)

DB2 10 for z/OS

Description
Schema or qualifier of the table that contains the column.
Name of the table that contains the column.
Numeric place of this column in the table.
Name of the column.
Data type of the encoded values in the field:
INTEGER
Large integer
SMALLINT
Small integer
FLOAT
Floating-point
CHAR
Fixed-length character string
VARCHAR
Varying-length character string
DECIMAL
Decimal
GRAPHIC
Fixed-length graphic string
VARG
Varying-length graphic string
The length attribute of the field; or, for a decimal field, its
precision. The number does not include the internal prefixes that
can be used to record actual length and null state.
INTEGER
4
SMALLINT 2
FLOAT
8
CHAR
Length of string
VARCHAR Maximum length of string
DECIMAL Precision of number
GRAPHIC Number of DBCS characters
VARG
Maximum number of DBCS characters
Scale if FLDTYPE is DECIMAL; otherwise, the value is 0.
For a row describing a field procedure, the name of the
procedure.
For a row describing a field procedure, the size, in bytes, of the
work area required for the encoding and decoding of the
procedure.
Whether the row came from the basic machine-readable material
(MRM) tape: N=No, Y=Yes
291

YL&A DB2 10 for z/OS Reference Guide


Column Name
EXITPARML

Data Type
SMALLINT

PARMLIST

VARCHAR(735)

EXITPARM

VARCHAR(1530)
FOR BIT DATA

Description
For a row describing a field procedure, the length of the field
procedure parameter value block.
For a row describing a field procedure, the parameter list
following FIELDPROC in the statement that created the
column, with insignificant blanks removed.
For a row describing a field procedure, the parameter value
block of the field procedure (the control block passed to the field
procedure when it is invoked).

SYSIBM.SYSFOREIGNKEYS
Contains one row for every column of every foreign key.
Column Name
CREATOR
TBNAME
RELNAME

Data Type
VARCHAR(128)
VARCHAR(128)
VARCHAR(128)

COLNAME
COLNO
COLSEQ
IBMREQD

VARCHAR(128)
SMALLINT
SMALLINT
CHAR(1)

Description
Authorization ID of the owner of the table that contains the column.
Name of the table that contains the column.
Constraint name for the constraint for which the column is part of
the foreign key.
Name of the column.
Numeric place of the column in its table.
Numeric place of the column in the foreign key.
A value of Y indicates that the row came from the basic machinereadable material (MRM) tape.

SYSIBM.SYSINDEXES
Contains one row for every index.
Column Name
NAME
CREATOR
TBNAME
TBCREATOR
UNIQUERULE

Data Type
VARCHAR(128)
VARCHAR(128)
VARCHAR(128)
VARCHAR(128)
CHAR(1)

COLCOUNT
CLUSTERING

SMALLINT
CHAR(1)

292

Description
Name of the index.
Schema of the index.
Name of the table on which the index is defined.
Schema of the table.
Whether the index is unique:
C Yes, and it is used to enforce the uniqueness of a
UNIQUE constraint or hash key columns.
D No (duplicates are allowed)
U Yes
P Yes, and it is a primary index (As in prior releases of
DB2, a value of P is used for primary keys that are used
to enforce a referential constraint.)
C Yes, and it is an index used to enforce UNIQUE constraint
N Yes, and it is defined with UNIQUE WHERE
R Yes, and it is an index used to enforce the uniqueness of
a non-primary parent key
G Yes, and it is an index used to enforce the uniqueness of
values in a column defined as ROWID GENERATED BY
DEFAULT.
X Yes, and it is an index used to enformce the uniqueness
of values in a column that contains XML data
The number of columns in the key.
Whether CLUSTER was specified when the index was
created:
DB2 10 for z/OS

YL&A DB2 10 for z/OS Reference Guide


Column Name

Data Type

CLUSTERED

CHAR(1)

DBID
OBID
ISOBID
DBNAME
INDEXSPACE

NLEAF

SMALLINT
SMALLINT
SMALLINT
VARCHAR(24)
VARCHAR(24)
INTEGER
INTEGER
INTEGER

NLEVELS

SMALLINT

BPOOL
PGSIZE

CHAR(8)
SMALLINT

ERASERULE

CHAR(1)

CLOSERULE

VARCHAR(24)
CHAR(1)

SPACE

INTEGER

IBMREQD

CHAR(1)

CLUSTERRATIO

SMALLINT

CREATEDBY

VARCHAR(128)

DB2 10 for z/OS

Description
N No
Y Yes
Whether the table is actually clustered by the index:
N
A significant number of rows are not in clustering
order, or statistics have not been gathered.
Y
Most of the rows are in clustering order.
blank Not applicable.
This is an updatable column that can also be changed by the
RUNSTATS utility.
Internal identifier of the database.
Internal identifier of the index fan set descriptor.
Internal identifier of the index page set descriptor.
Name of the database that contains the index.
Name of the index space.
Not used.
Not used.
Number of active leaf pages in the index. The value is -1 if
statistics have not been gathered. This is an updatable
column.
Number of levels in the index tree. If the index is partitioned,
it is the maximum of the number of levels in the index tree for
all the partitions. The value is -1 if statistics have not been
gathered. This is an updatable column.
Name of the buffer pool used for the index.
Contains the value 4, 8, 16, or 32 which indicates the size, in
KB, of the leaf pages in the index. If the index was created
prior to Version 9, the value will be 4096 for a 4 KB page size.
Whether the data sets are erased when dropped. The value
is
meaningless if the index is partitioned:
N No
Y Yes
Not used.
Whether the data sets are candidates for closure when the
limit on the number of open data sets is reached:
N No
Y Yes
Number of kilobytes of DASD storage allocated to the index,
as determined by the last execution of the STOSPACE utility.
The value is 0 if the index is not related to a storage group, or
if STOSPACE has not been run. If the index space is
partitioned, the value is the total kilobytes of DASD storage
allocated to all partitions that are defined in a storage group.
A value of Y indicates that the row came from the basic
machine-readable material (MRM) tape.
Percentage of rows that are in clustering order. For a
partitioning index, it is the weighted average of all index
partitions in terms of the number of rows in the partition. The
value is 0 if statistics have not been gathered. The value is -2
if the index is for an auxiliary table. This is an updatable
column.
Primary authorization ID of the user who created the index.
293

YL&A DB2 10 for z/OS Reference Guide


Column Name

Data Type
SMALLINT

Description
Internal use only.

SMALLINT

Not used.

STATSTIME

TIMESTAMP

INDEXTYPE

CHAR(1)

FIRSTKEYCARDF

FLOAT

FULLKEYCARDF

FLOAT

CREATEDTS

TIMESTAMP

ALTEREDTS

TIMESTAMP

PIECESIZE

INTEGER

COPY

CHAR(1)

COPYLRSN

CHAR(6)

CLUSTERRATIOF

FLOAT

If RUNSTATS updated the statistics, the date and time when


the last invocation of RUNSTATS updated the statistics. The
default value is '0001-01-01.00.00.00.000000'. This is an
updatable column.
The index type:
2
Type 2 index or a hash overflow index on nonpartitioned tables.
blank Type 1 index
D
Data partitioned secondary index
P
An index that is both partitioned and is a partitioning
index (index that is on a table that uses tablecontrolled partitioning).
Number of distinct values of the first key column. This number
is an estimate if updated while collecting statistics on a single
partition. The value is -1 if statistics have not been gathered.
This is an updatable column.
Number of distinct values of the key. The value is -1 if
statistics
have not been gathered. This is an updatable column.
Time when the CREATE statement was executed for the
index. If the index was created in a DB2 release prior to
Version 5, the value is '0001-01-01.00.00.00.000000'.
Time when the most recent ALTER INDEX statement was
executed for the index. If no ALTER INDEX statement has
been applied, ALTEREDTS has the value of CREATEDTS. If
the index was created in a DB2 release prior to Version 5, the
value is '0001-01-01.00.00.00.000000'.
Maximum size of a data set in kilobytes for non-partitioning
indexes. A value of zero (0) indicates that the index is a
partitioning index or that the index was created in a DB2
release prior to Version 5.
Whether COPY YES was specified for the index, which
indicates if the index can be copied and if
SYSIBM.SYSLGRNX recording is enabled for the index.
N No
Y Yes
The value can be either an RBA or LRSN. (LRSN is only for
data sharing.) If the index is currently defined as COPY YES,
the value is the RBA or LRSN when the index was created
with COPY YES or altered to COPY YES, not the current
RBA or LRSN. If the index is currently defined as COPY NO,
the value is set to X'000000000000' if the index was created
with COPY NO; otherwise, if the index was altered to COPY
NO, the value in COPYLRSN is not changed when the index
is altered to COPY NO.
When multiplied by 100, the value of the column is the
percentage of rows that are in clustering order. For example, a
value of .9125 indicates 91.25%. For a partitioning index, it is
the weighted average of all index partitions in terms of the
number of rows in the partition. The value is 0 if statistics have

294

DB2 10 for z/OS

YL&A DB2 10 for z/OS Reference Guide


Column Name

Data Type

SPACEF

FLOAT(8)

REMARKS

VARCHAR(762)

PADDED

CHAR(1)

VERSION

SMALLINT

OLDEST_VERSION

SMALLINT

CURRENT_VERSION

SMALLINT

RELCREATED
AVGKEYLEN
KEYTARGET_COUNT

CHAR(1)
INTEGER
CHAR(1)
SMALLINT

UNIQUE_COUNT

SMALLINT

IX_EXTENSION_
TYPE

CHAR(1)

COMPRESS

CHAR(1)

OWNER

VARCHAR(128)

OWNERTYPE

CHAR(1)

DATAREPEAT
FACTORF

FLOAT

DB2 10 for z/OS

Description
not been gathered. The value is -2 if the index is for an
auxiliary table, a node ID index or an XML index. This is an
updatable column.
Kilobytes of DASD storage. The value is 1 if statistics have
not been gathered. This is an updatable column.
A character field string provided by the user with the
COMMENT ON statement.
Indicates whether keys within the index will be padded for
vary-length column data.
Y
The index contains varying length character or graphic
data is padded
N
The index contains varying length characters or
graphic data that is not padded
Blank The index does not contain varying length or graphic
data
The version of the data row format for this index. A value of
zero indicates that a version-creating alter has never occurred
against this index.
The version number describing the oldest format of the data in
the index space and any image copies of the index
The version number describing the newest format of data in
the index space. A zero indicates that the index space has
never had been versioned. After the version number reaches
the maximum value, the number will wrap back to one.
Release of DB2 use to the object. Blank if before V8.
Average key length within the index.
Not used.
The number of key-targets for an extended index. The value is
0 for a simple index.
The number of columns or key-targets that make up the
unique constraint of an index, when other non-constraint
enforcing columns or key-targets exist. Otherwise the value is
0.
Identifies the type of extended index:
blank Simple index
S
Index on a scalar expression
N
node ID index
T
Spatial index
V
XML index
Indicates whether index compression is active:
N Index compression is not active
Y Index compression is active
Authorization ID of the owner of the index, empty string for
indexes created in a DB2 release prior to Version 9.
Indicates the type of owner:
blank Authorization ID
L
Role
The anticipated number of data pages that will be touched
following an index key order. This statistic is only collected
when the STATCLUS subsystem parameter is set to
ENHANCED. This number is -1 if statistics have not been
collected. The valid value is -1 or any value that is equal to or
295

YL&A DB2 10 for z/OS Reference Guide


Column Name

Data Type

ENVID
HASH

INTEGER
CHAR(1)

SPARSE

CHAR(1)

ROWID

ROWID
BLOB(1G)
BLOB(1G)

Description
greater than 1. This is an updatable column.
Internal environment identifier.
Whether the index is the hash overflow index for a hash table.
N No. N is the default.
Y Yes
Whether the index is sparse or not.
N No. N is the default. Every data row has an index entry.
Y Yes. This index might not have an entry for each data row
in the table.
ROWID column, created for the lob columns in this table.
Internal use only
Internal use only

SYSIBM.SYSINDEXES_HIST
Contains rows from SYSINDEXES.
Column Name
NAME
CREATOR
TBNAME
TBCREATOR
CLUSTERING

Data Type
VARCHAR(128)
VARCHAR(128)
VARCHAR(128)
VARCHAR(128)
CHAR(1)

NLEAF

INTEGER

NLEVELS

SMALLINT

STATSTIME

TIMESTAMP

FIRSTKEYCARDF

FLOAT(8)

FULLKEYCARDF

FLOAT(8)

CLUSTERRATIOF

FLOAT(8)

SPACEF

FLOAT(8)

IBMREQD

CHAR(1)

AVGKEYLEN
DATAREPEAT
FACTORF

INTEGER
FLOAT

296

Description
Name of the index.
Schema of the index.
Name of the table on which the index is defined.
Schema of the table.
Whether CLUSTER was specified when the index was created:
N No
Y Yes
Number of active leaf pages in the index. The value is -1 if
statistics have not been gathered.
Number of levels in the index tree .If the index is partitioned, it is
the maximum of the number of levels in the index tree for all the
partitions. The value is -1 if statistics have not been gathered.
If RUNSTATS updated the statistics ,the date and time when the
last invocation of RUNSTATS updated the statistics. The default
value is 0001-01-01.00.00.00.000000 .
Number of distinct values of the first key column. This number is
an estimate if updated while collecting statistics on a single
partition. The value is -1 if statistics have not been gathered.
Number of distinct values of the key. The value is -1 if statistics
have not been gathered.
Percentage of rows that are in clustering order. For a partitioning
index, it is the weighted average of all index partitions in terms of
the number of rows in the partition. The value is 0 if statistics have
not been gathered. The value is -2 if the index is for an auxiliary
table.
Number of kilobytes of DASD storage allocated to the index space
partition. The value is -1 if statistics have not been gathered.
A value of Y indicates that the row came from the basic
machine-readable material (MRM) tape.
Average key length within the index.
The anticipated number of data pages that will be touched
following an index key order. This statistic is only collected when
the STATCLUS subsystem parameter is set to ENHANCED. This
DB2 10 for z/OS

YL&A DB2 10 for z/OS Reference Guide


Column Name

Data Type

Description
number is -1 if statistics have not been collected. The valid value
is -1 or any value that is equal to or greater than 1. This is an
updatable column.

SYSIBM.SYSINDEXES_RTSECT
An auxiliary table for the RTSECTION column of the SYSIBM.SYSINDEXES table and is
required to hold LOB data.
Column Name

Data Type
BLOB(1G)

Description
Internal use only

SYSIBM.SYSINDEXES_TREE
An auxiliary table for the RTSECTION column of the SYSIBM.SYSINDEXES table and is
required to hold LOB data.
Column Name

Data Type
BLOB(1G)

Description
Internal use only

SYSIBM.SYSINDEXPART
Contains one row for each non-partitioning secondary index and one row for each partition of a
partitioning index or data partitioned secondary index.
Column Name
PARTITION
IXNAME
IXCREATOR
PQTY

DB2 10 for z/OS

Data Type
SMALLINT
VARCHAR(128)
VARCHAR(128)
INTEGER

Description
Partition number; Zero if index is not partitioned.
Name of the index.
Schema of the index.
For user-managed data sets, the value is the primary
space allocation in units of 4KB storage blocks or -1.
PQTY is based on a value of PRIQTY in the appropriate
CREATE or ALTER INDEX statement. Unlike PQTY,
however, PRIQTY asks for space in 1KB units.
A value of -1 indicates that either of the following cases is
true:

PRIQTY was not specified for a CREATE


INDEX statement or for any subsequent ALTER
INDEX statements.

-1 was the most recently specified value for


PRIQTY, either on the CREATE INDEX
statement or a subsequent ALTER INDEX
statement.

297

YL&A DB2 10 for z/OS Reference Guide


Column Name
SQTY

Data Type
SMALLINT

STORTYPE

CHAR(1)

STORNAME

VARCHAR(128)

VCATNAME

VARCHAR(24)

LEAFDIST

INTEGER

IBMREQD

CHAR(1)

LIMITKEY

VARCHAR(512)

FREEPAGE

SMALLINT

PCTFREE

SMALLINT

298

Description
For user-managed data sets, the value is the secondary
space allocation in units of 4KB storage blocks or -1.
SQTY is based on a value of SECQTY in the appropriate
CREATE or ALTER INDEX statement. Unlike SQTY,
however, SECQTY asks for space in 1KB units.
A value of -1 indicates that either of the following cases is
true:

SECQTY was not specified for a CREATE


INDEX statement or for any subsequent ALTER
INDEX statements.

-1 was the most recently specified value for


SECQTY, either on the CREATE INDEX
statement or a subsequent ALTER INDEX
statement.
If the value does not fit into the column, the value of the
column is 32767. See the description of column SECQTY
Type of storage allocation:
E Explicit, and STORNAME names an integrated catalog
facility catalog
I Implicit, and STORNAME names a storage group
Name of storage group or integrated catalog facility
catalog used for space allocation.Blank for the catalog
indexes.
Name of integrated catalog facility catalog used for space
allocation.
100 times the average number of leaf pages between
successive active leaf pages of the index. The value is -1
if statistics have not been gathered. Value is -2 if index is
an auxiliary index, a node ID index, or an XML index.
A value of Y indicates that the row came from the basic
machine-readable material (MRM) tape.
High value of the limit key of the partition in an internal
format. An empty string if the index is not partitioned or for
a data-partitioned secondary index (DPSI).
If any column of the key has a field procedure, the
internal format is the encoded form of the value.
Number of pages loaded before a page is left as free
space.
Percentage of each leaf or non-leaf page left as free
space.

DB2 10 for z/OS

YL&A DB2 10 for z/OS Reference Guide


Column Name
SPACE

Data Type
INTEGER

STATSTIME

TIMESTAMP

GBPCACHE

CHAR(1)

FAROFFPOSF

FLOAT

NEAROFFPOSF

FLOAT

CARDF

FLOAT

SECQTYI

INTEGER

IPREFIX

CHAR(1)

ALTEREDTS

TIMESTAMP

SPACEF

FLOAT(8)

DSNUM

INTEGER

DB2 10 for z/OS

Description
Number of kilobytes of DASD storage allocated to the
index space partition, as determined by the last execution
of the STOSPACE utility.
0 The STOSPACE or RUNSTATS utility has not been
run or the data set for the index has been created
during the first insert operation or when the LOAD
utility was run.
-1 The index was defined with the DEFINE NO clause,
which defers the physical creation of the data sets
until data is first inserted into the index, and data has
yet to be inserted into the index.
A non-negative value
Indicates that the data sets for the index space are
defined with the underlying data sets allocated.
The value is updated by STOSPACE if the index is related
to a storage group. The value is updated by RUNSTATS if
the utility is executed as RUNSTATS INDEX with
UPDATE(ALL) or UPDATE(SPACE).
If RUNSTATS updated the statistics, the date and time
when the last invocation of RUNSTATS updated the
statistics. The default value is '0001-0101.00.00.00.000000'.
Group buffer pool cache option specified for this index or
index partition.
blank Only changed pages are cached in the group
buffer pool.
A
Changed and unchanged pages are cached in
the group buffer pool.
N
No data is cached in the group buffer pool.
Number of referred to rows far from optimal position
because of an insert into a full page. The value is -1 if
statistics have not been gathered. The value is -2 if the
index is a node ID index or an XML index. The column is
not applicable for an index on an auxiliary table.
Number of referred to rows near, but not at optimal
position, because of an insert into a full page. The value is
-2 if the index is a node ID index or an XML index.
Not applicable for an index on an auxiliary table.
Number of RIDs in the index that refer to data rows or
LOBs. The value is -1 if statistics have not been gathered.
Secondary space allocation in units of 4KB storage. For
user-managed data sets, the value is the secondary
space allocation in units of 4KB blocks.
The first character of the instance qualifier for this indexs
data set name. I or J are the only valid characters for
this field. The default is 'I'.
Time when the most recent ALTER INDEX statement was
executed for the index. If no ALTER INDEX statement has
been applied, the value is '0001-01-01.00.00.00.000000'.
Kilobytes of DASD storage. The value is 1 if statistics
have not been gathered. This is an updatable column.
Number of data sets. The value is 1 if statistics have not
been gathered. This is an updatable column.
299

YL&A DB2 10 for z/OS Reference Guide


Column Name
EXTENTS

Data Type
INTEGER

PSEUDO_DEL_ENTRIES

INTEGER

LEAFNEAR

INTEGER

LEAFFAR

INTEGER

OLDEST_VERSION

SMALLINT

CREATEDTS
AVGKEYLEN

TIMESTAMP
INTEGER

Description
Number of data set extents. The value is 1 if statistics
have not been gathered. This is an updatable column.
Number of pseudo deleted entries (entries that are
logically deleted but still physically present in the index).
For a non-unique index, value is the number of RIDs that
are pseudo deleted. For a unique index, the value is the
number of keys and RIDs that are pseudo deleted. The
value is 1 if statistics have not been gathered. An
updatable column.
Number of leaf pages physically near previous leaf page
for successive active leaf pages. The value is 1 if
statistics have not been gathered. An updatable column.
Number of leaf pages located physically far away from
previous leaf pages for successive (active leaf) pages
accessed in an index scan. The value is 1 if statistics
have not been gathered. This is an updatable column.
The version numbers describing the oldest formt of data in
the index part and any image copies of the index part.
Time when the partition was created.
Average length of keys within the index. The value is -1 if
statistics have not been gathered.

SYSIBM.SYSINDEXPART_HIST
Contains rows from SYSINDEXPART. Can be inserted, updated, and deleted.
Column Name
PARTITION
IXNAME
IXCREATOR
PQTY

300

Data Type
SMALLINT
VARCHAR(128)
VARCHAR(128)
INTEGER

Description
Partition number; zero if index is not partitioned.
Name of the index.
Schema of the index.
For user-managed data sets, the value is the primary
space allocation in units of 4KB storage blocks or -1.
For user-specified values of PRIQTY other than -1, the
value is set to the primary space allocation only if
RUNSTATS INDEX with UPDATE(ALL) or
UPDATE(SPACE) is executed; otherwise, the value is
zero. PQTY is based on a value of PRIQTY in the
appropriate CREATE or ALTER INDEX statement. Unlike
PQTY, however, PRIQTY asks for space in 1KB units.
A value of -1 indicates that either of the following cases is
true:

PRIQTY was not specified for a CREATE


INDEX statement or for any subsequent ALTER
INDEX statements.

-1 was the most recently specified value for


PRIQTY, either on the CREATE INDEX
statement or a subsequent ALTER INDEX
statement.
If a storage group is not used, the value is 0.

DB2 10 for z/OS

YL&A DB2 10 for z/OS Reference Guide


Column Name
SECQTYI

Data Type
INTEGER

LEAFDIST

INTEGER

SPACEF

INTEGER

STATSTIME

TIMESTAMP

FAROFFPOSF

FLOAT

NEAROFFPOSF

FLOAT

CARDF

FLOAT

EXTENTS

INTEGER

PSEUDO_DEL_ENTRIES

INTEGER

DSNUM

INTEGER

IBMREQD

CHAR(1)

DB2 10 for z/OS

Description
For user-managed data sets, the value is the secondary
space allocation in units of 4KB storage blocks or -1.
For user-specified values of SECQTY other than -1, the
value is set to the secondary space allocation only if
RUNSTATS INDEX with UPDATE(ALL) or
UPDATE(SPACE) is executed; otherwise, the value is
zero. SQTY is based on a value of SECQTY in the
appropriate CREATE or ALTER INDEX statement. Unlike
SQTY, however, SECQTY asks for space in 1KB units.
A value of -1 indicates that either of the following cases is
true:

SECQTY was not specified for a CREATE


INDEX statement or for any subsequent ALTER
INDEX statements.

-1 was the most recently specified value for


SECQTY, either on the CREATE INDEX
statement or a subsequent ALTER INDEX
statement.
If a storage group is not used, the value is 0.
100 times the average number of leaf pages between
successive active leaf pages of the index. The value is -1
if statistics have not been gathered.
Number of kilobytes of DASD storage allocated to the
index space partition. The value is -1 if statistics have not
been gathered.
If RUNSTATS updated the statistics, the date and time
when the last invocation of RUNSTATS updated the
statistics. The default value is '0001-0101.00.00.00.000000'.
Number of referred to rows far from optimal position
because of an insert into a full page. The value is -1 if
statistics have not been gathered. The column is not
applicable for an index on an auxiliary table.
Number of referred to rows near, but not at optimal
position, because of an insert into a full page. Not
applicable for an index on an auxiliary table.
Number of RIDs in the index that refer to data rows or
LOBs. The value is -1 if statistics have not been gathered.
Number of data set extents. The value is -1 if statistics
have not been gathered. This value is only for the last
DSNUM for the object.
Number of pseudo deleted entries. The value is -1 if
statistics have not been gathered.
Data set number within the tablespace. For partitioned
index spaces, this value corresponds to the partition
number for a single partition copy, or 0 for a copy of an
entire partitioned index space. The value is -1 if statistics
have not been gathered.
A value of Y indicates that the row came from the basic
machine-readable material (MRM) tape

301

YL&A DB2 10 for z/OS Reference Guide


Column Name
LEAFNEAR

Data Type
INTEGER

LEAFFAR

INTEGER

AVGKEYLEN

INTEGER

Description
Number of leaf pages physically near previous leaf page
for successive active leaf pages. The value is -1 if
statistics have not been gathered. This is an updatable
column.
Number of leaf pages located physically far away from
previous leaf pages for successive (active leaf) pages
accessed in an index scan. The value is -1 if statistics
have not been gathered. This is an updatable column.
Average length of keys within the index.

SYSIBM.SYSINDEXSPACESTATS
Contains real time statistics for index spaces. Can inserted, updated and deleted.
Column name
UPDATESTATSTIME
NLEVELS

Data type
TIMESTAMP
SMALLINT

NPAGES

INTEGER

NLEAF
NACTIVE

INTEGER
INTEGER

SPACE

INTEGER

EXTENTS

SMALLINT

LOADRLASTTIME

TIMESTAMP

REBUILDLASTTIME

TIMESTAMP

REORGLASTTIME

TIMESTAMP

REORGINSERTS

INTEGER

302

Description
The timestamp when the row was inserted or last updated.
The number of levels in the index tree
A null value indicates that the number of levels is unknown.
The number of pages in the index tree that contain only
pseudo-deleted index entries. This is an updatable
column.associated table. Updatable column.
The number of leaf pages in the index. Updatable column.
The number of active pages in the index space or partition.
This value is equivalent to the number of preformatted
pages. A null value indicates that the number of active
pages is unknown.
The amount of space, in KB, that is allocated to the index
space or partition. For multi-piece linear page sets, this
value is the amount of space in all data sets. A null value
indicates the amount of space is unknown.
The number of extents in the index space or partition. For
multi-piece index spaces, this value is the number of extents
for the last data set. For a data set that is striped across
multiple volumes, the value is the number of logical extents.
A null value indicates the number of extents is unknown.
The timestamp of the last LOAD REPLACE on the index
space or partition.
A null value indicates that the LOAD REPLACE utility has
never been run on the index space or partition or that the
timestamp is unknown.
The timestamp of the last REBUILD INDEX on the index
space or partition.
A null value indicates that the timestamp that the REBUILD
INDEX was last run is unknown.
The timestamp when the REORG INDEX utility was last run
on the index space or partition, or if the REORG INDEX
utility has not been run, the time when the index space or
partition was created. A null value indicates that the
timestamp is unknown.
The number of index entries that have been inserted into the
index space or partition since the last time the REORG,
REBUILD INDEX, or LOAD REPLACE utilities were run, or
DB2 10 for z/OS

YL&A DB2 10 for z/OS Reference Guide

REORGDELETES

INTEGER

REORGAPPENDINSERT

INTEGER

REORGPSEUDODELETES

INTEGER

REORGMASSDELETE

INTEGER

REORGLEAFNEAR

INTEGER

REORGLEAFFAR

INTEGER

DB2 10 for z/OS

since the object was created. A null value indicates that the
number of inserted index entries is unknown.
The number of index entries that have been deleted from
the index space or partition since the last time the REORG,
REBUILD INDEX, or LOAD REPLACE utilities were run, or
since the object was created. A null value indicates that the
number of deleted index entries is unknown.
The number of index entries that have a key value that is
greater than the maximum key value in the index or partition
that have been inserted into the index space or partition
since the last time the REORG, REBUILD INDEX, or LOAD
REPLACE utilities were run, or since the object was
created. A null value indicates that the number of inserted
index entries is unknown.
The number of index entries that have been pseudo-deleted
since the last REORG, REBUILD INDEX, or LOAD
REPLACE on the index space or partition, or since the
object was created. A pseudo-delete is a RID entry that has
been marked as deleted. A null value indicates that the
number of pseudo-deleted
index entries is unknown.
The number of mass deletes from a segmented or LOB
table space, or the number of dropped tables from a
segmented table space since the last time the REORG or
LOAD REPLACE utilities were run, or since the object was
created. A null value indicates that the number of mass
deletes is unknown.
The net number of leaf pages located physically near
previous pages for successive active leaf pages that
occurred since the last REORG, REBUILD INDEX, or LOAD
REPLACE, or since the object was created. The distance
between leaf pages is optimal if the difference is 1 and
considered near if the distance is 2-16. An index page is
added during a page split and the distance between the
predecessor and successor pages can lower this count if
the distance between the two was near. The distance
between the predecessor and new page increase the count
if they are near. The distance between the new page and
successor increment the count if they are near. If a leaf
page is deleted the distance between the new predecessor
and successor pages can increment this count if the
distance between the two is near. The distance between the
predecessor and the deleted page decrement the count if it
was near. The distance between the successor and the
deleted page decrement the count if it was near. A null
value means that the value is unknown. A negative value is
possible in some cases.
The net number of leaf pages located physically far away
from previous leaf pages for successive active leaf pages
that occurred since the last REORG, REBUILD INDEX, or
LOAD REPLACE, or since the object was created. The
distance between leaf pages is optimal if the difference is 1
and considered far if the distance is greater than 16. An
index page is added during a page split and the distance
303

YL&A DB2 10 for z/OS Reference Guide

REORGNUMLEVELS

INTEGER

STATSLASTTIME

TIMESTAMP

STATSINSERTS

INTEGER

STATSDELETES

INTEGER

STATSMASSDELETE

INTEGER

COPYLASTTIME

TIMESTAMP

COPYUPDATEDPAGES

INTEGER

COPYCHANGES

INTEGER

COPYUPDATELRSN

CHAR(6)

COPYUPDATETIME

TIMESTAMP

IBMREQD

CHAR(1)

DBID

SMALLINT

304

between the predecessor and successor pages can


decrement this count if the distance between the two was
far. The distance between the predecessor and new page
increment the count if they are far. The distance between
the new page and successor increment the count if they are
far. If a leaf page is deleted the distance between the new
predecessor and successor pages can increment this count
if the distance between the two is far. The distance between
the predecessor and the deleted page decrement the count
if it was far. The distance between the successor and the
deleted page decrement the count if it was far. A null value
means that the value is unknown.
The number of levels in the index tree that were added or
removed since the last REORG, REBUILD INDEX, or LOAD
REPLACE, or the object was created. A null value means
that the number of added or deleted levels is unknown.
The timestamp of the last RUNSTATS on the index space or
partition.
A null value means that RUNSTATS has never been run on
the index space or partition, or that the timestamp of the last
RUNSTATS is unknown.
The number of records or LOBs that have been inserted into
the table space or partition since the last time that the
RUNSTATS utility was run, or since the object was created.
A null value indicates that the number of inserted records or
LOBs is unknown.
The number of index entries that have been deleted since
the last RUNSTATS on the index space or partition, or since
the object was created. A null value means that the number
of deleted index entries is unknown.
The number of times that the index or index space partition
was mass deleted since the last RUNSTATS, or the object
was created. A null value indicates that the number of mass
deletes is unknown.
The timestamp of the last full image copy on the index
space or partition.
A null value means that COPY has never been run on the
index space or partition, or that the timestamp of the last full
image copy is unknown.
The number of distinct types that have been updated since
the last time that the COPY utility was run, or since the
object was created. A null value indicates that the number of
updated pages is unknown.
The number of insert, update, and delete operations since
the last time that the COPY utility was run, or since the
object was created. A null value indicates that the number of
insert, update, and delete operations is unknown.
The LRSN or RBA of the first update after the last COPY.
A null value indicates that the LRSN or RBA is unknown.
The timestamp of the first update after the last COPY.
A null value indicates that the timestamp is unknown.
A value of Y indicates that the row came from the basic
machine-readable material (MRM) tape.
The internal identifier of the database.
DB2 10 for z/OS

YL&A DB2 10 for z/OS Reference Guide


ISOBID
PSID

SMALLINT
SMALLINT

PARTITION

SMALLINT

INSTANCE

SMALLINT

TOTALENTRIES

FLOAT

DBNAME
NAME
CREATOR

LASTUSED

CHAR(8)
CHAR(8)
VARCHAR
(128)
VARCHAR
(128)
DATE

REORGINDEXACCESS

BIGINT

DRIVETYPE

CHAR(3)

INDEXSPACE

BIGINT

Internal identifier of the index space page set descriptor.


The internal identifier of the table space page set descriptor
for the table space associated with the index.
Data set number within index space. For partitioned index
spaces, value corresponds to the partition number for a
single partition. For non-partitioned table spaces, value is 0.
Indicates if the object is associated with data set 1 or 2. This
is an updatable column.
The number of entries, including duplicate entries, in the
index space or partition.
A null value indicates that the number of entries is unknown.
The name of the database.
The name of the index.
The schema of the index.
The name of the index space.
The date when the index is used for SELECT, FETCH,
searched UPDATE, searched DELETE, or used to enforce
referential integrity constraints. The default value is
1/1/0001.
The number of times the index was used for SELECT,
FETCH, searched UPDATE, searched DELETE, or used to
enforce referential integrity constraints, or since the object
was created. For hash overflow indexes, this is the number
of times DB2 has used the hash overflow index. A null value
indicates that the number of times the index has been used
is unknown.
The drive type on which the index or index partition data set
is defined.
HDD Hard Disk Drive
SSD Solid State Drive
For multi-volume data sets, the drive type is set to SSD if
any volume is SSD. For multi-piece linear page sets, the
drive type of the first data set is used.
Reserved for future IBM use.

SYSIBM.SYSINDEXSTATS
Contains one row for each partition of a partitioning index or a data partitioned secondary index.
Can be inserted, updated, and deleted.
Column Name
FIRSTKEYCARD

Data Type
INTEGER

FULLKEYCARD
NLEAF
NLEVELS

INTEGER
INTEGER
SMALLINT
SMALLINT
SMALLINT
SMALLINT

CLUSTERRATIO

DB2 10 for z/OS

Description
For the index partition, number of distinct values of the first
key column.
For the index partition, number of distinct values of the key.
Number of active leaf pages in the index partition.
Number of levels in the partition index tree.
Not used.
Not used.
For the index partition, the percentage of rows that are in
clustering order. The value is 0 if statistics have not been
gathered.
305

YL&A DB2 10 for z/OS Reference Guide


Column Name
STATSTIME

Data Type
TIMESTAMP

IBMREQD

CHAR(1)

PARTITION
OWNER
NAME
KEYCOUNT
FIRSTKEYCARDF

SMALLINT
VARCHAR(128)
VARCHAR(128)
INTEGER
FLOAT

FULLKEYCARDF
KEYCOUNTF
CLUSTERRATIOF

FLOAT
FLOAT
FLOAT

DATAREPEAT
FACTORF

VARCHAR(1000)
FLOAT

Description
If RUNSTATS updated the statistics, the date and time
when the last invocation of RUNSTATS updated the statistics.
The default value is '0001-01-01.00.00.00.000000'.
A value of Y indicates that the row came from the basic machinereadable material (MRM) tape.
Partition number of the index.
Schema of the owner of the index.
Name of the index.
Total number of rows in the partition.
For the index partition, number of distinct values of the first
key column.
For the index partition, number of distinct values of the key.
Total number of rows in the partition.
For the index partition, the value, when multiplied by 100,
is the percentage of rows that are in clustering order. For
example, a value of .9125 indicates 91.25%. The value is 0
if statistics have not been gathered.
Internal use only.
The anticipated number of data pages that will be touched
following an index key order. This statistic is only collected when
the STATCLUS subsystem parameter is set to ENHANCED.
This number is -1 if statistics have not been collected. The valid
value is -1 or any value that is equal to or greater than 1. This is
an updatable column.

SYSIBM.SYSINDEXSTATS_HIST
Contains rows from SYSINDEXSTATS. Can be inserted, updated, and deleted.
Column Name
NLEAF

Data Type
INTEGER

NLEVELS

SMALLINT

STATSTIME

TIMESTAMP

PARTITION
OWNER
NAME
FIRSTKEYCARDF

SMALLINT
VARCHAR(128)
VARCHAR(128)
FLOAT

FULLKEYCARDF

FLOAT

KEYCOUNTF

FLOAT

CLUSTERRATIOF

FLOAT

IBMREQD

CHAR(1)

306

Description
Number of active leaf pages in the index partition. The value is
-1 if statistics have not been gathered.
Number of levels in the partition index tree. The value is -1 if
statistics have not been gathered.
If RUNSTATS updated the statistics, the date and time
when the last invocation of RUNSTATS updated the statistics.
The default value is '0001-01-01.00.00.00.000000'.
Partition number of the index.
Schema of the index.
Name of the index.
For the index partition, number of distinct values of the first
key column. The value is -1 if statistics have not been gathered.
For the index partition, number of distinct values of the key. The
value is -1 if statistics have not been gathered.
Total number of rows in the partition. The value is -1 if statistics
have not been gathered.
For the index partition, the value, when multiplied by 100,
is the percentage of rows that are in clustering order. For
example, a value of .9125 indicates 91.25%. The value is 0
if statistics have not been gathered.
A value of Y indicates that the row came from the basic
machine-readable material (MRM) tape.
DB2 10 for z/OS

YL&A DB2 10 for z/OS Reference Guide


Column Name
DATAREPEAT
FACTORF

Data Type
FLOAT

Description
The anticipated number of data pages that will be touched
following an index key order. This statistic is only collected when
the STATCLUS subsystem parameter is set to ENHANCED. This
number is -1 if statistics have not been collected. The valid value
is -1 or any value that is equal to or greater than 1. This is an
updatable column.

SYSIBM.SYSJARCLASS_SOURCE
Auxiliary table for SYSIBM.SYSCONTENTS.
Column Name
CLASS_SOURCE

Data Type
CLOB(10M)

Description
The contents of the class in the jar file.

SYSIBM.SYSJARCONTENTS
Contains Java class source for installed jar.
Column Name
JARSCHEMA
JAR_ID
CLASS
CLASS_SOURCE_ROWID
CLASS_SOURCE
IBMREQD

Data Type
VARCHAR(128)
VARCHAR(128)
VARCHAR(384)
ROWID
CLOB(10M)
CHAR(1)

Description
The schema of the jar file.
The name of the jar file.
The class name contained in the jar file.
ID used to support CLOB data type.
The contents of the class in the jar file.
A value of Y indicates that the row came from the basic
machine-readable material (MRM) tape.

SYSIBM.SYSJARDATA
Auxiliary table for SYSIBM.SYSJAROBJECTS.
Column Name
JAR_DATA

Data Type
BLOB(100M)

Description
The contents of the jar file.

SYSIBM.SYSJAROBJECTS
Contains binary large object representing the installed jar.
Column Name
JARSCHEMA
JAR_ID
OWNER
JAR_DATA_ROWID
JAR_DATA
PATH

Data Type
VARCHAR(128)
VARCHAR(128)
VARCHAR(128)
ROWID
BLOB(100M)
VARCHAR(2048)

IBMREQD

CHAR(1)

CREATEDTS
ALTEREDTS
OWNERTYPE

TIMESTAMP
TIMESTAMP
CHAR(1)

DB2 10 for z/OS

Description
The schema of the jar file.
The name of the jar file.
Authorization ID of the owner of the jar object.
ID used to support BLOB data type.
The contents of the jar file. This is an updatable column.
The URL path of the source jar file. This is an updatable
column.
A value of Y indicates that the row came from the basic
machine-readable material (MRM) tape.
Time when the JAR object was created.
Time when the JAR object was altered.
Indicates the type of owner:
blank Authorization ID
L
Role
307

YL&A DB2 10 for z/OS Reference Guide

SYSIBM.SYSJAVAOPTS
Contains build options used during INSTALL_JAR.
Column Name
JARSCHEMA
JAR_ID
BUILDSCHEMA
BUILDNAME
BUILDOWNER
DBMLIB
HPJCOMPILE_OPTS
BIND_OPTS
POBJECT_LIB
IBMREQD

Data Type
VARCHAR(128)
VARCHAR(128)
VARCHAR(128)
VARCHAR(128)
VARCHAR(128)
VARCHAR(256)
VARCHAR(512)
VARCHAR(2048)
VARCHAR(256)
CHAR(1)

Description
The schema of the jar file.
The name of the jar file.
Schema name for BUILDNAME.
Procedure used to create the routine.
Authorization ID used to create the routine.
PDS name where DBRM is located.
HPJ compile options used to install the routine.
Bind options used to install the routine.
PDSE name where program object is located.
A value of Y indicates that the row came from the basic
machine-readable material (MRM) tape.

SYSIBM.SYSJAVAPATHS
Contains the complete JAR class resolution path, and records the dependencies that one JAR
has on the JARs in its Java path.
Column Name
JARSCHEMA
JAR_ID
OWNER
ORDINAL

Data Type
VARCHAR(128)
VARCHAR(128)
VARCHAR(128)
SMALLINT

PE_CLASS_PATTERN

VARCHAR(2048)

PE_JARSCHEMA
PE_JAR_ID
IBMREQD

VARCHAR(128)
VARCHAR(128)
CHAR(1)

Description
The schema of the JAR file.
The name of the JAR file.
Authorization ID of the owner of the JAR object.
The ordinal number of the path element within the JARs
Java path.
The pattern for the names of the classes that are to be
searched for in this path elements JAR file.
The schema of this path elements JAR file.
The name of this path elements JAR file.
A value of Y indicates that the row came from the basic
machine-readable material (MRM) tape.

SYSIBM.SYSKEYCOLUSE
Contains a row for every column in a unique constraint (primary key or unique key)
from the SYSIBM.SYSTABCONST table.
Column Name
CONSTNAME
TBCREATOR

Data Type
VARCHAR(128)
VARCHAR(128)

TBNAME
COLNAME
COLSEQ

VARCHAR(128)
VARCHAR(128)
SMALLINT

COLNO

SMALLINT

308

Description
Name of the constraint.
Schema or qualifier of the table on which the constraint is
defined.
Name of the table on which the constraint is defined.
Name of the column.
Numeric position of the column in the key (the first position in
the key is 1).
Numeric position of the column in the table on which the
DB2 10 for z/OS

YL&A DB2 10 for z/OS Reference Guide


Column Name

Data Type

IBMREQD

CHAR(1)

PERIOD

CHAR(1)

Description
constraint is defined.
A value of Y indicates that the row came from the basic
machine-readable material (MRM) tape.
Indicates whether the column is the start or end column for the
BUSINESS_TIME period:
B
The column is the start of the period BUSINESS_TIME.
C
The column is the end of the period BUSINESS_TIME.
blank Column is not used as either the start or the end of a
BUSINESS_TIME period.

SYSIBM.SYSKEYS
Contains one row for each column of an index key.
Column Name
IXNAME
IXCREATOR
COLNAME
COLNO

Data Type
VARCHAR(128)
VARCHAR(128)
VARCHAR(128)
SMALLINT

COLSEQ

SMALLINT

ORDERING

CHAR(1)

IBMREQD

CHAR(1)

PERIOD

CHAR(1)

Description
Name of the index.
Schema or qualifier of the index.
Name of the column of the key.
Numeric position of the column in the table; for example, 4 (out of
10).
Numeric position of the column in the key; for example, 4 (out
of 4). This value is meaningless for an index that is based on an
expression.
Order of the column in the key:
Blank index is based on an expression or the column is
specified for the index using the INCLUDE clause
A
Ascending
D
Descending
R
Random
A value of Y indicates that the row came from the basic machinereadable material (MRM) tape.
Indicates whether the column is the start or end column for the
BUSINESS_TIME period:
B
The column is the start of the period BUSINESS_TIME.
C
The column is the end of the period BUSINESS_TIME.
blank Column is not used as either the start or the end of a
BUSINESS_TIME period.

SYSIBM.SYSKEYTARGETS
Contains one row for each key-target that is participating in an extended index definition.
Column Name
IXNAME
IXSCHEMA
KEYSEQ
COLNO

Data Type
VARCHAR(128)
VARCHAR(128)
SMALLINT
SMALLINT

ORDERING

CHAR(1)

TYPESCHEMA
TYPENAME
DATATYPEID

VARCHAR(128)
VARCHAR(128)
INTEGER

DB2 10 for z/OS

Description
Qualifier of the index.
Numeric position of the key-target in the index.
Numeric position of the key-target in the index.
Numeric position of the column in the table if the expression is a
single column.
Order of the key:
A
Ascending
Schema of the data type.
Name of the data type.
The internal ID of the data type.
309

YL&A DB2 10 for z/OS Reference Guide


SOURCETYPEID

INTEGER

LENGTH

SMALLINT

LENGTH2

INTEGER

SCALE

SMALLINT

NULLS

CHAR(1)

CCSID

INTEGER

SUBTYPE

CHAR(1)

CREATEDTS
RELCREATED
IBMREQD

TIMESTAMP
CHAR(1)
CHAR(1)

DERIVED_FROM

VARCHAR(4000)

310

For a built-in data type, this column contains 0. For a distinct


type, this column contains the internal ID of the built-in type on
which the distinct type is based.
The length attribute of the key-target or its precision for a
decimal key-target. The number does not include the internal
prefixes that are used to record the actual length and null states,
when applicable.
Data type
Value of the LENGTH column
INTEGER
4
SMALLINT
2
FLOAT
4 or 8
CHAR
The length of the string
VARCHAR
The maximum length of the string
DECIMAL
The precision of the number
GRAPHIC
The number of DBCS characters
VARGRAPHIC The maximum number of DBCS characters
DATE
4
TIME
3
TIMESTAMP WITHOUT TIME ZONE
The integral part of ((p+1)/2)+7 where p is the
precision of the timestamp
TIMESTAMP WITH TIME ZONE
The integral part of ((p+1)/2)+9 where p is the
precision of the timestamp
BIGINT
8
BINARY
The length of the string
VARBINARY
The maximum length of the string
DECFLOAT
8 or 16
The maximum length of the data that is retrieved from the
column. Possible values include the following values:
0
Not a ROWID column
40 For a ROWID
The scale of decimal data or number of fractional second digits
of timestamp or timestamp with time zone data. Otherwise the
value is 0. If the column is a timestamp type, the LENGTH is 10
and the SCALE is 0, the number of fractional second digits is 6.
Whether the key can contain null values:
N No
Y Yes. Y also indicates that the index is an XML index.
The CCSID of the key. CCSID contains 0 if the key is a noncharacter type key.
SUBTYPE applies to character keys only and indicated the
subtype of the data:
B
BIT data
M
MIXED data
S
SBCS data
blank
non-character data
The timestamp for when the key-target is created.
The release of DB2 in which the key-target is created.
Y indicates row came from basic machine-readable material
(MRM) tape.
For an index on a scalar expression, DERIVED_FROM contains
the text of the scalar expression that is used to generated the
key-target value. For an XML index, this is the XML pattern that
DB2 10 for z/OS

YL&A DB2 10 for z/OS Reference Guide

STATSTIME

TIMESTAMP

CARDF
HIGH2KEY
LOW2KEY
STATS_FORMAT

FLOAT
VARCHAR(2000)
VARCHAR(2000)
CHAR(1)

is used to generate the key-target value. Otherwise


DERIVED_FROM contains an empty string.
Timestamp of the most recent RUNSTATS. Default value is
'0001-01-01.00.00.00.000000'. Is an updatable column.
The number of distinct values for the key-target.
Second highest key-value. HIGH2KEY is an updatable column.
Second lowest key-value. LOW2KEY is an updatable column.
The type of statistics that are gathered:
N
VARCHAR column statistical values are not padded
blank
Statistics have not been collects or VARCHAR
column statistical values are padded
An updatable column.

SYSIBM.SYSKEYTARGETSTATS
Contains partition statistics for selected key-targets.
Column Name
IXSCHEMA
IXNAME
KEYSEQ
HIGHKEY
HIGH2KEY
LOWKEY
LOW2KEY
PARTITION
STATSTIME

Data Type
VARCHAR(128)
VARCHAR(128)
SMALLINT
VARCHAR(2000)
VARCHAR(2000)
VARCHAR(2000)
VARCHAR(2000)
SMALLINT
TIMESTAMP

IBMREQD

CHAR(1)

STATS_FORMAT

FLOAT

CARDF

FLOAT

Description
The qualifier of the index.
The name of the index.
Numeric position of the key-target in the index.
The highest key value.
The second highest key-value.
The lowest key value.
The second lowest key-value.
The partition number of the table space.
The timestamp of the most recent RUNSTATS. The default
value is '0001-01-01.00.00.00.000000'.
A value of Y indicates that the row came from the basic
machine-readable material (MRM) tape.
The type of statistics that are gathered:
N
VARCHAR column statistical values are not padded
blank
Statistics have not been collects or VARCHAR
column statistical values are padded
Number of distinct values for the key target.

SYSIBM.SYSKEYTARGETS_HIST
Contains rows from the SYSKEYTARGETS table.
Column Name
IXNAME
IXSCHEMA
KEYSEQ
TYPESCHEMA
TYPENAME
DATATYPEID
SOURCETYPEID

Data Type
VARCHAR(128)
VARCHAR(128)
SMALLINT
VARCHAR(128)
VARCHAR(128)
INTEGER
INTEGER

LENGTH

SMALLINT

DB2 10 for z/OS

Description
Name of the index.
Qualifier of the index.
Numeric position of the key-target in the index.
Schema of the data type.
Name of the data type.
The internal ID of the data type.
For a built-in data type, this field contains 0. For a distinct type,
this field contains the internal ID of the built-in type on which the
distinct type is based.
Length attribute of the column or, in the case of a decimal
column, its precision. The number does not include the internal
311

YL&A DB2 10 for z/OS Reference Guide

LENGTH2

INTEGER

SCALE

SMALLINT

NULLS

CHAR(1)

IBMREQD

CHAR(1)

STATSTIME

TIMESTAMP

CARDF

FLOAT

HIGH2KEY
LOW2KEY
STATS_FORMAT

VARCHAR(2000)
VARCHAR(2000)
CHAR(1)

312

prefixes that are used to record the actual length and null state,
where applicable.
INTEGER
4
SMALLINT
2
FLOAT
4 or 8
CHAR
Length of string
VARCHAR
Maximum length of string
LONGVAR
Maximum length of string (prior to V9)
DECIMAL
Precision of number
GRAPHIC
Number of DBCS characters
VARGRAPHIC Maximum number of DBCS char.(prior to V9)
LONGVARG Maximum number of DBCS characters
DATE
4
TIME
3
TIMESTAMP WITHOUT TIME ZONE
The integral part of ((p+1)/2)+7 where p is
the precision of the timestamp
TIMESTAMP WITH TIME ZONE
The integral part of ((p+1)/2)+9 where p is
the precision of the timestamp
BIGINT
8
BINARY
Length of String
VARBINARY
Maximum length of string
DECFLOAT
8 or 16
The maximum length of the data that is retrieved from the
column. Possible values include the following values:
0
Not a ROWID column
40 For a ROWID
The scale of decimal data or number of fractional second digits
of timestamp or timestamp with time zone data. Otherwise the
value is 0. If the column is a timestamp type, the LENGTH is 10
and the SCALE is 0, the number of fractional second digits is 6.
Whether the key can contain null values:
N No
Y Yes
A value of Y indicates that the row came from the basic
machine-readable material (MRM) tape
The timestamp of the most recent RUNSTATS. The default
value is '0001-01-01.00.00.00.000000'. STATSTIME is an
updatable column.
The number of distinct values for the key-target. The value is -2
if the index is a node ID index. For an XML value index, the
statistic is collected for the second key target (the DOCID
column). For all other key targets of the XML value index, a
value of -2 is set.
The second highest key-value
The second lowest key-value.
The type of statistics that are gathered:
N
VARCHAR column statistical values are not padded
blank Statistics have not been collects or VARCHAR column
statistical values are padded

DB2 10 for z/OS

YL&A DB2 10 for z/OS Reference Guide

SYSIBM.SYSKEYTGTDIST
Contains one or more rows for the first key-target of an extended index key. Can be inserted,
updated, and deleted.
Column Name
STATSTIME

Data Type
TIMESTAMP

IBMREQD
IXSCHEMA
IXNAME
KEYSEQ
KEYVALUE

CHAR(1)
VARCHAR(128)
VARCHAR(128)
SMALLINT
VARCHAR(2000)

TYPE

CARDF

FLOAT

KEYGROUPKEYNO

VARCHAR(254)

NUMKEYS
FREQUENCYF

SMALLINT
FLOAT

QUANTILENO

SMALLINT

LOWVALUE

VARCHAR(2000)

HIGHVALUE

VARCHAR(2000)

DB2 10 for z/OS

Description
If the RUNSTATS utility updated the statistics, this column
contains the date and time when the last invocation of
RUNSTATS updated the statistics. The default value is
'0001-01-01.00.00.00.000000'.
The qualifier of the index.
The name of the index.
The numeric position of the key-target in the index.
The numeric position of the key-target in the index.
KEYVALUE contains the data of a frequently occurring
value. If the value has a non-character data type, the data
might not be printable.
The type of statistics that are gathered:
C Cardinality
F Frequent value
N Non-padded frequent value
H Histogram statistics
When TYPE='C', CARDF contains the number of distinct
values for the key group.
When TYPE='H', CARDF contains the number of distinct
values for the key group in a quantile indicated by
QUANTILENO.
KEYGROUPKEYNO contains a value that identifies the set
of keys that are associated with the statistics.
KEYGROUPKEYNO contains 0 if the statistics are only
associated with a single key. If the statistics are associated
with more than a single key, KEYGROUPKEYNO contains
an array of SMALLINT key numbers with
The number of keys that are associated with the statistics.
When TYPE='F' or 'N', FREQUENCYF contains a value that
indicates the percentage of entries in the index that have the
value that is contained in the KEYVALUE column.
When TYPE='H', FREQUENCYF contains a value that
indicates the percentage of entries in the index that have a
value that is in the range of the quantile that is indicated in
the QUALTILENO column. To determine the percentage
from the value of FREQUENCYF, multiply the value by 100.
For example, a value of '1' indicates 100 percent. A value of
'.153' indicates '15.3' percent.
QUANTILENO contains an ordinary sequence number of a
quantile in the whole consecutive value range, from low to
high.
When TYPE='H', LOWVALUE contains the lower bound for
the quantile that is in QUANTILENO. LOWVALUE is not
used if TYPE does not equal 'H'.
When TYPE='H', HIGHVALUE contains the upper bound for
the quantile that is in QUANTILENO. HIGHVALUE is not
used if TYPE does not equal 'H'.
313

YL&A DB2 10 for z/OS Reference Guide

SYSIBM.SYSKEYTGTDISTSTATS
Contains zero or more rows per partition for the first key-target of a data-partitioned secondary
index.
Column Name
STATSTIME

Data Type
TIMESTAMP

IBMREQD

CHAR(1)

PARTITION

SMALLINT

IXSCHEMA
IXNAME
KEYSEQ
KEYVALUE

VARCHAR(128)
VARCHAR(128)
SMALLINT
VARCHAR(2000)

TYPE

CHAR(1)

CARDF

FLOAT

KEYGROUPKEYNO

VARCHAR(254)

NUMKEYS
FREQUENCYF

SMALLINT
FLOAT

QUANTILENO

SMALLINT

LOWVALUE

VARCHAR(2000)

HIGHVALUE

VARCHAR(2000)
VARCHAR(1000)

314

Description
If RUNSTATS updated the statistics, STATSTIME contains
the timestamp of the most recent RUNSTATS. The default
value is '0001-01-01.00.00.00.000000'.
A value of Y indicates that the row came from the basic
machine-readable material (MRM) tape.
The partition number of the table space that contains the
index in which the key is defined.
The qualifier of the index.
The name of the index.
Numeric position of the key-target in the index.
KEYVALUE contains the data of a frequently occurring
value. If the value has a non-character data type, the data
might not be printable.
The type of statistics that are gathered:
C
Cardinality
F
Frequent value
N
Non-padded frequent value
H
Histogram statistics
When TYPE='C', CARDF contains the number of distinct
values for the key group. When TYPE='H', CARDF contains
the number of distinct values for the key group in the
quantile that is in QUANTILENO.
Identifies the set of keys that are associated with the
statistics. If the statistics are only associated with a single
key, KEYGROUPKEYNO contains a zero length value.
Otherwise, KEYGROUPKEYNO contains an array of
SMALLINT key numbers that have a dimension that is equal
to the value in NUMKEYS.
Identifies the number of keys associated with the statistics.
When TYPE='F' or 'N', FREQUENCYF contains the
percentage of entries in the index that have the value that is
specified in KEYVALUE when the number of entries is
multiplied by 100. For example, a value of 1 indicates 100
percent. A value of .153 indicates 15.3 percent. When
TYPE='H', FREQUENCYF contains the percentage of
entries in the index that have a value that is in the range of
the quantile that is indicated in QUALTILENO.
QUANTILENO contains an ordinary sequence number of a
quantile in consecutive value range, from low to high.
When TYPE='H', LOWVALUE is the lower bound for the
quantile that is indicated in QUANTILENO. LOWVALUE is
not used if TYPE does not equal 'H'.
When TYPE='H', HIGHVALUE is the upper bound for the
quantile that is indicated in QUANTILENO. HIGHVALUE is
not used if TYPE does not equal 'H'.
Internal use only.
DB2 10 for z/OS

YL&A DB2 10 for z/OS Reference Guide

SYSIBM.SYSKEYTGTDIST_HIST
Contains rows from the SYSKEYTGTDIST table. Can be inserted, updated, and deleted.
Column Name
STATSTIME

Data Type
TIMESTAMP

IBMREQD

CHAR(1)

IXSCHEMA
IXNAME
KEYSEQ
KEYVALUE

VARCHAR(128)
VARCHAR(128)
SMALLINT
VARCHAR(2000)

TYPE

CHAR(1)

CARDF

FLOAT

KEYGROUPKEYNO

VARCHAR(254)

NUMKEYS
FREQUENCYF

SMALLINT
FLOAT

QUANTILENO

SMALLINT

LOWVALUE

VARCHAR(2000)

HIGHVALUE

VARCHAR(2000)

DB2 10 for z/OS

Description
If the RUNSTATS utility updated the statistics, this column
contains the date and time when the last invocation of
RUNSTATS updated the statistics. The default value is '000101-01.00.00.00.000000'.
A value of Y indicates that the row came from the basic
machine-readable material (MRM) tape.
The qualifier of the index.
The name of the index.
The numeric position of the key-target in the index.
KEYVALUE contains the data of a frequently occurring value.
If the value has a non-character data type, the data might not
be printable.
The type of statistics that are gathered:
C
Cardinality
F
Frequent value
N
Non-padded frequent value
H
Histogram statistics
When TYPE='C', CARDF contains the number of distinct
values for the key group. When TYPE='H', CARDF contains
the number of distinct values for the key group in a quantile
indicated by QUANTILENO.
KEYGROUPKEYNO contains a value that identifies the set of
keys that are associated with the statistics.
KEYGROUPKEYNO contains 0 if the statistics are only
associated with a single key. If the statistics are associated
with more than a single key, KEYGROUPKEYNO contains an
array of SMALLINT key numbers with a dimension that is
equal to the value in NUMKEYS.
The number of keys that are associated with the statistics.
When TYPE='F' or 'N', FREQUENCYF contains the
percentage of entries in the index that have the value that is
specified in KEYVALUE when the number of entries is
multiplied by 100. For example, a value of 1 indicates 100
percent. A value of .153 indicates 15.3 percent. When
TYPE='H', FREQUENCYF contains the percentage of entries
in the index that have a value that is in the range of the
quantile that is indicated in QUALTILENO.
QUANTILENO contains an ordinary sequence number of a
quantile in the whole consecutive value range, from low to
high.
When TYPE='H', LOWVALUE contains the lower bound for
the quantile that is in QUANTILENO. LOWVALUE is not used
if TYPE does not equal 'H'.
When TYPE='H', HIGHVALUE contains the upper bound for
the quantile that is in QUANTILENO. HIGHVALUE is not
used if TYPE does not equal 'H'.
315

YL&A DB2 10 for z/OS Reference Guide

SYSIBM.SYSLOBSTATS
Contains one row for each LOB tablespace.
Column Name
STATSTIME
AVGSIZE
FREESPACE
ORGRATIO

Data Type
TIMESTAMP
INTEGER
INTEGER
DECIMAL(5,2)

DBNAME

CHAR(8)

NAME
IBMREQD

CHAR(8)
CHAR(1)

Description
Timestamp of RUNSTATS statistics update.
Average size of a LOB, measured in bytes, in the LOB tablespace.
Number of kilobytes of available space in the LOB tablespace.
The percentage of organization in the LOB table space. A value of
'100' indicates perfect organization of the LOB table space. A value
of '1' indicates that the LOB table space is disorganized.
A value of '0' indicates that the LOB table space is totally
disorganized.
Name of the database that contains the LOB tablespace
named in NAME.
Name of the LOB tablespace.
A value of Y indicates that the row came from the basic machinereadable material (MRM) tape.

SYSIBM.SYSLOBSTATS_HIST
Contains rows from SYSLOBSTATS. Can be inserted, updated, and deleted.
Column Name
STATSTIME
FREESPACE
ORGRATIO

Data Type
TIMESTAMP
INTEGER
DECIMAL(5,2)

DBNAME

VARCHAR(24)

NAME
IBMREQD

VARCHAR(24)
CHAR(1)

Description
Timestamp of RUNSTATS statistics update.
Number of kilobytes of available space in the LOB tablespace.
The percentage of organization in the LOB table space. A value of
'100' indicates perfect organization of the LOB table space. A value
of '1' indicates that the LOB table space is disorganized.
A value of '0' indicates that the LOB table space is totally
disorganized.
Name of the database that contains the LOB tablespace
named in NAME.
Name of the LOB tablespace.
A value of Y indicates that the row came from the basic machinereadable material (MRM) tape.

SYSIBM.SYSOBJROLEDEP
Contains the dependent objects for each role.
Column Name
DEFINER
DEFINERTYPE

Data Type
VARCHAR(128)
CHAR(1)

ROLENAME
DSCHEMA
DNAME
DTYPE

VARCHAR(128)
VARCHAR(128)
VARCHAR(762)
CHAR(1)

316

Description
The authorization ID or role that created the object.
The type of definer:
L
Role
blank Authorization ID
Name of the role on which there is a dependency.
Name of the schema of the dependent object.
Name of the dependent object.
The type of the dependent object in DNAME:
A Alias
B Trigger
D Database
E Distinct type
DB2 10 for z/OS

YL&A DB2 10 for z/OS Reference Guide

IBMREQD

CHAR(1)

F User-defined function
I Index
J Jar
L Role
M Materialized query table
N Trusted context
O Stored procedure
Q Sequence
R Table space
S Storage group
T Table
V View
X Row permission
Y Column mask
A value of Y indicates that the row came from the basic machinereadable material (MRM) tape.

SYSIBM.SYSPACKAGE
Contains a row for every package.
Column Name
LOCATION
COLLID

Data Type
VARCHAR(128)
VARCHAR(128)

NAME
CONTOKEN

VARCHAR(128)
CHAR(8)

OWNER

VARCHAR(128)

CREATOR

VARCHAR(128)

TIMESTAMP
BINDTIME
QUALIFIER

TIMESTAMP
TIMESTAMP
VARCHAR(128)

PKSIZE

INTEGER

Size of the base section of the package, in bytes.

AVGSIZE

INTEGER

Average size, in bytes, of those sections of the plan that


contain SQL statements processed at bind time.
Number of enabled or disabled entries for this package in

SYSENTRIES
DB2 10 for z/OS

SMALLINT

Description
Always contains blanks.
Name of the package collection. For a trigger package, it is the
schema name of the trigger.
Name of the package.
Consistency token for the package. For a package derived
from a DB2 DBRM, this is either:
o The "level" as specified by the LEVEL option when the
package's program was precompiled
o The timestamp indicating when the package's program was
precompiled, in an internal format.
Authorization ID of the package owner. For a trigger package,
the value is the authorization ID of the owner of the trigger,
which is set to the current authorization ID (the plan or
package owner for static CREATE TRIGGER statement; the
current SQLID for a dynamic CREATE TRIGGER statement).
Authorization ID of the owner of the creator of the package
version. For a trigger package the value is determined
differently. For dynamic SQL, it is the primary authorization ID
of the user who issued the CREATE TRIGGER statement. For
static SQL, it is the authorization ID of the plan or
package owner.
Timestamp indicating when the package was created.
Timestamp indicating when the package was last bound.
Implicit qualifier for the unqualified table, view, index, and alias
names in the static SQL statements of the package.

317

YL&A DB2 10 for z/OS Reference Guide


Column Name

Data Type

VALID

CHAR(1)

OPERATIVE

CHAR(1)

VALIDATE

CHAR(1)

ISOLATION

CHAR(1)

RELEASE

CHAR(1)

EXPLAIN

CHAR(1)

QUOTE

CHAR(1)

COMMA

CHAR(1)

HOSTLANG

CHAR(1)

318

Description
SYSIBM.SYSPKSYSTEM. A value of 0 if all types of
connections are enabled.
Whether the package is valid:
A
The ALTER statement changed the description of the
table or base table of a view referred to by the package.
For a CREATE INDEX statement involving data sharing,
VALID is also marked as A. The changes do not
invalidate the package.
H
The ALTER TABLE statement
changed the description of the table or base table of a
view referred to by the package. For releases of DB2
prior to V5R1, the change invalidates the package.
N
No
Y
Yes
Whether the package can be allocated:
N No; an explicit BIND or REBIND is required before the
package can be allocated.
Y Yes
Whether validity checking can be deferred until run time:
B
All checking must be performed at bind time.
R
Validation is done at run time for tables, views, and
privileges that do not exist at bind time.
Isolation level when the package was last bound or rebound
I
The local package is inheriting the value from the plan
R
RR (repeatable read)
S
CS (cursor stability)
T
RS (read stability)
U
UR (uncommitted read)
blank Not specified, and therefore at the level specified for
the plan executing the package
The value used for RELEASE when the package was last
bound or rebound:
C
Value used was COMMIT.
D
Value used was DEALLOCATE.
I
The local package is inheriting the value from the plan
blank Not specified, and therefore the value specified for the
plan executing the package.
EXPLAIN option specified for the package; that is, whether
information on the package's statements was added to the
owner of the PLAN_TABLE table:
N No
Y Yes
SQL string delimiter for SQL statements in the package:
N
Apostrophe
Y
Quotation mark
Decimal point representation for SQL statements in package:
N
Period
Y
Comma
Host language for the package's DBRM:
B
Assembler language
C
OS/VS COBOL
D
C
F
Fortran
DB2 10 for z/OS

YL&A DB2 10 for z/OS Reference Guide


Column Name

Data Type

CHARSET

CHAR(1)

MIXED

CHAR(1)

DEC31

CHAR(1)

DEFERPREP

CHAR(1)

SQLERROR

CHAR(1)

REMOTE

CHAR(1)

PCTIMESTAMP

TIMESTAMP

IBMREQD

CHAR(1)

VERSION

VARCHAR(122)

PDSNAME
DB2 10 for z/OS

VARCHAR(132)

Description
P
PL/I
2
VS COBOL II or IBM COBOL Release 1
(formerly called COBOL/370(TM))
3
IBM COBOL (Release 2 or subsequent releases)
4
C++
blank For remotely bound packages, trigger packages
(TYPE='T'), SQL procedure packages (TYPE='N'), or
non-inline SQL scalar function packages (TYPE='F').
Indicates whether the system CCSID for SBCS data was 290
(Katakana) when the program was precompiled:
K
Yes
A
No
Indicates if mixed data was in effect when the package's
program was precompiled.
N
No
Y
Yes
Indicates whether DEC31 was in effect when the package's
program was precompiled.
N
No
Y
Yes
Indicates the CURRENTDATA option when the package was
bound or rebound:
A
Data currency is required for all cursors. Inhibit
blocking for all cursors.
B
Data currency is not required for ambiguous cursors.
C
Data currency is required for ambiguous cursors.
blank The package was created before the
CURRENTDATA option was available.
Indicates the SQLERROR option on the most recent
subcommand that bound or rebound the package:
C
CONTINUE
N
NOPACKAGE
Source of the package:
C
Package was created by BIND COPY.
D
Package was created by BIND COPY with the
OPTIONS(COMMAND) option.
K
The package was copied from a package that was
originally bound on behalf of a remote requester.
L
The package was copied with the OPTIONS(COMMAND)
option from a package that was originally bound on
behalf of a remote requester.
N
Package was locally bound from a DBRM.
Y
Package was bound on behalf of a remote requester.
Date and time the application program was precompiled, or
0001-01-01-00.00.00.000000 if the LEVEL precompiler option
was used, or if the package came from a non-DB2 location.
A value of Y indicates that the row came from the basic
machine-readable material (MRM) tape.
Version identifier for the package. The value is blank for a
trigger package (TYPE='T') and when the package is created
using the BIND PACKAGE command (the initial version of the
package)(TYPE='blank').
For a locally bound package, the name of the PDS (library) in
319

YL&A DB2 10 for z/OS Reference Guide


Column Name

Data Type

DEGREE

CHAR(3)

GROUP_MEMBER

VARCHAR(24)

DYNAMICRULES

CHAR(1)

320

Description
which the package's DBRM is a member. For a locally copied
package, the value in SYSPACKAGE.PDSNAME for the
source package. Otherwise, the product signature of the bind
requester followed by one of the following:
o The requester's location name if the product is DB2
o Otherwise, the requester' LU name enclosed in angle
brackets; for example, "<LUSQLDS>."
The DEGREE option used when the package was last bound:
ANY
DEGREE(ANY)
1 or blank DEGREE(1)
Blank
if the package was migrated.
The DB2 data-sharing member name of the DB2 subsystem
that performed the most recent bind. This column is blank if the
DB2 subsystem was not in a DB2 data-sharing environment
when the bind was performed.
The DYNAMICRULES option used when the package was last
bound:
B
BIND. Dynamic SQL statements are executed with
DYNAMICRULES bind behavior.
D
DEFINEBIND. When the package is run under
an active stored procedure or user-defined function,
dynamic SQL statements in the package are
executed with DYNAMICRULES define behavior.
When the package is not run under an active stored
procedure or user-defined functions, dynamic SQL
statements in the package are executed with
DYNAMICRULES bind behavior.
E
DEFINERUN. When the package is run under
an active stored procedure or user-defined function,
dynamic SQL statements in the package are
executed with DYNAMICRULES define behavior.
When the package is not run under an active stored
procedure or user-defined function,
dynamic SQL statements in the package are
executed with DYNAMICRULES run behavior.
H
INVOKEBIND. When the package is run under
an active stored procedure or user-defined function,
dynamic SQL statements in the package are
executed with DYNAMICRULES invoke
behavior. When the package is not run under an
active stored procedure or user-defined function,
dynamic SQL statements in the package are
executed with DYNAMICRULES bind behavior.
I
INVOKERUN. When the package is run under
an active stored procedure or
user-defined function, dynamic SQL statements
in the package are executed with
DYNAMICRULES invoke behavior.
When the package is not run under an active stored
procedure or user-defined function, dynamic SQL
statements in the package are executed with
DYNAMICRULES run behavior.
R
RUN. Dynamic SQL statements are executed with
DB2 10 for z/OS

YL&A DB2 10 for z/OS Reference Guide


Column Name

Data Type

REOPTVAR

CHAR(1)

DEFERPREPARE

CHAR(1)

KEEPDYNAMIC

CHAR(1)

PATHSCHEMAS

VARCHAR(2048

TYPE

CHAR(1)

DB2 10 for z/OS

Description
DYNAMICRULES run behavior.
blank DYNAMICRULES is not specified for the
package. The package uses the DYNAMICRULES
value of the plan to which the package is appended at
execution time.
Whether the access path is determined again at execution
time using input variable values:
A
Bind option REOPT(AUTO) indicates that the access
path is determined multiple times at execution time
depending on the parameter value.
N
Bind option REOPT(NONE) indicates that the access
path is determined at bind time.
Y
Bind option REOPT(ALWAYS) indicates that the access
path is determined at execution time for SQL statements
with variable values.
1
Bind option REOPT(ONCE) indicates that the access
path is determined only once at execution time, using the
first set of input variable values, regardless of how many
times the same statement is executed.
Whether PREPARE processing is deferred until OPEN is
executed:
N
Bind option NODEFER(PREPARE) indicates that
PREPARE processing is not deferred until OPEN is
executed.
Y
Bind option DEFER(PREPARE) indicates that PREPARE
processing is deferred until OPEN is executed.
I
The local package is inheriting the value from the plan
blank Bind option not specified for the package. It is
inherited from the plan.
Whether prepared dynamic statements are to be purged at
each commit point:
N
The bind option is KEEPDYNAMIC(NO). Prepared
dynamic SQL statements are destroyed at commit.
Y
The bind option is KEEPDYNAMIC(YES). Prepared
dynamic SQL statements are kept past commit.
SQL path specified on the BIND or REBIND command that
bound the package. The path is used to resolve unqualified
data type, function, and stored procedure names used in certain
contexts. If the PATH bind option was not specified, the value in
the column is a zero length string; however, DB2 uses a default
SQL path of: SYSIBM, SYSFUN, SYSPROC, package qualifier.
Type of package. Identifies how the package was created:
F
CREATE FUNCTION or ALTER FUNCTIONstatement,
or a BIND PACKAGE DEPLOY command created the
package, and this package is a non-inline SQL scalar
function package.
N
CREATE PROCEDURE or ALTER PROCEDURE
statement, or BIND PACKAGE DEPLOY command
created the package, and this package is a native
SQL routine package.
R
Reserved for IBM use.
T
CREATE TRIGGER statement created the package,
and the package is a trigger package. blank BIND
321

YL&A DB2 10 for z/OS Reference Guide


Column Name

Data Type

DBPROTOCOL

CHAR(1)

FUNCTIONTS

TIMESTAMP

OPTHINT

VARCHAR(128)

ENCODING_CCSID

INTEGER

IMMEDWRITE

CHAR(1)

RELBOUND

CHAR(1)

REMARKS

VARCHAR(762)

OWNERTYPE

CHAR(1)

ROUNDING

CHAR(1)

LASTUSED
CONCUR_ACC_RES

DATE
CHAR(1)

322

Description
PACKAGE command created the package.
Whether remote access for SQL with three-part names is
implemented with DRDA or DB2 private protocol access:
D
DRDA
Timestamp when the function was resolved. Set by the BIND
and REBIND commands, but not by AUTOBIND.
Value of the OPTHINT bind option. Identifies rows in the
authid.PLAN_TABLE to be used as input to the optimizer.
Contains blanks if no rows in the authid.PLAN_TABLE are to be
used as input.
The CCSID corresponding to the encoding scheme or CCSID
as specified for the bind option ENCODING. The encoding
scheme specified on the bind command:
CCSID
The specified or derived CCSID
0
The EBCDIC default CCSID as specified on panel
DSNTIPF at installation time.
Indicates when writes of updated group bufferpool dependent
pages are to be done. This option is only applicable for datasharing environments.
I
The local package is inheriting the value from the plan
N
Bind option IMMEDWRITE(NO) indicates normal
write activity is done.
Y
Bind option IMMEDWRITE(YES) indicates that
immediate writes are done for updated group buffer
pool dependent pages.
1
Bind option IMMEDWRITE(PH1) indicates that
updated group bufferpool dependent pages are
written at or before phase 1 commit.
Blank
if the package was migrated.
The release when the package was bound or rebound.
blank
Bound prior to V7
A character string provided by the user with the COMMENT
statement.
Indicates the type of owner
blank Authorization ID
L
Role
The ROUNDING option used when the package was last
bound:
C ROUND_CEILING
D ROUND_DOWN
F ROUND_FLOOR
G ROUND_HALF_DOWN
E ROUND_HALF_EVEN
H ROUND_HALF_UP
U ROUND_UP blank
Blank The package created in a DB2 release prior to Version 9
The last date that the corresponding objects are used.
Indicates the CONCURRENTACCESSRESOLUTION option
when the package was bound or rebound:
blank Not specified
N
WAITFOROUTCOME
Y
USECURRENTLYCOMMITTED
DB2 10 for z/OS

YL&A DB2 10 for z/OS Reference Guide


Column Name
EXTENDED
INDICATOR

Data Type
CHAR(1)

PLANMGMT

CHAR(1)

PLANMGMTSCOPE

CHAR(1)

APRETAINDUP

CHAR(1)
CHAR(1)

RECORD
TEMPORALHIST

CHAR(1)

Description
The value of the EXTENDEDINDICATOR bind option:
N
EXTENDEDINDICATOR NO
Y
EXTENDEDINDICATOR YES
The value of the PLANMGMT bind option:
B
PLANMGMT BASIC
E
PLANMGMT EXTENDED
blank PLANMGMT OFF
The value of the PLANMGMTSCOPE bind option:
S
PLANMGMTSCOPE STATIC
Reserved for future IBM use.
The value of the APRETAINDUP bind option:
Y
APRETAINDUP YES specified. All copies were retained.
0
APRETAINDUP NO specified; however, the previous or
original package copy is still retained due to access path
differences.
1
APRETAINDUP NO specified, and the previous package
copy is not retained as the access paths are identical to
the current copy.
2
APRETAINDUP NO specified, and the previous and
original package copies are not retained as the access
paths are identical to the current copy.
Whether changes that are made by static or dynamic SQL
statements to the data in a system period temporal table cause
changes to the corresponding history table of the system period
temporal table:
Y
Changes to the data in a system period temporal table
cause changes to the corresponding history table of the
system period temporal table. This is the default value.
N
Changes to the data in system period temporal tables do
not cause changes to the corresponding history table of
the system period temporal table, and values can be
provided to override the row begin, row end, and
transaction start id columns, even though those column
are defined as GENERATED ALWAYS.

SYSIBM.SYSPACKCOPY
Contains a row for every package.
Column Name
LOCATION
COLLID

Data Type
VARCHAR(128)
VARCHAR(128)

NAME
CONTOKEN

VARCHAR(128)
CHAR(8)

OWNER

VARCHAR(128)

DB2 10 for z/OS

Description
Always contains blanks.
Name of the package collection. For a trigger package, it is
the
schema name of the trigger.
Name of the package.
Consistency token for the package. For a package derived
from a DB2 DBRM, this is either:
o The "level" as specified by the LEVEL option when the
package's program was precompiled
o The timestamp indicating when the package's program
was precompiled, in an internal format.
Authorization ID of the package owner. For a trigger package,
the value is the authorization ID of the owner of the trigger,
323

YL&A DB2 10 for z/OS Reference Guide


Column Name

Data Type

CREATOR

VARCHAR(128)

TIMESTAMP
BINDTIME
QUALIFIER

TIMESTAMP
TIMESTAMP
VARCHAR(128)

PKSIZE

INTEGER

Size of the base section of the package, in bytes.

AVGSIZE

INTEGER

SYSENTRIES

SMALLINT

VALID

CHAR(1)

OPERATIVE

CHAR(1)

VALIDATE

CHAR(1)

ISOLATION

CHAR(1)

RELEASE

CHAR(1)

Average size, in bytes, of those sections of the plan that


contain SQL statements processed at bind time.
Number of enabled or disabled entries for this package in
SYSIBM.SYSPKSYSTEM. A value of 0 if all types of
connections are enabled.
Whether the package is valid:
A
The ALTER statement changed the description of the
table or base table of a view referred to by the
package. For a CREATE INDEX statement involving
data sharing, VALID is also marked as A. The
changes do not invalidate the package.
H
The ALTER TABLE statement
changed the description of the table or base table of a
view referred to by the package. For releases of DB2
prior to V5R1, the change invalidates the package.
N
No
Y
Yes
Whether the package can be allocated:
N No; an explicit BIND or REBIND is required before the
package can be allocated.
Y Yes
Whether validity checking can be deferred until run time:
B
All checking must be performed at bind time.
R
Validation is done at run time for tables, views, and
privileges that do not exist at bind time.
Isolation level when the package was last bound or rebound
R
RR (repeatable read)
S
CS (cursor stability)
T
RS (read stability)
U
UR (uncommitted read)
blank Not specified, and therefore at the level specified for
the plan executing the package
The value used for RELEASE when the package was last
bound or rebound:
C
Value used was COMMIT.
D
Value used was DEALLOCATE.

324

Description
which is set to the current authorization ID (the plan or
package owner for static CREATE TRIGGER statement; the
current SQLID for a dynamic CREATE TRIGGER statement).
Authorization ID of the owner of the creator of the package
version. For a trigger package the value is determined
differently. For dynamic SQL, it is the primary authorization ID
of the user who issued the CREATE TRIGGER statement.
For static SQL, it is the authorization ID of the plan or
package owner.
Timestamp indicating when the package was created.
Timestamp indicating when the package was last bound.
Implicit qualifier for the unqualified table, view, index, and alias
names in the static SQL statements of the package.

DB2 10 for z/OS

YL&A DB2 10 for z/OS Reference Guide


Column Name

Data Type

EXPLAIN

CHAR(1)

QUOTE

CHAR(1)

COMMA

CHAR(1)

HOSTLANG

CHAR(1)

CHARSET

CHAR(1)

MIXED

CHAR(1)

DEC31

CHAR(1)

DEFERPREP

CHAR(1)

SQLERROR

CHAR(1)

REMOTE
DB2 10 for z/OS

CHAR(1)

Description
I
The local package is inheriting the value from the
plan
blank Not specified, and therefore the value specified for
the plan executing the package.
EXPLAIN option specified for the package; that is, whether
information on the package's statements was added to the
owner of the PLAN_TABLE table:
N No
Y Yes
SQL string delimiter for SQL statements in the package:
N
Apostrophe
Y
Quotation mark
Decimal point representation for SQL statements in package:
N
Period
Y
Comma
Host language for the package's DBRM:
B
Assembler language
C
OS/VS COBOL
D
C
F
Fortran
P
PL/I
2
VS COBOL II or IBM COBOL Release 1
(formerly called COBOL/370(TM))
3
IBM COBOL (Release 2 or subsequent releases)
4
C++
blank For remotely bound packages, trigger packages
(TYPE='T'), SQL procedure packages (TYPE='N'), or
non-inline SQL scalar function packages (TYPE='F').
Indicates whether the system CCSID for SBCS data was 290
(Katakana) when the program was precompiled:
K
Yes
A
No
Indicates if mixed data was in effect when the package's
program was precompiled.
N
No
Y
Yes
Indicates whether DEC31 was in effect when the package's
program was precompiled.
N
No
Y
Yes
Indicates the CURRENTDATA option when the package was
bound or rebound:
A
Data currency is required for all cursors. Inhibit
blocking for all cursors.
B
Data currency is not required for ambiguous cursors.
C
Data currency is required for ambiguous cursors.
blank The package was created before the
CURRENTDATA option was available.
Indicates the SQLERROR option on the most recent
subcommand that bound or rebound the package:
C
CONTINUE
N
NOPACKAGE
Source of the package:
325

YL&A DB2 10 for z/OS Reference Guide


Column Name

Data Type

PCTIMESTAMP

TIMESTAMP

IBMREQD

CHAR(1)

VERSION

VARCHAR(122)

PDSNAME

VARCHAR(132)

DEGREE

CHAR(3)

GROUP_MEMBER

VARCHAR(24)

DYNAMICRULES

CHAR(1)

326

Description
C
Package was created by BIND COPY.
D
Package was created by BIND COPY with the
OPTIONS(COMMAND) option.
K
The package was copied from a package that was
originally bound on behalf of a remote requester.
L
The package was copied with the
OPTIONS(COMMAND) option from a package that
was originally bound on behalf of a remote requester.
N
Package was locally bound from a DBRM.
Y
Package was bound on behalf of a remote requester.
Date and time the application program was precompiled, or
0001-01-01-00.00.00.000000 if the LEVEL precompiler option
was used, or if the package came from a non-DB2 location.
A value of Y indicates that the row came from the basic
machine-readable material (MRM) tape.
Version identifier for the package. The value is blank for a
trigger package (TYPE='T').
For a locally bound package, the name of the PDS (library) in
which the package's DBRM is a member. For a locally copied
package, the value in SYSPACKAGE.PDSNAME for the
source package. Otherwise, the product signature of the bind
requester followed by one of the following:
o The requester's location name if the product is DB2
o Otherwise, the requester' LU name enclosed in angle
brackets; for example, "<LUSQLDS>."
The DEGREE option used when the package was last bound:
ANY
DEGREE(ANY)
1 or blank DEGREE(1)
Blank
if the package was migrated.
The DB2 data-sharing member name of the DB2 subsystem
that performed the most recent bind. This column is blank if
the DB2 subsystem was not in a DB2 data-sharing
environment when the bind was performed.
The DYNAMICRULES option used when the package was last
bound:
B
BIND. Dynamic SQL statements are executed with
DYNAMICRULES bind behavior.
D
DEFINEBIND. When the package is run under
an active stored procedure or user-defined function,
dynamic SQL statements in the package are
executed with DYNAMICRULES define behavior.
When the package is not run under an active stored
procedure or user-defined functions, dynamic SQL
statements in the package are executed with
DYNAMICRULES bind behavior.
E
DEFINERUN. When the package is run under
an active stored procedure or user-defined function,
dynamic SQL statements in the package are
executed with DYNAMICRULES define behavior.
When the package is not run under an active stored
procedure or user-defined function,
dynamic SQL statements in the package are
executed with DYNAMICRULES run behavior.
DB2 10 for z/OS

YL&A DB2 10 for z/OS Reference Guide


Column Name

Data Type

REOPTVAR

CHAR(1)

DEFERPREPARE

CHAR(1)

KEEPDYNAMIC

CHAR(1)

DB2 10 for z/OS

Description
H
INVOKEBIND. When the package is run under
an active stored procedure or user-defined function,
dynamic SQL statements in the package are
executed with DYNAMICRULES invoke
behavior. When the package is not run under an
active stored procedure or user-defined function,
dynamic SQL statements in the package are
executed with DYNAMICRULES bind behavior.
I
INVOKERUN. When the package is run under
an active stored procedure or
user-defined function, dynamic SQL statements
in the package are executed with
DYNAMICRULES invoke behavior.
When the package is not run under an active stored
procedure or user-defined function, dynamic SQL
statements in the package are executed with
DYNAMICRULES run behavior.
R
RUN. Dynamic SQL statements are executed with
DYNAMICRULES run behavior.
blank DYNAMICRULES is not specified for the
package. The package uses the DYNAMICRULES
value of the plan to which the package is appended at
execution time.
Whether the access path is determined again at execution
time using input variable values:
A
Bind option REOPT(AUTO) indicates that the access
path is determined multiple times at execution time
depending on the parameter value.
N
Bind option REOPT(NONE) indicates that the access
path is determined at bind time.
Y
Bind option REOPT(ALWAYS) indicates that the
access path is determined at execution time for SQL
statements with variable values.
1
Bind option REOPT(ONCE) indicates that the access
path is determined only once at execution time, using
the first set of input variable values, regardless of how
many times the same statement is executed.
Whether PREPARE processing is deferred until OPEN is
executed:
N
Bind option NODEFER(PREPARE) indicates that
PREPARE processing is not deferred until OPEN is
executed.
Y
Bind option DEFER(PREPARE) indicates that
PREPARE
processing is deferred until OPEN
is executed.
blank Bind option not specified for the package. It is
inherited from the plan.
Whether prepared dynamic statements are to be purged at
each commit point:
N
The bind option is KEEPDYNAMIC(NO). Prepared
dynamic SQL statements are destroyed at commit.
Y
The bind option is KEEPDYNAMIC(YES). Prepared
dynamic SQL statements are kept past commit.
327

YL&A DB2 10 for z/OS Reference Guide


Column Name
PATHSCHEMAS

Data Type
VARCHAR(2048)

TYPE

CHAR(1)

DBPROTOCOL

CHAR(1)

FUNCTIONTS

TIMESTAMP

OPTHINT

VARCHAR(128)

ENCODING_CCSID

INTEGER

IMMEDWRITE

CHAR(1)

RELBOUND

CHAR(1)

REMARKS

VARCHAR(762)

OWNERTYPE

CHAR(1)

328

Description
SQL path specified on the BIND or REBIND command that
bound the package. The path is used to resolve unqualified
data type, function, and stored procedure names used in
certain contexts. If the PATH bind option was not specified,
the value in the column is a zero length string; however, DB2
uses a default SQL path of: SYSIBM, SYSFUN, SYSPROC,
package qualifier.
Type of package. Identifies how the package was created:
F
CREATE FUNCTION or ALTER
FUNCTIONstatement, or a BIND PACKAGE
DEPLOY command created the package, and this
package is a non-inline SQL scalar function
package.
N
CREATE PROCEDURE or ALTER PROCEDURE
statement, or BIND PACKAGE DEPLOY command
created the package, and this package is a native
SQL routine package.
R
Reserved for IBM use.
T
CREATE TRIGGER statement created the package,
and the package is a trigger package. blank BIND
PACKAGE command created the package.
Whether remote access for SQL with three-part names is
implemented with DRDA or DB2 private protocol access:
D
DRDA
Timestamp when the function was resolved. Set by the BIND
and REBIND commands, but not by AUTOBIND.
Value of the OPTHINT bind option. Identifies rows in the
authid.PLAN_TABLE to be used as input to the optimizer.
Contains blanks if no rows in the authid.PLAN_TABLE are to
be used as input.
The CCSID corresponding to the encoding scheme or CCSID
as specified for the bind option ENCODING. The encoding
scheme specified on the bind command:
CCSID
The specified or derived CCSID
0
The EBCDIC default CCSID as specified on
panel DSNTIPF at installation time.
Indicates when writes of updated group bufferpool dependent
pages are to be done. This option is only applicable for datasharing environments.
N
Bind option IMMEDWRITE(NO) indicates normal
write activity is done.
Y
Bind option IMMEDWRITE(YES) indicates that
immediate writes are done for updated group buffer
pool dependent pages.
1
Bind option IMMEDWRITE(PH1) indicates that
updated group bufferpool dependent pages are
written at or before phase 1 commit.
Blank
if the package was migrated.
The release when the package was bound or rebound.
blank
Bound prior to V7
A character string provided by the user with the COMMENT
statement.
Indicates the type of owner
DB2 10 for z/OS

YL&A DB2 10 for z/OS Reference Guide


Column Name

Data Type

ROUNDING

CHAR(1)

LASTUSED
CONCUR_ACC_RES

DATE
CHAR(1)

EXTENDED
INDICATOR

CHAR(1)

COPYID

INTEGER

PLANMGMT

CHAR(1)

PLANMGMTSCOPE

CHAR(1)

APRETAINDUP

CHAR(1)
CHAR(1)

Description
blank Authorization ID
L
Role
The ROUNDING option used when the package was last
bound:
C ROUND_CEILING
D ROUND_DOWN
F ROUND_FLOOR
G ROUND_HALF_DOWN
E ROUND_HALF_EVEN
H ROUND_HALF_UP
U ROUND_UP blank
Blank The package created in a DB2 release prior to Version
9
The last date that the corresponding objects are used.
Indicates the CONCURRENTACCESSRESOLUTION option
when the package was bound or rebound:
blank Not specified
N
WAITFOROUTCOME
Y
USECURRENTLYCOMMITTED
The value of the EXTENDEDINDICATOR bind option:
N
EXTENDEDINDICATOR NO
Y
EXTENDEDINDICATOR YES
The version of the copy of the package that this row
explains:
1
The previous copy of the package
2
The original copy of the package
The value of the PLANMGMT bind option:
B
PLANMGMT BASIC
E
PLANMGMT EXTENDED
F
PLANMGMT OFF
O
PLANMGMT ON
The value of the PLANMGMTSCOPE bind option:
S
PLANMGMTSCOPE STATIC
Reserved for future IBM use.
The value of the APRETAINDUP bind option:
Y
APRETAINDUP YES specified. All copies were
retained.
0
APRETAINDUP NO specified; however, the previous or
original package copy is still retained due to access
path
differences.
1
APRETAINDUP NO specified, and the previous
package copy is not retained as the access paths are
identical to the current copy.
2
APRETAINDUP NO specified, and the previous and
original package copies are not retained as the access
paths are identical to the current copy.

SYSIBM.SYSPACKAUTH
Records the privileges that are held by users over packages.
Column Name
DB2 10 for z/OS

Data Type

Description
329

YL&A DB2 10 for z/OS Reference Guide


Column Name
GRANTOR

Data Type
VARCHAR(128)

GRANTEE

VARCHAR(128)

LOCATION
COLLID

VARCHAR(128)
VARCHAR(128)

NAME

VARCHAR(128)

TIMESTAMP
GRANTEETYPE

TIMESTAMP
CHAR(1)

AUTHHOWGOT

CHAR(1)

BINDAUTH

CHAR(1)

COPYAUTH

CHAR(1)

EXECUTEAUTH

CHAR(1)

IBMREQD

CHAR(1)

GRANTORTYPE

CHAR(1)

Description
Authorization ID of the user who granted the privilege. Could
also be PUBLIC.
Authorization ID of the user who holds the privileges, the
name of a plan that uses the privileges or PUBLIC for a grant
to PUBLIC.
Always contains blanks.
Collection name for the package or packages on which the
privilege was granted.
Name of the package on which the privileges are held. An
asterisk (*) if the privileges are held on all packages in a
collection.
Timestamp indicating when the privilege was granted.
Type of grantee:
blank An authorization ID
L
Role
P
An application plan
Authorization level of the user from whom the privileges were
received. This authorization level is not necessarily the
highest authorization level of the grantor.
blank Not applicable
A
PACKADM (on collection *)
C
DBCTL
D
DBADM
E
SECADM
G
ACCESSCTRL
L
SYSCTRL
M
DBMAINT
P
PACKADM (on a specific collection)
S
SYSADM
T
DATAACCESS
Whether GRANTEE can use the BIND and REBIND
subcommands against the package:
blank Privilege is not held
G
Privilege is held with the GRANT option
Y
Privilege is held without the GRANT option
Whether GRANTEE can COPY the package:
blank Privilege is not held
G
Privilege is held with the GRANT option
Y
Privilege is held without the GRANT option
Whether GRANTEE can execute the package:
blank Privilege is not held
G
Privilege is held with the GRANT option
Y
Privilege is held without the GRANT option
A value of Y indicates that the row came from the basic
machine-readable material (MRM) tape.
Indicates the type of grantor:
blank Authorization ID
L
Role

SYSIBM.SYSPACKDEP
Records the dependencies of packages on local tables, views, synonyms, tablespaces,
indexes, aliases, functions, and stored procedures.
330

DB2 10 for z/OS

YL&A DB2 10 for z/OS Reference Guide


Column Name
BNAME

Data Type
VARCHAR(128)

BQUALIFIER

VARCHAR(128)

BTYPE

CHAR(1)

DLOCATION
DCOLLID
DNAME
DCONTOKEN

VARCHAR(128)
VARCHAR(128)
VARCHAR(128)
CHAR(8)

IBMREQD

CHAR(1)

DOWNER
DTYPE

VARCHAR(128)
CHAR(1)

DB2 10 for z/OS

Description
The name of an object that a package depends on. If BTYPE
is B or C, the value is the name of the table on which the
period is defined.
The value of the column depends on the type of object:

If BNAME identifies a table space (BTYPE is R), the


value is the name of its database.

If BNAME identifies a table on which a period is


defined (BTYPE is B or C), the value is the qualifier
of that table.

If BNAME identifies user-defined function, a cast


function, a stored procedure, or a sequence
(BTYPE is F, O, or Q), the value is the schema
name.

If BNAME identifies a role, the value is blank.

Otherwise, the value is the schema of BNAME.


Type of object identified by BNAME and BQUALIFIER:
A Alias
B BUSINESS_TIME
C SYSTEM_TIME
E INSTEAD OF trigger
F User-defined function or cast function
G Global temporary table
I
Index
M Materialized query table
O Stored procedure
P Partitioned tablespace if it is defined as LARGE or with the
DSSIZE parm
Q Sequence object
R Tablespace
S Synonym
T Table
V View
Always contains blanks
Name of the package collection.
Name of the package.
Consistency token for the package. This is either:
o The "level" as specified by the LEVEL option when the
package's program was precompiled
o The timestamp indicating when the package's program
was precompiled, in an internal format.
A value of Y indicates that the row came from the basic
machine-readable material (MRM) tape.
Owner of the package.
Type of package:
F
Non-inline SQL scalar function
N
Native SQL routine package
O
Original copy of a package
P
Previous copy of a package
R
Reserved for IBM use
T
Trigger package
blank Not a trigger package or a native SQL routine package
331

YL&A DB2 10 for z/OS Reference Guide


Column Name
DOWNERTYPE

Data Type
CHAR(1)

Description
Indicates the type of owner of the package:
blank
Authorization ID
L
Role

SYSIBM.SYSPACKLIST
Contains one or more rows for every local application plan bound with a package list.
Column Name
PLANNAME
SEQNO
LOCATION

Data Type
VARCHAR(24)
SMALLINT
VARCHAR(128)

COLLID

VARCHAR(128)

NAME
TIMESTAMP
IBMREQD

VARCHAR(128)
TIMESTAMP
CHAR(1)

Description
Name of the application plan.
Sequence number of the entry in the package list.
Location of the package. Blank if this is local. (*) indicates location
to be determined at run time.
Collection name for the package. An asterisk (*) indicates that
the collection name is determined at run time.
Name of the package. (*) indicates an entire collection.
Timestamp indicating when the row was created.
Y indicates row came from basic machine-readable material (MRM)
tape.

SYSIBM.SYSPACKSTMT
Contains one or more rows for each statement in a package.
Column Name
LOCATION
COLLID
NAME
CONTOKEN

Data Type
VARCHAR(128)
VARCHAR(128)
VARCHAR(128)
CHAR(8)

SEQNO
STMTNO

INTEGER
SMALLINT

SECTNO
BINDERROR

SMALLINT
CHAR(1)

IBMREQD

CHAR(1)

VERSION

VARCHAR(122)
VARCHAR(3500)
CHAR(1)

ISOLATION

332

Description
Always contains blanks
Name of the package collection.
Name of the package.
Consistency token for the package. This is either:
o The "level" as specified by the LEVEL option when the
package's program was precompiled
o The timestamp indicating when the package's program
was precompiled, in an internal format
Not used.
The statement number of the statement in the source program. A
statement number greater than 32767 is displayed as zero or a
or a negative number (see STMTNOI for the statement number).
The section number of the statement.
Whether an SQL error was detected at bind time:
N No
Y Yes
A value of Y indicates that the row came from the basic machinereadable material (MRM) tape.
Version identifier for the package.
Internal use only.
Isolation level for the SQL statement:
R
RR (repeatable read)
T
RS (read stability)
S
CS (cursor stability)
U
UR (uncommitted read)
L
KEEP UPDATE LOCKS for an RS isolation
X
KEEP UPDATE LOCKS for an RR isolation
blank The WITH clause was not specified on this
DB2 10 for z/OS

YL&A DB2 10 for z/OS Reference Guide


Column Name

Data Type

STATUS

CHAR(1)

ACCESSPATH

CHAR(1)

DB2 10 for z/OS

Description
statement. The isolation level is recorded in
SYSPACKAGE.ISOLATION and in
SYSPLAN.ISOLATION.
Status of binding the statement:
A
Distributed - statement uses DB2 private protocol
access. The statement will be parsed and executed at the
server using defaults for input variables during access path
selection.
B
Distributed - statement uses DB2 private protocol access.
The statement will be parsed and executed at the server
using values for input variables during access path
selection.
C
Compiled - statement was bound successfully using defaults
for input variables during access path selection.
E
Explain - statement is an SQL EXPLAIN statement. The
explain is done at bind time using defaults for input variables
during access path selection.
F
Parsed - statement did not bind successfully and
VALIDATE(RUN) was used. The statement will be rebound
at execution time using values for input variables during
access path selection.
G
Compiled - statement bound successfully, but REOPT is
specified. The statement will be rebound at execution
time using values for input variables during access path
selection.
H
Parsed - statement is either a data definition statement
or a statement that did not bind successfully and
VALIDATE(RUN) was used. The statement will be rebound
at execution time using defaults for input
variables during access path selection. Data manipulation
statements use defaults for input variables during access
path selection.
I
Indefinite - statement is dynamic. The statement will be
bound at execution time using defaults for input variables
during access path selection.
J
Indefinite - statement is dynamic. The statement will be
bound at execution time using values for input variables
during access path selection.
K
Control - CALL statement.
L
Bad - the statement has some allowable error. The bind
continues but the statement cannot be executed.
M
Parsed - statement references a table that is qualified with
SESSION and was not bound because the table reference
could be for a declared temporary table that will not be
defined until the package or plan is run. The SQL statement
will be rebound at execution time using values for input
variables during access path selection.
blank The statement is non-executable, or was bound in a DB2
release prior to Version 5.
For static statements, indicates if the access path for the
statement is based on user-specified optimization hints. A value of
'H' indicates that optimization hints were used. A blank value
indicates that the access path was determined without the use of
333

YL&A DB2 10 for z/OS Reference Guide


Column Name

Data Type

STMTNOI

INTEGER

SECTNOI
EXPLAINABLE

INTEGER
CHAR(1)

QUERYNO

INTEGER

ROWID

ROWID
NULL
GENERATED
ALWAYS
CLOB(2M)
BLOB(2M)
BIGINT

STATEMENT
STMT_ID

Description
optimization hints, or that there is no access path associated with
the statement. For dynamic statements, the value is blank.
If the value of STMTNO is zero, the column contains the statement
number of the statement in the source program. If both STMTNO
and STMTNOI are zero, the statement number is greater than
32767.
The section number of the statement.
Contains one of the following values:
Y
Indicates that the SQL statement can be used with the
EXPLAIN function and may have rows describing its
access path in the userid.PLAN_TABLE.
N
Indicates that the SQL statement does not have any rows
describing its access path in the userid.PLAN_TABLE
Blank Indicates that the SQL statement was bound prior to V7.
The query number of the SQL statement in the source program.
SQL statements bound prior to V7 have a default value of 1.
Statements bound V7 or later used the value specified on the
QUERYNO clause on SELECT, UPDATE, INSERT, DELETE,
EXPLAIN, and DECLARE CURSOR or REFRESH TABLE
statements. If the QUERYNO clause is not specified, the query
number is set to the statement number.
ROWID column, created for the lob columns in this table.

The complete text for the SQL statement that the row represents.
Internal use only.
A unique statement identifier.

SYSIBM.PACKSTMT_STMB
An auxiliary table for the STMTBLOB column of SYSIBM.SYSPACKSTMT.
Column Name

Data Type
BLOB(2M)

Description
Internal use only.

SYSIBM.PACKSTMT_STMT
An auxiliary table for the STMTBLOB column of SYSIBM.SYSPACKSTMT.
Column Name
STATEMENT

Data Type
CLOB(2M)

Description
The complete text for the SQL statement that the row represents.

SYSIBM.SYSPARMS
Contains a row for each parameter of a routine or multiple rows for table parameters.
Column Name
SCHEMA
OWNER
NAME
SPECIFICNAME
ROUTINETYPE

334

Data Type
VARCHAR(128)
VARCHAR(128)
VARCHAR(128)
VARCHAR(128)
CHAR(1)

Description
Schema of the routine.
Owner of the routine.
Name of the routine.
Specific name of the routine.
Type of routine:
F
User-defined function or cast function
DB2 10 for z/OS

YL&A DB2 10 for z/OS Reference Guide


Column Name

Data Type

CAST_FUNCTION

CHAR(1)

PARMNAME

VARCHAR(128)

ROUTINEID
ROWTYPE

INTEGER
CHAR(1)

ORDINAL

SMALLINT

DB2 10 for z/OS

Description
P
Stored procedure
Whether the routine is a cast function:
N
Not a cast function
Y
A cast function
The only way to get a value of Y is if a user creates a distinct
type when DB2 implicitly generates cast functions for the
distinct type.
Name of the parameter. For a table parameter, the
parameter name in the row corresponding to the first column
of the table is the parameter name specified on CREATE; an
empty string or blanks are stored for the parameter name for
the rows corresponding to the remaining columns.
Internal identifier of the routine.
The following values indicate the type of parameter
described by this row:
P Input parameter.
O Output parameter; not applicable for functions
B Both an input and an output parameter; not applicable for
functions
R Result before casting; not applicable for stored
procedures
C Result after casting; not applicable for stored procedures
S Input parameter of the underlying built-in source function.
For a sourced function and a given ORDINAL value:

The row with ROWTYPE = P describes the input


parameter of the user-defined function (identified
by ROUTINEID).

The row with ROWTYPE = S describes the


corresponding input parameter of the built-in
function that is the underlying source function
(identified by the SOURCESCHEMA and
SOURCESPECIFIC values).
A value of X indicates that the row is not used to describe a
particular parameter of the routine. Instead, for a routine that
was created prior to Version 9, the row is used to record a
CCSID for the encoding scheme specified in a
PARAMETER CCSID clause, or a DATATYPEID for the
representation of the variable length character string
parameters of a LANGUAGE C routine, as specified in a
PARAMETER VARCHAR clause. For routines created with
Version 8 (new function mode) or later releases, the CCSID
is recorded in the PARAMETER_CCSID column of
SYSROUTINES. For routines created with Version 9 or later
releases, the DATATYPEID information to support
PARAMETER VARCHAR is recorded in the
PARAMETER_VARCHARFORM column of
SYSIBM.SYSROUTINES.
If ROWTYPE is B, O, P, or S, the value is the ordinal
number of the parameter within the routine signature.
If ROWTYPE is C or R, the value depends on the type of
function:

For a scalar function, the value is 0.

For a table function, the value is the ordinal


335

YL&A DB2 10 for z/OS Reference Guide


Column Name

Data Type

TYPESCHEMA
TYPENAME
DATATYPEID

CHAR(8)
CHAR(18)
INTEGER

SOURCETYPEID

INTEGER

LOCATOR

CHAR(1)

TABLE

CHAR(1)

TABLE_COLNO

SMALLINT

LENGTH

INTEGER

SCALE

SMALLINT

SUBTYPE

CHAR(1)

CCSID

INTEGER

CAST_FUNCTION_ID

INTEGER

ENCODING_SCHEME

CHAR(1)

336

Description
number of the column of the output table.
If ROWTYPE is X, the value is 0.
Schema of the data type of the parameter.
Name of the data type of the parameter.
For a built-in data type, the internal ID of the built-in type.
For a distinct type, the internal ID of the distinct type. When
ROWTYPE is X and ORDINAL is 0, a non-zero
DATATYPEID indicates that actual representation, for a
LANGUAGE C routine, of any varying length string
parameters that appear in the routine's parameter list or in
the RETURNS clause.
For a built-in data type, 0. For a distinct type, the internal ID
of the built-in data type upon which the distinct type is
sourced.
Indicates whether a locator to a value, instead of the actual
value, is to be passed as the input value when the routine is
called:
N
The actual value is to be passed.
Y
A locator to a value is to be passed
The data type of a column for a table parameter:
N This is not a table parameter.
Y This is a table parameter.
For table parameters, the column number of the table.
Otherwise, the value is 0.
Length attribute of the parameter or result; If the parameter
or result length is determined during function resolution, the
length attribute can also be 0. In the case of a decimal
parameter or result this is the precision.
Scale of the data type of the parameter or number of
fractional second digits of timestamp or timestamp with time
zone parameter. If it is TIMESTAMP parameter where
LENGTH is 10 and SCALE is 0, the number of fractional
second digits is 6.
If the data type is a distinct type, the subtype of the distinct
type, which is based on the subtype of its source type:
B
The subtype is FOR BIT DATA.
S
The subtype is FOR SBCS DATA.
M
The subtype is FOR MIXED DATA.
blank The source type is not a character type.
CCSID of the data type for character, graphic, date, time,
and timestamp data types. When the ROWTYPE is X and
ORDINAL is 0, the CCSID column is the CCSID for all
character and graphic string parameters.
Internal function ID of the function used to cast the
argument, if this function is sourced on another function, or
result. Otherwise, the value is 0. Not applicable for stored
procedures.
Encoding scheme of the parameter:
A
ASCII
E
EBCDIC
U
UNICODE
blank The source type is not a character type.
DB2 10 for z/OS

YL&A DB2 10 for z/OS Reference Guide


Column Name
IBMREQD

Data Type
CHAR(1)

VERSION

VARCHAR(122)

OWNERTYPE

CHAR(1)

Description
A value of Y indicates that the row came from the basic
machine-readable material (MRM) tape.
The version identifier for the routine. The column is a zerolength string if the value of ORIGIN is not I or if the rows
were created prior to Version 9.
Indicates the type of owner:
blank Authorization ID
L
Role

SYSIBM.SYSPENDINGDDL
Contains information about which objects have pending definition changes.
Column Name
DBNAME
TSNAME
DBID
PSID

Data Type
VARCHAR(24)
VARCHAR(24)
SMALLINT
SMALLINT

Description
Name of the database for the pending option.
Name of the table space for the pending option.
Internal identifier of the database.
Internal identifier of the table space page set descriptor.

OBJSCHEMA
OBJNAME
OBJOBID
OBJTYPE

VARCHAR(128)
VARCHAR(128)
SMALLINT
CHAR(1)

STATEMENT_TYPE

CHAR(1)

OPTION_ENVID
OPTION_KEYWORD
OPTION_VALUE
OPTION_SEQNO
CREATEDTS
RELCREATED
IBMREQD

INTEGER
VARCHAR(128)
VARCHAR(4000)
SMALLINT
TIMESTAMP
CHAR(1)
CHAR(1)

ROWID
STATEMENT_TEXT

ROWID
CLOB(2M)

The qualifier of the object that contains the pending option.


Name of the object that contains the pending option.
Internal identifier of the object.
Type of object identified by OBJSCHEMA and OBJNAME.
I
The object is an index
S The object is a table space
The type of the statement for the pending option.
A
An ALTER statement
Internal identifier of the environment for the pending option.
The keyword of the pending option.
The value of the pending option as a string.
The sequence of the pending option within the statement.
Timestamp when the pending option was created.
The release of DB2 that is used to create the object.
A value of Y indicates that the row came from the basic
machine- readable material (MRM) tape.
ID to support LOB columns for source text
Source text of the original statement for the pending option.

SYSIBM.SYSPENDINGOBJECTS
Contains the name of and OBID information about objects that are the pending creation.
Column Name
DBNAME
TSNAME
DBID
PSID

Data Type
VARCHAR(24)
VARCHAR(24)
SMALLINT
SMALLINT

Description
Name of the database.
Name of the base table space.
Internal identifier of the database.
Internal identifier of the base table space page set descriptor.

PARTITION

SMALLINT

Partition number with which the object is associated

COLNAME

VARCHAR(128)

OBJSCHEMA
OBJNAME
OBJTYPE

VARCHAR(128)
VARCHAR(128)
CHAR(1)

Name of the column contained in the base table space with


which the object is associated.
The qualifier of the object.
Name of the object.
Type of object identified by OBJSCHEMA and OBJNAME.

DB2 10 for z/OS

337

YL&A DB2 10 for z/OS Reference Guide


Column Name

Data Type

INDEXSPACE

VARCHAR(24)

OBJOBID
OBJPSID

SMALLINT
SMALLINT

Description
I
The object is an index
S The object is a table space
T The object is a table
Name of the index space. An empty string if the object is
not an index.
Internal identifier of the object.
Internal identifier of the object page set descriptor, or 0 if the
object does not have a page set descriptor.

SYSIBM.SYSPKSYSTEM
Contains zero or more rows for every package
Column Name
LOCATION
COLLID
NAME
CONTOKEN

Data Type
VARCHAR(128)
VARCHAR(128)
VARCHAR(128)
CHAR(8)

SYSTEM

VARCHAR(24)

ENABLE

CHAR(1)

CNAME

VARCHAR(60)

IBMREQD

CHAR(1)

Description
Always contains blanks.
Name of the package collection.
Name of the package.
Consistency token for the package. This is either:
o The "level" as specified by the LEVEL option when the package's
program was precompiled
o The timestamp indicating when the package's program was
precompiled, in an internal format.
Environment. Values can be:
BATCH
TSO batch
CICS
Customer Information Control System
DB2CALL
DB2 call attachment facility
DLIBATCH DLI batch support facility
IMSBMP
IMS BMP region
IMSMPP
IMS MPP and IFP region
REMOTE
remote application server
Indicates whether the connections represented by the row are
enabled or disabled:
N Disabled
Y Enabled
Identifies the connection or connections to which the row applies.
Interpretation depends on the environment specified by SYSTEM.
Values can be:
o Blank if SYSTEM=BATCH or SYSTEM=DB2CALL
o The LU name for an application server if SYSTEM=REMOTE
o Either the requester's location (if the product is DB2) or the
requester's LU name enclosed in angle brackets if
SYSTEM=REMOTE.
o The name of a single connection if SYSTEM has any other
value.
CNAME can also be blank when SYSTEM is not equal to BATCH or
DB2CALL. When this is so, the row applies to all servers or
connections for the indicated environment.
A value of Y indicates that the row came from the basic machinereadable material (MRM) tape.

SYSIBM.SYSPLAN
Contains one row for each application plan.
338

DB2 10 for z/OS

YL&A DB2 10 for z/OS Reference Guide


Column Name
NAME
CREATOR
VALIDATE

Data Type
VARCHAR(24)
VARCHAR(128)
CHAR(6)
CHAR(1)

ISOLATION

CHAR(1)

VALID

CHAR(1)

OPERATIVE

CHAR(1)

PLSIZE
IBMREQD

CHAR(8)
INTEGER
CHAR(1)

AVGSIZE

INTEGER

ACQUIRE

CHAR(1)

RELEASE

CHAR(1)

EXPLAIN

CHAR(1)
CHAR(1)
CHAR(1)
CHAR(1)

DB2 10 for z/OS

Description
Name of the application plan.
Authorization ID of the owner of the application plan.
Not used.
Whether validity checking can be deferred until run time:
B All checking must be performed during BIND.
R Validation is done at run time for tables, views, and
privileges that do not exist at bind time.
Isolation level for the plan:
R
RR (repeatable read)
T
RS (read stability)
S
CS (cursor stability)
U
UR (uncommitted read)
Whether the application plan is
valid:
A
The ALTER TABLE statement changed the description of
the table or base table of a view that is referred to by
the application plan. For a CREATE INDEX statement
involving data sharing, VALID is also marked as A. The
change does not invalidate the application plan.
H
The ALTER TABLE statement changed the description
of the table or base table of a view that is referred to by
the application plan. For releases of DB2 prior to Version
5, the change invalidates the application plan.
N
No
Y
Yes
Whether the application plan can be allocated:
N
No; an explicit BIND or REBIND is required before the
plan can be allocated
Y
Yes
Not used.
Size of the base section of the plan, in bytes.
A value of Y indicates that the row came from the basic
machine-readable material (MRM) tape.
Average size, in bytes, of those sections of the plan that
contain SQL statements processed at bind time.
When resources are acquired:
A
At allocation
U
At first use
When resources are released:
C
At commit
D
At deallocation
Not used.
Not used.
Not used.
EXPLAIN option specified for the plan; that is, whether
information on the plan's statements was added to the
owner's PLAN_TABLE table:
N
No
Y
Yes

339

YL&A DB2 10 for z/OS Reference Guide


Column Name
EXPREDICATE

Data Type
CHAR(1)

BOUNDBY
QUALIFIER

VARCHAR(128)
VARCHAR(128)

CACHESIZE

SMALLINT

PLENTRIES

SMALLINT

DEFERPREP

CHAR(1)

CURRENTSERVER

VARCHAR(128)

SYSENTRIES

SMALLINT

DEGREE

CHAR(3)

SQLRULES

CHAR(1)

DISCONNECT

CHAR(1)

GROUP_MEMBER

VARCHAR(24)

DYNAMICRULES

CHAR(1)

340

Description
Indicates the CURRENTDATA option when the plan was bound
or rebound:
B Data currency is not required for ambiguous cursors. Allow
blocking for ambiguous cursors.
C Data currency is required for ambiguous cursors. Inhibit
blocking for ambiguous cursors.
N
Blocking is inhibited for ambiguous cursors, but the
plan was created before the CURRENTDATA option was
available.
Primary authorization ID of the binder of the plan.
Implicit qualifier for the unqualified table, view, index,
and alias names in the static SQL statements of the plan.
Size, in bytes, of the cache to be acquired for the plan. A
value of zero indicates that no cache is used.
Number of package list entries for the plan. The negative of
that number if there are rows for the plan in
SYSIBM.SYPACKLIST but the plan was bound in a prior
release after fall back.
Whether the package was last bound with the
DEFER(PREPARE) option:
N
No
Y
Yes
Location name specified with the CURRENTSERVER option
when the plan was last bound. Blank if none was specified,
implying that the first server is the local DB2 subsystem.
Number of rows associated with the plan in
SYSIBM.SYSPLSYSTEM. The negative of that number if such
rows exist but the plan was bound in a prior release after fall
back. A negative value or zero means that all connections
are enabled.
The DEGREE option used when the plan was last bound:
ANY
DEGREE(ANY)
1 or blank
DEGREE(1). Blank if the plan was migrated.
The SQLRULES option used when the plan was last bound:
D or blank
SQLRULES(DB2)
S
SQLRULES(STD)
blank
A migrated plan
The DISCONNECT option used when the plan was last bound:
E or blank DISCONNECT (EXPLICIT)
A
DISCONNECT (AUTOMATIC)
C
DISCONNECT (CONDITIONAL)
blank
A migrated plan
The DB2 data-sharing member name of the DB2 subsystem
that performed the most recent bind. This column is blank if the
DB2 subsystem was not in a DB2 data-sharing environment
when the bind was performed.
The DYNAMICRULES option used when the plan was last
bound:
B
BIND. Dynamic SQL statements are executed with
DYNAMICRULES bind behavior.
blank
RUN. Dynamic SQL statements in the plan are
executed with DYNAMICRULES run behavior.
DB2 10 for z/OS

YL&A DB2 10 for z/OS Reference Guide


Column Name
BOUNDTS
REOPTVAR

Data Type
TIMESTAMP
CHAR(1)

KEEPDYNAMIC

CHAR(1)

PATHSCHEMAS

VARCHAR(254)

DBPROTOCOL

CHAR(1)

FUNCTIONTS

TIMESTAMP

OPTHINT

CHAR(8)

ENCODING_CCSID

INTEGER

DB2 10 for z/OS

Description
Time when the plan was bound.
Whether the access path is determined again at execution
timeusing input variable values:
A
Bind option REOPT(AUTO) indicates that the access
path is determined multiple times at execution time
depending on the parameter value.
N
Bind option REOPT(NONE) indicates that the access
path is determined at bind time.
Y
Bind option REOPT(ALWAYS) indicates that the access
path is determined at execution time for SQL statements
with variable values.
1
Bind option REOPT(ONCE) indicates that the access
path is determined only once at execution time, using
the first set of input variable values, regardless of how
many times the same statement is executed.
Whether prepared dynamic statements are to be purged at
each commit point:
N
The bind option is KEEPDYNAMIC(NO).
Prepared dynamic SQL statements are destroyed at
commit or rollback.
Y
The bind option is KEEPDYNAMIC(YES). Prepared
dynamic SQL statements are kept past commit or
rollback.
SQL path specified on the BIND or REBIND command that
bound the plan. The path is used to resolve unqualified data
type, function, and stored procedure names used in certain
contexts. If the PATH bind option was not specified, the value in
the column is a zero length string; however, DB2 uses a default
SQL path of: SYSIBM, SYSFUN, SYSPROC, plan qualifier.
Whether remote access for SQL with three-part names is
implemented with DRDA or DB2 private protocol access:
D
DRDA
P
DB2 private protocol
Timestamp when the function was resolved. Set by the BIND
and REBIND commands, but not by AUTOBIND.
Value of the OPTHINT bind option. Identifies rows in the
authid.PLAN_TABLE to be used as input to the optimizer.
Contains blanks if no rows in the authid.PLAN_TABLE are to be
used as input.
The CCSID corresponding to the encoding scheme or CCSID
as specified for the bind option ENCODING. The encoding
scheme specified on the bind command:
CCSID
The specified or derived CCSID
0
The EBCDIC default CCSID as specified on panel
DSNTIPF at installation time.

341

YL&A DB2 10 for z/OS Reference Guide


Column Name
IMMEDWRITE

Data Type
CHAR(1)

RELBOUND

CHAR(1)

REMARKS

CHAR(1)
VARCHAR(128)

CREATORTYPE

CHAR(1)

ROUNDING

CHAR(1)

LASTUSED
CONCUR_ACC_
RES

DATE
CHAR(1)

Description
Indicates when writes of updated group bufferpool dependent
pages are to be done. This option is only applicable for datasharing environments.
N
Bind option IMMEDWRITE(NO) indicates normal
write activity is done.
Y
Bind option IMMEDWRITE(YES) indicates that
immediate writes are done for updated group buffer
pool dependent pages.
1
Bind option IMMEDWRITE(PH1) indicates that
updated group bufferpool dependent pages are
written at or before phase 1 commit.
The release when the package was bound or rebound.
blank
Bound prior to V7
K
Bound on V7
L
Bound on V8
Not used.
A character string provided by the user with the COMMENT
statement.
Indicates the type of creator:
blank Authorization ID
L
Role
The ROUNDING option used when the plan was last bound:
C
ROUND_CEILING
D
ROUND_DOWN
F
ROUND_FLOOR
G
ROUND_HALF_DOWN
E
ROUND_HALF_EVEN
H
ROUND_HALF_UP U ROUND_UP
blank The plan was created in a DB2 release prior to Version
9.
The last date that the corresponding objects are used.
Indicates the CONCURRENTACCESSRESOLUTION option
when the package was bound or rebound:
blank Not specified
N
WAITFOROUTCOME
Y
USECURRENTLYCOMMITTED

SYSIBM.SYSPLANAUTH
Records the privileges that are held by users over application plans.
Column Name
GRANTOR
GRANTEE

Data Type
VARCHAR(128)
VARCHAR(128)

NAME

VARCHAR(24)
CHAR(12)
CHAR(6)
CHAR(8)
CHAR(1)
CHAR(1)

AUTHHOWGOT

342

Description
Authorization ID of the user who granted the privileges.
Authorization ID of the user who holds the privileges. Could also
be PUBLIC for a grant to PUBLIC.
Name of the application plan on which the privileges are held.
Internal use only.
Not used.
Not used.
Not used.
Authorization level of the user from whom the privileges were
received. This authorization level is not necessarily the highest
authorization level of the grantor.
DB2 10 for z/OS

YL&A DB2 10 for z/OS Reference Guide


Column Name

Data Type

BINDAUTH

CHAR(1)

EXECUTEAUTH

CHAR(1)

IBMREQD

CHAR(1)

GRANTEDTS
GRANTEETYPE

TIMESTAMP
CHAR(1)

GRANTORTYPE

CHAR(1)

Description
blank Not applicable
C
DBCTL
D
DBADM
E
SECADM
G
ACCESSCTRL
L
SYSCTRL
M
DBMAINT
S
SYSADM
Whether the GRANTEE can use the BIND, REBIND, or FREE
subcommands against the plan:
blank Privilege is not held
G
Privilege is held with the GRANT option
Y
Privilege is held without the GRANT option
Whether the GRANTEE can run application programs that use the
application plan:
blank Privilege is not held
G
Privilege is held with the GRANT option
Y
Privilege is held without the GRANT option
A value of Y indicates that the row came from the basic machinereadable material (MRM) tape.
Time when the GRANT statement was executed.
Indicates the type of grantee:
blank Authorization ID
L
Role
Indicates the type of grantor:
blank Authorization ID
L
Role

SYSIBM.SYSPLANDEP
Records the dependencies of plans on tables, views, aliases, synonyms, tablespaces, indexes,
functions, and stored procedures.
Column Name
BNAME
BCREATOR

Data Type
VARCHAR(128)
VARCHAR(128)

BTYPE

CHAR(1)

DNAME
DB2 10 for z/OS

VARCHAR(24)

Description
The name of an object the plan depends on.
If BNAME is a table space, its database. Otherwise, the schema of
BNAME. If BNAME is a role, the value is blank.
Type of object identified by BNAME:
A
Alias
E
INSTEAD OF trigger
F
User-defined function or cast function
I
Index
L
Role
M Materialized query table
O Stored procedure
P Partitioned table space if it is defined as LARGE or with the
DSSIZE parm
Q Sequence object
R Tablespace
S Synonym
T Table
V View
Name of the plan.
343

YL&A DB2 10 for z/OS Reference Guide


Column Name
IBMREQD

Data Type
CHAR(1)

Description
A value of Y indicates that the row came from the basic machinereadable material (MRM) tape.

SYSIBM.SYSPLSYSTEM
Contains zero or more rows for every plan. Each row for a given plan represents one or more
connections to an environment in which the plan could be used.
Column Name
NAME
SYSTEM

Data Type
VARCHAR(24)
VARCHAR(24)

ENABLE

CHAR(1)

CNAME

VARCHAR(60)

IBMREQD

CHAR(1)

Description
Name of the plan.
Environment. Values can be:
BATCH
TSO batch
DB2CALL
DB2 call attachment facility
CICS
Customer Information Control System
DLIBATCH DLI batch support facility
IMSBMP
IMS BMP region
IMSMPP
IMS MPP or IFP region
Indicates whether the connections represented by the row are enabled
or disabled:
N
Disabled
Y
Enabled
Identifies the connection or connections to which the row
applies. Interpretation depends on the environment specified by
SYSTEM. Values can be:
o Blank if SYSTEM=BATCH or SYSTEM=DB2CALL
o The name of a single connection if SYSTEM has any other value
CNAME can also be blank when SYSTEM is not equal to BATCH or
DB2CALL. When this is so, the row applies to all connections for the
indicated environment.
A value of Y indicates that the row came from the basic
machine-readable material (MRM) tape.

SYSIBM.SYSQUERY
Contains one row for each query in a set of queries.
Column Name
QUERYID
QUERY_HASH
SCHEMA

Data Type
BIGINT
CHAR(16)
VARCHAR(128)

QUERY_SEC_
HASH
QUERY_HASH_
VERSION
SOURCE

CHAR(16)

Description
Unique identifier for the query.
The hash key generated by statement text.
The default schema name for unqualified objects in the
query or blank.
The hash key generated by the modified statement text.

INTEGER

The version of the query hash.

SMALLINT

USERFILTER

CHAR(8)
CHAR(128)
CHAR(1)

The source of the query:


0 Instance-level plan hint
1 Plan stability static
2 Plan stability dynamic
Filter name that is used to group a set of queries or blank
Internal use only.
Whether plan hints are valid:
blank No plan hint exists for the statement, but optimization

PLAN_VALID
344

DB2 10 for z/OS

YL&A DB2 10 for z/OS Reference Guide


Column Name

Data Type

INVALID_REASON

INTEGER

COLLECTION
PACKAGE
VERSION
AUTHID

VARCHAR(128)
VARCHAR(128)
VARCHAR(128)
VARCHAR(128)
VARCHAR(128)

BINDTIME

TIMESTAMP

STMTNO

INTEGER
NOT NULL

SECTNO

INTEGER
NOT NULL

STMTTEXT

CLOB(2M)
INLINE
LENGTH 2048

QUERYNO

INTEGER
NOT NULL
WITH DEFAULT
'-1'
VARCHAR(255)
VARCHAR(255)

CLIENT_USERID
CLIENT_
WRKSTNNAME
CLIENT_
APPLNAME

VARCHAR(255)

Description
parameters exist in SYSQUERYOPTS
Y
A plan hint exists in SYSQUERYPLAN for the statement.
The plan hint is also valid if the statement has already
been executed and the hint was used.
N
A plan hint exists in SYSQUERYPLAN, but the hint is
invalid and not used..
When PLAN_VALID is N, this column contains the reason code. If
PLAN_VALID is Y or blank, this column contains -1.
Not used.
Name of the collection of the originating query or blank.
Name of the package of the originating query or blank.
Version of the package or blank.
Authorization ID this was in effect when the query was captured or
blank.
Timestamp when the package was bound or when BIND QUERY
was run
When SOURCE is 1, this column contains the statement
number in the package. When SOURCE is 0 or 2, this
column contains -1.
When SOURCE is 1, this column contains the section
number in the package. When SOURCE is 0 or 2, this
column contains -1.
The text of the SQL statement that the optimization hint
or parameter applies to. The value is populated from the
value of the QUERY_TEXT column of the
DSN_USERQUERY_TABLE table, with the following
items removed:

Blanks including leading and trailing blanks, and


embedded blanks that are not within literal strings
between pairs of quotation mark symbols

White space, including leading and trailing white


space, and white space that is not within a literal string
between a pair of quotation mark symbols

SQL comments

EXPLAIN clauses
The query number.

User ID of the client.


Name of the client workstation.
Name of the client application.

SYSIBM.SYSQUERY_AUX
An auxiliary table for the STMTTEXT column of the SYSIBM.SYSQUERY table.
Column Name
STMTTEXT

DB2 10 for z/OS

Data Type
CLOB(2M)

Description
The full text of the query..

345

YL&A DB2 10 for z/OS Reference Guide

SYSIBM.SYSQUERYOPTS
Contains optimization parameters for the queries that are in SYSIBM.SYSQUERY.
Column Name
QUERYID

Data Type
BIGINT

COPYID

SMALLINT

REOPT

CHAR(1)

STARJOIN

CHAR(1)

MAX_PAR_
DEGREE

INTEGER

DEF_CURR_
DEGREE

CHAR(3)

SJTABLES

INTEGER

GROUP_MEMBER

VARCHAR(128)
VARCHAR(24)

IBMREQD

CHAR(1)

Description
Unique identifier for the query. This column corresponds
to the QUERYID column in the SYSIBM.SYSQUERY table.
The version of the plan hints for the query in this row.
0
Current version of the plan hints.
1
Previous version of the plan hints used by PLAN STABILITY
2
Original version of the plan hints used by PLAN STABILITY
The value of the REPOT bind option that is in effect for the plan:
1
REOPT(ONCE)
A
REPOT(AUTO)
N
REOPT(NONE)
Y
REOPT(ALWAYS)
blank REOPT is not specified.
Whether star join is enabled:
Y
Star join is enabled
N
Star join is disabled
blank Star join is not specified
The maximum parallel degree. This column will contain a value
between 0 and 254. If the value of the column is -1, the maximum
parallel degree is not specified.
Whether query parallelism is enabled:
ONE
Query parallelism is disabled
ANY
Query parallelism is enabled
blank Query parallelism is disabled
The number of tables specified in a query to qualify for star join
processing. If this column contains -1, star join processing is not
specified.
Internal use only.
The group member name to which the parameters are to be
applied. This column contains blank if the group member name is
not specified.
A value of Y indicates that the row came from the basic machinereadable material (MRM) tape.

SYSIBM.SYSQUERYPLAN
Plan hint information for queries in SYSIBM.SYSQUERY table.
Column Name
QUERYID

Data Type
BIGINT

COPYID

SMALLINT

PLAN_VALID

CHAR(1)

IBMREQD

CHAR(1)

346

Description
Unique identifier for the query. This column corresponds
to the QUERYID column in the SYSIBM.SYSQUERY table.
The version of the plan hints for the query in this row.
0
Current version of the plan hints.
1
Previous version of the plan hints used by PLAN
STABILITY
2
Original version of the plan hints used by PLAN STABILITY
Whether the plan hints are valid:
N The plan hints are invalid
Y The plan hints are valid
A value of Y indicates that the row came from the basic machineDB2 10 for z/OS

YL&A DB2 10 for z/OS Reference Guide


Column Name

Data Type

QBLOCKNO

SMALLINT

PLANNO

SMALLINT

METHOD

SMALLINT

CREATOR

VARCHAR(128)

TNAME

VARCHAR(128)

ACCESSTYPE

SMALLINT
CHAR(2)

DB2 10 for z/OS

Description
readable material (MRM) tape.
A number that identifies each query block within a query. The
value of the numbers are not in any particular order, nor are they
necessarily consecutive.
The number of the step in which the query that is indicated in
QBLOCKNO was processed. This column indicates the order in
which the steps were executed.
A number (0, 1, 2, 3, or 4) that indicates the join method used for
the step:
0 = First table accessed, continuation of previous table
accessed, or not used.
1 = Nested loop join. For each row of the present composite
table, matching rows of a new table are found and joined.
2 = Merge scan join. The present composite table and the new
tables are scanned in the order of the join columns, and
matching rows are joined.
3 = Sorts needed by ORDER BY, GROUP BY, SELECT
DISTINCT, UNION, a quantified predicate, or an IN predicate.
This step does not access a new table.
4 = Hybrid join. The current composite table is scanned in the
order of the join-column rows of the new table. The new table is
accessed using list prefetch.
The creator of the new table accessed in this step; blank if
METHOD is 3.
The name of a table, materialized query table, created or
declared temporary table, materialized view, or materialized
table expression. The value is blank if METHOD is 3. The
column can also contain the name of a table in the form
DSNWFQB(qblockno). DSNWFQB(qblockno) is used to
represent the intermediate result of a UNION ALL, an
INTERSECT ALL, an EXCEPT ALL, or an outer join that is
materialized. If a view is merged, the name of the view does not
appear. DSN_DIM_TBLX(qblockno) is used to represent the
work file of a star join dimension table.
IBM use only.
The method of accessing the new table:
DI = By an intersection of multiple DOCID lists to return the final
DOCID list.
DU = By a union of multiple DOCID lists to return the final
DOCID list.
DX = By an XML index scan of the index named in
ACCESSNAME to return a DOCID list.
E = By direct row using a row change timestamp column.
H = By hash access. IF an overflow condition occurs, the hash
overflow index that is identified by ACCESSCREATOR and
ACCESNAME is used.
HN = By hash access using an IN predicate, or an IN predicate
that DB2 generates. If a hash overflow condition occurs, the
hash overflow index that is identified in ACCESSCREATOR and
ACCESSNAME is used.
IN = By an index scan when the matching predicate contains an
IN predicate and the IN-list is accessed through an in-memory
table.
347

YL&A DB2 10 for z/OS Reference Guide


Column Name

Data Type

MATCHCOLS

SMALLINT

ACCESSCREATOR

VARCHAR(128)

ACCESSNAME

VARCHAR(128)

INDEXONLY

CHAR(1)

SORTN_UNIQ
SORTN_JOIN
SORTN_ORDERBY
SORTN_GROUPBY
SORTC_UNIQ

CHAR(1)
CHAR(1)
CHAR(1)
CHAR(1)
CHAR(1)

SORTC_JOIN

CHAR(1)

SORTC_ORDERBY

CHAR(1)

SORTC_GROUPBY

CHAR(1)

TSLOCKMODE

CHAR(3)

348

Description
I = By an index (identified in ACCESSCREATOR and
ACCESSNAME).
I1 = By a one-fetch index scan.
M = By a multiple index scan (followed by MX, MI, MH, or MU).
MH = By the hash overflow index named in ACCESSNAME.MX
= By an index scan on the index named in ACCESSNAME.
When the access method MX follows the access method DX, DI,
or DU, the table is accessed by the DOCID index using the
DOCID list returned by DX, DI, or DU.
MI = By an intersection of multiple indexes.
MU = By a union of multiple indexes.
N = By an index scan when the matching predicate contains the
IN keyword or by an index scan when DB2 rewrites a query
using the IN keyword.
NR = Range list access.
O = By a work file scan, as a result of a subquery.
P = By a dynamic pair-wise index scan.
R = By a table space scan.
RW = By a work file scan of the result of a materialized userdefined table function.
V = By buffers for an INSERT statement within a SELECT.
Blank = Not applicable to the current row.
For ACCESSTYPE I, I1, N, NR, MX, or DX, the number of index
keys used in an index scan; otherwise, 0.
For ACCESSTYPE I, I1, N, NR, MX, or DX, the creator of the
index; otherwise, blank.
For ACCESSTYPE I, I1, H, MH, N, NR, MX, or DX, the name of
the index; for ACCESSTYPE P, DSNPJW(mixopseqno) is the
starting pair-wise join leg in MIXOPSEQNO; otherwise, blank.
Whether access to an index alone is enough to carry out the
step, or whether data, too, must be accessed. Y = Yes; N = No.
If new table is sorted to remove duplicate rows. Y = Yes; N = No.
If new table is sorted for join method 2 or 4. Y = Yes; N = No.
If new table is sorted for ORDER BY. Y = Yes; N = No.
If new table is sorted for GROUP BY. Y = Yes; N = No.
If composite table is sorted to remove duplicate rows. Y = Yes; N
= No.
If composite table is sorted for join method 1, 2, or 4. Y=Yes;
N=No.
If composite table is sorted for an ORDER BY clause or a
quantified predicate. Y = Yes; N = No.
If composite table is sorted for a GROUP BY clause. Y=Yes;
N=No.
An indication of the mode of lock to be acquired on the new table
or its table space or table space partitions. If the isolation can be
determined at bind time, the values are:
IS = Intent share lock
IX = Intent exclusive lock
S = Share lock
U = Update lock
X = Exclusive lock
SIX = Share with intent exclusive lock
DB2 10 for z/OS

YL&A DB2 10 for z/OS Reference Guide


Column Name

Data Type

PREFETCH

CHAR(1)

COLUMN_FN_
EVAL

CHAR(1)

MIXOPSEQ

SMALLINT

ACCESS_DEGREE

SMALLINT

ACCESS_PGROUP
_ID

SMALLINT

JOIN_DEGREE

SMALLINT

DB2 10 for z/OS

Description
N = UR isolation; no lock
If the isolation cannot be determined at bind time, the lock mode
determined by the isolation at runtime is shown by the following
values.
NS = For UR isolation, no lock; for CS, RS, or RR, an S lock.
NIS = For UR isolation, no lock; for CS, RS, or RR, an IS lock.
NSS = For UR isolation, no lock; for CS or RS, an IS lock; for
RR, an S lock.
SS = For UR, CS, or RS isolation, an IS lock; for RR, an S lock.
The data in this column is right-justified. For example, IX appears
as a blank followed by I followed by X. If the column contains a
blank, no lock is acquired.
If the access method in the ACCESSTYPE column is DX, DI, or
DU, no latches are acquired on the XML index page, and no lock
is acquired on the new base table data page or row, nor on the
XML table and the corresponding table spaces. The value of
TSLOCKMODE is blank in this case.
Whether data pages are to be read in advance by prefetch:
D = Optimizer expects dynamic prefetch
S = Pure sequential prefetch
L = Prefetch through a page list
U = List prefetch with an unsorted RID list
Blank = Unknown at bind time or no prefetch
When a SQL aggregate function is evaluated:
R = While the data is being read from the table or index
S = While performing a sort to satisfy a GROUP BY clause
Blank = After data retrieval after any sorts
The sequence number of a step in a multiple index operation:
1, 2, . . . n = For the steps of the multiple index procedure
(ACCESSTYPE is MX, MI, MU, DX, DI, or DU), the sequence
number of the OR predicate in the SQL statement
(ACCESSTYPE is NR)
0 = For any other rows
The number of parallel tasks or operations activated by a query.
This value is determined at bind time; the actual number of
parallel operations used at execution time could differ. The
column contains 0 if there is a host variable. This column
contains the null value if the plan or package was bound using a
plan table with fewer than 43 columns. Otherwise, it can contain
null if the method that it refers to does not apply.
The identifier of the parallel group for accessing the new table. A
parallel group is a set of consecutive operations, executed in
parallel, that have the same number of parallel tasks. This value
is determined at bind time; it could change at execution time.
This column contains the null value if the plan or package was
bound using a plan table with fewer than 43 columns. Otherwise,
it can contain null if the method that it refers to does not apply.
The number of parallel operations or tasks used in joining the
composite table with the new table. This value is determined at
bind time and can be 0 if there is a host variable. The actual
number of parallel operations or tasks used at execution time
could be different. This column contains the null value if the plan
or package was bound using a plan table with fewer than 43
349

YL&A DB2 10 for z/OS Reference Guide


Column Name

Data Type

JOIN_PGROUP_ID

SMALLINT

SORTC_PGROUP_
ID

SMALLINT

SORTN_PGROUP_
ID

SMALLINT

PARALLELISM_
MODE

CHAR(1)

MERGE_JOIN_
COLS

SMALLINT

CORRELATION_
NAME

VARCHAR(128)

PAGE_RANGE

CHAR(1)

JOIN_TYPE

CHAR(1)

QBLOCK_TYPE

CHAR(6)

350

Description
columns. Otherwise, it can contain null if the method that it refers
to does not apply.
The identifier of the parallel group for joining the composite table
with the new table. This value is determined at bind time; it could
change at execution time. This column contains the null value if
the plan or package was bound using a plan table with fewer
than 43 columns. Otherwise, it can contain null if the method that
it refers to does not apply.
The parallel group identifier for the parallel sort of the composite
table. This column contains the null value if the plan or package
was bound using a plan table with fewer than 43 columns.
Otherwise, it can contain null if the method that it refers to does
not apply.
The parallel group identifier for the parallel sort of the new table.
This column contains the null value if the plan or package was
bound using a plan table with fewer than 43 columns. Otherwise,
it can contain null if the method that it refers to does not apply.
The kind of parallelism, if any, that is used at bind time:
I = Query I/O parallelism
C = Query CP parallelism
X = Sysplex query parallelism
This column contains the null value if the plan or package was
bound using a plan table with fewer than 43 columns. Otherwise,
it can contain null if the method that it refers to does not apply, or
if the plan or package was bound prior to version 10.
The number of columns that are joined during a merge scan join
(Method = 2). This column contains the null value if the plan or
package was bound using a plan table with fewer than 43
columns. Otherwise, it can contain null if the method that it refers
to does not apply.
The correlation name of a table or view that is specified in the
statement. If there is no correlation name, the column is blank.
This column contains the null value if the plan or package was
bound using a plan table with fewer than 43 columns. Otherwise,
it can contain null if the method that it refers to does not apply.
Whether the table qualifies for page range screening, so that
plans scan only the partitions that are needed. Y = Yes; blank =
No.
The type of an outer join:
F = Full outer join
L = Left outer join
P = Pair-wise join
S = Star join
Blank = Inner join or no join
RIGHT OUTER JOIN converts to a LEFT OUTER JOIN when
you use it, so that JOIN_TYPE contains L.
For each query block, the type of SQL operation performed. For
the outermost query, the column identifies the statement type.
Possible values:
SELECT = SELECT
INSERT = INSERT
UPDATE = UPDATE
MERGE = MERGE
DB2 10 for z/OS

YL&A DB2 10 for z/OS Reference Guide


Column Name

Data Type

PRIMARY_
ACCESSTYPE

CHAR(1)

PARENT_QBLOCK

SMALLINT

TABLE_TYPE

CHAR(1)

TABLE_ENCODE

CHAR(1)

DB2 10 for z/OS

Description
DELETE = DELETE
SELUPD = SELECT with FOR UPDATE OF
DELCUR = DELETE WHERE CURRENT OF CURSOR
UPDCUR = UPDATE WHERE CURRENT OF CURSOR
CORSUB = Correlated subquery
TRUNCA = TRUNCATE
NCOSUB = Noncorrelated subquery
TABLEX = Table expression
TRIGGR = WHEN clause on CREATE TRIGGER
UNION = UNION
UNIONA = UNION ALL
INTERS = INTERSECT
INTERA = INTERSECT ALL
EXCEPT = EXCEPT
EXCEPTA = EXCEPT ALL
Indicates whether direct row access will be attempted first:
D = DB2 will try to use direct row access. If it cannot use direct
row access at runtime, it uses the access path described in the
ACCESSTYPE column of PLAN_TABLE.
T = The base table or result file is materialized into a work file,
and the work file is accessed via sparse index access. If a base
table is involved, ACCESSTYPE indicates how the base table is
accessed.
Blank = DB2 will not try to use direct row access. The value of
the ACCESSTYPE column provides information on the method
of accessing the table.
Number that indicates the QBLOCKNO of the parent query
block.
The type of new table:
B = Buffers for SELECT from INSERT, SELECT from UPDATE,
SELECT from MERGE, or SELECT from DELETE statement.
C = Common table expression
F = Table function
I = The new table is generated from an IN-LIST predicate. If the
IN-LIST predicate is selected as the matching predicate, it will be
accessed as an in-memory table.
M = Materialized query table
Q = Temporary intermediate result table (not materialized). For
the name of the view or nested table expression, a value of Q
indicates that the materialization was virtual and not actual.
Materialization can be virtual when the view or nested table
expression definition contains a UNION ALL that is not
distributed.
R = Recursive common table expression
S = Subquery (correlated or non-correlated)
T = Table
W = Work file
The value of the column is null if the query uses GROUP BY,
ORDER BY, or DISTINCT, which requires an implicit sort.
The encoding scheme of the table. If the table has a single
CCSID set, possible values are:
A = ASCII
E = EBCDIC
351

YL&A DB2 10 for z/OS Reference Guide


Column Name

Data Type

TABLE_SCCSID

SMALLINT

TABLE_MCCSID

SMALLINT

TABLE_DCCSID

SMALLINT

CTREF

SMALLINT

PARENT_PLANNO

SMALLINT

Description
U = Unicode
M = The table contains multiple CCSID sets.
The SBCS CCSID value of the table. If column
TABLE_ENCODE is M, the value is 0.
The mixed CCSID value of the table. If column
TABLE_ENCODE is M, the value is 0. IF MIXED=NO in the
application defaults module, the value is -2.
The DBCS CCSID value of the table. If column
TABLE_ENCODE is M, the value is 0. IF MIXED=NO in the
application defaults module, the value is -2.
IBM use only.
If the referenced table is a common table expression, the value
is the top-level query block number.
Corresponds to the plan number in the parent query block where
a correlated subquery is involved. Or, for non-correlated
subqueries, corresponds to the plan number in the parent query
block that represents the work file for the subquery.

SYSIBM.SYSRELS
Contains one row for every referential constraint.
Column Name
CREATOR

Data Type
VARCHAR(128)

TBNAME
RELNAME
REFTBNAME
REFTBCREATOR
COLCOUNT
DELETERULE

VARCHAR(128)
VARCHAR(128)
VARCHAR(128)
VARCHAR(128)
SMALLINT
CHAR(1)

IBMREQD

CHAR(1)

RELOBID1

SMALLINT

RELOBID2

SMALLINT

TIMESTAMP

TIMESTAMP

IXOWNER

VARCHAR(128)

IXNAME

VARCHAR(128)

ENFORCED

CHAR(1)

352

Description
Schema of the owner of the dependent table of the
referential constraint.
Name of the dependent table of the referential constraint.
Constraint name.
Name of the parent table of the referential constraint.
Schema of the owner of the parent table.
Number of columns in the foreign key.
Type of delete rule for the referential constraint:
A
NO ACTION
C
CASCADE
N
SET NULL
R
RESTRICT
A value of Y indicates that the row came from the basic machinereadable material (MRM) tape
Internal identifier of the constraint with respect to the database
that contains the parent table.
Internal identifier of the constraint with respect to the
database that contains the dependent table.
Date and time the constraint was defined. If the constraint is
between catalog tables prior to DB2 Version 2 Release 3, the
value is '1985-04-01-00.00.00.000000.'.
Schema of unique non-primary index used for the parent key.
'99999999' if the enforcing index has been dropped. Blank if the
enforcing index is a primary index.
Name of unique non-primary index used for a parent key.
'99999999' if the enforcing index has been dropped. Blank if
the enforcing index is a primary index.
Enforced by the system or not:
Y Enforced by the system
N Not enforced by the system(trusted)
DB2 10 for z/OS

YL&A DB2 10 for z/OS Reference Guide


Column Name
CHECKEXISTING
DATA

Data Type
CHAR(1)

RELCREATED

CHAR(1)

Description
Option for checking existing data
I Immediately check existing data. If ENFORCED = Y this
column will have a value or I
N Never check existing data. If ENFORCED = N, this column will
have a value of N
The release of DB2 that is used to create the object.

SYSIBM.SYSRESAUTH
Records CREATE IN and PACKADM ON privileges for collections; USAGE privileges for
distinct types; and USE privileges for buffer pools, storage groups, and tablespaces.
Column Name
GRANTOR
GRANTEE

Data Type
VARCHAR(128)
VARCHAR(128)

QUALIFIER

VARCHAR(128)

NAME

VARCHAR(128)

AUTHHOWGOT

CHAR(1)

OBTYPE

CHAR(1)

DB2 10 for z/OS

Description
Authorization ID of the user who granted the privilege.
Authorization ID of the user who holds the privilege. Could also
be PUBLIC for a grant to PUBLIC.
Qualifier of the table space (the database name) if the privilege is
for a table space (OBTYPE='R'). The schema name of the distinct
type if the privilege is for a distinct type (OBTYPE='D'). The
schema name of the JAR file if the privilege is for a JAR file
(OBTYPE='J'). The value is PACKADM if the privilege is for a
collection (OBTYPE='C') and the authority held is PACKADM.
Otherwise, the value is blank.
Name of the buffer pool, collection, DB2 storage group,
distinct type, or tablespace. Could also be ALL when USE OF
ALL BUFFERPOOLS is granted.

CHAR(12)

Authorization level of the user from whom the privileges were


received. This authorization level is not necessarily the
highest authorization level of the grantor.
blank
Not applicable
A
PACKADM (on collection *)
C
DBCTL
D
DBADM
E
SECADM
G
ACCESSCTRL
L
SYSCTRL
M
DBMAINT
S
SYSADM
P
PACKADM (on a specific collection)
T
DATAACCESS
Type of object:
B
Buffer pool
C
Collection
D
Distinct type
R
Tablespace
S
Storage group
J
JAR (Java Archive file)
Internal use only

CHAR(6)

Not used

CHAR(8)

Not used
353

YL&A DB2 10 for z/OS Reference Guide


Column Name
USEAUTH

Data Type
CHAR(1)

IBMREQD

CHAR(1)

GRANTEDTS
GRANTEETYPE

TIMESTAMP
CHAR(1)

GRANTORTYPE

CHAR(1)

Description
Whether the privilege is held with the GRANT option:
G
Privilege is held with the GRANT option
Y
Privilege is held without the GRANT option
The authority held is PACKADM when the OBTYPE is C (a
collection) and QUALIFIER is PACKADM. The authority held is
CREATE IN when the OBTYPE is C and QUALIFIER is blank.
A value of Y indicates that the row came from the basic machinereadable material (MRM) tape.
Time when the GRANT statement was executed.
Indicates the type of grantee:
blank Authorization ID
L
Role
Indicates the type of grantor:
blank Authorization ID
L
Role

SYSIBM.SYSROLES
Contains one row for each role.
Column Name
NAME
DEFINER

Data Type
VARCHAR(128)
VARCHAR(128)

DEFINERTYPE

CHAR(1)

CREATEDTS
RELCREATED
REMARKS

TIMESTAMP
CHAR(1)
VARCHAR(762)

IBMREQD

CHAR(1)

Description
The name of the role.
The authorization ID or role that defined this role listed in the
NAME column.
The type of definer:
L
Role
blank Authorization ID
The time when the role is created.
The release of DB2 that is used to create the role.
A character string that is provided using the COMMENT
statement.
A value of Y indicates that the row came from the basic machinereadable material (MRM) tape.

SYSIBM.SYSROUTINEAUTH
Privileges held by users on routines. (UDF, cast function, or stored procedure.)
Column Name
GRANTOR
GRANTEE

Data Type
VARCHAR(128)
VARCHAR(128)

SCHEMA
SPECIFICNAME

VARCHAR(128)
VARCHAR(128)

GRANTEDTS
ROUTINETYPE

TIMESTAMP
CHAR(1)

GRANTEETYPE

CHAR(1)

354

Description
Authorization ID of the user who granted the privilege.
Authorization ID of the user who holds the privilege or the name
of a plan or package that uses the privilege. Can also be PUBLIC
for a grant to PUBLIC.
Schema of the routine.
Specific name of the routine. An asterisk (*) if the privilege is
held on all routines in the schema.
Time when the GRANT statement was executed.
Type of routine:
F
User-defined function or cast function
P
Stored procedure
Type of grantee:
blank An authorization ID
DB2 10 for z/OS

YL&A DB2 10 for z/OS Reference Guide


Column Name

Data Type

AUTHHOWGOT

CHAR(1)

EXECUTEAUTH

CHAR(1)

COLLID

VARCHAR(128)

CONTOKEN

CHAR(8)

IBMREQD

CHAR(1)

GRANTORTYPE

CHAR(1)

Description
L
Role
P
An application plan or package. The grantee is
a package if COLLID is not blank.
R
Internal use only
Authorization level of the user from whom the privileges were
received. This authorization level is not necessarily the
highest authorization level of the grantor. This field is also used to
indicate that the privilege was held on all schemas by the
grantor.
blank Not applicable
1
Grantor had privilege on schema.* at time of grant
E
SECADM
G
ACCESSCTRL
L
SYSCTRL
S
SYSADM
T
DATAACCESS
Whether GRANTEE can execute the routine:
Y Privilege is held without GRANT option.
G Privilege is held with GRANT option.
If the GRANTEE is a package, its collection name. Otherwise, the
value is blank.
If the GRANTEE is a package, the consistency token of the
DBRM from which the package was derived. Otherwise, the value
is blank.
Whether the row came from the basic machine-readable material
(MRM) tape.
Indicates the type of grantor:
blank Authorization ID
L
Role

SYSIBM.SYSROUTINES
Contains a row for every routine. (User-defined function, cast function, or stored procedure.)
Column Name
SCHEMA
OWNER
NAME
ROUTINETYPE

Data Type
VARCHAR(128)
VARCHAR(128)
VARCHAR(128)
CHAR(1)

CREATEDBY

VARCHAR(128)

SPECIFICNAME
ROUTINEID
RETURN_TYPE

VARCHAR(128)
INTEGER
INTEGER

DB2 10 for z/OS

Description
Schema of the routine.
Owner of the routine.
Name of the routine.
Type of routine:
F
User-defined function or cast function
P
Stored procedure
Primary authorization ID under which the routine was
created.
Specific name of the routine.
Internal identifier of the routine.
Internal identifier of the result data type of the function.
The column contains a -2 if the function is a table
function.

355

YL&A DB2 10 for z/OS Reference Guide


Column Name
ORIGIN

Data Type
CHAR(1)

FUNCTION_TYPE

CHAR(1)

PARM_COUNT
LANGUAGE

SMALLINT
VARCHAR(24)

COLLID

VARCHAR(128)

SOURCESCHEMA

VARCHAR(128)

SOURCESPECIFIC

VARCHAR(128)

DETERMINISTIC

CHAR(1)

EXTERNAL_ACTION

CHAR(1)

356

Description
Origin of the routine:
E External user-defined function or stored procedure
N Native SQL Procedure
Q SQL Function
U Sourced on user-defined function or built-in function
S System-generated function
Type of function:
C
Column function
S
Scalar function
T
Table function
blank For a stored procedure (ROUTINETYPE =
'P')
Number of parameters for the routine.
Implementation language of the routine:
ASSEMBLE
C
COBOL
COMPJAVA
JAVA
PLI
REXX
SQL
The value is blank if ROUTINETYPE = 'F' and ORIGIN
is not 'E' or not 'Q'.
Name of the package collection to be used when the
routine is executed. A blank value indicates the
package collection is the same as the package
collection of the program that invoked the routine.
If ORIGIN is 'U' and ROUTINETYPE is 'F', the schema
of the source user-defined function ('SYSIBM' for a
source built-in function). Otherwise, the value is blank.
If ORIGIN is 'U' and ROUTINETYPE is 'F', the specific
name of the source user-defined function or source
built-in function name. Otherwise, the value is blank.
The deterministic option of an external function or a
stored procedure:
N
Indeterminate (results may differ with a given
set of input values).
Y
Deterministic (results are consistent).
blank ROUTINETYPE='F' and ORIGIN is not 'E'
(the routine is a function, but not an external
function).
The external action option of an external function:
N
Function has no side effects.
E
Function has external side effects so that
the number of invocations is important.
blank ORIGIN is not 'E' for the function
(ROUTINETYPE='F'), or it is a stored
procedure (ROUTINETYPE='P').

DB2 10 for z/OS

YL&A DB2 10 for z/OS Reference Guide


Column Name
NULL_CALL

Data Type
CHAR(1)

CAST_FUNCTION

CHAR(1)

SCRATCHPAD

CHAR(1)

SCRATCHPAD_LENGTH

INTEGER

FINAL_CALL

CHAR(1)

PARALLEL

CHAR(1)

DB2 10 for z/OS

Description
The CALLED ON INPUT option of an external
function or stored procedure:
N
The routine is not called if any parameter
has a NULL value.
Y
The routine is called if any parameter has a
NULL value.
blank
ROUTINETYPE='F' and ORIGIN is not 'E'
(the routine is a function, but not an external
function).
Whether the routine is a cast function:
N The routine is not a cast function.
Y The routine is a cast function.
A cast function is generated by DB2 for a CREATE
DISTINCT TYPE statement.
The SCRATCHPAD option of an external function:
N
This function does not have a SCRATCHPAD.
Y
This function has a SCRATCHPAD.
blank ORIGIN is not 'E' for the function
(ROUTINETYPE='F'), or it is a stored
procedure (ROUTINETYPE='P').
Length of the scratchpad if the ORIGIN is 'E' for the
function (ROUTINETYPE='F') and NO
SCRATCHPAD is not specified. Otherwise, the value
is 0.
The FINAL CALL option of an external function:
N
A final call will not be made to the function.
Y
A final call will be made to the function.
blank ORIGIN is not 'E' for the function
(ROUTINETYPE='F'), or it is a stored
procedure (ROUTINETYPE='P').
The PARALLEL option of an external function:
A
This function can be invoked by parallel tasks.
D
This function cannot be invoked by parallel
tasks.
blank ORIGIN is not 'E' for the function
(ROUTINETYPE='F'), or it is a stored
procedure (ROUTINETYPE='P').

357

YL&A DB2 10 for z/OS Reference Guide


Column Name
PARAMETER_STYLE

Data Type
CHAR(1)

FENCED

CHAR(1)

SQL_DATA_ACCESS

CHAR(1)

DBINFO

CHAR(1)

STAYRESIDENT

CHAR(1)

358

Description
The PARAMETER STYLE option of an external
function or stored procedure:
D
DB2SQL. All parameters are passed to the
external function or stored procedure
according to the DB2SQL standard convention.
G
GENERAL. All parameters are passed to the
stored procedure according to the GENERAL
standard convention.
N
GENERAL CALL WITH NULLS. All parameters
are passed to the stored procedure according
to the GENERAL CALL WITH NULLS
convention.
J
JAVA. All parameters are passed to the
function or procedure according to the
conventions for JAVA and SQLJ specifications.
blank The column is blank if the ORIGIN is not 'E' or if
LANGUAGE is SQL.
Y
Indicates that this routine runs separately
from the DB2 address space in a WLM
managed DB2 address space. All user
defined routines that are not marked with Y in
this column run in the DB2 address space.
blank
ORIGIN is 'Q' or ORIGIN is N.
The SQL statements that are allowed in an external
function or stored procedure:
C
CONTAINS SQL: Only SQL that does not read
or modify data is allowed.
M
MODIFIES SQL DATA: All SQL is allowed,
including SQL that reads or modifies data.
N
NO SQL: SQL is not allowed.
R
READS SQL DATA: Only SQL that reads data
is allowed.
blank Not applicable.
The DBINFO option of an external function or stored
procedure:
N
No, the DBINFO parameter will not be passed
to the external function or stored procedure.
Y
Yes, the DBINFO parameter will be passed to
the external function or stored procedure.
blank ORIGIN is not 'E'.
The STAYRESIDENT option of the routine, which
determines whether the routine is to be deleted from
memory when the routine ends.
N
The load module is to be deleted from memory
after the routine terminates.
Y
The load module is to remain resident in memory
after the routine terminates.
blank ORIGIN is not 'E'.

DB2 10 for z/OS

YL&A DB2 10 for z/OS Reference Guide


Column Name
ASUTIME

Data Type
INTEGER

WLM_ENVIRONMENT

VARCHAR(54)

Description
Number of CPU service units permitted for any single
invocation of this routine. If ASUTIME is zero, the
number of CPU service units is unlimited. The value is
0 if ROUTINETYPE = 'F' and ORIGIN is not 'E'. If a
routine consumes more CPU service units than the
ASUTIME value allows, DB2 cancels the routine.
Name of the WLM environment to be used to run this
routine.
When ORIGIN = 'N', this is the name of the WLM
ENVIRONMENT FOR DEBUG MODE that is to be
used when debugging a native SQL procedure.

WLM_ENV_FOR_NESTED

CHAR(1)

PROGRAM_TYPE

CHAR(1)

EXTERNAL_SECURITY

CHAR(1)

DB2 10 for z/OS

The column is blank if ROUTINETYPE = 'F' and


ORIGIN is not 'E'. If the ROUTINETYPE = 'P', the
value might be blank. If this value is blank the stored
procedure cannot be run.
For nested routine calls, indicates whether the address
space of the calling store procedure or user-defined
function is used to run the nested stored procedure or
user-defined function:
N
The nested stored procedure or user-defined
function runs in an address space other than
the specified WLM environment if the
calling stored procedure or
user-defined function is not running in the
specified WLM environment. 'WLM
ENVIRONMENT name' was specified.
Y
The nested stored procedure or
user-defined function runs in the environment
used by the calling stored procedure or
user-defined function. 'WLM
ENVIRONMENT(name,*)' was specified.
blank WLM_ENVIRONMENT is blank.
Indicates whether the routine runs as a Language
Environment main routine or a subroutine:
M
The routine runs as a main routine.
S
The routine runs as a subroutine.
blank ORIGIN is not 'E'.
Specifies the authorization ID to be used if the routine
accesses resources protected by an external security
product:
D
DB2 - The authorization ID associated with the
WLM-established stored procedure address
space.
U
SESSSION_USER - The authorization ID of
the SQL user that invoked the routine.
C
DEFINER - The authorization ID of the owner
of the routine.
blank ORIGIN is not 'E'.

359

YL&A DB2 10 for z/OS Reference Guide


Column Name
COMMIT_ON_RETURN

Data Type
CHAR(1)

RESULT_SETS

SMALLINT

LOBCOLUMNS

SMALLINT

CREATEDTS

TIMESTAMP

ALTEREDTS

TIMESTAMP

IBMREQD

CHAR(1)

PARM1 - 30
IOS_PER_INVOC

SMALLINT
FLOAT

INSTS_PER_INVOC

FLOAT

INITIAL_IOS

FLOAT

INITIAL_INSTS

FLOAT

CARDINALITY

FLOAT

RESULT_COLS

SMALLINT

EXTERNAL_NAME

VARCHAR(762)

PARM_SIGNATURE
RUNOPTS

VARCHAR(150)
VARCHAR(762)

REMARKS

VARCHAR(762)

360

Description
If ROUTINETYPE = 'P', whether the transaction is
always to be committed immediately on successful
return (non-negative SQLCODE) from this stored
procedure:
N
The unit of work is to continue.
Y
The unit of work is to be committed
immediately.
If ROUTINETYPE = 'F', the value is blank.
If ROUTINETYPE = 'P', the maximum number of ad
hoc result sets that this stored procedure can return. If
no ad hoc result exists or ROUTINETYPE = 'F', the
value is zero.
If ORIGIN = 'E', the number of LOB columns found in
the parameter list for this user-defined function.
If no LOB columns are found in the parameter list or
ORIGIN is not 'E', the value is 0.
Time when the CREATE statement was executed for
this routine.
Time when the last ALTER statement was executed
for this routine.
A value of Y indicates that the row came from the
basic machine-readable material (MRM) tape.
Internal use only.
Estimated number of I/Os required to execute the
routine. The value is -1 if the estimated number is not
known.
Estimated number of machine instructions required to
execute the routine. The value is -1 if the estimated
number is not known.
Estimated number of I/Os that are performed the first
time or the last time the routine is invoked. The value
is -1 if the estimated number is not known.
Estimated number of machine instructions that are
performed the first time or the last time the routine is
invoked. The value is -1 if the estimated number is
not known.
The predicted cardinality of the routine, -1 to trigger
the use of the default value (10,000).
For a table function, the number of columns in the
result table. Otherwise, the value is 1.
The path/module/function that DB2 should load to
execute the routine. The column is blank if
ROUTINETYPE = 'F' and ORIGIN is not 'E'.
Internal use only.
The Language Environment run-time options to be
used for this routine. An empty string indicates that the
installation default Language Environment run-time
options are to be used. The column is blank if
ROUTINETYPE = 'F' and ORIGIN is not 'E'.
A character string provided by the user with the
COMMENT ON statement.

DB2 10 for z/OS

YL&A DB2 10 for z/OS Reference Guide


Column Name
JAVA_SIGNATURE

Data Type
VARCHAR(3072)

CLASS

VARCHAR(384)

JARSCHEMA

VARCHAR(128)

JAR_ID

VARCHAR(128)

SPECIAL_REGS

CHAR(1)

NUM_DEP_MQTS

SMALLINT

MAX_FAILURES

SMALLINT

DB2 10 for z/OS

Description
The signature of the jar file:
Blank
When PARAMETER STYLE is not JAVA.
The column is also blank if ROUTINETYPE = 'F' and
ORIGIN is not 'E'.
The class name contained in the jar file:
Blank
When PARAMETER STYLE is not JAVA
The column is also blank if ROUTINETYPE = 'F' and
ORIGIN is not 'E'.
The schema of the jar file:
Blank
When PARAMETER STYLE is not JAVA
The column is also blank if ROUTINETYPE = 'F' and
ORIGIN is not 'E'.
The name of the jar file:
Blank
When PARAMETER STYLE is not JAVA
The column is also blank if ROUTINETYPE = 'F' and
ORIGIN is not 'E'.
The SPECIAL REGISTER option for a routine:
I
INHERIT SPECIAL REGISTER
D
DEFAULT SPECIAL REGISTER
blank ROUTINETYPE = 'F' and ORIGIN is not 'E' or
not 'Q'.
Number of dependent MQTs. The value is 0 if the row
does not describe a user defined table function or if no
MQTs are defined on the table function.
Allowable failures for this routine (0-32767). If zero is
specified, the routine will never be stopped. If no value
is specified for this routine, the default will be -1 to
indicate that the DB2 installation parameter
(STORMXAB) will be used..

361

YL&A DB2 10 for z/OS Reference Guide


Column Name
PARAMETER_CCSID

Data Type
INTEGER

VERSION

VARCHAR(122)

CONTOKEN

CHAR(8)

ACTIVE

CHAR(1)

362

Description
A CCSID that specifies how character, graphic, date,
time, and timestamp data types for system generated
parameters to the routine such as message tokens
and DBINFO should be passed. The value is
dependent on the encoding scheme specified implicitly
or explicitly for the PARAMETER CCSID clause
defined at the system for that encoding scheme. The
following list describes the CCSID for each encoding
scheme:
ASCII If mixed data is allowed, this CCSID is for mixed
ASCII data, SBCS data uses the corresponding
SBCS CCSID, and graphic data uses the
corresponding DBCS CCSID. Otherwise, this
CCSID is for SBCS ASCII data.
EBCDIC
If mixed data is allowed, this CCSID is for
mixed EBCDIC data, SBCS data uses the
corresponding SBCS CCSID, and graphic data
uses the corresponding DBCS CCSID.
Otherwise, this is the CCSID for SBCS EBCDIC
data.
UNICODE
This CCSID is for mixed data (1208).
A value of zero means that the CCSIDs used are
those CCSIDs for the encoding scheme of other string
or datetime parameters in the parameter list or
RETURNS clause CCSID clauses, or the value in the
DEF ENCODING SCHEME on installation panel
DSNTIPF.
The version identifier for a native SQL procedure
(indicated by the value 'N' in the column ORIGIN) or a
non-inline SQL scalar function (indicated by the value
'Q' in the column ORIGIN and 'N' in the column
INLINE). A zero length string for the rows that are
created prior to Version 9 and for the rows that
correspond to neither native SQL procedures or noninline SQL scalar functions.
The consistency token for the routine. The column is
set to X'20' if the value of ORIGIN is not N
Identifies the active version of the routine:
Y
The routine is the active version.
N
The routine is not the active version.
blank The value of ORIGIN is not N or the row was
created prior to Version 9.

DB2 10 for z/OS

YL&A DB2 10 for z/OS Reference Guide


Column Name
DEBUG_MODE

Data Type
CHAR(1)

TEXT_ENVID

INTEGER

TEXT_ROWID
TEXT

ROWID
CLOB(2M)

OWNERTYPE

CHAR(1)

PARAMETER_
VARCHARFORM

INTEGER

RELCREATED

CHAR(1)

PACKAGEPATH

VARCHAR(4096)

SECURE

CHAR(1)

INLINE

CHAR(1)

SYSTEM_DEFINED

BLOB(1G)
CHAR(1)

Description
Identifies whether or not this routine is enabled for
debugging:
1 This routine is enabled for debugging and can be
debugged in a client debug session using the DB2
Unified Debugger.
0 This routine is not enabled for debugging.
N This routine can never be enabled for debugging.
blank The LANGUAGE is not specified as JAVA,
the value of ORIGIN is not N, or the row was
created prior to Version 9.
Internal identifier of the environment. The column is 0
if the value of ORIGIN is not N or if the row was
created prior to Version 9.
ID to support LOB columns for source text.
The source text of the CREATE statement or the
ALTER statement with the body for the routine. The
column is a zero-length string if the value of ORIGIN is
not N or if the row was created prior to Version 9.
Indicates the type of owner:
blank
Authorization ID
L
Role
A non-zero value that indicates the actual
representation, to a LANGUAGE C routine, of any
varying length string parameter that appears in the
parameter list or RETURNS clause for that routine.
The release of DB2 that is used to create the object.
Blank if created prior to Version 9.
The value of the PACKAGE PATH option of the
CREATE FUNCTION, CREATE PROCEDURE,
ALTER FUNCTION, or ALTER PROCEDURE
statement that created or last changed the routine.
PACKAGE PATH identifies the package path to use
when the routine is executed. A blank value indicates
the package path is the same as the package path of
the program that invoked the routine.
Indicates if the routine is secured:
N The routine is not secured
Y The routine is secured
Specifies if the SQL function is inline:
Y
The SQL function is inline when referenced. No
package is associated with this type of routine.
N
The SQL function has an associated package.
blank Not an SQL function (the ORIGIN column has
a value other than 'Q')
Identifies whether this routine is system defined:
blank This routine is not system defined
S
This routine is system defined

SYSIBM.SYSROUTINESTEXT
An auxiliary table for the TEXT column of SYSIBM.SYSROUTINES.
DB2 10 for z/OS

363

YL&A DB2 10 for z/OS Reference Guide


Column Name
TEXT

Data Type
CLOB(2M)

Description
The source text of the CREATE PROCEDURE statement
for the routine. TEXT can also hold the source text of the
ALTER PROCEDURE statement for the routine if the
routine is a native SQL procedure and the SQL procedure
body is included in the ALTER PROCEDURE statement.

SYSIBM.SYSROUTINES_OPTS
Contains a row for each generated routine. Can be inserted, updated, and deleted.
Column Name
SCHEMA
ROUTINENAME
BUILDDATE
BUILDTIME
BUILDSTATUS

Data Type
VARCHAR(128)
VARCHAR(128)
DATE
TIME
CHAR(1)

BUILDSCHEMA
BUILDNAME
BUILDOWNER
IBMREQD

VARCHAR(128)
VARCHAR(128)
VARCHAR(128)
CHAR(1)

PRECOMPILE_OPTS
COMPILE_OPTS
PRELINK_OPTS
LINK_OPTS
BIND_OPTS
SOURCEDSN
DEBUG_MODE

VARCHAR(765)
VARCHAR(765)
VARCHAR(765)
VARCHAR(765)
VARCHAR(3072)
VARCHAR(765)
CHAR(1)

Description
Schema of the routine.
Name of the routine.
Date the routine was built.
Time the routine was built.
Whether this version of the routines source is the current
version.
Schema name for BUILDNAME.
Procedure used to create the routine.
Authorization ID used to create the routine.
A value of Y indicates that the row came from the basic
machine-readable material (MRM) tape.
Precompiler options used to build the routine.
Compiler options used to build the routine.
Prelink-edit options used to build the routine.
Link-edit options used to build the routine.
Bind options used to build the routine.
Name of the source data set.
Debugging is on or off for this objects
0
Debugging is off.
1
Debugging is on.

SYSIBM.SYSROUTINES_PTREE
An auxiliary table for the PTREE column of the SYSIBM.SYSROUTINES table.
Column Name
PTREE

Data Type
CLOB(2M)

Description
Internal use only.

SYSIBM.SYSROUTINES_SRC
Contains source for generated routines. Can be inserted, updated, and deleted.
Column Name
SCHEMA
ROUTINENAME
BUILDDATE
BUILDTIME
BUILDSTATUS

Data Type
VARCHAR(128)
VARCHAR(128)
DATE
TIME
CHAR(1)

SEQNO
IBMREQD

INTEGER
CHAR(1)

364

Description
Schema of the routine.
Name of the routine.
Date the routine was built.
Time the routine was built.
Whether this version of the routines source is the current
version.
Number of the source statement piece in CREATESTMT.
A value of Y indicates that the row came from the basic
DB2 10 for z/OS

YL&A DB2 10 for z/OS Reference Guide


Column Name

Data Type

CREATESTMT

VARCHAR(7500)

Description
machine-readable material (MRM) tape.
Routine source statement.

SYSIBM.SYSSCHEMAAUTH
Contains one or more rows for each user that is granted a privilege on a particular schema in
the database.
Column Name
GRANTOR

Data Type
VARCHAR(128)

GRANTEE

VARCHAR(128)

SCHEMANAME
AUTHHOWGOT

VARCHAR(128)
CHAR(1)

CREATEINAUTH

CHAR(1)

ALTERINAUTH

CHAR(1)

DROPINAUTH

CHAR(1)

GRANTEDTS
IBMREQD

TIMESTAMP
CHAR(1)

GRANTEETYPE

CHAR(1)

GRANTORTYPE

CHAR(1)

Description
Authorization ID of the user who granted the privileges or
SYSADM.
Authorization ID of the user or group that holds the privileges.
Can also be PUBLIC for a grant to PUBLIC.
Name of the schema or '*' for all schemas.
Authorization level of the user from whom the privileges were
received. This authorization level is not necessarily the
highest authorization level of the grantor.
This field is also used to indicate that the privilege was held on all
schemas by the grantor.
1
Grantor had privilege on all schemas at time of grant
E
SECADM
G
ACCESSCTRL
L
SYSCTRL
S
SYSADM
Indicates whether grantee holds CREATEIN privilege on the
schema:
blank Privilege is not held
G
Privilege is held with the GRANT option
Y
Privilege is held without the GRANT option
Indicates whether grantee holds ALTERIN privilege on the
schema:
blank Privilege is not held
G
Privilege is held with the GRANT option
Y
Privilege is held without the GRANT option
Indicates whether grantee holds DROPIN privilege on the
schema:
blank Privilege is not held
G
Privilege is held with the GRANT option
Y
Privilege is held without the GRANT option
Time when the GRANT statement was executed.
Whether the row came from the basic machine-readable material
(MRM) tape.
Indicates the type of grantee:
blank Authorization ID
L
Role
Indicates the type of grantor:
blank Authorization ID
L
Role

SYSIBM.SYSSEQUENCEAUTH

Records the privileges that are held by users over sequences.


DB2 10 for z/OS

365

YL&A DB2 10 for z/OS Reference Guide


Column Name
GRANTOR
GRANTEE

Data Type
VARCHAR(128)
VARCHAR(128)

SCHEMA
NAME
GRANTEETYPE

VARCHAR(128)
VARCHAR(128)
CHAR(1)

AUTHHOWGOT

CHAR(1)

ALTERAUTH

CHAR(1)

USEAUTH

CHAR(1)

COLLID

VARCHAR(128)

CONTOKEN

CHAR(8)

GRANTEDTS
IBMREQD

TIMESTAMP
CHAR(1)

GRANTORTYPE

CHAR(1)

Description
Authorization ID of the user who granted the privileges.
Authorization ID of the user or group that holds the privileges or
the name of an application plan or package that uses the
privileges. PUBLIC for a grant to PUBLIC.
Schema of the sequence.
Name of the sequence.
Type of grantee:
blank An authorization ID.
L
Role
P
An application plan or package. The grantee is a
package if COLLID is not blank.
R
Internal use only.
Authorization level of the user from whom the privileges were
received. This authorization level is not necessarily the highest
authorization level of the grantor:
E
SECADM
G
ACCESSCTRL
L
SYSCTRL
S
SYSADM
T
DATAACCESS
Indicates whether grantee holds ALTER privilege on the
sequence:
blank Privilege is not held.
G
Privilege is held with the GRANT option.
Y
Privilege is held without the GRANT option.
Indicates whether grantee holds USAGE privilege on the
sequence:
blank Privilege is not held.
G
Privilege is held with the GRANT option.
Y
Privilege is held without the GRANT option.
If the GRANTEE is a package, its collection name. Otherwise, a
string of length zero.
If the GRANTEE is a package, the consistency token of the
DBRM from which the package wasderived. Otherwise, blank.
Time when the GRANT statement was executed.
A value of Y indicates that the row came from the basic
machine-readable material (MRM) tape.
Indicates the type of grantor:
blank Authorization ID
L
Role

SYSIBM.SYSSEQUENCES
Contains one row for each identity column or user-defined sequence.
Column Name
SCHEMA

Data Type
VARCHAR(128)

OWNER

VARCHAR(128)

366

Description
Schema of the sequence. For an identity column, the
value of TBCREATOR from the SYSCOLUMNS entry for
the column.
Owner of the sequence. For an identity column, the value
of TBCREATOR from the SYSCOLUMNS entry for the
column.
DB2 10 for z/OS

YL&A DB2 10 for z/OS Reference Guide


Column Name
NAME

Data Type
VARCHAR(128)

SEQTYPE

CHAR(1)

SEQUENCEID
CREATEDBY

INTEGER
VARCHAR(128)

INCREMENT

DECIMAL(31,0)

START
MAXVALUE
MINVALUE
CYCLE

DECIMAL(31,0)
DECIMAL(31,0)
DECIMAL(31,0)
CHAR(1)

CACHE

INTEGER

ORDER

CHAR(1)

DATATYPEID

INTEGER

SOURCETYPEID

INTEGER

CREATEDTS

TIMESTAMP

ALTEREDTS

TIMESTAMP

MAXASSIGNEDVAL

DECIMAL(31,0)

IBMREQD

CHAR(1)

REMARKS

VARCHAR(254)

PRECISION

SMALLINT

RESTARTWITH

DECIMAL(31,0)

OWNERTYPE

CHAR(1)

DB2 10 for z/OS

Description
Name of the identity column or sequence. (The name for
an identity is generated by DB2.)
Type of sequence object:
I
An identity column
S A user-defined sequence
X An implicitly created DOCID column for a base table
that contains XML data.
Internal identifier of the identity column or sequence.
Primary authorization ID of the user who created the
sequence or identity column.
Increment value (positive or negative, within INTEGER
scope).
Start value.
Maximum value allowed for the data type.
Minimum value allowed for the data type.
Whether cycling will occur when a boundary is reached:
N No
Y Yes
Number of sequence values to preallocate in memory for
faster access. A value of 0 indicates that values are not to
be preallocated.
Whether the values must be generated in order
Y Yes
N No
For a built-in data type, the internal ID of the built-in type.
For a distinct type, the internal ID of the distinct type.
For a built-in data type, 0. For a distinct type, the internal
ID of the built-in data type upon which the distinct type is
sourced.
Timestamp when the identity column or sequence was
created.
Timestamp when the identity column or sequence was
ALTERed.
Last possible assigned value. Initialized to null when the
sequence object is created. Updated each time the next
chunk of n values is cached, where n is the value for
CACHE.
A value of Y indicates that the row came from the basic
machine-readable material (MRM) tape.
Character string provided by user with the COMMENT
statement. The value is blank for an identity column.
The precision defined for a sequence with a decimal or
numeric type. Value is 5 for SMALLINT, 10 for INTEGER,
or the actual precision specified by the user for the
decimal data type. The value is 0 for rows created prior to
Version 8.
The RESTART WITH value specified for a sequence
during ALTER or NULL. The RESTART WITH value is
reset to NULL during the first value generation after the
ALTER. The value is NULL if no ALTER with RESTART
WITH has happened.
Indicates the type of owner:
367

YL&A DB2 10 for z/OS Reference Guide


Column Name

Data Type

RELCREATED

CHAR(1)

Description
blank Authorization ID
L
Role
The release of DB2 that is used to create the object. Blank
if created prior to Version 9.

SYSIBM.SYSSEQUENCESDEP
Records the dependencies of identity columns on tables.
Column Name
BSEQUENCEID
DCREATOR

Data Type
INTEGER
VARCHAR(128)

IBMREQD

CHAR(1)

DNAME

VARCHAR(128)

DCOLNAME
DTYPE

VARCHAR(128)
CHAR(1)

BSCHEMA

VARCHAR(129)

BNAME

VARCHAR(128)

DSCHEMA

VARCHAR(128)

DOWNER

VARCHAR(128)

DOWNERTYPE

CHAR(1)

Description
Internal identifier of the identity column or sequence.
Owner of the object that is dependent on this identity column or
sequence.
A value of Y indicates that the row came from the basic
machine-readable material (MRM) tape.
Name of the object that is dependent on this identity column or
sequence.
Name of the identity column. Blank for SQL function rows.
The type of object that is dependent on this sequence:
F
SQL function
I
Identity column
X
Implicit DOCID column that is created on a base tabl
with XML
blank Represents an identity column created prior to Version
8
The schema name of the sequence, will be a string of length
zero for an object created prior to Version 8.
The sequence name (generated by DB2 for an identity column),
will be a string of length zero for an object created prior to
Version 8.
The qualifier of the object that is dependent on this sequence,
will be a string of length zero for an object created prior to
Version 8.
The owner of the object that is dependent on this sequence.
This will be a string of length zero for an object that was created
prior to Version 9.
The type of owner:
Blank An authorization ID
L
A role

SYSIBM.SYSSTMT
Contains one or more rows for each SQL statement of each DBRM.
Column Name
NAME
PLNAME
PLCREATOR
SEQNO

368

Data Type
VARCHAR(24)
VARCHAR(24)
VARCHAR(128)
SMALLINT

Description
Name of the DBRM.
Name of the application plan.
Authorization ID of the owner of the application plan.
Sequence number of this row with respect to a statement of
the plan. Rows in which the values of SEQNO, STMTNO,
and SECTNO are zero are for internal use. The numbering
starts with zero.

DB2 10 for z/OS

YL&A DB2 10 for z/OS Reference Guide


Column Name
STMTNO

Data Type
SMALLINT

SECTNO

SMALLINT

IBMREQD

CHAR(1)

TEXT

VARCHAR(3800)

ISOLATION

CHAR(1)

DB2 10 for z/OS

Description
The statement number of the statement in the source
program. A statement number greater than 32767 is stored
as zero. If the value is zero, see STMTNOI for the statement
number. Rows in which the values of SEQNO, STMTNO, and
SECTNO are zero are for internal use.
The section number of the statement. Rows in which the
values of SEQNO, STMTNO, and SECTNO are zero are for
internal use.
A value of Y indicates that the row came from the basic
machine-readable material (MRM) tape.
Text or portion of the text of the SQL statement.
Isolation level for the SQL statement:
R
RR (repeatable read)
T
RS (read stability)
S
CS (cursor stability)
U
UR (uncommitted read)
L
KEEP UPDATE LOCKS for an RS isolation
X
KEEP UPDATE LOCKS for an RR isolation
blank The WITH clause was not specified
on this statement. The isolation level is recorded in
SYSPACKAGE.ISOLATION and in
SYSPLAN.ISOLATION.

369

YL&A DB2 10 for z/OS Reference Guide


Column Name
STATUS

370

Data Type
CHAR(1)

Description
Status of binding the statement:
A
Distributed - statement uses DB2 private protocol
access. The statement will be parsed and executed at
the server using defaults for input variables during
access path selection.
B
Distributed - statement uses DB2 private protocol
access. The statement will be parsed and
executed at the server using values for input
variables during access path selection.
C
Compiled - statement was bound successfully
using defaults for input variables during access path
selection.
E
Explain - statement is an SQL EXPLAIN statement.
The explain is done at bind time using defaults for
input variables during access path selection.
F
Parsed - statement did not bind successfully
and VALIDATE(RUN) was used. The statement
will be rebound at execution time using
values for input variables during access path
selection.
G
Compiled - statement bound successfully, but REOPT
is specified. The statement will be rebound at
execution time using values for input variables during
access path selection.
H
Parsed - statement is either a data definition statement
or a statement that did not bind successfully and
VALIDATE(RUN) was used. The statement will be
rebound at execution time using defaults for input
variables during access path selection. Data
manipulation statements use defaults for input
variables during access path selection.
I
Indefinite - statement is dynamic. The statement will
be bound at execution time using defaults for input
variables during access path selection.
J
Indefinite - statement is dynamic. The statement will
be bound at execution time using values for input
variables during access path selection.
K
Control - CALL statement.
M
Parsed - statement references a table that is qualified
with SESSION and was not bound because the table
reference could be for a declared temporary table that
will not be defined until the package or plan is run. The
SQL statement will be rebound at execution time using
values for input variables during access path selection.
L
Bad - the statement has some allowable error. The
bind continues but the statement cannot be executed.
blank The statement is non-executable, or was bound in
DB2 release prior to Version 5.

DB2 10 for z/OS

YL&A DB2 10 for z/OS Reference Guide


Column Name
ACCESSPATH

Data Type
CHAR(1)

STMTNOI

INTEGER

SECTNOI
EXPLAINABLE

INTEGER
CHAR(1)

QUERYNO

INTEGER

PLCREATOR

CHAR(1)

Description
For static statements, indicates if the access path for the
statement is based on user-specified optimization hints. A
value of 'H' indicates that optimization hints were used. A
blank value indicates that the access path was determined
without the use of optimization hints, or that there is no
access path associated with the statement. For dynamic
statements, the value is blank.
If the value of STMTNOI is not zero, the column contains the
statement number of the statement in the source program..
The section number of the statement.
Contains one of the following values:
Y
Indicates that the SQL statement can be used with the
EXPLAIN function and may have rows describing its
access path in the userid.PLAN_TABLE.
N
Indicates that the SQL statement does not have any
rows describing its access path in the
userid.PLAN_TABLE
Blank Indicates that the SQL statement was bound prior to
V7.
The query number of the SQL statement in the source
program. SQL statements bound prior to V7 have a default
value of 1. Statements bound V7 or later used the value
specified on the QUERYNO clause on SELECT, UPDATE,
INSERT, DELETE, EXPLAIN, and DECLARE CURSOR
statements. If the QUERYNO clause is not specified, the
query number is set to the statement number.
Indicates the type of creator:
blank Authorization ID
L
Role

SYSIBM.SYSSTOGROUP
Contains one row for each storage group.
Column Name
NAME
CREATOR
VCATNAME
SPACE

Data Type
VARCHAR(128)
VARCHAR(128)
VARCHAR(128)
VARCHAR(24)
INTEGER

IBMREQD

CHAR(1)

CREATEDBY

VARCHAR(128)

STATSTIME

TIMESTAMP

CREATEDTS

TIMESTAMP

ALTEREDTS

TIMESTAMP

DB2 10 for z/OS

Description
Name of the storage group.
Authorization ID of the owner of the storage group.
Name of the integrated catalog facility catalog.
Not used.
Number of kilobytes of DASD storage allocated to the storage
group as determined by the last execution of the STOSPACE
utility.
A value of Y indicates that the row came from the basic machinereadable material (MRM) tape.
Primary authorization ID of user who created storage group.
If the STOSPACE utility was executed for the storage group, date
and time when STOSPACE was last executed.
Time when the CREATE statement was executed for the storage
group.
Time when the most recent ALTER STOGROUP statement was
executed for the storage group. If no ALTER STOGROUP
statement has been applied, ALTEREDTS has the value of
371

YL&A DB2 10 for z/OS Reference Guide


Column Name

Data Type

SPACEF

FLOAT

DATACLAS
MGMTCLAS

VARCHAR(24)
VARCHAR(24)

STORCLAS
CREATOR
TYPE

VARCHAR(24)
CHAR(1)

RELCREATED

CHAR(1)

Description
CREATEDTS.
Kilobytes of DASD storage for the storage group. The value is -1 if
statistics have not been gathered. This is an updatable column.
Name of the SMS data class. Blank if data class is not used.
Name of the SMS management class. Blank if management class
is not used.
Name of the SMS storage class. Blank if storage class is not used.
Indicates the type of creator:
Blank Authorization ID
L
Role
The release of DB2 that is used to create the object. Blank if
created prior to Version 9.

SYSIBM.SYSSTRINGS
Contains information about character conversion..
Column Name
INCCSID

Data Type
INTEGER

OUTCCSID

INTEGER

TRANSTYPE

CHAR(2)

ERRORBYTE

CHAR(1)

SUBBYTE

CHAR(1)

TRANSPROC

VARCHAR(24)

372

Description
The source CCSID for the character conversion represented by
this row. The value of the source CCSID must be in the range of
1 to 65533 and must not be the same as the value for the
OUTCCSID column.
The target CCSID for the character conversion represented by
this row. The value of the target CCSID must be in the range of 1
to 65533 and must not be the same as the value for the
INCCSID column.
Indicates the nature of the conversion. Values can be:
GG
GRAPHIC to GRAPHIC
MM
EBCDIC MIXED to EBCDIC MIXED
MS
EBCDIC MIXED to SBCS
PM
ASCII MIXED to EBCDIC MIXED
PS
ASCII MIXED to SBCS
SM
SBCS to EBCDIC MIXED
SS
SBCS to SBCS
MP
EBCDIC MIXED to ASCII MIXED
PP
ASCII MIXED to ASCII MIXED
SP
SBCS to ASCII MIXED
The byte used in the conversion table as an error byte. Any nonnull value that is specified for the ERRORBYTE column must not
be the same as the value that is specified for the SUBBYTE
column. Null indicates the absence of an error byte.
The byte used in the conversion table as a substitution
character. Any non-null value that is specified for the SUBBYTE
column must not be the same as the value that is specified for
the ERRORBYTE column. Null indicates the absence of a
substitution character.
The name of a module or blanks. If IBMREQD is 'N', a nonblank
value is the name of a conversion procedure provided by the
user. If IBMREQD is 'Y', a nonblank value is the name of a DB2
module that contains DBCS conversion tables. The first five
characters of the name of a user-provided conversion
procedure must not be 'DSNXV'; these characters are used to
distinguish user-provided conversion procedures from DB2
DB2 10 for z/OS

YL&A DB2 10 for z/OS Reference Guide


Column Name

Data Type

IBMREQD

CHAR(1)

TRANSTAB

VARCHAR(256)

Description
modules that contain DBCS conversion tables.
A value of Y indicates that the row came from the basic machinereadable material (MRM) tape.
Either a conversion table or an empty string.

SYSIBM.SYSSYNONYMS
Contains one row for each synonym of a table or view.
Column Name
NAME
CREATOR
TBNAME
TBCREATOR
IBMREQD

Data Type
VARCHAR(128)
VARCHAR(128)
VARCHAR(128)
VARCHAR(128)
CHAR(1)

CREATEDBY
CREATEDTS

VARCHAR(128)
TIMESTAMP

CREATORTYPE

CHAR(1)

RELCREATED

CHAR(1)

Description
Synonym for the table or view.
Authorization ID of the owner of the synonym.
Name of the table or view.
Schema of the owner of the table or view.
A value of Y indicates that the row came from the basic
machine-readable material (MRM) tape.
Primary authorization ID of the user who created the synonym.
Time when the CREATE statement was executed for the
synonym. The value is '0001-01.01.00.00.00.000000' for
synonyms created in a DB2 release prior to Version 5.
Indicates the type of creator:
blank Authorization ID
L
Role
The release of DB2 that is used to create the object. Blank if
created prior to Version 9.

SYSIBM.SYSTABAUTH
Records the privileges that users hold on tables and views.
Column Name
GRANTOR

Data Type
VARCHAR(128)

GRANTEE

VARCHAR(128)

GRANTEETYPE

CHAR(1)

DBNAME

VARCHAR(24)

SCREATOR

VARCHAR(128)

STNAME

VARCHAR(128)

DB2 10 for z/OS

Description
Authorization ID of the user who granted the privileges. Could
also be PUBLIC.
Authorization ID of the user who holds the privileges or the
name of an application plan or package that uses the
privileges. PUBLIC for a grant to PUBLIC.
Type of grantee:
blank An authorization ID
L
Role
P
An application plan or a package. The grantee is a
package if COLLID is not blank.
If the privileges were received from a user with DBADM,
DBCTRL, or DBMAINT authority, DBNAME is the name of the
database on which the GRANTOR has that authority.
Otherwise, DBNAME is blank.
If the row of SYSIBM.SYSTABAUTH was created as a result of
a CREATE VIEW statement, SCREATOR is the schema of the
owner of a table or view referred to in the CREATE VIEW
statement. Otherwise, SCREATOR is the same as TCREATOR.
If the row of SYSIBM.SYSTABAUTH was created as a result of
a CREATE TABLE statement or a materialized query table,
STNAME is the name of a table or view referred to in the
fullselect of the CREATE TABLE statement.
373

YL&A DB2 10 for z/OS Reference Guide


Column Name
TCREATOR
TTNAME
AUTHHOWGOT

Data Type
VARCHAR(128)
VARCHAR(128)
CHAR(1)

UPDATECOLS

CHAR(12)
CHAR(6)
CHAR(8)
CHAR(1)

ALTERAUTH

CHAR(1)

DELETEAUTH

CHAR(1)

INDEXAUTH

CHAR(1)

INSERTAUTH

CHAR(1)

SELECTAUTH

CHAR(1)

UPDATEAUTH

CHAR(1)

IBMREQD

CHAR(1)
VARCHAR(128)
VARCHAR(128)

374

Description
Schema of the owner of the table or view.
Name of the table or view.
Authorization level of the user from whom the privileges were
received. This authorization level is not necessarily the
highest authorization level of the grantor.
blank Not applicable
C
DBCTL
D
DBADM
E
SECADM
G
ACCESSCTRL
L
SYSCTRL
M
DBMAINT
S
SYSADM
T
DATAACCESS
Internal use only.
Not used.
Not used.
The value of this column is blank if the value of UPDATEAUTH
applies uniformly to all columns of the table or view. The value
is an asterisk (*) if the value of UPDATEAUTH applies to some
columns but not to others. In this case, rows will exist in
SYSIBM.SYSCOLAUTH with matching timestamps and
PRIVILEGE = blank. These rows list the columns on which
update privileges have been granted.
Whether the GRANTEE can alter the table:
blank Privilege is not held
G
Privilege is held with the GRANT option
Y
Privilege is held without the GRANT option
Whether the GRANTEE can delete rows from the table or view:
blank Privilege is not held
G
Privilege is held with the GRANT option
Y
Privilege is held without the GRANT option
Whether the GRANTEE can create indexes on the table:
blank Privilege is not held
G
Privilege is held with the GRANT option
Y
Privilege is held without the GRANT option
Whether the GRANTEE can insert rows into the table or view:
blank Privilege is not held
G
Privilege is held with the GRANT option
Y
Privilege is held without the GRANT option
Whether the GRANTEE can select rows from the table or view:
blank Privilege is not held
G
Privilege is held with the GRANT option
Y
Privilege is held without the GRANT option
Whether the GRANTEE can update rows of the table or view:
blank Privilege is not held
G
Privilege is held with the GRANT option
Y
Privilege is held without the GRANT option
A value of Y indicates that the row came from the basic
machine-readable material (MRM) tape.
Not used.
Not used.
DB2 10 for z/OS

YL&A DB2 10 for z/OS Reference Guide


Column Name
COLLID

Data Type
VARCHAR(128)

CONTOKEN

CHAR(8)

REFERENCESAUTH

CHAR(1)
CHAR(1)

REFCOLS

CHAR(1)

GRANTEDTS
TRIGGERAUTH

TIMESTAMP
CHAR(1)

GRANTORTYPE

CHAR(1)

Description
If the GRANTEE is a package, its collection name. Otherwise,
the value is blank.
If the GRANTEE is a package, the consistency token of the
DBRM from which the package was derived. Otherwise, the
value is blank.
Not used
Whether the GRANTEE can create or drop referential
constraints in which the table is a parent.
blank
Privilege is not held
G
Privilege is held with the GRANT option
Y
Privilege is held without the GRANT option
The value of this column is blank if the value of
REFERENCESAUTH applies uniformly to all columns of the
table. The value is an asterisk(*) if the value of
REFERENCESAUTH applies to some columns but not to
others. In this case, rows will exist in SYSIBM.SYSCOLAUTH
with PRIVILEGE = R and matching timestamps that list the
columns on which reference privileges have been granted.
Time when the GRANT statement was executed.
Whether the GRANTEE can create triggers in which the table is
named as the triggering table:
blank Privilege is not held
G
Privilege is held with the GRANT option
Y
Privilege is held without the GRANT option
Indicates the type of grantor:
blank
Authorization ID
L
Role

SYSIBM.SYSTABCONST
table contains one row for each unique constraint (primary key or unique key) created in DB2
Version 7 or later.
Column Name
CONSTNAME
TBCREATOR
TBNAME
CREATOR
TYPE

Data Type
VARCHAR(128)
VARCHAR(128)
VARCHAR(128)
CHAR(8)
CHAR(1)

IXOWNER

VARCHAR(128)

IXNAME

VARCHAR(128)

CREATEDTS

TIMESTAMP

IBMREQD

CHAR(1)
DEFAULT N
SMALLINT
CHAR(1)

COLCOUNT
RELCREATED

DB2 10 for z/OS

Description
Name of the constraint.
Schema of the table on which the constraint is defined.
Name of the table on which the constraint is defined.
Authorization ID under which the constraint was created.
Type of constraint:
P Primary key
U Unique key
Schema of the index enforcing the constraint or blank if index
has not been created yet.
Name of the index enforcing the constraint or blank if index
has not been created yet.
Time when the statement to create the constraint was
executed.
A value of Y indicates that the row name from the basic
machine-readable material (MRM) tape.
Number of columns in the constraint.
The release of DB2 that is used to create the object. Blank if
created prior to Version 9.
375

YL&A DB2 10 for z/OS Reference Guide

SYSIBM.SYSTABLEPART
Contains one row for each non-partitioned tablespace and one row for each partition of a
partitioned table space.
Column Name
PARTITION
TSNAME
DBNAME
IXNAME

Data Type
SMALLINT
VARCHAR(24)
VARCHAR(24)
VARCHAR(128)

IXCREATOR

VARCHAR(128)

PQTY

INTEGER

SQTY

SMALLINT

STORTYPE

CHAR(1)

STORNAME

VARCHAR(128)

VCATNAME

VARCHAR(24)

CARD

INTEGER

376

Description
Partition number; 0 if tablespace is not partitioned.
Name of the tablespace.
Name of the database that contains the tablespace.
Name of the partitioning index. This column is blank if the
tablespace is not partitioned.
Schema of the partitioning index. This column is blank if the
tablespace is not partitioned.
For user-managed data sets, the value is the primary space
allocation in units of 4 KB storage blocks or -1. PQTY is
based on a value of PRIQTY in the appropriate CREATE or
ALTER TABLESPACE statement. Unlike PQTY, however,
PRIQTY asks for space in 1 KB units. A value of -1 indicates
that either of the following cases is true:

PRIQTY was not specified for a CREATE


TABLESPACE statement or for any subsequent
ALTER TABLESPACE statements.

-1 was the most recently specified value for


PRIQTY, either on the CREATE TABLESPACE
statement or a subsequent ALTER TABLESPACE
statement.
For user-managed data sets, the value is the secondary
space allocation in units of 4 KB storage blocks or -1. SQTY
is based on a value of SECQTY in the appropriate CREATE
or ALTER TABLESPACE statement. Unlike SQTY, however,
SECQTY asks for space in 1 KB units. A value of -1
indicates that either of the following cases is true:

SECQTY was not specified for a CREATE


TABLESPACE statement or for any subsequent
ALTER TABLESPACE statements.

-1 was the most recently specified value for


SECQTY, either on the CREATE TABLESPACE
statement or a subsequent ALTER TABLESPACE
statement.
If the value does not fit into the column, the value of the
column is 32767. See the description of column SECQTYI.
Type of storage allocation:
E
Explicit (storage group not used)
I
Implicit (storage group used)
Name of storage group used for space allocation. Blank if
storage group not used or for the catalog table spaces.
Name of integrated catalog facility catalog used for space
allocation.
Number of rows in the tablespace or partition or, if the
tablespace is a LOB tablespace, the number of LOBs in the
tablespace. The value is 2 147 483 647 if the number of rows
DB2 10 for z/OS

YL&A DB2 10 for z/OS Reference Guide


Column Name

Data Type

FARINDREF

INTEGER

NEARINDREF

INTEGER

PERCACTIVE

SMALLINT

PERCDROP

SMALLINT

IBMREQD

CHAR(1)

LIMITKEY

VARCHAR(765)

FREEPAGE
PCTFREE
CHECKFLAG

SMALLINT
SMALLINT
CHAR(1)

SPACE

INTEGER

Description
is greater than or equal to 2 147 483 647. The value is -1 if
statistics have not been gathered.
Number of rows that have been relocated far from their
original page. The value is -1 if statistics have not been
gathered. Not applicable if the tablespace is a LOB
tablespace.
Number of rows that have been relocated near their original
page. The value is -1 if statistics have not been gathered.
Not applicable if the tablespace is a LOB tablespace.
Percentage of space occupied by rows of data from active
tables. The value is -1 if statistics have not been gathered.
The value is -2 if the tablespace is a LOB tablespace. This
value is not applicable for understanding data distribution in
tables that are organized for hash access.
Percentage of space occupied by rows of dropped tables.
The value is -1 if statistics have not been gathered. The
value is 0 for segmented tablespaces. Not applicable if the
table is an auxiliary table.
A value of Y indicates that the row came from the basic
machine-readable material (MRM) tape.
The high value of the partition in external format. If the table
space was converted from index-controlled partitioning to
table-controlled partitioning, the value is the highest possible
value for an ascending key, or the lowest possible value for a
descending key. If the table space is not partitioned, the
value is an empty string.
Number of pages loaded before a page is left as free space.
Percentage of each page left as free space.
C
The tablespace partition is in a check pending status
and there are rows in the table that can violate
referential constraints, table check constraints, or
both.
D
The inline length of the LOB column that is associated
with this LOB table space was decremented when the
inline length was altered.
I
The inline length of the LOB column that is associated
with this LOB table space was incremented when the
inline length was altered.
blank The tablespace is not a partition, or does not
contain rows that may violate referential
constraints, table check constraints, or both.
Number of kilobytes of DASD storage allocated to the table
space partition, as determined by the last execution of the
STOSPACE utility or RUNSTATS utility.
0 The STOSPACE or RUNSTATS utility has not been run.
-1 The table space was defined with the DEFINE NO
clause, which defers the physical creation of the data
sets until data is first inserted into one of the partitions,
and data has yet to be inserted.
non-zero or non-negative value
An auxiliary table in the LOB table space.
The value is if The value is updated by STOSPACE if the

DB2 10 for z/OS

377

YL&A DB2 10 for z/OS Reference Guide


Column Name

Data Type

COMPRESS

CHAR(1)

PAGESAVE

SMALLINT

STATSTIME

TIMESTAMP

GBPCACHE

CHAR(1)

CHECKRID5B

CHAR(5)

TRACKMOD

CHAR(1)

378

Description
table space is related to a storage group. The value is
updated by RUNSTATS if the utility is executed as
RUNSTATS TABLESPACE with UPDATE(ALL) or
UPDATE(SPACE).
Indicates the following:
o For a tablespace partition, whether the COMPRESS
attribute for the partition is YES.
o For a non-partitioned tablespace, whether the
COMPRESS attribute is YES for the tablespace.
Values for the column can be:
Y
Compression is defined for the tablespace
blank No compression
Percentage of pages saved in the tablespace or partition as
a result of defining the tablespace with COMPRESS YES or
other compression routines. For example, a value of 25
indicates a savings of 25%, so that the pages required are
only 75% of what would be required without data
compression. The calculation includes overhead bytes for
each row, the bytes required for dictionary, and the bytes
required for the current FREEPAGE and PCTFREE
specification for the table space or partition. This calculation
is based on an average row length, and the result varies
depending on the actual lengths of the rows. The value is 0
if there are no savings from using data compression, or if
statistics have not been gathered. The value can be
negative, if for example, data compression causes an
increase in the number of pages in the data set.
If RUNSTATS updated the statistics, the date and time
when the last invocation of RUNSTATS updated the
statistics. The default value is '0001-0101.00.00.00.000000'.
Group buffer pool cache option specified for this tablespace
or tablespace partition.
A
Changed and unchanged pages are cached in the
group buffer pool.
N
No data is cached in the group buffer pool.
S
Only changed system pages, such as space map
pages that do not contain actual data values, are
cached in the group buffer pool.
blank Only changed pages are cached in the group buffe
pool.
Blank if the table or partition is not in a check pending status
(CHECKFLAG is blank), or if the tablespace is not
partitioned.
Otherwise, the RID of the first row of the tablespace partition
that can violate referential constraints, table check
constraints, or both; or the value is X'0000000000', indicating
that any row can
violate referential constraints.
Whether to track the page modifications in the space map
pages:
N
No
blank Yes
DB2 10 for z/OS

YL&A DB2 10 for z/OS Reference Guide


Column Name
EPOCH

Data Type
INTEGER

SECQTYI

INTEGER

CARDF

FLOAT

IPREFIX

CHAR(1)

ALTEREDTS

TIMESTAMP

SPACEF

FLOAT(8)

DSNUM

FLOAT(8)

EXTENTS

INTEGER

LOGICAL_PART

SMALLINT

LIMITKEY_INTERNAL

VARCHAR(512)

OLDEST_VERSION

SMALLINT

CREATDTS
AVGROWLEN

TIMESTAMP
INTEGER

FORMAT

CHAR(1)

DB2 10 for z/OS

Description
A number that is incremented whenever an operation that
changes the location of rows in a table occurs.
Secondary space allocation in units of 4KB storage. For
user-managed data sets, the value is the secondary space
allocation in units of 4KB blocks.
Number of rows in the tablespace or partition, or if the
tablespace is a LOB tablespace, the number of LOBS in the
tablespace. The value is -1 if statistics have not been
gathered.
The first character of the instance qualifier for the data set
name for the table space or partition. 'I' or 'J' are the only
valid characters for this field. The default is 'I'.
Time when the most recent ALTER INDEX statement was
executed for the index. If no ALTER INDEX statement has
been applied, the value is '0001-01-01.00.00.00.000000'.
Kilobytes of DASD storage. The value is -1 if statistics have
not been gathered. The value might be non-zero for an
auxiliary table in the LOB table space. This is an updatable
column.
Number of data sets. The value is 1 if statistics have not
been gathered. This is an updatable column.
Number of data set extents. The value is -1 if statistics have
not been gathered. This is an updatable column. This value
is only for the last DSNUM for the object.
The logical partition (logical ascending or descending order)
for table spaces created with either table-controlled
partitioning or index-controlled partitioning. The physical
partition number is kept in column PART and is zero for
partitioned table spaces created prior to Version 8 and for
nonpartitioned table spaces..
The highest value of the limit key of the partition in an
internal format. If the uses index-controlled partitioning
instead of table-controlled partitioning or the table is not
partitioned, the value is an empty string. If the table space
was converted from index-controlled partitioning to tablecontrolled partitioning, the value is the highest possible value
for an ascending key, or the lowest possible value for a
descending key. If any column of the key has a field
procedure, the internal format is the encoded form of the
value.
The version number of the oldest format of data in the table
past and any image copies at the part level.
Time when the partition was created.
Average length of rows for the tables in the table space or
part. If the table space or part is compressed, the value is the
compressed row length. If the table space or part is not
compressed, the value is the uncompressed row length. The
value is -1 if statistics have not been gathered.
Indicates the format of the rows in the table space or
partition:
R
Indicates reordered row format
blank Indicates basic row format or a LOB tablespace
379

YL&A DB2 10 for z/OS Reference Guide


Column Name
RELCREATED

Data Type
CHAR(1)

REORG_LR_TS

TIMESTAMP

HASHSPACE

BIGINT

HASHDATAPAGES

BIGINT

Description
The release of DB2 that is used to create the object. Blank if
created prior to Version 9.
The time when the REORG or LOAD REPLACE utility last
occurred. The default value is '0001-01-01.00.00.00.000000'.
For partition by growth table spaces this is zero. For range
partitioned universal table spaces, this is the amount of
space, in KB, specified at the partition level to override the
space specification at the table level. If no override is
provided it will be the same as the value of HASHSPACE in
the SYSIBM.SYSTABLEPSACE catalog table.
For partition by growth table spaces, the value is zero. For
range partitioned universal table spaces, this is the number
of hash data pages that correspond to the value of the
HASHSPACE column for each partition. The value is 0 for
table spaces which have been changed to use hash access
but have not been reorganized.

SYSIBM.SYSTABLEPART_HIST
Contains rows from SYSTABLEPART. Can be inserted, updated, and deleted.
Column Name
PARTITION
TSNAME
DBNAME
PQTY

Data Type
SMALLINT
VARCHAR(24)
VARCHAR(24)
INTEGER

SECQTYI

SMALLINT

FARINDREF

INTEGER

380

Description
Partition number; 0 if tablespace is not partitioned.
Name of the tablespace.
Name of the database that contains the tablespace.
For user-managed data sets, the value is the primary space allocation
in units of 4 KB storage blocks or -1. PQTY is based on a value of
PRIQTY in the appropriate CREATE or ALTER TABLESPACE
statement. Unlike PQTY, however, PRIQTY asks for space in 1 KB
units. A value of -1 indicates that either of the following cases is true:

PRIQTY was not specified for a CREATE TABLESPACE


statement or for any subsequent ALTER TABLESPACE
statements.
-1 was the most recently specified value for PRIQTY, either on the
CREATE TABLESPACE statement or a subsequent ALTER
TABLESPACE statement.
Secondary space allocation in units of 4KB blocks. If a storage group
is not used the value is 0. For user-managed data sets, the value is
the secondary space allocation in units of 4 KB storage blocks or -1.
SQTY is based on a value of SECQTY in the appropriate CREATE or
ALTER TABLESPACE statement. Unlike SQTY, however, SECQTY
asks for space in 1 KB units. A value of -1 indicates that either of the
following cases is true:

SECQTY was not specified for a CREATE


TABLESPACE statement or for any subsequent ALTER
TABLESPACE statements.

-1 was the most recently specified value for SECQTY,


either on the CREATE TABLESPACE statement or a
subsequent ALTER TABLESPACE statement.
Number of rows that have been relocated far from their original page.
The value is -1 if statistics have not been gathered. Not applicable if
the tablespace is a LOB tablespace.
DB2 10 for z/OS

YL&A DB2 10 for z/OS Reference Guide


Column Name
NEARINDREF

Data Type
INTEGER

PERCACTIVE

SMALLINT

PERCDROP

SMALLINT

SPACEF

FLOAT(8)

PAGESAVE

SMALLINT

STATSTIME

TIMESTAMP

CARDF

FLOAT(8)

EXTENTS

INTEGER

DSNUM

INTEGER

IBMREQD

CHAR(1)

AVGROWLEN

INTEGER

Description
Number of rows that have been relocated near their original page.
The value is -1 if statistics have not been gathered. Not applicable if
the tablespace is a LOB tablespace.
Percentage of space occupied by rows of data from active tables.
The value is -1 if statistics have not been gathered. The value is -2 if
the tablespace is a LOB tablespace.
Percentage of space occupied by rows of dropped tables. The value
is -1 if statistics have not been gathered. The value is 0 for
segmented tablespaces. Not applicable if the table is an auxiliary
table.
Number of kilobytes of DASD storage allocated to the tablespace
partition. The value is -1 if statistics have not been gathered.
Percentage of pages saved in the tablespace or partition as a result of
defining the tablespace with COMPRESS YES or other compression
routines. For example, a value of 25 indicates a savings of 25%, so
that the pages required are only 75% of what would be required
without data compression. The calculation includes overhead bytes
for each row, the bytes required for dictionary, and the bytes required
for the current FREEPAGE and PCTFREE specification for the
tablespace or partition. This calculation is based on an average row
length, and the result varies depending on the actual lengths of the
rows. The value is 0 if there are no savings from using data
compression, or if statistics have not been gathered. The value an be
negative, if for example, data compression causes an increase in the
number of pages in the data set.
If RUNSTATS updated the statistics ,the date and time when the last
invocation of RUNSTATS updated the statistics. The default value is
0001-01-01.00.00.00.000000 .
Number of rows in the tablespace or partition ,or if the tablespace is a
LOB tablespace , the number of LOBS in the tablespace. The value is
-1 if statistics have not been gathered.
Number of data set extents. The value is '-1' if statistics have not been
gathered. This value is only for the last DSNUM for the object.
Data set number within the tablespace. For partitioned tablespaces,
this value corresponds to the partition number for a single partition
copy, or 0 for a copy of an entire partitioned tablespace or index
space. The value is -1 if statistics have not been gathered.
A value of Y indicates that the row came from the basic machinereadable material (MRM) tape.
Average length of rows for the tables in the table space or part. If the
table space or part is compressed, the value is the compressed row
length. If the table space or part is not compressed, the value is the
uncompressed row length. The value is '-1' if statistics have not been
gathered.

SYSIBM.SYSTABLES
Contains one row for each table, view, or alias.
Column Name
NAME
CREATOR
DB2 10 for z/OS

Data Type
VARCHAR(128)
VARCHAR(128)

Description
Name of the table, view, or alias.
Schema of the table, view, or alias.
381

YL&A DB2 10 for z/OS Reference Guide


Column Name
TYPE

Data Type
CHAR(1)

DBNAME

VARCHAR(24)

TSNAME

VARCHAR(24)

DBID

SMALLINT

OBID

SMALLINT

COLCOUNT

SMALLINT

EDPROC

VARCHAR(24)

VALPROC

VARCHAR(24)

CLUSTERTYPE

CHAR(1)

NPAGES

INTEGER

PCTPAGES

SMALLINT

IBMREQD

CHAR(1)

REMARKS

VARCHAR(254)

382

Description
Type of object:
A
Alias
C
Clone table
H
History table
G
Created global temporary table
M
Materialized query table
P
Implicit table created for XML columns
T
Table
V
View
X
Auxiliary table
For a table, or a view of tables, the name of the database
that contains the tablespace named in TSNAME. For a
created temporary table, an alias, or a view of a view, the
value is DSNDB06.
For a table, or a view of one table, the name of the table
space that contains the table. For a view of more than one
table, the name of a tablespace that contains one of the
tables. For a created temporary table, the value is
SYSPKAGE. For a view of a view, the value is SYSVIEWS.
For an alias, it is SYSDBAUT.
Internal identifier of the database; 0 if the row describes a
view, alias, or created temporary table. Non-zero if the
view has an INSTEAD OF trigger defined.
Internal identifier of the table; 0 if the row describes a
view, an alias, or a created temporary table. Non-zero if the
view has an INSTEAD OF trigger defined.
Number of columns in the table or view. The value is 0 if the
row describes an alias.
Name of the edit procedure; blank if the row describes a
view or alias or a table without an edit procedure.
Name of the validation procedure; blank if the row describes
a view or alias or a table without a validation procedure.
Whether RESTRICT ON DROP applies:
blank No
Y
Yes. Neither the table nor any tablespace or
database that contains the table can be dropped.
Total number of pages on which rows of the table appear.
The value is -1 if statistics have not been gathered, or the
row describes a view, an alias, a created temporary table, or
an auxiliary table. This is an updatable column.
Percentage of active tablespace pages that contain rows
of the table. A page is termed active if it is formatted for
rows, regardless of whether it contains any. If the table
space is segmented, the percentage is based on the
number of active pages in the set of segments assigned to
the table. The value is -1 if statistics have not been
gathered, or the row describes a view, alias, created
temporary table, or auxiliary table. This is an updatable
column.
A value of Y indicates that the row came from the basic
machine-readable material (MRM) tape.
A character string provided by the user with the COMMENT
DB2 10 for z/OS

YL&A DB2 10 for z/OS Reference Guide


Column Name

Data Type

PARENTS

SMALLINT

CHILDREN

SMALLINT

KEYCOLUMNS

SMALLINT

RECLENGTH

SMALLINT

STATUS

CHAR(1)

KEYOBID

SMALLINT

LABEL

VARCHAR(90)

CHECKFLAG

CHAR(1)

DB2 10 for z/OS

Description
ON statement.
Number of relationships in which the table is a dependent.
The value is 0 if the row describes a view, an alias,
a created temporary table or MQT.
Number of relationships in which the table is a parent. The
value is 0 if the row describes a view, an alias, a created
temporary table or MQT.
Number of columns in the table's primary key. The value is 0
if the row describes a view, an alias, or a created temporary
table.
For user tables, the maximum length of any record in the
table. Length is 8+N+L, where:

The number 8 accounts for the header (6 bytes) and


the ID map entry (2 bytes).

N is 10 if the table has an edit procedure, or 0


otherwise.

L is the sum of the maximum column lengths. In


determining a column's maximum length, take into
account whether the column allows nulls and the data
type of the column. If the column can contain nulls
and is not a LOB or ROWID column, add 1 byte for a
null indicator. Use 4 bytes for the length of a LOB
column and 19 bytes for the length of a ROWID column.
If the column has a varying-length data type (for
example, VARCHAR, CLOB, or BLOB), add 2 bytes for
a length indicator.
The value is 0 if the row describes a view, alias, or
auxiliary table.
Indicates the status of the table definition:
I
The definition of the table is incomplete.
The TABLESTATUS column indicates the
reason for the table definition being incomplete.
R
An error occurred when an attempt wa made to
regenerate the internal representation of the view.
X
The table has a parent index and the
table definition is complete.
blank
The table has no parent index, or is a catalog table,
or the row describes a view or alias. The definition
of the table, view, or alias is complete.
Internal DB2 identifier of the index that enforces uniqueness
of the table's primary key; 0 if not applicable.
The label as given by a LABEL ON statement; otherwise an
empty string.
C
The tablespace that contains the table is in a
check pending status and there are rows in the
table that can violate referential constraints,
table check constraints, or both. The table is
an mqt that may contain in consistent data.
blank
The table contains no rows that violate
referential constraints, table check constraints,
or both; or the row describes a view, alias, or
created temporary table.
383

YL&A DB2 10 for z/OS Reference Guide


Column Name
CHECKRID

Data Type
CHAR(4)

AUDITING

CHAR(1)

CREATEDBY

VARCHAR(128)

LOCATION

VARCHAR(128)

TBCREATOR

VARCHAR(128)

TBNAME

VARCHAR(128)

CREATEDTS

TIMESTAMP

ALTEREDTS

TIMESTAMP

DATACAPTURE

CHAR(1)

RBA1

CHAR(6)

RBA2

CHAR(6)

PCTROWCOMP

SMALLINT

384

Description
A value of 'FFFFFF00' in this column indicates that the edit
procedure on this table is defined without row attribute
sensitivity. Any other value indicates that the edit procedure
is defined with row attribute sensitivity.
Value of the audit option:
A
AUDIT ALL
C
AUDIT CHANGE
blank AUDIT NONE, or the row describes a view,
an alias, or a created temporary table.
Primary authorization ID of the user who created the table,
view, or alias.
Location name of the object of an alias. Blank for a table, a
view, or for an alias that was not defined with a three-part
object name.

For an alias, the schema of the referred to table or


view

For a base table that is involved in a clone


relationship, the name of the creator of the clone
table

For a clone table that is involved in a clone


relationship, the name of the creator of the base
table

Otherwise, TBCREATOR is blank

For an alias, the name for the referred to table or


view

For a base table that is involved in a clone


relationship, the name of the clone table

For a clone table that is involved in a clone


relationship, the name of the base table

Otherwise, TBNAME is blank


Time when the CREATE statement was executed for the
table, view, or alias.
For a table, the time when the latest ALTER TABLE
statement was applied. If no ALTER TABLE statement has
been applied, or if the row is for an alias, ALTEREDTS has
the value of CREATEDTS. For a view, the time when the last
ALTER VIEW REGENERATE statement was applied.
Records the value of the DATACAPTURE option for a table:
blank No
Y
Yes
For a created temporary table, DATACAPTURE is always
blank.
The log RBA when the table was created. Otherwise, RBA1
is X'000000000000', indicating that the log RBA is not
known, or that the object is a view, an alias, or a created
temporary table. For data sharing it is the LRSN.
The log RBA when the table was last altered. Otherwise,
RBA2 is X'000000000000' indicating that the log RBA is not
known, or that the object is a view, an alias, or a created
temporary table. RBA1 will equal RBA2 if the table has not
been altered. For data sharing it is the LRSN.
Percentage of rows compressed within the total number of
DB2 10 for z/OS

YL&A DB2 10 for z/OS Reference Guide


Column Name

Data Type

STATSTIME

TIMESTAMP

CHECKS

SMALLINT

CARDF

FLOAT

CHECKRID5B

CHAR(5)

ENCODING_SCHEME

CHAR(1)

TABLESTATUS

VARCHAR(30)

NPAGESF

FLOAT(8)

SPACEF

FLOAT(8)

DB2 10 for z/OS

Description
active rows in the table. This includes any row in a table
space that is defined with COMPRESS YES. The value is -1
if statistics have not been gathered, or the row describes a
view, alias, created temporary table, or auxiliary table. This
is an updatable column.
If RUNSTATS updated the statistics, the date and time
when the last invocation of RUNSTATS updated the
statistics. The default value is '0001-01-01.00.00.00.000000'.
For a created temporary table, the value of STATSTIME is
always the default value. This
is an updatable column.
Number of check constraints defined on the table. The value
is 0 if the row describes a view, an alias, or a created
temporary table, or if no constraints are defined on the
table.
Total number of rows in the table or total number of LOBs
in an auxiliary table. The value is -1 if statistics have
not been gathered or the row describes a view, alias, or
created temporary table. This is an updatable column.
Blank if the table or partition is not in a check pending
status (CHECKFLAG is blank), if the tablespace is not
partitioned, or if the table is a created temporary table.
Otherwise, the RID of the first row of the tablespace
partition that can violate referential constraints, table
check constraints, or both; or the value is X'0000000000',
indicating that any row can violate referential constraints.
Default encoding scheme for tables, views, and local
aliases:
E
EBCDIC
A
ASCII
M
Multiple CCSID set or multiple encoding schemes
U
UNICODE
blank For remote aliases
The value is 'E' for tables in non-work-file databases and
blank for tables in work-file databases created prior to
Version 5 or the default database, DSNDB04.
Indicates the reason for an incomplete table definition:
L
Definition is incomplete because an auxiliary table or
auxiliary index has not been defined for a LOB
column.
P
Definition is incomplete because the table lacks a
parent index.
R
Definition is incomplete because the table lacks a
required index on a row ID.
U
Definition is incomplete because the table lacks a
required index on a unique key.
V
An error occurred when an attempt was made to
regenerate the internal representation of the view.
blank Definition is complete.
Number of pages used by the table. The value is 1 if
statistics have not been gathered. This is an updatable
column.
Kilobytes of DASD storage. The value is 1 if statistics have
385

YL&A DB2 10 for z/OS Reference Guide


Column Name

Data Type

AVGROWLEN

INTEGER

RELCREATED
NUM_DEPT_MQTS

CHAR(1)
SMALLINT

VERSION

SMALLINT

PARTKEYCOLNUM

SMALLINT

SPLIT_ROWS

CHAR(16)

SECURITY_LABEL

CHAR(1)

OWNER

VARCHAR(128)

APPEND

CHAR(1)

OWNERTYPE

CHAR(1)

HASHKEYCOLUMNS

SMALLINT

CONTROL

CHAR(1)

386

Description
not been gathered. This is an updatable column.
Average length of rows for the tables in the tablespace. If the
tablespace is compressed, the value is the compressed row
length. If the tablespace is not compressed, the value is the
uncompressed row. The value is 1 if statistics have not
been gathered.
Release of DB2 that was used to create the object.
Number of dependent materialized query tables. The value is
zero if the row describes an alias or a created temporary
table, or if no materialized query tables are defined on the
table.
The version of the data row format for this table.

A value of zero indicates that a version-creating


alter operation has never occurred against this
table.

A value of -1 indicates that the view has been


regenerated because a column of the base table
has been altered.

A value of 800 indicates that a successful


CREATE VIEW or ALTER VIEW statement has
occurred against this table in Version 8 or later.
The number of columns in the partitioning key. This value is
zero for tables that do not have partitioning or use indexcontrolled partitioning. The value is non-zero for tables that
use table-controlled partitioning.
Value is blank except for VOLATILE tables which will have a
Y in the field to indicate to DB2 to use index access on the
table wheneve possible.
Only meaningful it TYPE column is T or M. Indicates if table
has multi-level security:
Blank
No multi-level security
R
Table has multi-level security with row granularity
Authorization ID of the owner of the table, view, or alias,
blank for tables, views or aliases that were created in a DB2
release prior to Version 9.
Indicates whether the APPEND option is specified for the
table.
Y The APPEND option is specified.
N The APPEND option is not specified.
Indicates the type of owner:
blank Authorization ID
L
Role
The number of columns in the hash key of the table. The
value is 0 if the row describes a view, an alias, or a created
temporary table.
Indicates whether access to the table is enforced using row
or column access control:
blank No access control enforcement
B
The table is enforced using both row and column
access control
C
The table is enforced using column access control
R
The table is enforced using row access control
DB2 10 for z/OS

YL&A DB2 10 for z/OS Reference Guide


Column Name
VERSIONING
_SCHEMA

Data Type
VARCHAR(128)

VERSIONING
_TABLE

VARCHAR(128)

Description
Indicates either the schema name of the history table if the
table is a system-maintained temporal table with versioning
or the schema name of the system-maintained temporal
table if the table is a history table. The value is blank if no
versioning relationships exist for this table.
Indicates either the table name of the history table if the table
is a system- maintained temporal table with versioning or the
table name of system-maintained temporal table if the table
is a history table. The value is blank if no versioning
relationships exist for this table.

SYSIBM.SYSTABLESPACE
Contains one row for each tablespace.
Column Name
NAME
CREATOR
DBNAME
DBID

Data Type
VARCHAR(24)
VARCHAR(128)
VARCHAR(24)
SMALLINT

OBID
PSID
BPOOL
PARTITIONS

SMALLINT
SMALLINT
CHAR(8)
SMALLINT

LOCKRULE

CHAR(1)

PGSIZE
ERASERULE

SMALLINT
CHAR(1)

STATUS

CHAR(1)

IMPLICIT

CHAR(1)

DB2 10 for z/OS

Description
Name of the tablespace.
Authorization ID of the owner of the tablespace.
Name of the database that contains the tablespace.
Internal identifier of the database that contains the
tablespace.
Internal identifier of the tablespace file descriptor.
Internal identifier of the tablespace page set descriptor.
Name of the buffer pool used for the tablespace.
Number of partitions of the tablespace; 0 if the tablespace is
not partitioned.
Lock size of the tablespace:
A
Any
L
Large object (LOB)
P
Page
R
Row
S
Tablespace
T
Table
X
Implicitly created XML table space
Size of pages in the tablespace in kilobytes.
Whether the data sets are to be erased when dropped. The
value is meaningless if the tablespace is partitioned.
N
No erase
Y
Erase
Availability status of the tablespace:
A Available
C Definition is incomplete because a partitioning index
has not been created.
P Tablespace is in a check pending status.
S Tablespace is in a check pending status with the
scope less than the entire tablespace.
T
Definition is incomplete because no table has been
created.
Whether the tablespace was created implicitly:
N
No
Y
Yes
387

YL&A DB2 10 for z/OS Reference Guide


Column Name
NTABLES
NACTIVE

Data Type
SMALLINT
INTEGER

CLOSERULE

CHAR(1)

SPACE

INTEGER

IBMREQD

CHAR(1)

SEGSIZE

SMALLINT

CREATEDBY

VARCHAR(128)

STATSTIME

TIMESTAMP

LOCKMAX

INTEGER

TYPE

CHAR(1)

388

Description
Number of tables defined in the tablespace.
Number of active pages in the tablespace. A page is termed
active if it is formatted for rows, even if it currently
contains none. The value is 0 if statistics have not been
gathered. This is an updatable column.
Whether the data sets are candidates for closure when the
limit on the number of open data sets is reached.
N
No
Y
Yes
Number of kilobytes of DASD storage allocated to the
tablespace, as determined by the last execution of the
STOSPACE utility. The value is 0 if the tablespace is not
related to a storage group, or if STOSPACE has not been
run. If the tablespace is partitioned, the value is the total
kilobytes of DASD storage allocated to all partitions that
are storage-group defined.
A value of Y indicates that the row came from the basic
machine-readable material (MRM) tape.
Number of pages in each segment of a segmented
tablespace. The value is 0 if the tablespace is not
segmented.
Primary authorization ID of the user who created the
tablespace.
If RUNSTATS updated the statistics, the date and time
when the last invocation of RUNSTATS updated the
statistics. The default value is '0001-0101.00.00.00.000000'. This is an updatable column.
The maximum number of locks per user to acquire for the
table or tablespace before escalating to the next locking
level.
0 Lock escalation does not occur.
n n, where n > 0, is the maximum number of locks (row,
page, or LOB locks for the table or tablespace) an
application process can acquire before lock escalation
occurs.
-1 Represents LOCKMAX SYSTEM. The value of field
LOCKS PER TABLE(SPACE) on installation panel
DSNTIPJ determines lock escalation. If the value of
the field is 0, lock escalation does not occur. If the
value is n, where n > 0, lock escalation occurs as it
does for LOCKMAX n.
The type of tablespace:
blank The tablespace was created without any of the
following options: DSSIZE, LARGE, LOB, and
MEMBER CLUSTER.
I
The table space was defined with the MEMBER
CLUSTER option and is not greater than 64
gigabytes.
G
The table space was defined with the
MAXPARTITIONS option (a partitioned-by-growth
table space) with the underlying structure of a
universal table space.
K
The table space was defined with the MEMBER
DB2 10 for z/OS

YL&A DB2 10 for z/OS Reference Guide


Column Name

Data Type

CREATEDTS

TIMESTAMP

ALTEREDTS

TIMESTAMP

ENCODING_SCHEME

CHAR(1)

SBCS_CCSID

INTEGER

DBCS_CCSID

INTEGER

MIXED_CCSID

INTEGER

MAXROWS

SMALLINT

LOCKPART

CHAR(1)

LOG

CHAR(1)

DB2 10 for z/OS

Description
CLUSTER option and can be greater than 64
gigabytes.
L
The table space can be greater than 64 gigabytes.
O
The table space was defined with the LOB option
(the table space is a LOB table space).
P
Implicit table space created for XML columns.
R
Range-partitioned universal table space.
Time when the CREATE statement was executed for the
tablespace. If the tablespace was created in a DB2 release
prior to Version 5, the value is
'0001-01-01.00.00.00.000000'.
Time when the most recent ALTER TABLESPACE
statement was executed for the tablespace. If no ALTER
TABLESPACE statement has been applied, ALTEREDTS
has the value of CREATEDTS. If the index was created in a
DB2 release prior to Version 5, the value is
'0001-01-01.00.00.00.000000'.
Default encoding scheme for the tablespace:
E
EBCDIC
A
ASCII
U
UNICODE
blank For tablespaces in a work file database or a
TEMP database (a database that was created
AS TEMP, which is for declared temporary tables)
The value is 'E' for tables in non- work-file databases and
blank for tables in work-file databases created prior to
Version 5 or the default database, DSNDB04.
Default SBCS CCSID for the tablespace. For a tablespace
in a TEMP database or a database created in a DB2 release
prior to Version 5, the value is 0.
Default DBCS CCSID for the tablespace. For a tablespace
in a TEMP database or a database created in a DB2 release
prior to Version 5, the value is 0.
Default mixed CCSID for the tablespace. For a tablespace
in a TEMP database or a database created in a DB2 release
prior to Version 5, the value is 0.
The maximum number of rows that DB2 will place on a data
page. The default value is 255. For a LOB tablespace, the
value is 0 to indicate that the column is not applicable.
Y
LOCKPART YES is specified for the tablespace.
blank LOCKPART NO is specified, or LOCKPART
is not specified or not a partitioned tablespace.
Whether the changes to a tablespace are to be logged.
N
This table space has the NOT LOGGED attribute.
Undo and redo logging for the table space and all
indexes for tables in the table space is suppressed.
Logging is also suppressed for the auxiliary indexes
for all auxiliary tables associated with tables in the
table space.
Y
This table space has the LOGGED attribute. Normal
logging is associated with modifications to this table
space, all indexes for tables in this table space, and
all auxiliary indexes for all auxiliary tables
389

YL&A DB2 10 for z/OS Reference Guide


Column Name

Data Type

NACTIVEF

FLOAT

DSSIZE

INTEGER

OLDEST_VERSION

SMALLINT

CURRENT_VERSION

SMALLINT

AVGROWLEN

INTEGER

SPACEF

FLOAT

CREATORTYPE

CHAR(1)

RELCREATED

CHAR(1)

INSTANCE

SMALLINT

CLONE

CHAR(1)

MAXPARTITIONS

SMALLINT

MEMBER_CLUSTER

CHAR(1)

390

Description
associated with tables in the table space.
X
This LOB or XML table space has the NOT
LOGGED attribute. Undo and redo logging for the
table space is suppressed. Also, the logging
attribute for this LOB or XML table space is linked to
the logging attribute of the associated base table
space and might not be able to be altered
independently. If the logging attribute of the base
table space is altered to LOGGED, the logging
attribute of the LOB or XML table space will also be
altered to LOGGED.
Number of active pages in the tablespace. A page is termed
active if it is formatted for rows, even if it currently
contains none. The value is -1 if statistics have not been
gathered. This is an updatable column.
Maximum size of a data set in kilobytes. The value might be
0 if the table space was created prior to Version 10, but will
contain the actual value after the table space is converted to
a partitioned by growth table space.
Version number of the oldest format of data in the table
space and any image copies.
The version number describing the newest format of data in
the table space. A zero indicates that the table space has
never had versioning. After the version number reaches the
maximum value, the number wraps back to one.
Average length of rows for the tables in the table space or
part. If the table space or part is compressed, the value is
the compressed row length. If the table space or part is not
compressed, the value is the uncompressed row length. The
value is -1 if statistics have not been gathered.
Kilobytes of DASD storage for the storage group. The value
is -1 if statistics have not been gathered. This is an
updatable column.
Indicates the type of creator:
blank Authorization ID
L
Role
The release of DB2 that is used to create the object. Blank if
created prior to Version 9.
INSTANCE indicates the column value of the data set
instance number of the current base object (table and
index).
Indicates whether the table space contains any objects that
are involved in a clone relationship:
Y
Table space contains objects that are involved in a
clone relationship
N
Table space does not contain any objects that are
involved in a clone relationship
Identifies the maximum number of partitions to which the
table space can grow. 0 if the table space is not partitioned
or is range partitioned but not a universal table space.
Whether MEMBER CLUSTER is specified for the table
space:
DB2 10 for z/OS

YL&A DB2 10 for z/OS Reference Guide


Column Name

Data Type

ORGANIZATIONTYPE

CHAR(1)

HASHSPACE

BIGINT

HASHDATAPAGES

BIGINT

Description
Y
MEMBER CLUSTER is specified for the table space
blank MEMBER CLUSTER is not specified for the table
space
Type of table space organization:
blank Not known. Blank is the default.
H
Hash organization
The amount of space, in KB, that is to be allocated to the
table space or partition as hash space. For partition by
growth table spaces, the space applies to the whole table
space. For range partitioned universal table spaces, the
space is applicable for each partition.
The total number of hash data pages to preallocate for hash
space. For partition by growth table spaces, this includes all
pages in the fixed part of the table space. For range
partitioned universal table spaces, this is the number of
pages in the fixed hash space in each partition unless it is
overridden by providing hash space at the partition level.
This is calculated by DB2 from the value specified with the
HASH SPACE option or when the REORG utility is run with
automatic estimation of space. The calculated value is used
in the hash algorithm. The value is 0 for non-hash table
spaces. The value is also 0 for table spaces which have
been changed to use hash access but have not been
reorganized.

SYSIBM.SYSTABLESPACESTATS
Contains real time statistics for table spaces. Can be inserted, updated, and deleted.
Column name
UPDATESTATSTIME
NACTIVE
NPAGES

Data type
TIMESTAMP
INTEGER
INTEGER

EXTENTS

SMALLINT

LOADRLASTTIME

TIMESTAMP

REORGLASTTIME

TIMESTAMP

REORGINSERTS

INTEGER

DB2 10 for z/OS

Description
The timestamp when the row was inserted or last updated
The number of active pages in the table space or partition.
The number of distinct pages with active rows in the partition
of the table space. This is an updateable column.
The number of extents in the table space or partition. For
multi-piece table spaces, this value is the number of extents
for the last data set. For a data set that is striped across
multiple volumes, the value is the number of logical extents.
A null value indicates the value is unknown.
The timestamp of the last LOAD REPLACE on the table
space or partition.
A null value indicates that the LOAD REPLACE utility has
never been run on the table space or partition or that the
timestamp is unknown.
The timestamp the REORG utility was last run on the table
space or partition, or when the REORG utility has not been
run, the time when the table space or partition was created. A
null value indicates that the timestamp is unknown.
The number of records or LOBs that have been inserted into
the table space or partition or loaded into the table space or
partition using the LOAD utility specified without the
REPLACE option since the last time the REORG or LOAD
REPLACE utilities were run, or since the object was created.
391

YL&A DB2 10 for z/OS Reference Guide

REORGDELETES

INTEGER

REORGUPDATES

INTEGER

REORGUNCLUSTINS

INTEGER

REORGDISORGLOB

INTEGER

REORGMASSDELETE

INTEGER

REORGNEARINDREF

INTEGER

REORGFARINDEF

INTEGER

STATSLASTTIME

TIMESTAMP

STATSINSERTS

INTEGER

392

A null value indicates that the number of inserted records or


LOBs is unknown.
The number of records or LOBs that have been deleted from
the table space or partition since the last time the REORG or
LOAD REPLACE utilities were run, or since the object was
created. A null value indicates that the number of deleted
records or LOBs is unknown.
The number of rows that have been updated in the table
space or partition since the last time the REORG or LOAD
REPLACE utilities were run, or since the object was created.
A null value indicates that the number of updated rows is
unknown.
The number of records that were inserted that are not wellclustered with respect to the clustering index since the last
REORG or LOAD REPLACE , or since the object was
created. A record is well-clustered if the record is inserted
into a page that is within 16 pages of the ideal candidate
page. The clustering index determines the ideal candidate
page. A null value indicates that the number of not well
clustered pages is unknown.
The number of LOBs that were inserted that are not perfectly
chunked since the last REORG or LOAD REPLACE, or since
the object was created. A LOB is perfectly chunked if the
allocated pages are in the minimum number of chunks. A null
value indicates that the number of not perfectly chunked
LOBs is unknown.
The number of mass deletes from a segmented or LOB table
space, or the number of dropped tables from a segmented
table space since the last time the REORG or LOAD
REPLACE utilities were run, or since the object was created.
A null value indicates that the number of mass deletes is
unknown.
The number of overflow records that are created and
relocated near the pointer record since the last time the
REORG and LOAD REPLACE utilities were run, or since the
object was created. For non-segmented table spaces, a page
is near the present page if the two page numbers differ by 16
or less. For segmented table spaces, a page is near the
present page if the two page numbers differ by SEGSIZE*2
or less. A null value indicates that the number of overflow
records that are near the pointer record is unknown.
The number of overflow records that are created and
relocated far from the pointer record since the last time the
REORG and LOAD REPLACE utilities were run, or since the
object was created. For non-segmented table spaces, a page
is far from the present page if the two page numbers differ by
more than 16. For segmented table spaces, a page is far
from the present page if the two page numbers differ by at
least (SEGSIZE*2)+1. A null value indicates that the number
of overflow records that are near the pointer record is
unknown.
The timestamp of the last RUNSTATS on the table space or
partition.
The number of records or LOBs that have been inserted into
DB2 10 for z/OS

YL&A DB2 10 for z/OS Reference Guide

STATSDELETES

INTEGER

STATSUPDATES

INTEGER

STATSMASSDELETE

INTEGER

COPYLASTTIME

TIMESTAMP

COPYUPDATEDPAGES

INTEGER

COPYCHANGES

INTEGER

COPYUPDATELRSN

CHAR(6)

COPYUPDATETIME

TIMESTAMP

IBMREQD

CHAR(1)

DBID

SMALLINT

PSID

SMALLINT

PARTITION

SMALLINT

INSTANCE

SMALLINT

SPACE

INTEGER

DB2 10 for z/OS

the table space or partition or loaded into the table space or


partition using the LOAD utility specified without the
REPLACE option since the last time that the RUNSTATS
utility was run, or since the object was created. A null value
indicates that the number of inserted records or LOBs is
unknown.
The number of records or LOBs that have been deleted from
the table space or partition since the last time that the
RUNSTATS utility was run, or since the object was created. A
null value indicates that the number of deleted records or
LOBs is unknown.
The number of rows that have been updated in the table
space or partition since the last time that the RUNSTATS
utility was run, or since the object was created. A null value
indicates that the number of updated rows is unknown.
The number of mass deletes from a segmented or LOB table
space, or the number of tables that are dropped from a
segmented table space, since the last time the RUNSTATS
utility was run, or since the object was created. A null value
indicates that the number of mass deletes is unknown.
The timestamp of the last full or incremental image copy of
the table space or partition, or since the object was created.
A null value indicates that the COPY utility has never been
run on the table space or partition. A null value can also
indicate that the timestamp of the last image copy is
unknown.
The number of distinct types that have been updated since
the last time that the COPY utility was run, or since the object
was created. A null value indicates that the number of
updated pages is unknown.
The number of insert, update, and delete operations, or the
number of records loaded, since the last time that the COPY
utility was run, or since the object was created. A null value
indicates that the number of insert, update, and delete
operations or the number of records loaded is unknown.
The LRSN or RBA of the first update after the last COPY
A null value indicates that the LRSN or RBA is unknown.
The timestamp of the first update after the last COPY.
A null value indicates that the timestamp is unknown.
A value of Y indicates that the row came from the basic
machine-readable material (MRM) tape.
The internal identifier of the database. This column is used to
map a DBID to its statistics.
The internal identifier of the table space page set descriptor.
This column is used to map a PSID to its statistics.
The data set number within the table space. This column is
used to map a data set number in a table space to its
statistics. For partitioned table spaces, this value corresponds
to the partition number for a single partition. For nonpartitioned table spaces, this value is 0.
Indicates if the object is associated with data set instance 1
or 2. This is an updatable column.
The amount of space, in KB, that is allocated to the table
393

YL&A DB2 10 for z/OS Reference Guide

TOTALROWS
DATASIZE

BIGINT
BIGINT

UNCOMPRESSEDDATASIZE
DBNAME

BIGINT

NAME

CHAR(8)

REORGSCANACCESS

BIGINT

REORGHASHACCESS

BIGINT

HASHLASTUSED

TIMESTAMP

REORGCLUSTERSENS

BIGINT

DRIVETYPE

CHAR(3)

LPFACILITY

CHAR(1)

CHAR(8)

BIGINT

space or partition.
For multi-piece linear page sets, this value is the amount of
space in all data sets.
The number of rows or LOBs in the table space or partition.
The total number of bytes that row data occupy in the data
rows or LOB rows. This is an updatable column.
This column is not used. The value is always set to 0.
The name of the database. This column is used to map a
database to its statistics.
The name of the table space. This column is used to map a
table space to its statistics.
The number of times data is accessed for SELECT, FETCH,
searched UPDATE, or searched DELETE since the last
CREATE, LOAD REPLACE or REORG, or since the object
was created.A null value indicates that the number of times
data is accessed is unknown.
The number of times data is accessed using hash access for
SELECT, FETCH, searched UPDATE, searched DELETE, or
used to enforce referential integrity constraints since the last
CREATE, LOAD REPLACE or REORG, or since the object
was created. A null value indicates that the number of times
data is accessed is unknown.
The date when hash access was last used for SELECT,
FETCH, searched UPDATE, searched DELETE, or used to
enforce referential integrity constraints.
The number of times data has been read by SQL statements
that are sensitive to the clustering sequence of the data since
the last REORG or LOAD REPLACE, or since the object was
created.
The drive type on which the table space or table space
partition data set is defined.
HDD Hard Disk Drive
SSD Solid State Drive
For multi-volume data sets, the drive type is set to SSD if any
volume is SSD. For multi-piece linear page sets, the drive
type of the first data set is used. This is an updatable column.
Whether the disk control unit has the high performance list
prefetch facility.
N No
Y Yes
A NULL value indicates that it is unknown whether the disk
control unit has the high performance list prefetch facility.
This is an updatable column.
Reserved for future IBM use.

SYSIBM.SYSTABLES_HIST
Contains rows from SYSTABLES. Can be inserted, updated, and deleted.
Column Name
NAME
CREATOR
DBNAME
394

Data Type
VARCHAR(128)
VARCHAR(128)
VARCHAR(24)

Description
Name of the table, view, or alias.
Schema of the owner of the table, view, or alias.
For a table, or a view of tables ,the name of the database
DB2 10 for z/OS

YL&A DB2 10 for z/OS Reference Guide


Column Name

Data Type

TSNAME

VARCHAR(24)

COLCOUNT

SMALLINT

PCTPAGES

SMALLINT

PCTROWCOMP

SMALLINT

STATSTIME

TIMESTAMP

CARDF

FLOAT(8)

NPAGESF

FLOAT(8)

AVGROWLEN

INTEGER

SPACEF

FLOAT(8)

IBMREQD

CHAR(1)

Description
that contains the tablespace named in TSNAME. For a
temporary table, an alias, or a view of a view, the value is
DSNDB06.
For a table, or a view of one table, the name of the
tablespace that contains the table. For a view of more than
one table, the name of a tablespace that contains one of the
tables. For a temporary table, the value is SYSPKAGE. For a
view of a view, the value is SYSVIEWS. For an alias, it is
SYSDBAUT.
Number of columns in the table or view. The value is 0 if the
row describes an alias.
Percentage of active tablespace pages that contain rows of
the table. A page is termed active if it is formatted for rows,
regardless of whether it contains any. If the tablespace is
segmented, the percentage is based on the number of active
pages in the set of segments assigned to the table. The
value is -1 if statistics have not been gathered, or the row
describes a view, alias, temporary table, or auxiliary table.
Percentage of rows compressed within the total number of
active rows in the table. This includes any row in a
tablespace that is defined with COMPRESS YES. The value
is -1 if statistics have not been gathered, or the row
describes a view, alias, temporary table, or auxiliary table.
If RUNSTATS updated the statistics, the date and time when
the last invocation of RUNSTATS updated the statistics. The
default value is 0001-01-01.00.00.00.000000. For a
temporary table, the value of STATSTIME is always the
default value.
Total number of rows in the table or total number of LOBs in
an auxiliary table. The value is -1 if statistics have not been
gathered or the row describes a view, alias, or temporary
table.
Total number of pages on which rows of the partition appear.
The value is -1 if statistics have not been gathered.
Average row length of the table specified in the tablespace.
The value is -1 if statistics have not been gathered.
Kilobytes of DASD storage. The value is -1 if statistics have
not been gathered. This is an updatable column.
A value of Y indicates that the row came from the basic
machine-readable material (MRM) tape.

SYSIBM.SYSTABLES_PROFILES
Contains one row for each profile that is associated with a table in SYSIBM.SYSTABLES.
Column Name
SCHEMA
TBNAME
PROFILE_TYPE
PROFILE_TEXT
ROWID
PROFILE_UPDATE
DB2 10 for z/OS

Data Type
VARCHAR(128)
VARCHAR(128)
VARCHAR(32)
VARCHAR(32)
CLOB(1M)
ROWID
TIMESTAMP

Description
The schema (qualifier) for the table.
The table name.
The type of profile. Allowed values are 'RUNSTATS'.
Internal use only.
The text of the profile.
The ROWID value for the LOB column of this table.
The last time the profile was updated, or the timestamp
395

YL&A DB2 10 for z/OS Reference Guide


Column Name

Data Type

Description
for when the profile was inserted into the table.

PROFILE_USED

TIMESTAMP

The last time the profile was used.

SYSIBM.SYSTABLES_PROFILE_TEXT
Auxiliary table for the PROFILE_TEXT column of the SYSIBM.SYSTABLE_PROFILE table.
Column Name
PROFILE_TEXT

Data Type
CLOB(2M)

Description
The complete text for the profile that the row represents

SYSIBM.SYSTABSTATS
Contains one row for each partition of a partitioned tablespace. Can be inserted, updated, and
deleted.
Column Name
CARD
NPAGES
PCTPAGES

Data Type
INTEGER
INTEGER
SMALLINT

NACTIVE
PCTROWCOMP

INTEGER
SMALLINT

STATSTIME

TIMESTAMP

IBMREQD

CHAR(1)

DBNAME
TSNAME
PARTITION
OWNER
NAME
CARDF

VARCHAR(24)
VARCHAR(24)
SMALLINT
VARCHAR(128)
VARCHAR(128)
FLOAT

Description
Total number of rows in the partition.
Total number of pages on which rows of the partition appear.
Percentage of total active pages in the partition that contain rows
of the table.
Number of active pages in the partition.
Percentage of rows compressed within the total number of
active rows in the partition. This includes any row in a table
space that is defined with COMPRESS YES.
If RUNSTATS updated the statistics, the date and time when the
last invocation of RUNSTATS updated the statistics.
A value of Y indicates that the row came from the basic machinereadable material (MRM) tape.
Database that contains the tablespace named in TSNAME.
Tablespace that contains the table.
Partition number of the tablespace that contains the table.
Schema of the table.
Name of the table.
Total number of rows in the partition.

SYSIBM.SYSTABSTATS_HIST
Contains rows from SYSTABLES. Can be inserted, updated, and deleted.
Column Name
NPAGES
STATSTIME

Data Type
INTEGER
TIMESTAMP

DBNAME
TSNAME
PARTITION
OWNER
NAME
CARDF

VARCHAR(24)
VARCHAR(24)
SMALLINT
VARCHAR(128)
VARCHAR(128)
FLOAT(8)

IBMREQD

CHAR(1)

396

Description
Total number of pages on which rows of the partitions appear.
If RUNSTATS updated the statistics, the date and time when the
last invoation of RUNSTATS updated the statistics.
Database that contains the table space in TSNAME.
Table space that contains the table.
Partition number of the table space that contains the table.
Schema of the table.
Name of the table.
Total number of rows in the partition. The value is 1 is statistics
have not been gathered.
A value of Y indicates that the row came from the basic
DB2 10 for z/OS

YL&A DB2 10 for z/OS Reference Guide


Column Name

Data Type

Description
machine-readable material (MRM) tape.

SYSIBM.SYSTRIGGERS
Contains one row for each trigger.
Column Name
NAME
SCHEMA

Data Type
VARCHAR(128)
VARCHAR(128)

DBID
OBID
OWNER
CREATEDBY
TBNAME
TBOWNER
TRIGTIME

SMALLINT
SMALLINT
SMALLINT
VARCHAR(128)
VARCHAR(128)
VARCHAR(128)
VARCHAR(128)
CHAR(1)

TRIGEVENT

CHAR(1)

GRANULARITY

CHAR(1)

CREATEDTS

TIMESTAMP

IBMREQD

CHAR(1)

REMARKS

VARCHAR(6000)
VARCHAR(762)

TRIGNAME
OWNERTYPE

VARCHAR(18)
CHAR(1)

ENVID
RELCREATED

INTEGER
CHAR(1)

SECURE

CHAR(1)
CHAR(1)
INTEGER
VARCHAR(96)
CHAR(1)

DB2 10 for z/OS

Description
Name of the trigger and trigger package.
Schema of the trigger. This implicit or explicit qualifier for the
trigger name is also used for the collection ID of the trigger
package.
Not used.
Internal identifier of the database for the trigger.
Internal identifier of the trigger.
Owner of the trigger.
Primary authorization ID of the creator of the trigger.
Name of the table or view.
Qualifier of the name of the table to which this trigger applies.
Time when triggered actions are applied to the base table,
relative to the event that activated the trigger:
B
Trigger is applied before the event.
A
Trigger is applied after the event.
I
Trigger is applied instead of the event.
Operation that activates the trigger:
I
Insert
D
Delete
U
Update
Trigger is executed once per:
S
Statement
R
Row
Time when the CREATE statement was executed for this trigger.
The time value is used in resolving functions, distinct types, and
stored procedures. It is also used to order the execution of multiple
triggers.
A value of Y indicates that the row came from the basic machinereadable material (MRM) tape.
Not used.
A character string provided by the user with the COMMENT ON
statement.
Unused.
Indicates the type of creator:
blank Authorization ID
L
Role
Internal environment identifier.
The release of DB2 that is used to create the object. Blank if
created prior to Version 9.
Reserved for IBM use.
Reserved for IBM use.
Reserved for IBM use.
Reserved for IBM use.
Indicates if the trigger is secured:
397

YL&A DB2 10 for z/OS Reference Guide


Column Name

Data Type

ALTEREDTS
ROWID
STATEMENT

TIMESTAMP
ROWID
CLOB(2M)

Description
N The trigger is not secured
Y The trigger is secured
Time when the last ALTER statement was executed for this trigger
ROWID column, created for the lob columns in this table.
The text of the entire CREATE TRIGGER statement that was used
to create the object.

SYSIBM.SYSTRIGGERS_STMT
An auxiliary table for the STATEMENT column of the SYSIBM.SYSTRIGGERS.
Column Name
STATEMENT

Data Type
CLOB(2M)

Description
Text of CREATE TRIGGER statement t used to create the object.

SYSIBM.SYSUSERAUTH
Records the system privileges that are held by users.
Column Name
GRANTOR
GRANTEE

Data Type
VARCHAR(128)
VARCHAR(128)

AUTHHOWGOT

CHAR(12)
CHAR(6)
CHAR(8)
CHAR(1)
CHAR(1)

BINDADDAUTH

CHAR(1)
CHAR(1)

BSDSAUTH

CHAR(1)

CREATEDBAAUTH

CHAR(1)

398

Description
Authorization ID of the user who granted the privileges.
Authorization ID of the user that holds the privilege. Could
also be PUBLIC for a grant to PUBLIC.
Internal use only.
Not used.
Not used.
Not used.
Authorization level of the user from whom the privileges
were received. This authorization level is not necessarily
the highest authorization level of the grantor.
blank Not applicable
C
DBCTL
D
DBADM
E
SECADM
G
ACCESSCTRL
L
SYSCTRL
M
DBMAINT
O
SYSOPR
S
SYSADM
Not used.
Whether the GRANTEE can use the BIND subcommand
with the ADD option:
blank Privilege is not held
G
Privilege is held with the GRANT option
Y
Privilege is held without the GRANT option
Whether the GRANTEE can issue the RECOVER BSDS
command:
blank Privilege is not held
G
Privilege is held with the GRANT option
Y
Privilege is held without the GRANT option
Whether the GRANTEE can create databases and
automatically receive DBADM authority over the new
databases:
blank Privilege is not held
DB2 10 for z/OS

YL&A DB2 10 for z/OS Reference Guide


Column Name

Data Type

CREATEDBCAUTH

CHAR(1)

CREATESGAUTH

CHAR(1)

DISPLAYAUTH

CHAR(1)

RECOVERAUTH

CHAR(1)

STOPALLAUTH

CHAR(1)

STOSPACEAUTH

CHAR(1)

SYSADMAUTH

CHAR(1)

SYSOPRAUTH

CHAR(1)

TRACEAUTH

CHAR(1)

IBMREQD

CHAR(1)

MON1AUTH

CHAR(1)

DB2 10 for z/OS

Description
G
Privilege is held with the GRANT option
Y
Privilege is held without the GRANT option
Whether the GRANTEE can execute the CREATE
DATABASE statement to create new databases and
automatically receive DBCTRL authority over the new
databases:
blank Privilege is not held
G
Privilege is held with the GRANT option
Y
Privilege is held without the GRANT option
Whether the GRANTEE can execute the CREATE
STOGROUP statement to create new storage groups:
blank Privilege is not held
G
Privilege is held with the GRANT option
Y
Privilege is held without the GRANT option
Whether the GRANTEE can use the DISPLAY commands:
blank Privilege is not held
G
Privilege is held with the GRANT option
Y
Privilege is held without the GRANT option
Whether the GRANTEE can use the RECOVER INDOUBT
command:
blank Privilege is not held
G
Privilege is held with the GRANT option
Y
Privilege is held without the GRANT option
Whether the GRANTEE can use the STOP command:
blank Privilege is not held
G
Privilege is held with the GRANT option
Y
Privilege is held without the GRANT option
Whether the GRANTEE can use the STOSPACE utility:
blank Privilege is not held
G
Privilege is held with the GRANT option
Y
Privilege is held without the GRANT option
Whether the GRANTEE has system administration
authority:
blank Privilege is not held
G
Privilege is held with the GRANT option
Y
Privilege is held without the GRANT option
GRANTEE has the privilege with the GRANT option for a
value of either Y or G.
Whether the GRANTEE has system operator authority:
blank Privilege is not held
G
Privilege is held with the GRANT option
Y
Privilege is held without the GRANT option
Whether the GRANTEE can issue the START TRACE and
STOP TRACE commands:
blank Privilege is not held
G
Privilege is held with the GRANT option
Y
Privilege is held without the GRANT option
A value of Y indicates that the row came from the basic
machine-readable material (MRM) tape.
Whether the GRANTEE can obtain IFC serviceability data:
blank Privilege is not held
G
Privilege is held with the GRANT option
Y
Privilege is held without the GRANT option
399

YL&A DB2 10 for z/OS Reference Guide


Column Name
MON2AUTH

Data Type
CHAR(1)

CREATEALIASAUTH

CHAR(1)

SYSCTRLAUTH

CHAR(1)

BINDAGENTAUTH

CHAR(1)

ARCHIVEAUTH

CHAR(1)

GRANTEDTS

CHAR(1)
CHAR(1)
TIMESTAMP

CREATETMTABAUTH

CHAR(1)

GRANTEETYPE

CHAR(1)

GRANTORTYPE

CHAR(1)

DEBUGSESSIONAUTH

CHAR(1)

EXPLAINAUTH

CHAR(1)

SQLADMAUTH

CHAR(1)

400

Description
Whether the GRANTEE can obtain IFC data:
blank Privilege is not held
G
Privilege is held with the GRANT option
Y
Privilege is held without the GRANT option
Whether the GRANTEE can execute the CREATE ALIAS
statement:
blank Privilege is not held
G
Privilege is held with the GRANT option
Y
Privilege is held without the GRANT option
Whether the GRANTEE has SYSCTRL authority:
blank Privilege is not held
G
Privilege is held with the GRANT option
Y
Privilege is held without the GRANT option
GRANTEE has the privilege with the GRANT option for a
value of either Y or G.
Whether the GRANTEE has BINDAGENT privilege:
blank Privilege is not held
G
Privilege is held with the GRANT option
Y
Privilege is held without the GRANT option
Whether the GRANTEE is privileged to use the ARCHIVE
LOG command:
blank Privilege is not held
G
Privilege is held with the GRANT option
Y
Privilege is held without the GRANT option
Not used.
Not used.
Time when the GRANT statement was executed. The value
is '1985-04-01.00.00.00.000000' for the one installation
row.
Whether the GRANTEE has CREATETMTABAUTH
privilege:
blank Privilege is not held
G
Privilege is held with the GRANT option
Y
Privilege is held without the GRANT option
Indicates the type of grantee:
blank
Authorization ID
L
Role
Indicates the type of grantor:
blank
Authorization ID
L
Role
Whether the GRANTEE has DEBUGSESSION privilege:
blank
Privilege is not held
G
Privilege is held with the GRANT option
Y
Privilege is held without the GRANT option
Whether the GRANTEE can explain and prepare
statements:
blank Privilege is not held
G
Privilege is held with the GRANT option
Y
Privilege is held without the GRANT option
Whether the GRANTEE has SQLADM authority:
Blank Privilege is not held
G
Privilege is held with the GRANT option
DB2 10 for z/OS

YL&A DB2 10 for z/OS Reference Guide


Column Name

Data Type

SDBADMAUTH

CHAR(1)

DATAACCESSAUTH

CHAR(1)

ACCESSCTRLAUTH

CHAR(1)

CREATESECURE
AUTH

CHAR(1)

Description
Y
Privilege is held without the GRANT option
Whether the GRANTEE has system DBADM authority:
blank Privilege is not held
Y
Privilege is held without the GRANT option
Whether the GRANTEE has DATAACCESS authority:
blank Privilege is not held
Y
Privilege is held without the GRANT option
Whether the GRANTEE has ACCESSCTRL authority:
blank Privilege is not held
Y
Privilege is held without the GRANT optio
Whether the GRANTEE can create secured objects (triggers
and user-defined functions):
blank Privilege is not held
Y
Privilege is held without the GRANT option

SYSIBM.SYSVIEWDEP
Records the dependencies of views on tables, functions, and other views.
Column Name
BNAME

Data Type
VARCHAR(128)

BCREATOR

VARCHAR(128)

BTYPE

CHAR(1)

DNAME
DCREATOR
IBMREQD

VARCHAR(128)
VARCHAR(128)
CHAR(1)

BSCHEMA
DTYPE

VARCHAR(128)
CHAR(1)

DOWNER

VARCHAR(128)

OWNERTYPE

CHAR(1)

Description
Name of the object on which the view is dependent. If the object
type is a function (BTYPE='F'), the name is the specific name of
the function.
Authorization ID of the owner of BNAME. For functions, it is the
schema name of the BNAME.
Type of object:
F
Function
M
Materialized query table
T
Table
V
View
Name of the view.
Schema of the view.
A value of Y indicates that the row came from the basic machinereadable material (MRM) tape.
Schema of BNAME.
Type of table
F
SQL Function
M Materialized
V View
Authorization ID of the owner of the view, blank for views that
were created in a DB2 release prior to Version 9.
Indicates the type of owner:
blank
Authorization ID
L
Role

SYSIBM.SYSVIEWS
Contains one or more rows for each view.
Column Name
NAME
CREATOR

DB2 10 for z/OS

Data Type
VARCHAR(128)
VARCHAR(128)
SMALLINT

Description
Name of the view.
Schema of the view.
Not used.
401

YL&A DB2 10 for z/OS Reference Guide


Column Name

Data Type

Description

CHECK

CHAR(1)

IBMREQD

CHAR(1)

PATHSCHEMAS

VARCHAR(1500)
VARCHAR(2048)

RELCREATED

CHAR(1)

TYPE

CHAR(1)

REFRESH

CHAR(1)

ENABLE

CHAR(1)

MAINTENANCE

CHAR(1)

REFRESH_TIME

TIMESTAMP

ISOLATION

CHAR(1)

SIGNATURE
APP_ENCODING_
CCSID

VARCHAR(1024)
INTEGER

OWNER

VARCHAR(128)

OWNERTYPE

CHAR(1)

ENVID

INTEGER

Whether the WITH CHECK OPTION clause was specified in the


CREATE VIEW statement:
N
No
C
Yes with the cascaded semantic
Y
Yes with the local semantic
The value is N if the view has no WHERE clause.
A value of Y indicates that the row came from the basic machinereadable material (MRM) tape.
Not used.
SQL path at the time the view was defined. The path is used to
resolve unqualified data type and function names used in the
view definition.
The release of DB2 that is used to create the object. Blank if
created prior to Version 9.
Type of table
F
SQL Function
M Materialized Query Table
V View
Refresh mode
D
An MQT with a deferred refresh mode
Blank Not an MQT
Indicates whether an MQT is enabled or disabled for query
optimization:
Y
Enabled
N
Disabled
Blank Row describes a view
Maintenance Mode
S
Maintained by system
U
Maintained by user
Blank
Row describes a view
For REFRESH = 'D' and MAINTENANCE = 'S', the timestamp of
the REFRESH TABLE statement that last refreshed the data.
Otherwise, this is the default timestamp ('0001-0101.00.00.00.000000').
Isolation level when the materialized query table is created or
altered from a base table:
R
RR (repeatable read)
S
CS (cursor stability)
T
RS (read stability)
U
UR (uncommitted read)
blank Not a materialized query table
Contains the internal description. Used for MQT tables
CCSID of the current application encoding scheme at the time
the object was created. For objects created prior to Version 8 of
DB2, the value is 0.
Authorization ID of the owner of the view, blank for views that
were created in a DB2 release prior to Version 9.
Indicates the type of owner:
blank
Authorization ID
L
Role
Internal environment identifier.

402

DB2 10 for z/OS

YL&A DB2 10 for z/OS Reference Guide


Column Name
ROWID
STATEMENT

Data Type
ROWID
CLOB(2M)

Description
ROWID column, created for the lob columns in this table
The text of the entire CREATE VIEW statement that was used to
create the object.
Internal use only.

BLOB(1G)

SYSIBM.SYSVIEWS_STMT
Auxiliary table for the STATEMENT column of the SYSIBM.SYSVIEWS table.
Column Name
STATEMENT

Data Type
CLOB(2M)

Description
The text of the statement that was used to create the object.

SYSIBM.SYSVIEWS_TREE
An auxiliary table for the PARSETREE column of the SYSIBM.SYSVIEWS table.
Column Name

Data Type
BLOB(2M)

Description
Internal use only.

SYSIBM.SYSVOLUMES
Contains one row for each volume of each storage group.
Column Name
SGNAME
SGCREATOR
VOLID
IBMREQD

Data Type
VARCHAR(128)
VARCHAR(128)
VARCHAR(18)
CHAR(1)

RELCREATED

CHAR(1)

Description
Name of the storage group.
Authorization ID of the owner of the storage group.
Serial number of the volume or * if SMS-managed.
A value of Y indicates that the row came from the basic machinereadable material (MRM) tape
The release of DB2 that is used to create the object. Blank if
created prior to Version 9.

SYSIBM.SYSXMLRELS
Contains one row for each XML table that is created for an XML column.
Column Name
TBOWNER
TBNAME
COLNAME
XMLTBOWNER
XMLTBNAME
XMLRELOBID

Data Type
VARCHAR(128)
VARCHAR(128)
VARCHAR(128)
VARCHAR(128)
VARCHAR(128)
INTEGER

IBMREQD

CHAR(1)

CREATEDTS
RELCREATED

TIMESTAMP
CHAR(1)

Description
Schema or qualifier of the base table.
Name of the base table.
Name of the XML column in the base table.
Schema or qualifier of the XML table.
Name of the XML table.
Internal identifier of the relationship between the base table and the
XML table.
A value of Y indicates that the row came from the basic machinereadable material (MRM) tape.
Time when the XML table was created.
The release of DB2 that is used to create the object.

SYSIBM.SYSXMLSTRINGS
Each row contains a single string and its unique ID that are used to condense XML data. The
string can be an element name, attribute name, name space prefix, or a namespace URI.
DB2 10 for z/OS

403

YL&A DB2 10 for z/OS Reference Guide


Column
Name
STRINGID
STRING
IBMREQD

Data Type

Description

INTEGER
VARCHAR(1000)
CHAR(1)

Unique ID for the string.


The string data.
A value of Y indicates that the row came from the basic machinereadable material (MRM) tape.

SYSIBM.USERNAMES
Each row in the table is used to carry out one of the following operations:

Outbound ID translation

Inbound ID translation and "come from" checking


Can be inserted, updated, and deleted.
Column Name
TYPE

Data Type
CHAR(1)

AUTHID

VARCHAR(128)

LINKNAME

VARCHAR(24)

NEWAUTHID

VARCHAR(128)

PASSWORD

VARCHAR(24)

IBMREQD

CHAR(1)

404

Description
How the row is to be used:
O For outbound translation.
I
For inbound translation and "come from" checking.
S For outbound system AUTHID to establish a trusted connection.
Authorization ID to be translated. Applies to any authorization ID if
blank.
Identifies the VTAM or TCP/IP network locations associated
with this row. A blank value in this column indicates this name
translation rule applies to any TCP/IP or SNA partner. If a nonblank
LINKNAME is specified, one or both of the following statements must
be true:
o A row exists in SYSIBM.LUNAMES whose LUNAME
matches the value specified in the SYSIBM.USERNAMES
LINKNAME column. This row specifies the VTAM site
associated with this name translation rule.
o A row exists in SYSIBM.IPNAMES whose
LINKNAME matches the value specified in the
SYSIBM.USERNAMES LINKNAME column. This row specifies
the TCP/IP host associated with this name translation rule.
Inbound name translation and "come from" checking are not
performed for TCP/IP clients.
Translated value of AUTHID. Blank specifies no translation.
NEWAUTHID can be stored as encrypted data by calling the
DSNLEUSR stored procedure. To send the encrypted value of
AUTHID across a network, one of the encryption security options in
the SYSIBM.IPNAMES table should be specified.
Password to accompany an outbound request, if passwords are not
encrypted by RACF. If passwords are encrypted, or the row is for
inbound requests, the column is not used.PASSWORD can be stored
as encrypted data by calling the DSNLEUSR stored procedure. To
send the encrypted value of PASSWORD across a network, one of
the encryption security options in the SYSIBM.IPNAMES table should
be specified.
value of Y indicates that the row came from the basic machinereadable material (MRM) tape.

DB2 10 for z/OS

YL&A DB2 10 for z/OS Reference Guide

SYSIBM.SYSXMLTYPMOD
Contains rows about the XML type modifiers of XML columns. Can be inserted, updated and
deleted
Column Name
XML_
TYPEMOD_ID
TYPE_
ANNOTATION

Data Type
INTEGER

CREATEDTS
ALTEREDTS
RELCREATED
IBMREQD

TIMESTAMP
TIMESTAMP
CHAR(1)
CHAR(1)

CREATEDBY

VARCHAR(128)

CHAR(1)

Description
An id generated for the XML type modifier, it is an identity column and
primary key.
Indicate whether there is type annotation.
Y WITH type annotation
N with no type annotation.
The timestamp when this type modifier is created.
The timestamp when this type modifier is altered
The release of DB2 that is used to create the object.
Value of Y indicates that the row came from the basic machinereadable material (MRM) tape.
Primary authorization ID of the user who created the
database.

SYSIBM.SYSXMLTYPMSCHEMA
Contains the XML schema information for an XML type modifier.
Column Name
XML_
TYPEMOD_ID
XSROBJECTID
ELEMENT_
NAMESPACE

Data Type
INTEGER

Description
The id for the XML type modifier.

INTEGER
INTEGER

ELEMENT_
NAME
CREATEDTS
ALTEREDTS
RELCREATED
IBMREQD

INTEGER

The id for an XML schema registered in XSR.


String id for the namespace name of the root element node. By
default, it is the TARGETNAMESPACE of the XML schema. It would
be 0 if it is NO NAMESPACE.
String id for the local name of the root element node. It would be 0 if it
is not specified.
The timestamp when this type modifier is created.
The timestamp when this type modifier is altered
The release of DB2 that is used to create the object.
Value of Y indicates that the row came from the basic machinereadable material (MRM) tape.

TIMESTAMP
TIMESTAMP
CHAR(1)
CHAR(1)

SYSIBM.XSRCOMPONENT
An auxiliary table for the BLOB column COMPONENT in
SYSIBM.SYSXSROBJECTCOMPONENTS.
Column Name
COMPONENT

Data Type
BLOB(30M)

Description
Contents of the XML schema document

SYSIBM.XSROBJECTS
Contains one row for each registered XML schema.
Column Name
XSROBJECTID

DB2 10 for z/OS

Data Type
INTEGER

Description
Internal identifier of the XML schema. XSROBJECTID is
generated as an identity column.
405

YL&A DB2 10 for z/OS Reference Guide


XSROBJECT
SCHEMA
XSROBJECT
NAME
TARGET
NAMESPACE

VARCHAR(128)

SCHEMA
LOCATION

INTEGER

ROWID
GRAMMAR
PROPERTIES
CREATEDBY
CREATEDTS

ROWID
BLOB(250M)
BLOB(5M)
VARCHAR(128)
TIMESTAMP

STATUS

CHAR(1)

RELCREATED

CHAR(1)
CHAR(1)
VARCHAR(128)
VARCHAR(762)

REMARKS

VARCHAR(128)
INTEGER

Qualifier of the XML schema name. This is always set to


SYSXSR.
Name of the XML schema.
The value of the STRINGID column in
SYSIBM.SYSXMLSTRINGS when the target namespace URI of
the primary XML schema document is stored in
SYSIBM.SYSXMLSTRINGS
The value of the STRINGID column in
SYSIBM.SYSXMLSTRINGS when the schema location URI of
the primary XML schema document is stored in
SYSIBM.SYSXMLSTRINGS
ID that is used to support BLOB data type values.
The internal binary representation of the XML schema.
Additional property information of the entire XML schema.
Authorization ID under which the XML schema was created.
The time that the DB2-supplied stored procedure
XSR_REGISTER was executed for the XML schema.
Registration status of the XML schema:
C Complete
I Incomplete
T Temporary
The release of DB2 that is used to create the object.
Not used.
Not used.
Character string that contains comments about this XML
schema.

SYSIBM.XSROBJECTCOMPONENTS
Contains one row for each component (document) in an XML schema.
Column Name
XSRCOMPONENTID

Data Type
INTEGER

TARGETNAMESPACE

INTEGER

SCHEMALOCATION

INTEGER

ROWID
COMPONENT
PROPERTIES

ROWID
BLOB(30M)
BLOB(5M)

CREATEDTS
STATUS

TIMESTAMP
CHAR(1)

RELCREATED

CHAR(1)

406

Description
Internal identifier of the XML schema document.
XSRCOMPONENTID is generated as an identity column.
The value of the STRINGID column in
SYSIBM.SYSXMLSTRINGS when the target namespace URI of
the primary XML schema document is stored in
SYSIBM.SYSXMLSTRINGS.
The value of the STRINGID column in
SYSIBM.SYSXMLSTRINGS when the schema location URI of
the primary XML schema document is stored in
SYSIBM.SYSXMLSTRINGS.
The ID that is used to support BLOB data type values.
Contents of the XML schema document.
If available, additional property information of the XML schema
document
The time that the XML schema document was registered.
Registration status of the XML schema:
C Complete
I Incomplete
The release of DB2 that is used to create the object.
DB2 10 for z/OS

YL&A DB2 10 for z/OS Reference Guide

SYSIBM.XSROBJECTGRAMMER
An auxiliary table for the BLOB column GRAMMAR in SYSIBM.SYSXSROBJECTS.
Column Name
GRAMMAR

Data Type
BLOB(250M)

Description
Internal binary representation of the XML schema

SYSIBM.XSROBJECTHIERARCHIES
SYSIBM.XSROBJECTHIERARCHIES contains one row for each component (document) in an
XML schema to record the XML schema document hierarchy relationship. Rows in this table
can only be changed using static SQL statements issued by the DB2-supplied XSR stored
procedures.
Column Name
XSROBJECTID
XSRCOMPONENTID
HTYPE

Data Type
INTEGER
INTEGER
CHAR(1)

TARGETNAMESPACE

INTEGER

SCHEMALOCATION

INTEGER

RELCREATED

CHAR(1)

Description
Internal identifier of the XML schema.
Internal identifier of the XML schema document.
Hierarchy type:
D Document
P Primary document
The value of the STRINGID column in
SYSIBM.SYSXMLSTRINGS when the target namespace URI of
the primary XML schema document is stored in
SYSIBM.SYSXMLSTRINGS.
The value of the STRINGID column in
SYSIBM.SYSXMLSTRINGS when the schema location URI of the
primary XML schema document is stored in
SYSIBM.SYSXMLSTRINGS.
The release of DB2 that is used to create the object.

SYSIBM.XRSOBJECTPROPERTY
An auxiliary table for the BLOB column PROPERTIES in SYSIBM.SYSXSROBJECTS.
Column Name
PROPERTIES

Data Type
BLOB(5M)

Description
Contents of the additional property information of the entire XML schema.

SYSIBM.XSRPROPERTY
An auxiliary table for BLOB column PROPERTIES in
SYSIBM.SYSXSROBJECTCOMPONENTS.
Column Name
PROPERTIES

DB2 10 for z/OS

Data Type
BLOB(5M)

Description
Contents of the additional property information of the XML schema
document

407

YL&A DB2 10 for z/OS Reference Guide

Updateable Catalog Statistics


The following table shows the catalog statistics that are updateable and used for
access path selection.
Table

Statistics

SYSIBM.SYSCOLDIST

CARDF
COLGROUPCOLNO
COLVALUE
FREQUENCYF
HIGHVALUE
LOWVALUE
NUMCOLUMNS
QUANTILENO
TYPE
HIGHVALUE
QUANTILENO
COLCARDF
HIGH2KEY
LOW2KEY
CLUSTERRATIOF
FIRSTKEYCARDF
FULLKEYCARDF
NLEAF
NLEVELS
DATAREPEATFACTORF
DATAREPEATFACTORF
HIGH2KEY
LOW2KEY
STATS_FORMAT
HIGHKEY
HIGH2KEY
LOWKEY
LOW2KEY
STATS_FORMAT
CARDF
KEYGROUPKEYNO
KEYVALUE
FREQUENCYF
HIGHVALUE
LOWVALUE
NUMKEYS
QUANTILENO
TYPE
HIGHVALUE
LOWVALUE
QUANTILENO
CARDINALITY
INITIAL_INSTS
INITIAL_IOS
INSTS_PER_INVOC

SYSIBM.SYSCOLDISTSTATS
SYSIBM.SYSCOLUMNS
SYSIBM.SYSINDEXES

SYSIBM.SYSINDEXSTATS
SYSIBM.SYSKEYTARGETS
SYSIBM.SYSKEYTARGETSTATS

SYSIBM.SYSKEYTGTDIST

SYSIBM.SYSKEYTGTDISTSTATS
SYSIBM.SYSROUTINES

408

DB2 10 for z/OS

YL&A DB2 10 for z/OS Reference Guide


SYSIBM.SYSTABLES

SYSIBM.SYSTABLESPACE
SYSIBM.SYSTABSTATS

DB2 10 for z/OS

IOS_PER_INVOC
CARDF
NPAGES
NPAGESF
PCTROWCOMP
NACTIVE
CARDF
NPAGES

409

YL&A DB2 10 for z/OS Reference Guide

IBM Utilities
BACKUP SYSTEM
.-FULL-----.
>>-BACKUP SYSTEM--+-----------+--+-------------------------+---------------->
'-DATA ONLY-' +-ESTABLISH FCINCREMENTAL-+
'-END FCINCREMENTAL-------'
>--+-----------------------------------------------------------+-----------><
+--FORCE----------------------------------------------------+
+--DUMP--+-------------------+--+-------+-------------------+
|
'- dumpclass-spec---' '-FORCE-'
|
'-DUMPONLY--+-------------------------+-+------------------+'
'- TOKEN- (X'byte-string')' '- dumpclass-spec -'
dumpclass-spec:
>--DUMPCLASS(--dc1---)----------------------------------------------------><
|-dc2-|
|-dc3-|
|-dc4-|
|-dc5-|

CATENFM
>>-CATENFM--+-START----------------------------+---------------------------><
+-COMPLETE-------------------------+
+-ENFMON---------------------------+
+-CMON-----------------------------+
'-CONVERT--INPUT--table-space-name-'

CATMAINT
>>-CATMAINT--UPDATE--------------------------------------------------------->
>--+-------------------------------------------------+---------------------->
|
.-------------------------------------. |
|
V
| |
+-SCHEMA----SWITCH(schema_name,new_schema_name)-+-+
|
.-,----------.
|
|
V
|
|
'-OWNER--FROM--(----owner_name-+--)--TO ROLE------'
>--+-------------------------------------------+---------------------------><
|
.---------------------------------. |
|
V
| |
'-VCAT---SWITCH(vcat_name,new_vcat_name)-+-'

CHECK DATA
.--------------------------------------.
V
|
410

DB2 10 for z/OS

YL&A DB2 10 for z/OS Reference Guide


>>-CHECK--DATA----table-space-spec--+---------------+-+--------------------->
'-PART--integer-' .
.--SHRLEVEL-REFERENCE-.
>-+-------------------------+----------+-+-------+--+---------------------+->
|-INCLUDE-XML-TABLESPACES-+---ALL----| '-CLONE-' '--SHRLEVEL--CHANGE---'
|-xml-spec-|
.-SCOPE--PENDING-----.
>--drain-spec--+--------------------+--------------------------------------->
'-SCOPE--+-AUXONLY-+-'
+-ALL-----+
'-REFONLY-'
.-AUXERROR--REPORT--------.
>--+-------------------------+---------------------------------------------->
'-AUXERROR--INVALIDATE----'
.-LOBERROR--REPORT-----. .-XMLERROR--REPORT-----.
>--+----------------------+--+----------------------+----------------------->
'-LOBERROR--INVALIDATE-' '-XMLERROR--INVALIDATE-'
>--+-------------------------------------------------------+---------------->
|
.-----------------------------------. |
|
V
| |
'-FOR--EXCEPTION----IN--table-name1--USE--table-name2-+-'
.-DELETE--NO---------------. .-EXCEPTIONS--0-------.
>--+---------------------------+--+---------------------+------------------->
|
.-LOG--YES- | '-EXCEPTIONS--integer-'
'-DELETE--YES--+----------+-'
'-LOG--NO--'
.-ERRDDN--SYSERR-.
>--+----------------+------------------------------------------------------->
'-ERRDDN--ddname-'
.-WORKDDN--SYSUT1--,--SYSUT2----------.
>--+-------------------------------------+---------------------------------->
'-WORKDDN--+-ddname1--,--ddname2----+-'
|
.-,--SYSUT2-. |
+-ddname1--+-----------+-+
| .-SYSUT1-.
|
'-+--------+--,--ddname2-'
>--+------------------------+--+-----------------------+-------------------->
|
.-SYSPUNCH-. | '-SORTDEVT--device-type-'
'-PUNCHDDN--+-ddname---+-'
>--+------------------+----------------------------------------------------><
'-SORTNUM--integer-'

CHECK INDEX
>>-CHECK--INDEX------------------------------------------------------------->
>-+-LIST--listdef-name---------------------------------------------------+-->
+-(-index-name-+--------------+-)--------------------------------------+
|
'-PART-integer-'
|
'-(ALL)-TABLESPACE-+----------------+-table-space-name-+-------------+-'
'-database-name.-'
'-PART-integer'
.-SHRLEVEL--REFERENCE-.
>--+-------+--+---------------------+--------------------------->
'-CLONE-' '-SHRLEVEL--CHANGE----'
.-DRAIN_WAIT--IRLMRWT value-. .-RETRY--UTIMOUT value-.
>--+---------------------------+--+----------------------+------>
DB2 10 for z/OS

411

YL&A DB2 10 for z/OS Reference Guide


'-DRAIN_WAIT--integer-------' '-RETRY--integer-------'
.-WORKDDN--SYSUT1-.
>--+----------------------+--+-----------------+---------------------------->
'-RETRY_DELAY--integer-' '-WORKDDN--ddname-'
>--+-----------------------+--+------------------+-------------------------><
'-SORTDEVT--device-type-' '-SORTNUM--integer-'

CHECK LOB
.-SHRLEVEL--REFERENCE-.
>>-CHECK--LOB--lob-table-space-spec--+---------------------+---------------->
'-SHRLEVEL--CHANGE----'
.-EXCEPTIONS--0-------.
>--drain-spec--+---------------------+-------------------------------------->
'-EXCEPTIONS--integer-'
>--+------------------------+--+-----------------------+-------------------->
|
.-SYSPUNCH-. | '-SORTDEVT--device-type-'
'-PUNCHDDN--+-ddname---+-'
>--+------------------+----------------------------------------------------><
'-SORTNUM--integer-'

COPY
.-FULL--YES------------.
>>-+-LIST--listdef-name--| data-set-spec |--+----------------------+----------------------------+----->
|
+-FULL--NO-------------+
|
|
'-| changelimit-spec |-'
|
| .-----------------------------------------------------------------------------------------+|
| V
.-FULL--YES------------. .-DSNUM--ALL---------.
|
'---+-table-space-spec-+--+----------------------+--+--------------------+--data-set-spec-+-'
'-index-name-spec-'
+-FULL--NO-------------+ |
|
'-| changelimit-spec |-' '-DSNUM--integer-----'

>--+----------------------------------------------------------------+-->
'-PARALLEL-+---------------+-+---------------------------------+-'
'-(num-objects)-' '-TAPEUNITS--(--num-tape-units--)-'
(2) .-SYSTEMPAGES--YES-.
>--+-----------+------+------------------+---------------------------------->
'-CHECKPAGE-'
'-SYSTEMPAGES--NO--'
>--+--------------------------------------------------+--------------------><
|
.-NO---------.
|
'-FLASHCOPY--+-YES--------+--+-------------------+-'
'-CONSISTENT-' '-FCCOPYDDN(ddname)-'
Concurrent-spec:
>>-+-LIST--listdef-name--data-set-spec--------------------------------+---->
| .--------------------------------------------------------------. |
| V
.-DSNUM--ALL----------.
| |
'---+-table-space-spec-+--+---------------------+--data-set-spec-+-'
'-index-name-spec--' '-DSNUM--integer------'
>--CONCURRENT--------------------------------------------------><
Filterddn-spec:
>>-+-LIST--listdef-name--------------------------------+-------------------->
412

DB2 10 for z/OS

YL&A DB2 10 for z/OS Reference Guide


| .-----------------------------------------------. |
| V
.-DSNUM--ALL----------. | |
'---+-table-space-spec-+--+---------------------+-+-'
'-index-name-spec--' '-DSNUM--integer------'
>--data-set spec--FILTERDDN--(ddname)--CONCURRENT--------------------------><
data-set spec:
>>-+-COPYDDN(-+-ddname1-------+----------+-+-)-+------------------------------------------+-+-------><
|
|
'-,ddname2-' |
'-RECOVERYDDN(-+-ddname3--+----------+-+-)-' |
|
'-,ddname2-------------------'
|
'-,ddname4-' |
|
|
'-,ddname4--------------'
|
'-RECOVERYDDN(-+-ddname3--+----------+-+-)-----------------------------------------------'
|
'-,ddname4-' |
'-,ddname4--------------'

Change-limit spec:
>>-CHANGELIMIT-+---------------------------------------+-+------------+----><
'-(percent_value1-+-----------------+-)-' '-REPORTONLY-'
'-,percent_value2-'
Tablespace spec:
>>-TABLESPACE--+----------------+--table-space-name------------------------><
'-database-name.-'
Indexpspace spec:
>>-+-INDEXSPACE--+----------------+--index-space-name-+--------------------><
|
'-database-name.-'
|
'-INDEX--+-------------+--index-name---------------'
'-creator-id.-'

COPYTOCOPY
>>-COPYTOCOPY--------------------------------------------------------------->
>--+-LIST--listdef-name--from-copy-spec--data-set-spec------+---+-------+--->
| .----------------------------------------------------. |
'-CLONE-'
| V
| |
'---+-ts-num-spec-----+--from-copy-spec--data-set-spec-+-'
'-index-name-spec-'
ts-num-spec:
.-DSNUM--ALL-----.
>>-TABLESPACE--+----------------+-table-space-name--+----------------+------>
'-database-name.-'
'-DSNUM--integer-'
index-name-spec:
.-DSNUMALL----.
>>-+-INDEXSPACE-------+----------------+--index-space-name-++--------------+>
|
'-database-name.-'
|'-DSNUM-integer'
'-INDEX--+-------------+--index-name--------------------'
'-creator-id.-'
from-copy-spec:
.-FROMLASTCOPY-----------------------------------------------------.
>>-+------------------------------------------------------------------+----><
+-FROMLASTFULLCOPY-------------------------------------------------+
+-FROMLASTINCRCOPY-------------------------------------------------+
'-FROMCOPY-------dsn--+------------------------------------------+-'
'-FROMVOLUME--+-CATALOG------------------+-'
DB2 10 for z/OS

413

YL&A DB2 10 for z/OS Reference Guide


'-volser--+--------------+-'
'-FROMSEQNO--n-'
data-set-spec:
>>-+-COPYDDN(-+-ddname1----+----------+-+-)-+------------------------------------------+-+------><
|
|
'-,ddname2-' |
'-RECOVERYDDN(-+-ddname3--+----------+-+-)-' |
|
'-,ddname2----------------'
|
'-,ddname4-' |
|
|
'-,ddname4--------------'
|
'-RECOVERYDDN(-+-ddname3--+----------+-+-)--------------------------------------------'
|
'-,ddname4-' |
'-,ddname4--------------'

DIAGNOSE
>>-DIAGNOSE--+-diagnose statement-+----------------------------------------><
'-END----------------'
diagnose-statement:
>>-+---------------------+-------------------------------------------------->
| .-,-------.
|
| V
|
|
'-TYPE(---integer-+-)-'
>--+------------------------------------+----------------------------------->
'-ALLDUMPS-+-----------------------+-'
| .-,-------------.
|
| V
|
|
'-(---X'abend-code'-+-)-'
>--+-----------------------------------+------------------------------------>
'-NODUMPS-+-----------------------+-'
| .-,-------------.
|
| V
|
|
'-(---X'abend-code'-+-)-'
>--+-------------------+--+----------------+--+-----------------+----------><
'-display statement-' '-wait statement-' '-abend statement-'
display-statement:
>>-DISPLAY------------------------------------------------------------------>
>--+-OBD-+------------------+-table-space-name-+---------+-+-------+---+---><
|
'-database-name--.-'
+-ALL-----+ '-CLONE-'
|
|
+-TABLES--+
|
|
'-INDEXES-'
|
+-SYSUTIL-----------------------------------------------------------+
+-MEPL--------------------------------------------------------------+
+-AVAILABLE---------------------------------------------------------+
'-DBET-+-DATABASE--database-name------------------------+-+-------+-'
+-TABLESPACE-+----------------+-table-space-name-+ '-CLONE-'
|
'-database-name.-'
|
'-INDEX--index-name------------------------------'
wait-statement:
.---------------------------------------------------.
V
|
>>-WAIT----+-MESSAGE--message-id--+-------------------+------+-+-----------><
|
'-INSTANCE--integer-'
|
'-TRACEID--+-X'trace-id'-+--+-------------------+-'
'-integer-----' '-INSTANCE--integer-'
414

DB2 10 for z/OS

YL&A DB2 10 for z/OS Reference Guide


abend-statement:
>>-ABEND--+-MESSAGE--message-id--+-------------------+------+--+--------+--><
|
'-INSTANCE--integer-'
| '-NODUMP-'
'-TRACEID--+-X'trace-id'-+--+-------------------+-'
'-integer-----' '-INSTANCE--integer-'

EXEC SQL
>>-EXEC--SQL--+-declare-cursor-spec--------------+--ENDEXEC----------------><
'-non-select dynamic SQL statement-'
declare-cursor-spec:
>>-DECLARE--cursor-name--CURSOR--FOR--select-statement---------------------><

LISTDEF
.---------------.
V
|
>>-LISTDEF--list-name------list-options----------------------------------------->
list-options:
>-+INCLUDE+-+-----------+-+-LIST-ref-list-+-+---------------++----+-+-----+-+--->
'EXCLUDE' |
| '-init-obj-spec-' 'CLONED-+-YES-+-''-RI-' +-ALL-+
'-type-spec-'
'-NO--'
+-BASE+
+-LOB-+
'-XML-'
>>-+--DEFINED YES--+-----------------------------------------------------------><
'--DEFINED NO---'
'--DEFINED ALL--'
type-spec:
>>-+-TABLESPACES--------------------+--------------------------------------><
'-INDEXSPACES--+---------------+-'
'-COPY--+-NO--+-'
'-YES-'
init-obj-spec:
>>-+-DATABASE--database-name-+--+--------------------+---------------------><
+-table-space-spec--------+ '-PARTLEVEL--+-----+-'
+-index-space-spec--------+
'-(n)-'
+-table-spec--------------+
'-index-spec--------------'
table-space-spec:
TABLESPACE--+----------------+--table-space-name---------------------------><
'-database-name.-'
index-space-spec
>>-INDEXSPACE--+----------------+--index-space-name------------------------><
'-database-name.-'

DB2 10 for z/OS

415

YL&A DB2 10 for z/OS Reference Guide


table-spec
>>-TABLE--+-------------+--table-name--------------------------------------><
'-creator-id.-'
index-spec
>>-INDEX--+-------------+--index-name--------------------------------------><
'-creator-id.-'

LOAD
.-DATA-. .-INDDN--SYSREC---------.
>>-LOAD--+------+--+-----------------------+--+-----------+----------------->
+-INDDN--ddname---------+ '-PREFORMAT-'
'-INCURSOR--cursor-name-'
.-RESUME--NO-. .-SHRLEVEL--NONE-.
>--+-+------------+--+----------------+--+--------------------+--+-----------------+-+->
|
'-REPLACE--copy-spec-' '-statistics-spec-' |
|
.-SHRLEVEL--NONE---.
|
'-RESUME--YES--+------------------+-----------------------------------------------'
'-SHRLEVEL--CHANGE-'

.-LOG--YES----------------.
>-flashcopy-spec-+----------------+--+-------+--+-------------------------+->
'-KEEPDICTIONARY-' '-REUSE-' '-LOG--NO--+------------+-'
'-NOCOPYPEND-'
.-SORTKEYS--0--------.
>--workddn-spec--+--------------------+--format-spec------------------------>
+-SORTKEYS--NO-------+
'-SORTKEYS--integer--'
.-FLOAT(S390)-. .-EBCDIC--.
>--+-------------+--+---------+--+----------------------+------------------->
'-FLOAT(IEEE)-' +-ASCII---+ | .-,-------.
|
'-UNICODE-' | V
|
|
'-CCSID(---integer-+-)-'
.-ENFORCE--CONSTRAINTS-. .-ERRDDN--SYSERR-.
>--+--------+--+----------------------+--+----------------+----------------->
'-NOSUBS-' '-ENFORCE--NO----------' '-ERRDDN--ddname-'
.-MAPDDN--SYSMAP-. .-DISCARDDN--SYSDISC-.
>--+----------------+--+--------------------+------------------------------->
'-MAPDDN--ddname-' '-DISCARDDN--ddname--'
.-DISCARDS--0-------.
>--+-------------------+--+-----------------------+------------------------->
'-DISCARDS--integer-' '-SORTDEVT--device-type-'
>--+------------------+----------------------------------------------------->
'-SORTNUM--integer-'
>--+-----------------------------------------------------+------------------>
'-CONTINUEIF(start-+------+-)=-+-X'byte-string'-----+-'
'-:end-'
'-'character-string'-'
>--+-----------------------------------------+------------------------------>
'-DECFLOAT_ROUNDMODE--+-ROUND_CEILING---+-'
+-ROUND_DOWN------+
+-ROUND_FLOOR-----+
+-ROUND_HALF_DOWN-+
+-ROUND_HALF_EVEN-+
416

DB2 10 for z/OS

YL&A DB2 10 for z/OS Reference Guide


+-ROUND_HALF_UP---+
'-ROUND_UP--------'
.----------------.
V
|
>-+------------------+-+--------------------------------+-INTO-TABLE-spec-->
'-IDENTITYOVERRIDE-' '-IMPLICIT_TZ--'timezone-string'-'
workddn-spec:
.-WORKDDN(SYSUT1,SORTOUT)--------------.
>>-+--------------------------------------+--------------------------------><
'-WORKDDN--+-(ddname1,ddname2)-------+-'
|
.-,SORTOUT-. |
+-(ddname1-+----------+-)-+
| .-SYSUT1-.
|
'-(-+--------+-,ddname2)--'
copy-spec
>>-+---------------------------------------+-------------------------------->
|
.-(SYSCOPY)---------------.
|
'-COPYDDN-+-------------------------+---'
+-(ddname1-+----------+-)-+
|
'-,ddname2-'
|
'-(,ddname2)--------------'
>--+------------------------------------+----------------------------------><
'-RECOVERYDDN(ddname3-+----------+-)-'
'-,ddname4-'
flashcopy-spec
>>-+--------------------------------------------------+--------------------><
|
.-NO---------.
|
'-FLASHCOPY--+-YES--------+--+-------------------+-'
'-CONSISTENT-' '-FCCOPYDDN(ddname)-'
statistics-spec
>>-STATISTICS--------------------------------------------------------------->
.-TABLE--(--ALL--)-.
>--+-+------------------+--+-----------------+-----------------------------------+------>
|
'-SAMPLE--integer-'
|
|
.---------------------------------------------------------------------.|
|
V
.-COLUMN--ALL----------------. ||
'-TABLE-(-table-name-)-+------------+-+-----------------------------+-+---''
'-SAMPLE-int-' |
.-,----------.
|
|
V
|
|
'-COLUMN-(-column-name-+-)----'

.-INDEX--(--ALL--)-.
>--+-+------------------+--correlation-stats-spec--------------+------------>
|
.-,----------------------------------.
|
|
V
|
|
'-INDEX--(----index-name--correlation-stats-spec-+--)-------'
.-REPORT--NO--. .-UPDATE--ALL------------.
>--+-------------+--+------------------------+--+--------------------------+>
'-REPORT--YES-' '-UPDATE--+-ACCESSPATH-+-' '-DELETE-+-AGE-(-integer-)-'
+-SPACE------+
'-DATE-(integer)--'
'-NONE-------'
DB2 10 for z/OS

417

YL&A DB2 10 for z/OS Reference Guide


>--+-------------------------+--+----------------------+-------><
'-HISTORY--+-ALL--------+-' '-FORCEROLLUP--+-YES-+-'
+-ACCESSPATH-+
'-NO--'
+-SPACE------+
'-NONE-------'
Correlation-stats-spec
.-FREQVAL--NUMCOLS--1--COUNT--10------------------.
>>-+---------+---------------------------------------+---------------------><
'-KEYCARD-'
|
.-------------------------------------------. |
|
V
|
'-----FREQVAL--NUMCOLS--integer--COUNT--integer-+-'
format-spec
>>-+---------------------------------------------------------------------+-><
'-FORMAT-+-UNLOAD------------------------------------------------------+-'
+-SQL/DS------------------------------------------------------------+
|
.-COLDEL--','--. .-CHARDEL--'"'----. .-DECPT---'.'--. |
'-DELIMITED--+---------------+-+-----------------+-+--------------+-'
'-COLDEL-coldel-' '-CHARDEL-chardel-' '-DECPT-decpt--'
into-table-spec
>>-INTO--TABLE--table-name--+-----------------+---+-----------------+------->
'-PERIODOVERRRIDE-'
'-TRANSIDOVERRIDE-'
.-IGNOREFIELDS--NO--.
>--+-------------------+---------------------------------------------------->
'-IGNOREFIELDS--YES-'
>--+---------------------------------------------------------------------------------+->
|
.-INDDN -SYSREC-------------------. |
'-PART--integer--+-----------+--resume-spec--+----------------------------------+-'
'-PREFORMAT-'
+-INDDN-ddname-+-------------------+-+
|
'-DISCARDDN--ddname-' |
'-INCURSOR--cursor-name--------------'

>--+------------------+---+----------------------------------+-------------->
'-NUMRECS--integer-'
'-WHEN-+-SQL/DS='table-name'-------+-'
'-field selection criterion-'
>--+-----------------------------+-----------------------------------------><
|
.-,-------------------.
|
|
V
|
|
'-(---field specification-+-)-'
resume-spec
.-RESUME--NO-.
>>-+-+------------+-+-----------------------------------+-+----------------->
|
'-REPLACE--+-------+--+-----------+-' |
|
'-REUSE-' '-copy-spec-'
|
'-RESUME--YES------------------------------------------'
>--+----------------+------------------------------------------------------><
'-KEEPDICTIONARY-'
field-selection-criteria
>>-+-field-name--------+--=--+-X'byte-string'-----+------------------------><
'-(start-+------+-)-'
+-'character-string'-+
'-:end-'
+-G'graphic-string'--+
'-N'graphic-string'--'
418

DB2 10 for z/OS

YL&A DB2 10 for z/OS Reference Guide


field specification>>-field-name--+---------------------------+-------------------------------->
'-POSITION(start-+------+-)-'
'-:end-'
>--+--------------------------------------------------------------------+-->
+-CHAR--+---------------------------------------------+--------------+
|
+-BIT-(length)-strip-spec---------------------+
|
|
+-MIXEDstrip-spec-----------------------------+
|
|
+-BLOBF-+---------------------+-+-----------+-+
|
|
|
'-PRESERVE WHITESPACE-' '-BINARYXML-' |
|
|
+-CLOBF-+-------+-+---------------------+-----+
|
|
|
'-MIXED-' '-PRESERVE WHITESPACE-'
|
|
|
'-DBCLOBF-+---------------------+-------------'
|
|
'-PRESERVE WHITESPACE-'
|
+-VARCHAR--+--------------------------------------------+-strip-spec-+
|
+-BIT----------------------------------------+
|
|
+-MIXED--------------------------------------+
|
|
+-BLOBF-+---------------------+-+-----------++
|
|
|
'-PRESERVE WHITESPACE-' '-BINARYXML-'|
|
|
+-CLOBF-+-------+-+---------------------+----+
|
|
|
'-MIXED-' '-PRESERVE WHITESPACE-'
|
|
|
'-DBCLOBF-+---------------------+------------'
|
|
'-PRESERVE WHITESPACE-'
|
+-GRAPHIC-+----------+-+----------+-strip-spec-----------------------+
|
'-EXTERNAL-' '-(length)-'
|
+-VARGRAPHIC--strip-spec---------------------------------------------+
+-SMALLINT-----------------------------------------------------------+
+-INTEGER-+-----------------------+----------------------------------+
|
'-EXTERNAL-+----------+-'
|
|
'-(length)-'
|
+-BIGINT-------------------------------------------------------------+
+-BINARY-+----------+-strip-spec-------------------------------------+
|
'-(length)-'
|
+-+-VARBINARY------+--strip-spec-------------------------------------+
| '-BINARY VARYING-'
|
+-decimal-spec-------------------------------------------------------+
+-FLOAT-+----------+-+----------+------------------------------------+
|
'-EXTERNAL-' '-(length)-'
|
+-DATE--EXTERNAL--+----------+---------------------------------------+
|
'-(length)-'
|
+-TIMESTAMP--EXTERNAL--+----------+----------------------------------+
|
'-(length)-'
|
+-TIMESTAMP-WITH-TIME-ZONE--EXTERNAL--+----------+-------------------+
|
'-(length)-'
|
+-ROWID--------------------------------------------------------------+
+-BLOB---------------------------------------------------------------+
+-CLOB-+-------+-----------------------------------------------------+
|
'-MIXED-'
|
+-DBCLOB-------------------------------------------------------------+
|
.-(34)-------------------.
|
+-DECFLOAT--+------------------------+-------------------------------+
|
+-(16)-------------------+
|
|
'-EXTERNAL--+----------+-'
|
|
'-(length)-'
|
'-XML--+---------------------+--+-----------+------------------------'
DB2 10 for z/OS

419

YL&A DB2 10 for z/OS Reference Guide


'-PRESERVE WHITESPACE-'

'-BINARYXML-'

>--+--------------------------------------+--------------------------------><
+-NULLIF--field selection criterion----+
'-DEFAULTIF--field selection criterion-'
strip spec
>>-+--------------------------------------------+----+----------+----------->
| .-BOTH----.
|
'-TRUNCATE-'
'-STRIP--+----------+--+-------------------+-'
+-TRAILING-+ |
|
'-LEADING--' +-'strip-char'------+
'-X'strip-char'-----'
decimal spec
.-PACKED----------------------------.
>>-DECIMAL-+-----------------------------------+---------------------------><
+-ZONED-----------------------------+
'-EXTERNAL-+----------------------+-'
|
.-,0-----.
|
'-(length-+--------+-)-'
'-,scale-'

MERGECOPY

>>-MERGECOPY---------------------------------------------------------------->

>--+-LIST--listdef-name--------------------------------------------------+--->
|
.-DSNUM--ALL-----. |
'-TABLESPACE--+----------------+-table-space-name--+----------------+-'
'-database-name.-'
'-DSNUM--integer-'
.-WORKDDN--SYSUT1-.
>--+-------+--+-----------------+------------------------------------------->
'-CLONE-' '-WORKDDN--ddname-'
.-NEWCOPY--NO-. .-COPYDDN--SYSCOPY-------------------.
>--+-+-------------+--+------------------------------------+-------------+-><
|
+-COPYDDN(ddname1-+----------+-)-----+
|
|
|
'-,ddname2-'
|
|
|
+-COPYDDN(,ddname2)------------------+
|
|
'-RECOVERYDDN(ddname3-+--------+-)-' |
|
|
',ddname4'
|
|
|
.-COPYDDN--SYSCOPY-----------.
|
'-NEWCOPY-YES-+----------------------------+--+-+--------------------+'
+-COPYDDN(ddname1-+---------+-)-+ '-RECOVERYDDN(ddname3)'
|
',ddname2-'
|
',ddname4'
'-COPYDDN(,ddname2)-------------'

MODIFY RECOVERY
>>-MODIFY--RECOVERY--------------------------------------------------------->
>--+-LIST--listdef-name------------------------------+---------------------->
'-TABLESPACE--+----------------+-table-space-name-'
'-database-name.-'
.-DSNUM--ALL-----.
>--+----------------+--+-------+-------------------------------------------->
'-DSNUM--integer-' '-CLONE-'
>--+-DELETE-+------------------+----------------------+--------------------><
420

DB2 10 for z/OS

YL&A DB2 10 for z/OS Reference Guide


|
+-AGE-+-integer-+--+
|
|
|
'-(*)-----' |
|
|
'-DATE-+-integer-+-'
|
|
'-(*)-----'
|
'-RETAIN----+-LAST--(--integer--)--------------+---'
+-LOGLIMIT-------------------------+
'-GDGLIMIT-+---------------------+-'
+-LAST--(--integer--)-+
'-LOGLIMIT------------'

MODIFY STATISTICS
>>-MODIFY--STATISTICS------------------------------------------------------->
>--+-LIST-- listdef-name------------------------------+--------------------->
+-TABLESPACE--+----------------+--table-space-name-+
|
'-database-name.-'
|
+-INDEXSPACE--+----------------+--index-space-name-+
|
'-database-name.-'
|
'-INDEX--+-------------+--index-name---------------'
'-creator-id.-'
>--DELETE-+-ALL--------+--+-AGE-+-(integer)-+--+---------------------------><
+-ACCESSPATH-+ |
'-(*)-------' |
'-SPACE------' '-DATE-+-(integer)-+-'
'-(*)-------'

OPTIONS
>>-OPTIONS------------------------------------------------------>
>+-+---------+-+------------------+-+-------------------+-+------------+-+-><
| '-PREVIEW-' '-LISTDEFDD-ddname-' '-TEMPLATEDD-ddname-' '-event-spec-' |
+-OFF-------------------------------------------------------------------+
'-KEY--key-value--------------------------------------------------------'
event-spec
.-ITEMERROR,HALT-.
.-WARNING,RC4-.
>>-EVENT--(--+----------------+--+---+--+-------------+--)-----><
'-ITEMERROR,SKIP-' '-,-' +-WARNING,RC0-+
'-WARNING,RC8-'

QUIESCE
>>-QUIESCE------------------------------------------------------------------>
>--+-LIST--listdef-name---------------------------------------------------+->
| .------------------------------------------------------------------ |
| V
| |
|---+-TABLESPACE-+----------------+-table-space-name-+--------------++-'
|
'-database-name.-'
'-PART-integer-' ||
|-TABLESPACESET-+------------+-+----------------+-table-space-name-|
'-TABLESPACE-' '-database-name.-'
.-WRITE--YES-.
>--+-------+--+------------+-----------------------------------------------><
'-|CLONE-' '-WRITE--NO--'

DB2 10 for z/OS

421

YL&A DB2 10 for z/OS Reference Guide

REBUILD INDEX
>>-REBUILD------------------------------------------------------------------>
.-,---------------------------------------.
V
|
>--+-INDEX--+-(----creatorid.index-name--+---------------+-+--)-+----------+>
|
|
'-PART--integer-' |
|
|
|
+-(ALL)--table-space-spec---------------------------+
|
|
'-LIST--listdef-name--------------------------------'
|
|
.-,------------------------------------------. |
|
V
| |
'-INDEXSPACE-+(----+----------------+--index-space-name--+----------++)-+'
'-database-name.-'
'-PART-int-'
|
'-(ALL)-table-space-spec-----------------------------'
.-SHRLEVEL--REFERENCE-----------.
>--+-------------------------------+--drain-spec--+-------+----------------->
'-SHRLEVEL--CHANGE--change-spec-'
'-|CLONE-'
.-SCOPE--ALL-----.
>--+----------------+--+-------+--+-----------------------+----------------->
'-SCOPE--PENDING-' '-REUSE-' '-SORTDEVT--device-type-'
>--+------------------+--+------------+------------------------------------->
'-SORTNUM--integer-' '-stats-spec-'
>_-+--------------------------------------------------+--------------------><
|
.-NO---------.
|
'-FLASHCOPY--+-YES--------+--+-------------------+-'
'-CONSISTENT-' '-FCCOPYDDN(ddname)-'
table-space-spec
>>-TABLESPACE--+----------------+--table-space-name------------------------->
'-database-name.-'
>--+---------------+-------------------------------------------------------><
'-PART--integer-'
change-spec
.-MAXRO--integer-. .-LONGLOG--CONTINUE-.
>>-+----------------+--+-------------------+-------------------------------->
'-MAXRO--DEFER---' +-LONGLOG--TERM-----+
'-LONGLOG--DRAIN----'
.-DELAY--1200----.
>--+----------------+------------------------------------------------------><
'-DELAY--integer-'
drain-spec
.-DRAIN_WAIT--IRLMRWT value-. .-RETRY--UTIMOUT value-.
>>-+---------------------------+--+----------------------+------------------>
'-DRAIN_WAIT--integer-------' '-RETRY--integer-------'
>--+----------------------+------------------------------------------------><
'-RETRY_DELAY--integer-'
stats-spec
>>-STATISTICS-------------------correlation-stats-spec--------------------->

422

DB2 10 for z/OS

YL&A DB2 10 for z/OS Reference Guide


.-REPORT--NO--. .-UPDATE--ALL------------.
>--+-------------+--+------------------------+--+--------------------------+>
'-REPORT--YES-' '-UPDATE--+-ACCESSPATH-+-' '-DELETE-+-AGE-(-integer-)-'
+-SPACE------+
'-DATE-(integer)--'
'-NONE-------'
>--+-------------------------+--+----------------------+-------------------><
'-HISTORY--+-ALL--------+-' '-FORCEROLLUP--+-YES-+-'
+-ACCESSPATH-+
'-NO--'
+-SPACE------+
'-NONE-------'
Correlation-stats-spec
.-FREQVAL--NUMCOLS--1--COUNT--10------------------.
>>-+---------+---------------------------------------+---------------------><
'-KEYCARD-'
|
.-------------------------------------------. |
|
V
|
'-----FREQVAL--NUMCOLS--integer--COUNT--integer-+-'

RECOVER
>>-RECOVER------------------------------------------------------------------>
>--+-+-LIST--listdef-name-----------------+--list-options-spec-+------------>
| | .--------------------------------. |
|
| | V
.-DSNUM--ALL----------. | |
|
| '---object-+---------------------+-+-'
|
|
'-DSNUM--integer------'
|
|
.-DSNUM--ALL----------.
|
+-object--+---------------------+--recover-options-spec-----+
|
'-DSNUM--integer------'
|
'-object--PAGE--page-number--+----------+-------------------'
'-CONTINUE-'
.-LOGRANGES--YES-----.
>--+-------+--+--------------+--+--------------------+---------------------><
'-CLONE-' +-LOCALSITE----+ |
|
'-RECOVERYSITE-'

'-LOGRANGES--NO------'

REORG INDEX

>>-REORG--+-INDEX--LIST--listdef-name-+--+-------+--+-------+--------------->
'-index-name-spec-----------'

'-REUSE-'

'-CLONE-'

.-SHRLEVEL NONE-----------------------------------------------.
>--+-------------------------------------------------------------+---------->
'-SHRLEVEL-+-REFERENCE--deadline-spec--drain-spec-----------+-'
'-CHANGE--deadline-spec--drain-spec--change-spec-'
.-FORCE--NONE----.
>--+------------------------------------------+----+----------------+------->
'-LEAFDISTLIMIT-+---------+-+------------+-'
+-FORCE--READERS-+
'-integer-' '-REPORTONLY-'
'-FORCE--ALL-----'
.-UNLOAD--CONTINUE-------.
>--+------------------------+--+-----------------+-------------------------->
'-UNLOAD--+-PAUSE------+-' '-stats-spec------'
DB2 10 for z/OS

423

YL&A DB2 10 for z/OS Reference Guide


'-ONLY-------'
.-WORKDDN--(SYSUT1)-.
>--+-------------------+--+-----------+------------------------------------->
'-WORKDDN--(ddname)-' '-PREFORMAT-'
>--+--------------------------------------------------+--------------------><
|
.-NO---------.
|
'-FLASHCOPY--+-YES--------+--+-------------------+-'
'-CONSISTENT-' '-FCCOPYDDN(ddname)-'
index-name-spec
>>-+-INDEX-+-------------+-index-name---------------+----------------------->
|
'-creator-id.-'
|
'-INDEXSPACE-+----------------+-index-space-name-'
'-database-name.-'
>--+---------------+-------------------------------------------------------><
'-PART--integer-'
deadline-spec
.-DEADLINE--NONE----------------------------.
>>-+-------------------------------------------+---------------------------><
'-DEADLINE--+-timestamp-------------------+-'
'-labeled-duration-expression-'
drain-spec
>>-+---------------------+-------+----------------+------------------------->
'-DRAIN_WAIT--integer-'
'-RETRY--integer-'
>--+----------------------+------------------------------------------------><
'-RETRY_DELAY--integer-'
change-spec

.-DRAIN--WRITERS-.
>>-+-------------------------+--+----------------+-------------------------->
|
| '-DRAIN--ALL-----'
'-MAXRO--+-integer-+------'
'-DEFER---'
.-LONGLOG--CONTINUE--. .-DELAY--1200----.
>--+--------------------+--+----------------+------------------------------->
'-LONGLOG--+-TERM--+-' '-DELAY--integer-'
'-DRAIN-'
.-TIMEOUT--TERM--.
>--+----------------+------------------------------------------------------><
'-TIMEOUT--ABEND-'
Labeled-duration-expression
>>-+-CURRENT_DATE----------------------------------------------------------->
'-CURRENT_TIMESTAMP---+----------------+-----'
'-WITH TIME ZONE-'
.-------------------------------------.
V
|
>----+- + -+--constant--+-YEAR---------+-+---------------------------------><
'- - -'
+-YEARS--------+
+-MONTH--------+
+-MONTHS-------+
424

DB2 10 for z/OS

YL&A DB2 10 for z/OS Reference Guide


+-DAY----------+
+-DAYS---------+
+-HOUR---------+
+-HOURS--------+
+-MINUTE-------+
+-MINUTES------+
+-SECOND-------+
+-SECONDS------+
+-MICROSECOND--+
'-MICROSECONDS-'
stats-spec

.-REPORT--NO--.
>>-STATISTICS--+-------------+--correlation-stats-spec---------------------->
'-REPORT--YES-'
.-UPDATE--ALL------------.
>--+------------------------+--+-------------------------+------------------>
'-UPDATE--+-ACCESSPATH-+-' '-HISTORY--+-ALL--------+-'
+-SPACE------+
+-ACCESSPATH-+
'-NONE-------'
+-SPACE------+
'-NONE-------'
>--+----------------------+------------------------------------------------><
'-FORCEROLLUP--+-YES-+-'
'-NO--'
correlation-stat-spec
.-FREQVAL--NUMCOLS--1--COUNT--10------------------.
>>-+---------+---------------------------------------+---------------------><
'-KEYCARD-'
|
.-------------------------------------------. |
|
V
|
'-----FREQVAL--NUMCOLS--integer--COUNT--integer-+-'
>>-+---------------------+---+----------------+----------------------------><
'-SORTDEVT-device-type'
'-SORTNUM-integer'

REORG TABLESPACE
>>-REORG--TABLESPACE-------------------------------------------------------->
.-PARALLEL-YES-.
>-+-LIST-listdef-name-+--------------+----------------------------------+--->
|
'-PARALLEL-NO--'
|
'-+----------------+-table-space-name-+-----------------------------+-'
'-database-name.-'
|
.-,---------------------.|
|
V
||
'-PART---+-integer-----------+-+'
'-integer1:integer2-'
.-SCOPE ALL-----.
>--+-------+--+-------+--+---------------+--+-----------+------------------->
'-CLONE-' '-REUSE-' '-SCOPE PENDING-' '-REBALANCE-'
.-YES-.
.-LOG--YES-. .-SORTDATA--+-NO--+-.
>--+----------+--+-------------------+--+----------+------------------------>
'-LOG--NO--'
'-NOSYSREC-'
DB2 10 for z/OS

425

YL&A DB2 10 for z/OS Reference Guide


.-AUTOESTSPACE YES-.
>--| copy-spec |--+------------------+-------------------------------------->
'-AUTOESTSPACE NO--'
.-SHRLEVEL NONE--------------------------------------------------------.
>--------------------------------------------------------------------------->
'-SHRLEVEL--+-REFERENCE--| deadline-spec |--| drain-spec |--------------+->
'-CHANGE-|deadline-spec|--|drain-spec|--|table-change-spec|-'
.-FASTSWITCH YES-. .-AUX NO--.
.-FORCE--NONE----.
>--+----------------+--+---------+-----+----------------+------------------->
'-FASTSWITCH NO--' '-AUX YES-'
+-FORCE--READERS-+
'-FORCE--ALL-----'
>--+------------------------------------------------------------------+----->
|
.-10------.
.-10------.
|
'-OFFPOSLIMIT--+---------+-INDREFLIMIT--+---------+-+------------+-'
'-integer-'
'-integer-' '-REPORTONLY-'
.-UNLOAD--CONTINUE--.
>--+-+-------------------+--+----------------+--+---------------------+-+--->
| |
(1) | '-KEEPDICTIONARY-' '-| statistics-spec |-' |
| '-UNLOAD--PAUSE-----'
|
+-UNLOAD--ONLY-------------------------------------------------------+
'-UNLOAD--EXTERNAL--+-------+--+-------------------------+-----------'
'-NOPAD-' | .---------------------. |
| V
| |
'---| FROM-TABLE-spec |-+-'
.-PUNCHDDN--SYSPUNCH-. .-DISCARDDN--SYSDISC-.
>--+--------------------+--+--------------------+--------------------------->
'-PUNCHDDN--ddname---' '-DISCARDDN--ddname--'
>--+------------------------------+----------------------------------------->
'-| reorg tablespace options |-'
>--+---------------------------------------------+-------------------------><
|
.---------------------. |
|
V
| |
'-DISCARD--+-------+----| FROM-TABLE-spec |-+-'
'-NOPAD-'
copy-spec
.-COPYDDN(SYSCOPY)---------------------.
>>-+--------------------------------------+--------------------------------->
'-COPYDDN(-+-ddname1--+----------+-+-)-'
|
'-,ddname2-' |
'-,ddname2--------------'
>--+------------------------------------+----------------------------------->
'-RECOVERYDDN(ddname3-+----------+-)-'
'-,ddname4-'
>--+--------------------------------------------------+--------------------><
|
.-NO---------.
|
'-FLASHCOPY--+-YES--------+--+-------------------+-'
'-CONSISTENT-' '-FCCOPYDDN(ddname)-'
deadline-spec

426

DB2 10 for z/OS

YL&A DB2 10 for z/OS Reference Guide


.-DEADLINE--NONE----------------------------.
>>-+-------------------------------------------+---------------------------><
'-DEADLINE--+-timestamp-------------------+-'
'-labeled-duration-expression-'
drain-spec
>>-+---------------------+-------+----------------+------------------------->
'-DRAIN_WAIT--integer-'
'-RETRY--integer-'
.-MAXRO--------------.
>--+----------------------+-------+--------------------+-------------------->
'-RETRY_DELAY--integer-'
'-MAXRO--+-integer-+-'
'-DEFER---'
.-DRAIN--WRITERS-. .-LONGLOG--CONTINUE--.
>--+----------------+--+--------------------+------------------------------->
'-DRAIN--ALL-----' '-LONGLOG--+-TERM--+-'
'-DRAIN-'
.-DELAY--1200----. .-TIMEOUT--TERM--.
>--+----------------+--+----------------+----------------------------------><
'-DELAY--integer-' '-TIMEOUT--ABEND-'
table-change-spec
>>-MAPPINGTABLE--table-name------------------------------------------------><
Labeled-duration-expression
>>-+-CURRENT_DATE----------------------------------------------------------->
'-CURRENT_TIMESTAMP---+----------------+-----'
'-WITH TIME ZONE-'
.-------------------------------------.
V
|
>----+- + -+--constant--+-YEAR---------+-+---------------------------------><
'- - -'
+-YEARS--------+
+-MONTH--------+
+-MONTHS-------+
+-DAY----------+
+-DAYS---------+
+-HOUR---------+
+-HOURS--------+
+-MINUTE-------+
+-MINUTES------+
+-SECOND-------+
+-SECONDS------+
+-MICROSECOND--+
'-MICROSECONDS-'
statistics-spec
>>-STATISTICS--------------------------------------------------->
.-TABLE--(--ALL--)-.
>--+-+------------------+--+-----------------+---------------------------+->
|
'-SAMPLE--integer-'
|
| .-------------------------------------------------------------------|
| V
.-COLUMN--ALL---------------------------.
|
'---TABLE-(-table-name-)--+-----------------+--+--------------------+-+-'
DB2 10 for z/OS

427

YL&A DB2 10 for z/OS Reference Guide


'-SAMPLE--integer-'

|
.-,-------. |
|
V
| |
'-COLUMN(-colname-)+-'

.-INDEX--(--ALL--)-.
>--+-+------------------+--correlation-stats-spec--------+------>
| .-,----------------------------------.
|
| V
|
|
'-INDEX--(----index-name--correlation-stats-spec-+--)-'
.-REPORT--NO--. .-UPDATE--ALL------------.
>--+-------------+--+------------------------+--+--------------------------+>
'-REPORT--YES-' '-UPDATE--+-ACCESSPATH-+-' '-DELETE-+-AGE-(-integer-)-'
+-SPACE------+
'-DATE-(integer)--'
'-NONE-------'
>--+-------------------------+--+----------------------+-------------------><
'-HISTORY--+-ALL--------+-' '-FORCEROLLUP--+-YES-+-'
+-ACCESSPATH-+
'-NO--'
+-SPACE------+
'-NONE-------'
correlation-stats-spec
.-FREQVAL--NUMCOLS--1--COUNT--10------------------.
>>-+---------+---------------------------------------+---------------------><
'-KEYCARD-'
|
.-------------------------------------------. |
|
V
|
'-----FREQVAL--NUMCOLS--integer--COUNT--integer-+-'
FROM-TABLE spec
>>-FROM--TABLE--table-name-------------------------------------------------->
>--+--------------------------------------+--------------------------------><
'-WHEN--(--selection-condition-spec--)-'
selection-codition spec
>>-+-predicate-----------+-------------------------------------------------->
'-selection condition-'
.-------------------------------------.
V
|
>----+----------------------------------+-+--------------------------------><
'-+-AND-+--+-predicate-----------+-'
'-OR--' '-selection condition-'
predicate
>>-+-basic predicate---+---------------------------------------------------><
+-BETWEEN predicate-+
+-IN predicate------+
+-LIKE predicate----+
'-NULL predicate----'
basic predicate
>>-column-name--+++++'428

= --+---------------------------------------------------->
<> -+
> --+
< --+
>= -+
<= -'
DB2 10 for z/OS

YL&A DB2 10 for z/OS Reference Guide


>--+-constant--------------------+-----------------------------------------><
'-labeled-duration-expression-'
between predicate
>>-column-name--+-----+--BETWEEN-------------------------------------------->
'-NOT-'
>--+-constant--------------------+--AND------------------------------------->
'-labeled-duration-expression-'
>--+-constant--------------------+-----------------------------------------><
'-labeled-duration-expression-'
IN predicate
.-,--------.
V
|
>>-column-name--+-----+--IN--(---constant-+-)------------------------------><
'-NOT-'
LIKE predicate
>>-column-name--+-----+--LIKE--string-constant------------------------------>
'-NOT-'
>--+-------------------------+---------------------------------------------><
'-ESCAPE--string-constant-'
NULL predicate
>>-column-name--IS--+-----+--NULL------------------------------------------><
'-NOT-'
Reorg tablespace options
.-UNLDDN--SYSREC-.
>>-+----------------+--+-----------------------+---------------------------->
'-UNLDDN--ddname-' '-SORTDEVT--device-type-'
>--+------------------+--+-----------+-+-----------------+-----------------><
'-SORTNUM--integer-' '-PREFORMAT-' '-ROWFORMAT-+-BRF-'
|-RRF-|

REPAIR
>>-REPAIR------------------------------------------------------------------->
>--+---------------------------------------------------+-------------------->
|
.-------------------. |
| .-OBJECT-. .-LOG--YES-.
V
| |
+-+--------+-+----------+-+---+-set statement-+-+-+-+
|
'-LOG--NO--' |
'-locate block--'
| |
|
|
'-dbd-statement-----' |
+-level-id statement--------------------------------+
'-versions statement--------------------------------'
>--+-------+---------------------------------------------------------------><
'-CLONE-'
level-id statement
>>-LEVELID------------------------------------------------------------------>
>--+-TABLESPACE--+----------------+-table-space-name-+---------------------->
|
'-database-name.-'
|
'-index-name-spec---------------------------------'
DB2 10 for z/OS

429

YL&A DB2 10 for z/OS Reference Guide


>--+---------------+-------------------------------------------------------><
'-PART--integer-'
versions statement
>>-VERSIONS----------------------------------------------------------------->
>--+-TABLESPACE--+----------------+-table-space-name-+---------------------><
|
'-database-name.-'
|
'-index-name-spec---------------------------------'
index-name spec
>>-+-INDEX-+-------------+-index-name---------------+----------------------><
|
'-creator-id.-'
|
'-INDEXSPACE-+----------------+-index-space-name-'
'-database-name.-'
set statement
>>-SET---------------------------------------------------------------------------------->
>+-|table-space-spec|-+---------------+-+-NOCOPYPEND------+-----------------------+----><
|
'-PART--integer-' +-NORCVRPEND------+
|
|
+-NOCHECKPEND-----+
|
|
+-NOAUXWARN-------+
|
|
+-NOAUXCHKP-------+
|
|
+-NOAREORPENDSTAR-+
|
|
'-NOAREORPEND-----'
|
'-+-INDEX-+-(index-name-+---------------+-)-+------------+-+-NOCOPYPEND------+-'
|
|
'-PART--integer-'
|
| +-NORCVRPEND------+
|
'-(--ALL--)--| table-space-spec |-'
| +-NORBDPEND-------+
'-INDEXSPACE-+-(-+-----------+-index-space+-----------+)-+-NOCHECKPEND-----+
|
'-database.-'
'-PART-int' | +-NOAREORPENDSTAR-+
'-(--ALL--)--table-space-spec------------' +-NOAREORPEND-----+
+-RBDPEND---------+
'-PSRBDPEND-------'

table space spec


>>-TABLESPACE--+----------------+-table-space-name-------------------------><
'-database-name.-'

REPORT
>>-REPORT------------------------------------------------------------------->
.-INDEX NONE-.
>-+-RECOVERY-+-TABLESPACE+-LIST-listdef-name---+-+-----------+-+-+----+-+--><
|
|
'-tablespace-name-spec' '-INDEX ALL-' | 'info' |
|
'-index-list-spec---------------------------------'
|
'-TABLESPACESET--+------------+--table-space-name-spec--+----------+--'
'-TABLESPACE-'
'-SHOWDSNS-'
Index-list-spec
>>-+-INDEXSPACE--+-+----------------+-index-space-name-+-+-----------------><
|
| '-database-name.-'
| |
|
'-LIST--listdef-name------------------' |
'-INDEX--+-+-------------+-index-name-+---------------'
| '-creator-id.-'
|
'-LIST--listdef-name---------'

430

DB2 10 for z/OS

YL&A DB2 10 for z/OS Reference Guide


info-options
.-DSNUM--ALL-----.
>>-+----------------+--+---------+--+---------+----------------------------->
'-DSNUM--integer-' '-CURRENT-' '-SUMMARY-'
.-ARCHLOG--1-------.
>--+-----------+--+--------------+--+------------------+-------------------><
'-LOCALSITE-' '-RECOVERYSITE-' '-ARCHLOG--+-2---+-'
'-ALL-'
table-space-name-spec
>>-+----------------+--table-space-name------------------------------------><
'-database-name.-'

RESTORE SYSTEM
>>-RESTORE SYSTEM----------------------------------------------------------->
>--+---------------------------------------------------------------------+-><
+-LOGONLY-------------------------------------------------------------+
'-+---------------------------------------------------+---------------+
|-FROMDUMP--+-----------------+-+-------------------|
|
'-DUMPCLASS-(dcl)-' '-RSA-(key-label)--|
'--TAPEUNITS-+------------------+-------------------'
'-(num-tape-units)-'

RUNSTATS
>>-RUNSTATS--TABLESPACE----------------------------------------------------->
>-+-LIST--listdef-name---------------------------------------------------+-->
'-+----------------+-table-space-name--+-----------------------------+-'
'-database-name.-'
|
.-FORCEROLLUP--NO-. |
'-PART-int-+-----------------+-'
'-FORCEROLLUP-YES-'
>--+----------------+------------------------------------------------------->
'-| table-spec |-'
>--+-------------------------------------------------------------+---------->
|
(1)
|
'-+-INDEX------(--ALL--)--| correlation-stats-spec |--------+-'
|
(2)
|
+-INDEX--(--*------)--| correlation-stats-spec |----------+
|
.-,--------------------------------------.
|
|
V
|
|
'-INDEX--(----index-name--| correlation-stats-spec |-+--)-'
.-SHRLEVEL--CHANGE ---. .-REPORT--NO--.
>--+---------------------+--+-------------+--------------------------------->
'-SHRLEVEL--REFERENCE-' '-REPORT--YES-'
.-UPDATE--ALL----------------.
>--+----------------------------+----| history-spec |----------------------->
'---UPDATE--+-ACCESSPATH-+---'
+-SPACE------+
'-NONE-------'
>--+-----------------------+-----------------------------------------------><
'-SORTDEVT--device-type-'column-spec
DB2 10 for z/OS

431

YL&A DB2 10 for z/OS Reference Guide


.-COLUMN--(--ALL--)-------------.
>>-+-------------------------------+---------------------------------------><
|
.-,-----------. |
|
V
| |
'-COLUMN--(----column-name-+--)-'
table-spec
>>-+---------------------------------------------------------------------------------+-><
|
.-(ALL)-.
|
+-TABLE-+-------+-------+-|sample-spec|--USE PROFILE--+--------------------+-+----+
|
|
'-INCLUDE--+-(NPI)-+-' |
|
|
|
'-NPI---'
|
|
|
'-DELETE PROFILE---------------------------------'
|
| .------------------------------------------------------------------------------.|
| V
||
'-TABLE-(table-name)-+-|sample-spec|------+-|column-spec|-+-----------------+-++-'|
|
'|colgroup-spec|' | ||
|
'-USE PROFILE-+-------------------+-'|
|
'-INCLUDE-+-(NPI)-+-' |
|
'-NPI---'
|
+-|column-spec|--+---------------+--|prof-spec|------=----+
|
'|colgroup-spec|'
|
'-DELETE PROFILE------------------------------------------'

sample-spec
>>-+-----------------------------------------------------------------+-----><
|
.-25------.
|
+-SAMPLE--+---------+---------------------------------------------+
|
'-integer-'
|
|
.-AUTO------------.
|
'-TABLESAMPLE SYSTEM--+-numeric-literal-+--+--------------------+-'
'-REPEATABLE-integer-'
column-spec
.-COLUMN--(--ALL--)-----------------.
>>-+-----------------------------------+------------------------------------>
|
.-,---------------.
|
|
V
(1) |
|
'-COLUMN--(----column-name-----+--)-'
>--+------------------+----------------------------------------------------><
'-SORTNUM--integer-'
colgoup-spec
.---------------------------------------------------------.
|
.-,----------.
|
V
V
|
|
>>---COLGROUP--(----column-name-+--)--|colgroup-stats-spec-+---------------><
colgroup-stats-spec
>>-+------------------------------------+----------------------------------->
|
.-MOST--. |
'-FREQVAL--COUNT--integer--+-------+-'
+-BOTH--+
'-LEAST-'
>--+--------------------------------------+--------------------------------><
432

DB2 10 for z/OS

YL&A DB2 10 for z/OS Reference Guide


|
.-NUMQUANTILES--100-----. |
'-HISTOGRAM--+-----------------------+-'
'-NUMQUANTILES--integer-'
Correlation-stat-spec
>>-+---------+-------------------------------------------------------------->
'-KEYCARD-'
.----------------------------------------------------------------.
V .-FREQVAL--NUMCOLS--1--COUNT--10--MOST-----------------------. |
>----+------------------------------------------------------------+-+------><
|
.-MOST--.
|
+-FREQVAL--NUMCOLS--integer--COUNT--integer--+-------+-------+
|
+-BOTH--+
|
|
'-LEAST-'
|
|
.-NUMCOLS--1--NUMQUANTILES--100---------------. |
'-HISTOGRAM--+---------------------------------------------+-'
|
.-NUMQUANTILES--100-----. |
'-NUMCOLS--integer--+-----------------------+-'
'-NUMQUANTILES--integer-'

STOSPACE
.-,-------------.
V
|
>>-STOSPACE--STOGROUP(-+---stogroup-name-+-+-)-----------------------------><
'-*-----------------'

TEMPLATE
>>-TEMPLATE--template-name--DSN--name-expression---------------------------->
>--+----------------+--+--------------+------------------------------------->
'-common-options-' +-disk-options-+
'-tape-options-'
>--+-----------------------------------------+-----------------------------><
'-SUBSYS--name--LRECL--int--RECFM--+----+-'
+-F--+
+-FB-+
+-V--+
'-VB-'
name-expression
.-.--------------------.
V
|
>>---qualifier-expression-+------------------------------------------------->
>--+----------------------------+------------------------------------------><
'-(parenthetical-expression)-'
qualifier expression
.----------------------------------------------------.
V
|
>>---+-character-expression---------------------------+-+------------------><
'-&variable-+---------------------------+-.------'
'-(start-+---------+-)------'
'-,length-'
Common-options

DB2 10 for z/OS

433

YL&A DB2 10 for z/OS Reference Guide


.-UNIT--SYSALLDA-.
>>-+----------------+--+------------------+--------------------------------->
'-UNIT--name-----' '-MODELDCB--dsname-'
.-BUFNO--30------.
>--+----------------+--+----------------+--+----------------+--------------->
'-BUFNO--integer-' '-DATACLAS--name-' '-MGMTCLAS--name-'
>--+----------------+--+---------------+------------------------------------>
'-STORCLAS--name-' +-RETPD integer-+
'-EXPDL' date'--'
>--+-------------------------+--+-----------------+------------------------->
|
.-,------.
| '-VOLCNT--integer-'
|
V
|
|
'-VOLUMES--(---volser-+-)-'
.-GDGLIMIT--99------.
>--+----------------+--+-------------------+-------------------------------->
'-UNCNT--integer-' '-GDGLIMIT--integer-'
>--+-----------------------------------------------------+------------------>
'-DISP--(--+-NEW-+--,--+-DELETE--+--,--+-DELETE--+--)-'
+-OLD-+
+-KEEP----+
+-KEEP----+
+-SHR-+
+-CATLG---+
+-CATLG---+
'-MOD-'
'-UNCATLG-'
'-UNCATLG-'
>--+--------------------------------+--------------------------------------><
'-LIMIT(n-+-CYL-+-,new_template)-'
+-GB--+
'-MB--'
disk-options
.-SPACE--CYL------------------------------.
>>-+-----------------------------------------+------------------------------>
'-SPACE--+---------------------+--+-CYL-+-'
'-(primary,secondary)-' +-TRK-+
'-MB--'
.-PCTPRIME--100-----.
>--+-------------------+--+-------------------+----------------------------->
'-PCTPRIME--integer-' '-MAXPRIME--integer-'
.-NBRSECND--10------.
>--+-------------------+--+--------------+---------------------------------->
'-NBRSECND--integer-' '-DIR--integer-'
>--+----------------------+------------------------------------------------><
'-DSNTYPE--+-LIBRARY-+-'
+-PDS-----+
+-HFS-----+
'-NULL----'
tape-options
.-STACK--NO--.
.-TRTCH--NONE-------.
>>-+------------+--+----------------+--+-------------------+---------------><
'-STACK--YES-' '-JES3DD--ddname-' '-TRTCH--+-COMP---+-'
'-NOCOMP-'

UNLOAD
.---------------------.
V
|
>>-UNLOAD--+-DATA--from-table-spec----+-----------------+-+-+--------------->
|
'-from-table-spec-'
|
|
.---------------------.
|
434

DB2 10 for z/OS

YL&A DB2 10 for z/OS Reference Guide


|
V
|
|
+-source-spec----+-----------------+-+-----------+
|
'-from-table-spec-'
|
'-LIST--listdef-name-----------------------------'
>--unload-spec--+-------+--------------------------------------------------><
'-CLONE-'
source-spec
>>-TABLESPACE--+----------------+-tablespace-name--------------------------->
'-database-name.-'
>--+------------------------+----------------------------------------------->
'-PART-+-integer-------+-'
'-int1--:--int2-'
>-+---------------------------------------------------------------------+-><
+-FROMCOPY--data-set-name-+------------------------------------------+-+
|
'-FROMVOLUME-+-CATALOG-------------------+-' |
|
'-vol-ser--+--------------+-'
|
|
'-FROMSEQNO--n-'
|
'-FROMCOPYDDN--ddname--------------------------------------------------'
Unload-spec
.-PUNCHDDN--SYSPUNCH----------.
>>-+-----------------------------+------------------------------------------>
'-PUNCHDDN--+-ddname--------+-'
'-template-name-'
.-UNLDDN--SYSREC------------.
>--+---------------------------+--+---------+------------------------------->
'-UNLDDN--+-ddname--------+-' +-EBCDIC--+
'-template-name-'
+-ASCII---+
'-UNICODE-'
'-SPANNED NO--'
>--+----------------------+--+--------+--+-------+----+-------------+------->
|
.-,-------.
| '-NOSUBS-' '-NOPAD-'
'-SPANNED YES-'
|
V
|
|
'-CCSID(---integer-+-)-'
>+-----------------------------------------------------------------------+-->
|
.-COLDEL--','----. .-CHARDEL--'"'-----. .-DECPT--'.'---. |
'-DELIMITED--+----------------+--+------------------+--+--------------+-'
'-COLDEL--coldel-' '-CHARDEL--chardel-' '-DECPT--decpt-'
.-FLOAT--S390-. .-MAXERR--1-------.
>--+-------------+--+-----------------+------------------------------------->
'-FLOAT--IEEE-' '-MAXERR--integer-'
.-SHRLEVEL--CHANGE--ISOLATION--CS--+------------------+-.
|
'-SKIP LOCKED DATA-' |
>--+-------------------------------------------------------+---------------->
'-SHRLEVEL-+-CHANGE--ISOLATION--UR-+--------------------'
'-REFERENCE-------------'
>-+--------------------------------------+-+-----------------------------+-><
'-DECFLOAT_ROUNDMODE-+-ROUND_CEILING---' '-IMPLICIT_TZ-timezone-string-'
+-ROUND_DOWN------+
+-ROUND_FLOOR-----+
+-ROUND_HALF_DOWN-+
+-ROUND_HALF_EVEN-+
DB2 10 for z/OS

435

YL&A DB2 10 for z/OS Reference Guide


+-ROUND_HALF_UP---+
'-ROUND_UP--------'
from-table spec
>>-FROM--TABLE--table-name-------------------------------------------------->
.-HEADER--OBID-------------------------.
>--+--------------------------------------+--------------------------------->
'-HEADER--+-NONE---------------------+-'
'-CONST--+-'string'------+-'
'-X'hex-string'-'
>--+-----------------+--+----------------+---------------------------------->
'-SAMPLE--decimal-' '-LIMIT--integer-'
>--+-----------------------------+------------------------------------------>
|
.-,-------------------.
|
|
V
|
|
'-(---field-specification-+-)-'
>--+-----------------------------+-----------------------------------------><
'-WHEN--(selection-condition)-'
field spec
.-POSITION(*)-----.
>>-field-name--+-----------------+------------------------------------------>
'-POSITION(start)-'
>--+-----------------------------------------------------------------+----><
+-CHAR-+----------+-+-------------------------------------------+-+
|
'-(length)-' +-TRUNCATE----------------------------------+ |
|
'-+-BLOBF---+--template-name---+-----------+ |
|
+-CLOBF---+
'-BINARYXML-' |
|
'-DBCLOBF-'
|
+-VARCHAR-+----------+-+----------------------------------------+-+
|
'-(length)-' +-strip-spec-----------------------------+ |
|
'-+-BLOBF---+-template-name-+-----------+ |
|
+-CLOBF---+
'-BINARYXML-' |
|
'-DBCLOBF-'
|
+-GRAPHIC-+----------+-+----------+-+----------+------------------+
|
'-EXTERNAL-' '-(length)-' '-TRUNCATE-'
|
+-VARGRAPHIC-+----------+-strip-spec------------------------------+
|
'-(length)-'
|
+-SMALLINT--------------------------------------------------------+
+-INTEGER--+-----------------------+------------------------------+
|
'-EXTERNAL-+----------+-'
|
|
'-(length)-'
|
+-BIGINT----------------------------------------------------------+
+-BINARY-+----------+-+----------+--------------------------------+
|
'-(length)-' '-TRUNCATE-'
|
+-+-VARBINARY------+----------------------------------------------+
| '-BINARY VARYING-'
|
+-strip-spec------------------------------------------------------+
|
.-PACKED---.
|
+-DECIMAL--+----------+--+----------------------+-----------------+
|
+-ZONED----+ |
.-,0-----.
|
|
|
'-EXTERNAL-' '-(length-+--------+-)-'
|
|
'-,scale-'
|
+-FLOAT-+----------+-+----------+---------------------------------+
|
'-EXTERNAL-' '-(length)-'
|
436

DB2 10 for z/OS

YL&A DB2 10 for z/OS Reference Guide


+-DOUBLE----------------------------------------------------------+
+-REAL------------------------------------------------------------+
+-DATE--EXTERNAL--+----------+------------------------------------+
|
'-(length)-'
|
+-TIME--EXTERNAL--+----------+------------------------------------+
|
'-(length)-'
|
+-TIMESTAMP--EXTERNAL--+----------+-------------------------------+
|
'-(length)-'
|
+-TIMESTAMP WITH THE ZONE EXTERNAL----+----------+----------------+
|
'-(length)-'
|
+-CONSTANT--+-'string'------+-------------------------------------+
|
'-X'hex-string'-'
|
+-ROWID-----------------------------------------------------------+
+-BLOB-+----------+-+----------+----------------------------------+
|
'-(length)-' '-TRUNCATE-'
|
+-CLOB-+----------+-+----------+----------------------------------+
|
'-(length)-' '-TRUNCATE-'
|
+-DBCLOB-+----------+-+----------+--------------------------------+
|
'-(length)-' '-TRUNCATE-'
|
|
.-(34)-------------------.
|
+-DECFLOAT--+------------------------+----------------------------+
|
+-(16)-------------------+
|
|
'-EXTERNAL--+----------+-'
|
|
'-(length)-'
|
'-XML--+-----------+----------------------------------------------'
'-BINARYXML-'
strip spec
>>-+--------------------------------------------+--------------------------->
|
.-BOTH----.
|
'-STRIP--+----------+--+-------------------+-'
+-TRAILING-+ |
|
'-LEADING--' +-'strip-char'------+
'-X'strip-char'-----'
selection-codition spec
>>-+-predicate-----------+-------------------------------------------------->
'-selection condition-'
.-------------------------------------.
V
|
>----+----------------------------------+-+--------------------------------><
'-+-AND-+--+-predicate-----------+-'
'-OR--' '-selection condition-'
predicate
>>-+-basic predicate---+---------------------------------------------------><
+-BETWEEN predicate-+
+-IN predicate------+
+-LIKE predicate----+
'-NULL predicate----'
basic predicate
>>-column-name--++++DB2 10 for z/OS

= --+---------------------------------------------------->
<> -+
> --+
< --+
437

YL&A DB2 10 for z/OS Reference Guide


+- >= -+
'- <= -'
>--+-constant--------------------+-----------------------------------------><
'-labeled-duration-expression-'
between predicate
>>-column-name--+-----+--BETWEEN-------------------------------------------->
'-NOT-'
>--+-constant--------------------+--AND------------------------------------->
'-labeled-duration-expression-'
>--+-constant--------------------+------------------------------------------>
'-labeled-duration-expression-'
IN predicate

.-,--------.
V
|
>>-column-name--+-----+--IN--(---constant-+-)------------------------------><
'-NOT-'
LIKE predicate
>>-column-name--+-----+--LIKE--string-constant------------------------------>
'-NOT-'
>--+-------------------------+---------------------------------------------><
'-ESCAPE--string-constant-'
NULL predicate
>>-column-name--IS--+-----+--NULL------------------------------------------><
'-NOT-'
Labeled-duration-expression
>>-+-CURRENT_DATE----------------------------+------------------------------>
'-CURRENT_TIMESTAMP----+----------------+-'
'-WITH TIME ZONE-'
.-------------------------------------.
V
|
>----+- + -+--constant--+-YEAR---------+-+---------------------------------><
'- - -'
+-YEARS--------+
+-MONTH--------+
+-MONTHS-------+
+-DAY----------+
+-DAYS---------+
+-HOUR---------+
+-HOURS--------+
+-MINUTE-------+
+-MINUTES------+
+-SECOND-------+
+-SECONDS------+
+-MICROSECOND--+
'-MICROSECONDS-'

438

DB2 10 for z/OS

YL&A DB2 10 for z/OS Reference Guide

SQL Positive Return Codes


000
+012
+098
+100
+110
+111
+117
+162
+203
+204
+205
+206
+217
+218
+219
+220
+222
+231
+236
+236
+237
+238
+239
+252
+304
+331

SUCCESSFUL EXECUTION
THE UNQUALIFIED COLUMN NAME column-name WAS INTERPRETED AS A
CORRELATED REFERENCE
A DYNAMIC SQL STATEMENT ENDS WITH A SEMICOLON
ROW NOT FOUND FOR FETCH, UPDATE OR DELETE, OR THE RESULT OF A QUERY
IS AN EMPTY TABLE
SQL UPDATE TO A DATA CAPTURE TABLE NOT SIGNALED TO ORIGINATING
SUBSYSTEM
THE SUBPAGES OPTION IS NOT SUPPORTED FOR TYPE 2 INDEXES
THE NUMBER OF INSERT VALUES IS NOT THE SAME AS THE NUMBER OF OBJECT
COLUMNS
TABLESPACE database-name.tablespace-name HAS BEEN PLACED IN CHECK PENDING
THE QUALIFIED COLUMN NAME column-name WAS RESOLVED USING A NON-UNIQUE
OR UNEXPOSED NAME
name IS AN UNDEFINED NAME
column-name IS NOT A COLUMN OF TABLE table-name
column-name IS NOT A COLUMN OF AN INSERTED TABLE, UPDATED TABLE, OR
ANY TABLE IDENTIFIED IN A FROM CLAUSE
THE STATEMENT WAS NOT EXECUTED AS ONLY EXPLAIN INFORMATION REQUESTS
ARE BEING PROCESSED
THE SQL STATEMENT REFERENCING A REMOTE OBJECT CANNOT BE EXPLAINED
THE REQUIRED EXPLANATION TABLE table-name DOES NOT EXIST
THE COLUMN column-name IN EXPLANATION TABLE table-name IS NOT DEFINED
PROPERLY
HOLE DETECTED USING CURSOR cursor-name
CURRENT POSITION OF CURSOR cursor-name IS NOT VALID FOR THE SPECIFIED
FETCH ORIENTATION OF THE CURRENT ROW OR ROWSET
SQLDA INCLUDES integer1 SQLVAR ENTRIES, BUT integer2 ARE REQUIRED FOR
integer3 COLUMNS
SQLDA INCLUDES integer1 SQLVAR ENTRIES, BUT integer2 ARE REQUIRED FOR
integer3 COLUMNS
SQLDA INCLUDES integer1 SQLVAR ENTRIES, BUT integer2 ARE REQUIRED BECAUSE
AT LEAST ONE OF THE COLUMNS BEING DESCRIBED IS A DISTINCT TYPE
SQLDA INCLUDES integer1 SQLVAR ENTRIES, BUT integer2 SQLVAR ENTRIES
ARE NEEDED FOR integer3 COLUMNS BECAUSE AT LEAST ONE OF THE COLUMNS
BEING DESCRIBED IS A LOB
SQLDA INCLUDES integer1 SQLVAR ENTRIES, BUT integer2 ARE REQUIRED FOR
integer3 COLUMNS BECAUSE AT LEAST ONE OF THE COLUMNS BEING
DESCRIBED IS A DISTINCT TYPE
A NON-ATOMIC statement STATEMENT SUCCESSFULLY PROCESSED ALL
REQUESTED ROWS, WITH ONE OR MORE WARNING CONDITION
A VALUE WITH DATA TYPE data-type1 CANNOT BE ASSIGNED TO A HOST VARIABLE
BECAUSE THE VALUE IS NOT WITHIN THE RANGE OF THE HOST VARIABLE IN
POSITION position-number WITH DATA TYPE data-type2
THE NULL VALUE HAS BEEN ASSIGNED TO A HOST VARIABLE OR PARAMETER
BECAUSE THE STRING CANNOT BE CONVERTED FROM source-ccsid TO target-ccsid.
REASON reason-code, POSITION position-number

DB2 10 for z/OS

439

YL&A DB2 10 for z/OS Reference Guide


+335

+402

DB2 CONVERTED A HOST VARIABLE, PARAMETER, OR COLUMN NUMBER var-num


var-name-or-num TO COLUMN NAME, HOST VARIABLE, OR EXPRESSION NUMBER colname-or-num FROM from ccsid TO to-ccsid, AND RESULTING IN SUBSTITUTION
CHARACTERS.
THE SQL STATEMENT HAS BEEN SUCCESSFULLY EXECUTED, BUT THERE MAY BE
SOME CHARACTER CONVERSION INCONSISTENCIES
THE RECURSIVE COMMON TABLE EXPRESSION name MAY CONTAIN AN INFINITE
LOOP
A ROWSET FETCH STATEMENT MAY HAVE RETURNED ONE OR MORE ROWS OF
DATA. HOWEVER, ONE OR MORE WARNING CONDITIONS WERE ALSO
ENCOUNTERED. USE THEGET DIAGNOISTICS STATEMENT FOR MORE INFROMATION
REGARDING THE CONDITIONS THAT WERE ENCOUNTERED.
COMMAND WAS SUCCESSFUL BUT RESULTED IN THE FOLLOWING: msg-token
DECFLOAT EXCEPTION exception-type HAS OCCURRED DURING operation-type
OPERATION, POSITION position-type
ASSIGNMENT TO AN SQLSTATE OR SQLCODE VARIABLE IN AN SQL ROUTINE routinename MAY BE OVERWRITTEN AND DOES NOT ACTIVATE ANY HANDLER.
ALL USER SPECIFIED OPTIMIZATION HINTS USED DURING ACCESS PATH SELECTION
USER SPECIFIED OPTIMIZATION HINTS ARE INVALID (REASON CODE = 'reason-code').
THE OPTIMIZATION HINTS ARE IGNORED.
LOCATION location IS UNKNOWN

+403

THE LOCAL OBJECT REFERENCED BY CREATE ALIAS STATEMENT DOES NOT EXISTS

+434
+438
+440

clause IS A DEPRECATED FEATURE


APPLICATION RAISED WARNING WITH DIAGNOSTIC TEXT: text
NO routine-type BY THE NAME routine-name HAVING COMPATIBLE ARGUMENTS WAS
FOUND
VALUE value HAS BEEN TRUNCATED
EXTERNAL FUNCTION OR PROCEDURE name (SPECIFIC NAME specific-name) HAS
RETURNED A WARNING SQLSTATE, WITH DIAGNOSTIC TEXT text
PROCEDURE proc RETURNED num QUERY RESULT SETS, WHICH EXCEEDS THE
DEFINED LIMIT integer
CREATE PROCEDURE proc RETURNED num QUERY RESULTS SETS
NUMBER OF RESULT SETS IS GREATER THAN NUMBER OF LOCATORS
ESTIMATED PROCESSOR COST OF estimate-amount1 PROCESSOR SECONDS
(estimate-amount2 SERVICE UNITS) IN COST CATEGORY cost-category EXCEEDS A
RESOURCE LIMIT WARNING THRESHOLD OF limit- amount SERVICE UNITS
THE RESULT OF THE POSITIONED UPDATE OR DELETE MAY DEPEND ON THE
ORDER OF THE ROWS
THE REFERENTIAL OR UNIQUE CONSTRAINT name HAS BEEN IGNORED BECAUSE
IT IS A DUPLICATE
auth-id DOES NOT HAVE THE PRIVILEGE TO PERFORM OPERATION operation ON
OBJECT object-name
auth-id DOES NOT HAVE THE PRIVILEGE TO PERFORM OPERATION operation
THE WITH GRANT OPTION IS IGNORED
THE ALTER, INDEX, REFERENCES, AND TRIGGER PRIVILEGES CANNOT BE GRANTED
PUBLIC AT ALL LOCATIONS
A GRANT OF A PRIVILEGE WAS IGNORED BECAUSE THE GRANTEE ALREADY HAS
THE PRIVILEGE FROM THE GRANTOR
THE COLLECTION collection-id APPEARS MORE THAN ONCE WHEN SETTING THE
special-register SPECIAL REGISTER
COMPARISON FUNCTIONS ARE NOT CREATED FOR A DISTINCT TYPE BASED ON A
LONG STRING DATA TYPE

+339
+347
+354

+361
+364
+385
+394
+395

+445
+462
+464
+466
+494
+495
+535
+541
+551
+552
+558
+561
+562
+585
+599

440

DB2 10 for z/OS

YL&A DB2 10 for z/OS Reference Guide


+610
+650
+653
+655
+658
+664
+738
+799
+802
+806
+807
+863
+883
+4726
+20002
+20007
+20122
+20141
+20187
+20237
+20245
+20270
+20271
+20272
+20348
+20360
+20365
+20367
+20371
+20378
+20458

A CREATE/ALTER ON OBJECT object-name HAS PLACED OBJECT IN utility PENDING


THE TABLE BEING CREATED OR ALTERED CANNOT BECOME A DEPENDENT TABLE
TABLE table-name IN PARTITIONED TABLESPACE tspace-name IS NOT AVAILABLE
BECAUSE ITS PARTITIONED INDEX HAS NOT BEEN CREATED
STOGROUP stogroup_name HAS BOTH SPECIFIC AND NON-SPECIFIC VOLUME IDS. IT
WILL NOT BE ALLOWED IN FUTURE RELEASES
THE SUBPAGES VALUE IS IGNORED FOR THE CATALOG INDEX index-name
THE INTERNAL LENGTH OF THE LIMIT-KEY FIELDS SPECIFIED IN THE PARTITION
CLAUSE OF THE statement-name STATEMENT EXCEEDS THE EXISTING INTERNAL
LIMIT KEY LENGTH STORED IN CATALOG TABLE table-name
DEFINITION CHANGE OF object object_name MAY REQUIRE SIMILAR CHANGE ON
READ-ONLY SYSTEMS
A SET STATEMENT REFERENCES A SPECIAL REGISTER THAT DOES NOT EXIST AT
THE SERVER SITE
EXCEPTION ERROR exception-type HAS OCCURRED DURING operation-type
OPERATION ON data-type DATA, POSITION position-number
BIND ISOLATION LEVEL RR CONFLICTS WITH TABLESPACE LOCKSIZE PAGE OR
LOCKSIZE ROW AND LOCKMAX 0
THE RESULT OF DECIMAL MULTIPLICATION MAY CAUSE OVERFLOW
THE CONNECTION WAS SUCCESSFUL BUT ONLY SBCS WILL BE SUPPORTED
ROLLBACK TO SAVEPOINT OCCURRED WHEN THERE WERE OPERATIONS THAT
CANNOT BE UNDONE, OR AN OPERATION THAT CANNOT BE UNDONE WAS
PERFORMED WHEN THERE WAS A SAVEPOINT OUTSTANDING
THE STATEMENT WAS SUCCESSFULLY PREPARED, BUT IT CANNOT BE EXECUTED.
THE clause SPECIFICATION IS IGNORED FOR THE OBJECT object-name
USE OF OPTIMIZATION HINTS IS DISALLOWED BY A DB2 SUBSYSTEM THE SPECIAL
REGISTER 'OPTIMIZATION HINT' IS SET TO THE DEFAULT VALUE OF BLANKS.
DEFINE NO OPTION IS NOT APPLICABLE IN THE CONTEXT SPECIFIED
TRUNCATION OF VALUE WITH LENGTH length OCCURRED FOR hv-or-parm-number
ROLLBACK TO SAVEPOINT CAUSED A NOT LOGGED TABLE SPACE TO BE PLACED IN
THE LPL
FETCH PRIOR ROWSET FOR CURSOR cursor-name RETURNED A PARTIAL ROWSET
NOT PADDED CLAUSE IS IGNORED FOR INDEXES CREATED ON AUXILIARY TABLES
OPTION NOT SPECIFIED FOLLOWING ALTER PARTITION CLAUSE
THE NAME AT ORDINAL POSITIONposition-number IN THE STATEMENT, WITH NAME
object-name, WAS TRUNCATED.
TABLE SPACE table-space-name HAS BEEN CONVERTED TO USE TABLE-CONTROLLED
PARTITIONING INSTEAD OF INDE CONTROLLED PARTITIONING, ADDITIONAL
INFORMATION old-limit-key-value
THE PATH VALUE HAD BEEN TRUNCATED
TRUSTED CONNECTION CAN NOT BE ESTABLISHED FOR SYSTEM AUTHID
authorization-name
A SIGNALING NAN WAS ENCOUNTERED, OR AN EXCEPTION OCCURRED IN AN
ARTHIMETIC OPERATION OR FUNCTION INVOLVING A DECFLOAT
OPTION clause IS NOT SUPPORTED IN THE CONTEXT IN WHICH IT WAS SPECIFIED
THE ABILITY TO USE TRUSTED CONTEXT context-name WAS REMOVED FROM SOME,
BUT NOT ALL AUTHORIZATION IDS SPECIFIED IN THE STATEMENT
A NON-ATOMIC statement STATEMENT SUCCESSFULLY COMPLETED FOR SOME OF
THE REQUESTED ROWS, POSSIBLY WITH WARNING, AND ONE OR MORE ERRORS,
AND THE CURSOR CAN BE USED
THE PROCEDURE procedure-name HAS ENCOUNTERED AN INTERNAL PARAMETER
PROCESSING ERROR IN PARAMETER number1. THE VALUE FOR PARAMETER

DB2 10 for z/OS

441

YL&A DB2 10 for z/OS Reference Guide


+20459
+20460
+20461
+20468
+20520
+30100

442

number2 CONTAINS FURTHER INFORMATION ABOUT THE ERROR.


THE PROCEDURE procedure-name HAD ENCOUNTERED AN INTERNAL PROCESSING
ERROR. THE VALUE FOR PARAMETER number CONTAINS FURTHER INFORMATION
ABOUT THE ERROR.
THE PROCEDURE procedure-name SUPPORTS A HIGHER VERSION, version1. THAN
THE SPECIFIEDVERSION, version2, FOR PARAMETER number.
THE PROCEDURE procedure-name RETURNED OUTPUT IN THE ALTERNATE LOCALE,
locale1, INSTEAD OF THE LOCALE locale2, SPECIFIED IN PARAMETER number.
THE COMBINATION OF TARGET NAMESPACE target-namespace AND SCHEMA
LOCATION HINT location-hint IS NOT UNIQUE IN THE DB2 XML SCHEMA REPOSITORY.
ATTEMPT TO USE A DEPRECATED FEATURE ON OBJECT object-name. REASON CODE
reason-code
OPERATION COMPLETED SUCCESSFULLY BUT A DISTRIBUTION PROTOCOL
VIOLATION HAS BEEN DETECTED. ORIGINAL SQLCODE=original-sqlcode AND
ORIGINAL SQLSTATE=original-sqlstate

DB2 10 for z/OS

YL&A DB2 10 for z/OS Reference Guide

SQL Error Return Codes


-007
-010
-011
-029
-051
-056
-057
-058
-060
-078
-079
-084
-087
-096
-097
-101
-102
-103
-104
-105
-107
-108
-109
-110
-111
-112
-113
-114
-115
-117
-118
-119
-120
-121
-122
-123

STATEMENT CONTAINS THE ILLEGAL CHARACTER character


THE STRING CONSTANT BEGINNING string IS NOT TERMINATED
COMMENT NOT CLOSED
INTO CLAUSE REQUIRED
Identifier-Name (sqltype) WAS PREVIOUSLY DECLARED OR REFERENCED
AN SQLSTATE OR SQLCODE VARIABLE DECLARATION IS IN A NESTED COMPOUND
STATEMENT
THE RETURN STATEMENT IN AN SQL FUNCTION MUST RETURN A VALUE.
VALUE SPECIFIED ON RETURN STATEMENT MUST BE AN INTEGER
INVALID type SPECIFICATION : spec
PARAMETER NAMES MUST BE SPECIFIED FOR ROUTINE routine-name
QUALIFIER FOR OBJECT name WAS SPECIFIED AS qualifier1 but qualifier2 IS
REQUIRED
UNACCEPTABLE SQL STATEMENT
A NULL VALUE WAS SPECIFIED IN A CONTEXT WHERE A NULL IS NOT ALLOWED
VARIABLE variable-name DOES NOT EXIST OR IS NOT SUPPORTED BY THE SERVER
AND A DEFAULT VALUE WAS NOT PROVIDED
THE USE OF LONG VARCHAR OR LONG VARGRAPHIC IS NOT ALLOWED IN THIS
CONTEXT
THE STATEMENT IS TOO LONG OR TOO COMPLEX
LITERAL STRING IS TOO LONG. STRING BEGINS string
constant IS AN INVALID NUMERIC CONSTANT
ILLEGAL SYMBOL " token". SOME SYMBOLS THAT MIGHT BE LEGAL ARE: token-list
INVALID STRING
THE NAME name IS TOO LONG. MAXIMUM ALLOWABLE SIZE IS
THE NAME name IS QUALIFIED INCORRECTLY
clause CLAUSE IS NOT PERMITTED
INVALID HEXADECIMAL LITERAL BEGINNING string
AN AGGREGATE FUNCTION DOES NOT INCLUDE A COLUMN NAME
THE OPERAND OF AN AGGREGATE FUNCTION INCLUDES AN AGGREGATE FUNCTION,
AND OLAP SPECIFICATION, OR SCALAR FULLSELECT
INVALID CHARACTER FOUND IN string, REASON CODE nnn
THE LOCATION NAME location DOES NOT MATCH THE CURRENT SERVER
A PREDICATE IS INVALID BECAUSE THE COMPARISON OPERATOR operator IS
FOLLOWED BY A PARENTHESIZED LIST OR BY ANY OR ALL WITHOUT A SUBQUERY
THE NUMBER OF VALUES ASSIGNED IS NOT THE SAME AS THE NUMBER OF SPECIFIED
OR IMPLIED COLUMNS
THE OBJECT TABLE OR VIEW OF THE DELETE OR UPDATE STATEMENT IS ALSO
IDENTIFIED IN A FROM CLAUSE
A COLUMN OR EXPRESSION IN A HAVING CLAUSE IS NOT VALID
AN AGGREGATE FUNCTION OR OLAP SPECIFICATION IS NOT VALID IN THE CONTEXT IN
WHICH IS WAS INVOKED
THE COLUMN name IS IDENTIFIED MORE THAN ONCE IN THE INSERT OR UPDATE OR
SET TRANSITION VARIABLE STATEMENT
COLUMN OR EXPRESSION IN THE SELECT LIST IS NOT VALID
THE PARAMETER IN POSITION n IN THE FUNCTION name MUST BE A CONSTANT OR
KEYWORD

DB2 10 for z/OS

443

YL&A DB2 10 for z/OS Reference Guide


-125
-126
-127
-128
-129
-130
-131
-132
-133
-134
-136
-137
-138
-142
-144
-147
-148
-150
-151
-152
-153
-154
-156
-157
-158
-159
-160
-161
-164
-170
-171
-173
444

AN INTEGER IN THE ORDER BY CLAUSE DOES NOT IDENTIFY A COLUMN OF THE


RESULT
THE SELECT STATEMENT CONTAINS BOTH AN UPDATE CLAUSE AND AN ORDER BY
CLAUSE
DISTINCT IS SPECIFIED MORE THAN ONCE IN A SUBSELECT
IN VALID USE OF NULL IN A PREDICATE
THE STATEMENT CONTAINS TOO MANY TABLE NAMES
THE ESCAPE CLAUSE CONSISTS OF MORE THAN ONE CHARACTER, OR THE STRING
PATTERN CONTAINS AN INVALID OCCURRENCE OF THE ESCAPE CHARACTER
STATEMENT WITH LIKE PREDICATE HAS INCOMPATIBLE DATA TYPES
AN OPERAND OF value IS NOT VALID
AN AGGREGATE FUNCTION IN A SUBQUERY OF A HAVING CLAUSE IS INVALID BECAUSE
ALL COLUMN REFERENCES IN ITS ARGUMENT ARE NOT CORRELATED TO THE GROUP
BY RESULT THAT THE HAVING CLAUSE IS APPLIED TO
IMPROPER USE OF A STRING, LOB, OR XML VALUE
SORT CANNOT BE EXECUTED BECAUSE THE SORT KEY LENGTH IS TOO LONG
THE LENGTH RESULTING FROM operation IS GREATER THAN maximum-length
THE SECOND OR THIRD ARGUMENT OF THE SUBSTR OR SUBSTRING FUNCTION IS OUT
OF RANGE
THE SQL STATEMENT IS NOT SUPPORTED
INVALID SECTION NUMBER number
ALTER FUNCTION function-name FAILED BECAUSE SOURCE FUNCTIONS OR NOT
FENCED EXTERNAL FUNCTION CANNOT BE ALTERED
THE SOURCE TABLE source-name CANNOT BE RENAMED OR ALTERED, REASON reasoncode
THE OBJECT OF THE INSERT, DELETE, UPDATE, MERGE, OR TRUNCATE STATEMENT IS
A VIEW, SYSTEM-MAINTAINED MATERIALIZED QUERY TABLE, OR TRANSITION TABLE
FOR WHICH THE REQUESTED OPERATION IS NOT PERMITTED
THE UPDATE OPERATION IS INVALID BECAUSE THE CATALOG DESCRIPTION OF
COLUMN column-name INDICATES THAT IT CANNOT BE UPDATED
THE DROP clause CLAUSE IN THE ALTER STATEMENT IS INVALID BECAUSE constraintname IS A constraint-type
THE STATEMENT IS INVALID BECAUSE THE VIEW OR TABLE DEFINITION DOES NOT
INCLUDE A UNIQUE NAME FOR EACH COLUMN
THE STATEMENT FAILED BECAUSE VIEW OR TABLE DEFINITION IS NOT VALID
THE STATEMENT DOES NOT IDENTIFY A TABLE
ONLY A TABLE NAME CAN BE SPECIFIED IN A FOREIGN KEY CLAUSE. object-name IS
NOT THE NAME OF A TABLE.
THE NUMBER OF COLUMNS SPECIFIED FOR name IS NOT THE SAME AS THE NUMBER
OF COLUMNS IN THE RESULT TABLE.
THE STATEMENT REFERENCES object-name WHICH IDENTIFIES AN object-type
RATHER THAN AN expected-object-type
THE WITH CHECK OPTION CANNOT BE USED FOR THE SPECIFIED VIEW
THE INSERT OR UPDATE IS NOT ALLOWED BECAUSE A RESULTING ROW DOES NOT
SATISFY THE VIEW DEFINITION
auth-id1 DOES NOT HAVE THE PRIVILEGE TO CREATE A VIEW WITH QUALIFICATION
authorization ID
THE NUMBER OF ARGUMENTS SPECIFIED FOR function-name IS INVALID
THE DATA TYPE, LENGTH, OR VALUE OF ARGUMENT nn OF ARGUMENT nn OR functionname IS INVALID
UR IS SPECIFIED ON THE WITH CLAUSE BUT THE CURSOR IS NOT READ-ONLY
DB2 10 for z/OS

YL&A DB2 10 for z/OS Reference Guide


-180
-181
-182
-183
-184
-185
-186
-187
-188
-189
-190
-191
-197
-198
-199
-203
-204
-205
-206
-208
-212
-214

-216
-219
-220
-221
-222
-224
-225
-227
-228
-229

THE DATE, TIME, OR TIMESTAMP VALUE value IS INVALID


THE STRING REPRESENTATION OF A DATETIME VALUE IS NOT A VALID DATETIME
VALUE
AN ARITHMETIC EXPRESSION WITH A DATETIME VALUE IS INVALID
AN ARITHMETIC OPERATION ON A DATE OR TIMESTAMP HAS A RESULT THAT IS NOT
WITHIN THE VALID RANGE OF DATES
AN ARITHMETIC EXPRESSION WITH A DATETIME VALUE CONTAINS A PARAMETER
MARKER
THE LOCAL FORMAT OPTION HAS BEEN USED WITH A DATE OR TIME AND NO LOCAL
EXIT HAS BEEN INSTALLED
THE LOCAL DATE LENGTH OR LOCAL TIME LENGTH HAS BEEN INCREASED AND
EXECUTING PROGRAM RELIES ON THE OLD LENGTH
A REFERENCE TO A CURRENT DATE/TIME SPECIAL REGISTER IS INVALID BECAUSE THE
MVS TOD CLOCK IS BAD OR THE MVS PARMTZ IS OUT OF RANGE
THE STRING REPRESENTATION OF A NAME IS INVALID
CCSID ccsid IS INVALID
THE ATTRIBUTES SPECIFIED FOR THE COLUMN table-name.column-name ARE NOT
COMPATIBLE WITH THE EXISTING COLUMN DEFINITION
A STRING CANNOT BE USED BECAUSE IT IS INVALID MIXED DATA
QUALIFIED COLUMN NAMES IN ORDER BY CLAUSE NOT PERMITTED WHEN UNION OR
UNION ALL SPECIFIED
THE OPERAND OF THE PREPARE OR EXECUTE IMMEDIATE STATEMENT IS BLANK OR
EMPTY
ILLEGAL USE OF KEYWORD keyword TOKEN token-list WAS EXPECTED
A REFERENCE TO COLUMN column-name IS AMBIGUOUS
name IS AN UNDEFINED NAME
column-name IS NOT A COLUMN OF TABLE table-name
name IS NOT VALID IN THE CONTEXT WHERE IT IS USED
THE ORDER BY CLAUSE IS INVALID BECAUSE COLUMN name IS NOT, PART OF THE
RESULT TABLE
name IS SPECIFIED MORE THAN ONCE IN THE REFERENCING CLAUSE OF A TRIGGER
DEFINITION
AN EXPRESSION IN THE FOLLOWING POSITION, OR STARTING WITH position-orexpression-start IN THE clause-type CLAUSE IS NOT VALID. REASON CODE =
reason-code
THE NUMBER OF ELEMENTS ON EACH SIDE OF A PREDICATE OPERATOR DOES NOT
MATCH. PREDICATE OPERATOR IS operator.
THE REQUIRED EXPLANATION TABLE table-name DOES NOT EXIST
THE COLUMN column-name IN EXPLANATION TABLE table-name IS NOT DEFINED
PROPERLY
SET OF OPTIONAL COLUMNS IN EXPLANATION TABLE table-name IS INCOMPLETE
OPTIONAL COLUMN column-name IS MISSING
AN UPDATE OR DELETE OPERATION WAS ATTEMPTED AGAINST A HOLE USING
CURSOR cursor-name
THE RESULT TABLE DOES NOT AGREE WITH THE BASE TABLE USING cursor-name
FETCH STATEMENT FOR cursor-name IS NOT VALID FOR THE DECLARATION OF THE
CURSOR
FETCH fetch-orientation IS NOT ALLOWED, BECAUSE CURSOR cursor-name HAS AN
UNKNOWN POSITION (sqlcode,sqlstate)
FOR UPDATE CLAUSE SPECIFIED FOR READ-ONLY CURSOR cursor-name
THE LOCALE locale SPECIFIED IN A SET LOCALE OR OTHER STATEMENT THAT IS

DB2 10 for z/OS

445

YL&A DB2 10 for z/OS Reference Guide


-240
-242
-243
-244
-245
-246
-247

-248

-249
-250
-251
-253
-254
-270
-300
-301
-302
-303
-304
-305
-309
-310
-311
-312
-313
-314
-327

446

LOCALE SENSITIVE WAS NOT FOUND


THE PARTITION CLAUSE OF A LOCK TABLE STATEMENT IS INVALID
THE OBJECT NAMED object-name OF TYPE object-type WAS SPECIFIED MORE THAN
ONCE IN THE LIST OF OBJECTS, OR THE NAME IS THE SAME AS AN EXISTING OBJECT
SENSITIVE CURSOR cursor-name CANNOT BE DEFINED FOR THE SPECIFIED SELECT
STATEMENT
SENSITIVITY sensitivity SPECIFIED ON THE FETCH IS NOT VALID FOR CURSOR
cursor-name
THE INVOCATION OF FUNCTION routine-name IS AMBIGUOUS
STATEMENT USING CURSOR cursor-name SPECIFIED NUMBER OF ROWS num-rows
WHICH IS NOT VALID WITH dimension
A HOLE WAS DETECTED ON A MULTIPLE ROW FETCH STATEMENT USING CURSOR
cursor-name, BUT INDICATOR VARIABLES WERE NOT PROVIDED TO DETECT THE
CONDITION
A POSITIONED DELETE OR UPDATE STATEMENT FOR CURSOR cursor-name
SPECIFIED ROW n OF A ROWSET, BUT THE ROW IS NOT CONTAINED WITHIN THE
CURRENT ROWSET
DEFINITION OF ROWSET ACCESS FOR CURSOR cursor-name IS INCONSISTENT WITH
THE FETCH ORIENTATION CLAUSE clause SPECIFIED
THE LOCAL LOCATION NAME IS NOT DEFINED WHEN PROCESSING A THREE-PART
OBJECT NAME
TOKEN name IS NOT VALID
A NON-ATOMIC statement STATEMENT SUCCESSFULLY COMPLETED FOR SOME OF
THE REQUESTED ROWS, POSSIBLY WITH WARNINGS, AND ONE OR MORE ERRORS
A NON-ATOMIC statement STATEMENT ATTEMPTED TO PROCESS MULTIPLE ROWS OF
DATA, BUT ERRORS OCCURRED
FUNCTION NOT SUPPORTED
THE STRING CONTAINED IN HOST VARIABLE OR PARAMETER position-number IS NOT
NUL-TERMINATED
THE VALUE OF INPUT HOST VARIABLE OR PARAMETER NUMBER position-number
CANNOT BE USED AS SPECIFIED BECAUSE OF ITS DATA TYPE
THE VALUE OF INPUT VARIABLE OR PARAMETER NUMBER position-number IS INVALID
OR TOO LARGE FOR THE TARGET COLUMN OR THE TARGET VALUE
A VALUE CANNOT BE ASSIGNED TO OUTPUT HOST VARIABLE NUMBER positionnumber BECAUSE THE DATA TYPES ARE NOT COMPARABLE
A VALUE WITH DATA TYPE data-type1 CANNOT BE ASSIGNED TO A HOST VARIABLE
BECAUSE THE VALUE IS NOT WITHIN THE RANGE OF THE HOST VARIABLE IN POSITION
position-number WITH DATA TYPE data-type2
THE NULL VALUE CANNOT BE ASSIGNED TO OUTPUT HOST VARIABLE NUMBER
position-number BECAUSE NO INDICATOR VARIABLE IS SPECIFIED
A PREDICATE IS INVALID BECAUSE A REFERENCED HOST VARIABLE HAS THE NULL
VALUE
DECIMAL HOST VARIABLE OR PARAMETER number CONTAINS NON-DECIMAL DATA
THE LENGTH OF INPUT HOST VARIABLE NUMBER position-number IS NEGATIVE OR
GREATER THAN THE MAXIMUM
VARIABLE variable-name IS NOT DEFINED OR NOT USABLE
THE NUMBER OF HOST VARIABLES SPECIFIED IS NOT EQUAL TO THE NUMBER OF
PARAMETER MARKERS
THE STATEMENT CONTAINS AN AMBIGUOUS HOST VARIABLE REFERENCE
THE ROW CANNOT BE INSERTED BECAUSE IT IS OUTSIDE THE BOUND OF THE
PARTITION RANGE FOR THE LAST PARTITION
DB2 10 for z/OS

YL&A DB2 10 for z/OS Reference Guide


-330
-331

-332
-333
-336
-338
-340

-341
-342
-343
-344
-345

-346

-348
-350
-351
-352
-353
-354

-355
-356
-359
-363
-365
-372

A STRING CANNOT BE USED BECAUSE IT CANNOT BE PROCESSED. REASON reasoncode, CHARACTER code-point, HOST VARIABLE position-number
CHARACTER CONVERSION CANNOT BE PERFORMED BECAUSE A STRING, POSITION
position-number, CANNOT BE CONVERTED FROM source-ccsid TO target-ccsid,
REASON reason-code
CHARACTER CONVERSION BETWEEN CCSID from-ccsid TO to-ccsid REQUESTED BY
reason-code IS NOT SUPPORTED
THE SUBTYPE OF A STRING VARIABLE IS NOT THE SAME AS THE SUBTYPE KNOWN AT
BIND TIME AND THE DIFFERENCE CANNOT BE RESOLVED BY CHARACTER
CONVERSION
THE SCALE OF THE DECIMAL NUMBER MUST BE ZERO
AN ON CLAUSE IS INVALID
THE COMMON TABLE EXPRESSION name HAS THE SAME IDENTIFIER AS ANOTHER
OCCURRENCE OF A COMMON TABLE EXPRESSION DEFINITION WITHIN THE SAME
STATEMENT
A CYCLIC REFERENCE EXISTS BETWEEN THE COMMON TABLE EXPRESSIONS name1
AND name2
THE COMMON TABLE EXPRESSION name MUST NOT USE SELECT DISTINCT AND MUST
USE UNION ALL BECAUSE IT IS RECURSIVE
THE COLUMN NAMES ARE REQUIRED FOR THE RECURSIVE COMMON TABLE
EXPRESSION name
THE RECURSIVE COMMON TABLE EXPRESSION name HAS MISMATCHED DATA TYPES
OR LENGTHS OR CODE PAGE FOR COLUMN column-name
THE FULLSELECT OF THE RECURSIVE COMMON TABLE EXPRESSION name MUST BE A
UNION ALL AND MUST NOT INCLUDE AGGREGATE FUNCTIONS, GROUP BY CLAUSE,
HAVING CLAUSE, OR AN EXPLICIT JOIN INCLUDING AN ON CLAUSE
AN INVALID REFERENCE TO COMMON TABLE EXPRESSION name OCCURS IN THE FIRST
FULLSELECT, AS A SECOND OCCURRENCE IN THE SAME FROM CLAUSE, OR IN THE
FROM CLAUSE OF A SUBQUERY
sequence-expression CANNOT BE SPECIFIED IN THIS CONTEXT
column-name WAS IMPLICITLY OR EXPLICITLY REFERENCED IN A CONTEXT IN WHICH
IT CANNOT BE USED
AN UNSUPPORTED SQLTYPE WAS ENCOUNTERED IN POSITION position-number OF
THE SELECT-LIST
AN UNSUPPORTED SQLTYPE WAS ENCOUNTERED IN POSITION position-number OF
THE INPUT-LIST
FETCH IS NOT ALLOWED, BECAUSE CURSOR cursor-name HAS AN UNKNOWN
POSITION
A ROWSET FETCH STATEMENT MAY HAVE RETURNED ONE OR MORE ROWS OF DATA.
HOWEVER, ONE OR MORE NON-TERMINATING ERROR CONDITIONS WERE
ENCOUNTERED. USE THE GET DIAGNOSTICS STATEMENT FOR MORE INFORMATION
REGARDING THE CONDITIONS THAT WERE ENCOUNTERED
A LOB COLUMN IS TOO LARGE TO BE LOGGED
KEY EXPRESSION key-expr-num IS NOT VALID, REASON CODE = reason-code
THE RANGE OF VALUES FOR THE IDENTITY COLUMN IS EXHAUSTED
THE EXTENDED INDICATOR VARIABLE VALUE FOR PARAMETER position-number IS OUT
OF RANGE
USE OF THE VALUE OF EXTENDED INDICATOR VARIABLE IN POSITION value-position IS
NOT VALID
ONLY ONE ROWID, IDENTITY, ROW CHANGE TIMESTAMP, ROW BEGIN, ROW END,
TRANSACTION START ID, OR SECURITY LABEL COLUMN IS ALLOWED IN A TABLE

DB2 10 for z/OS

447

YL&A DB2 10 for z/OS Reference Guide


-373
-374

-390
-392
-393
-396
-397
-398
-399
-400
-401
-402
-404
-405
-406
-407
-408
-409
-410
-411
-412
-413
-414
-415
-416
-417
-418
-419
-420
-421

448

DEFAULT CANNOT BE SPECIFIED FOR COLUMN OR SQL VARIABLE name


THE CLAUSE clause HAS NOT BEEN SPECIFIED IN THE CREATE OR ALTER FUNCTION
STATEMENT FOR LANGUAGE SQL FUNCTION function-name BUT AN EXAMINATION OF
THE FUNCTION BODY REVEALS THAT IT SHOULD BE SPECIFIED
THE FUNCTION function-name, SPECIFIC NAME specific-name, IS NOT VALID IN THE
CONTEXT WHERE IT IS USED
SQLDA PROVIDED FOR CURSOR cursor HAS BEEN CHANGED FROM THE PREVIOUS
FETCH
THE CONDITION OR CONNECTION NUMBER IS INVALID
object-type object-name ATTEMPTED TO EXECUTE AN SQL STATEMENT DURING FINAL
CALL PROCESSING
GENERATED IS SPECIFIED AS PART OF A COLUMN DEFINITION, |BUT IT IS NOT VALID
FOR THE DEFINITION OF THE COLUMN
A LOCATOR WAS REQUESTED FOR HOST VARIABLE NUMBER position-number BUT THE
VARIABLE IS NOT A LOB
INVALID VALUE ROWID WAS SPECIFIED
THE CATALOG HAS THE MAXIMUM NUMBER OF USER DEFINED INDEXES
THE OPERANDS OF AN ARITHMETIC OR COMPARISON OPERATION ARE NOT
COMPARABLE
AN ARITHMETIC FUNCTION OR OPERATOR arith-fop IS APPLIED TO CHARACTER OR
DATETIME DATA
THE SQL STATEMENT SPECIFIES A STRING THAT IS TOO LONG
THE NUMERIC LITERAL literal CANNOT BE USED AS SPECIFIED BECAUSE IT IS OUT OF
RANGE
A CALCULATED OR DERIVED NUMERIC VALUE IS NOT WITHIN THE RANGE OF ITS
OBJECT COLUMN
AN UPDATE, INSERT, OR SET VALUE IS NULL, BUT THE OBJECT COLUMN column-name
CANNOT CONTAIN NULL VALUES
THE VALUE IS NOT COMPATIBLE WITH THE DATA TYPE OF ITS TARGET.TARGET NAME
IS name
INVALID OPERAND OF A COUNT FUNCTION
A NUMERIC VALUE value IS TOO LONG, OR IT HAS A VALUE THAT IS NOT WITHIN THE
RANGE OF ITS DATA TYPE
CURRENT SQLID CANNOT BE USED IN A STATEMENT THAT REFERENCES REMOTE
OBJECTS
THE SELECT CLAUSE OF A SUBQUERY SPECIFIES MULTIPLE COLUMNS
OVERFLOW OR UNDERFLOW OCCURRED DURING NUMERIC DATA TYPE CONVERSION
A LIKE PREDICATE IS INVALID BECAUSE THE FIRST OPERAND IS NOT A STRING
THE CORRESPONDING COLUMNS, column-number, OF THE OPERANDS |OF A SET
OPERATOR ARE NOT COMPATIBLE
AN OPERAND OF A UNION CONTAINS A LONG STRING COLUMN
A STATEMENT STRING TO BE PREPARED INCLUDES PARAMETER MARKERS AS THE
OPERANDS OF THE SAME OPERATOR
A STATEMENT STRING TO BE PREPARED CONTAINS AN INVALID USE OF PARAMETER
MARKERS
THE DECIMAL DIVIDE OPERATION IS INVALID BECAUSE THE RESULT WOULD HAVE A
NEGATIVE SCALE
THE VALUE OF A CHARACTER STRING ARGUMENT WAS NOT ACCEPTABLE TO THE
function-name FUNCTION
THE OPERANDS OF A UNION OR UNION ALL DO NOT HAVE THE SAME NUMBER OF
COLUMNS
DB2 10 for z/OS

YL&A DB2 10 for z/OS Reference Guide


-423
-426
-427
-430
-431
-433
-435
-438
-440
-441
-443
-444
-449
-450
-451

-452
-453
-454
-455
-456
-457
-458
-461
-469
-470
-471
-472
-473

INVALID VALUE FOR LOCATOR IN POSITION position-#


DYNAMIC COMMIT NOT VALID AT AN APPLICATION SERVER WHERE UPDATES ARE NOT
ALLOWED
DYNAMIC ROLLBACK NOT VALID AT AN APPLICATION SERVER WHERE UPDATES ARE
NOT ALLOWED
routine-type routine-name (SPECIFIC NAME specific-name) HAS ABNORMALLY TERMINATED
ROUTINE routine-name (SPECIFIC NAME specific-name) OF TYPE routine-type HAS BEEN
INTERRUPTED BY THE USER
VALUE value IS TOO LONG
AN INVALID SQLSTATE sqlstate IS SPECIFIED IN A RAISE_ERROR FUNCTION, RESIGNAL
STATEMENT, OR SIGNAL STATEMENT
APPLICATION RAISED ERROR WITH DIAGNOSTIC TEXT: text
NO routine-type BY THE NAME routine-name HAVING COMPATIBLE ARGUMENTS WAS
FOUND IN THE CURRENT PATH
INVALID USE OF 'DISTINCT' OR 'ALL' WITH FUNCTION function-name
ROUTINE routine-name (SPECIFIC NAME specific-name) HAS RETURNED AN ERROR
SQLSTATE WITH DIAGNOSTIC TEXT msg-txt
USER PROGRAM name COULD NOT BE FOUND
CREATE OR ALTER STATEMENT FOR FUNCTION OR PROCEDURE routine-name
CONTAINS AN INVALID FORMAT OF THE EXTERNAL NAME CLAUSE OR IS MISSING THE
EXTERNAL NAME CLAUSE
USER-DEFINED FUNCTION OR STORED PROCEDURE name, PARAMETER NUMBER
paramnum, OVERLAYED STORAGE BEYOND ITS DECLARED LENGTH
THE data-item DEFINITION IN THE CREATE OR ALTER STATEMENT FOR routine-name
CONTAINS DATA TYPE type WHICH IS NOT SUPPORTED FOR THE TYPE AND
LANGUAGE OF THE ROUTINE
UNABLE TO ACCESS THE FILE REFERENCED BY HOST VARIABLE variable-position.
REASON CODE: reason-code
THERE IS A PROBLEM WITH THE RETURNS CLAUSE IN THE CREATE FUNCTION
STATEMENT FOR function-name
THE SIGNATURE PROVIDED IN THE CREATE FUNCTION STATEMENT FOR function-name
MATHCES THE SIGNATURE OF SOME OTHER FUNCTION ALREADY EXISTING IN THE
SCHEMA
IN CREATE FUNCTION FOR function-name, THE SCHEMA NAME schema-name PROVIDED
FOR THE SPECIFIC NAME DOES NOT MATCH THE SCHEMA NAME schema-name2 OF THE
FUNCTION
IN CREATE FUNCTION FOR function-name, THE SPECIFIC NAME specific-name ALREADY
EXISTS IN THE SCHEMA
A FUNCTION OR DISTINCT TYPE CANNOT BE CALLED name SINCE IT IS RESERVED FOR
SYSTEM USE
IN A REFERENCE TO FUNCTION function-name BY SIGNATURE, A MATCHING FUNCTION
COULD NOT BE FOUND
A VALUE WITH DATA TYPE source-data-type CANNOT BE CAST TO TYPE target-data-type
SQL CALL STATEMENT MUST SPECIFY AN OUTPUT HOST VARIABLE FOR PARAMETER
number
SQL CALL STATEMENT SPECIFIED A NULL VALUE FOR INPUT PARAMETER number, BUT
THE STORED PROCEDURE DOES NOT SUPPORT NULL VALUES
INVOCATION OF FUNCTION OR PROCEDURE name FAILED DUE TO REASON rc
CURSOR cursor-name WAS LEFT OPEN BY EXTERNAL FUNCTION function-name
(SPECIFIC NAME specific-name)
A USER DEFINED DATA TYPE CANNOT BE CALLED THE SAME NAME AS A SYSTEM
PREDEFINED TYPE (BUILT-IN TYPE)

DB2 10 for z/OS

449

YL&A DB2 10 for z/OS Reference Guide


-475
-476
-478
-480
-482
-483
-487
-490
-491

-492
-495
-496
-497
-499
-500
-501
-502
-503
-504
-507
-508
-509
-510
-511
-512
-513
-514
-516
-517
-518

450

THE RESULT TYPE type-1 OF THE SOURCE FUNCTION CANNOT BE CAST TO THE
RETURNS TYPE type-2 OF THE USER-DEFINED FUNCTION
REFERENCE TO FUNCTION function-name WAS NAMED WITHOUT A SIGNATURE, BUT
THE FUNCTION IS NOT UNIQUE WITHIN ITS SCHEMA
DROP OR REVOKE ON OBJECT TYPE type1 CANNOT BE PROCESSED BECAUSE OBJECT
name OF TYPE type2 IS DEPENDENT ON IT
THE PROCEDURE procedure-name HAS NOT YET BEEN CALLED
THE PROCEDURE procedure-name RETURNED NO LOCATORS
IN CREATE FUNCTION FOR function-name STATEMENT, THE NUMBER OF PARAMETERS
DOES NOT MATCH THE NUMBER OF PARAMETERS OF THE SOURCE FUNCTION
object-type object-name ATTEMPTED TO EXECUTE AN SQL STATEMENT WHEN THE
DEFINITION OF THE FUNCTION OR PROCEDURE DID NOT SPECIFY THIS ACTION
NUMBER number DIRECTLY SPECIFIED IN AN SQL STATEMENT IS OUTSIDE THE RANGE
OF ALLOWABLE VALUES IN THIS CONTEXT (minval, maxval)
CREATE STATEMENT FOR USER-DEFINED FUNCTION function-name MUST HAVE A
RETURNS CLAUSE AND: THE EXTERNAL CLAUSE WITH OTHER REQUIRED KEYWORDS;
THE RETURN STATEMENT AND PARAMETER NAMES; OR THE SOURCE CLAUSE
THE CREATE FUNCTION FOR function-name HAS A PROBLEM WITH PARAMETER
NUMBER number. IT MAY INVOLVE A MISMATCH WITH A SOURCE FUNCTION
ESTIMATED PROCESSOR COST OF estimate-amount1 PROCESSOR SECONDS ( estimateamount2 SERVICE UNITS) IN COST CATEGORY cost-category EXCEEDS A RESOURCE
LIMIT ERROR THRESHOLD OF limit- amount SERVICE UNITS
THE SQL STATEMENT CANNOT BE EXECUTED BECAUSE IT REFERENCES A RESULT
SET THAT WAS NOT CREATED BY THE CURRENT SERVER
THE MAXIMUM LIMIT OF INTERNAL IDENTIFIERS HAS BEEN EXCEEDED FOR DATABASE
CURSOR cursor-name HAS ALREADY BEEN ASSIGNED TO THIS OR ANOTHER RESULT
SET FROM PROCEDURE procedure-name.
THE IDENTIFIED CURSOR WAS CLOSED WHEN THE CONNECTION WAS DESTROYED
THE CURSOR IDENTIFIED IN A FETCH OR CLOSE STATEMENT IS NOT OPEN
THE CURSOR IDENTIFIED IN AN OPEN STATEMENT IS ALREADY OPEN
A COLUMN CANNOT BE UPDATED BECAUSE IT IS NOT IDENTIFIED IN THE UPDATE
CLAUSE OF THE SELECT STATEMENT OF THE CURSOR
THE CURSOR NAME cursor-name IS NOT DECLARED
THE CURSOR IDENTIFIED IN THE UPDATE OR DELETE STATEMENT IS NOT OPEN
THE CURSOR IDENTIFIED IN THE UPDATE OR DELETE STATEMENT IS NOT POSITIONED
ON A ROW OR ROWSET THAT CAN BE UPDATED OR DELETED
THE TABLE IDENTIFIED IN THE UPDATE OR DELETE STATEMENT IS NOT THE SAME
TABLE DESIGNATED BY THE CURSOR
THE TABLE DESIGNATED BY THE CURSOR OF THE UPDATE OR DELETE STATEMENT
CANNOT BE MODIFIED
THE FOR UPDATE CLAUSE CANNOT BE SPECIFIED BECAUSE THE TABLE DESIGNATED
BY THE CURSOR CANNOT BE MODIFIED
STATEMENT REFERENCE TO REMOTE OBJECT IS INVALID
THE ALIAS alias-name MUST NOT BE DEFINED ON ANOTHER LOCAL OR REMOTE ALIAS
THE CURSOR cursor-name IS NOT IN A PREPARED STATE
THE DESCRIBE FOR STATIC STATEMENT DOES NOT IDENTIFY A PREPARED
STATEMENT
CURSOR cursor-name CANNOT BE USED BECAUSE ITS STATEMENT NAME DOES NOT
IDENTIFY A PREPARED SELECT STATEMENT
THE EXECUTE STATEMENT DOES NOT IDENTIFY A VALID PREPARED STATEMENT

DB2 10 for z/OS

YL&A DB2 10 for z/OS Reference Guide


-519
-525
-526
-530
-531
-532
-533
-534
-536
-537
-538
-539
-540
-542
-543
-544
-545
-546
-548
-549
-551
-552
-553
-554
-555
-556

-557
-558
-559
-562
-567

THE PREPARE STATEMENT IDENTIFIES THE SELECT STATEMENT OF THE OPENED


CURSOR cursor-name
THE SQL STATEMENT CANNOT BE EXECUTED BECAUSE IT WAS IN ERROR AT BIND
TIME FOR SECTION = sectno PACKAGE = pkgname CONSISTENCY TOKEN = X'contoken'
THE REQUESTED OPERATION OR USAGE DOES NOT APPLY TO table-type
TEMPORARY TABLE table-name
THE INSERT OR UPDATE VALUE OF FOREIGN KEY constraint-name IS INVALID
PARENT KEY IN A PARENT ROW CANNOT BE UPDATED BECAUSE IT HAS ONE OR MORE
DEPENDENT ROWS IN RELATIONSHIP constraint-name
THE RELATIONSHIP constraint-name RESTRICTS THE DELETION OF ROW WITH RID X ridnumber
INVALID MULTIPLE-ROW INSERT
THE PRIMARY KEY CANNOT BE UPDATED BECAUSE OF MULTIPLE-ROW UPDATE
THE DELETE STATEMENT IS INVALID BECAUSE TABLE table-name CAN BE AFFECTED BY
THE OPERATION
THE PRIMARY KEY CLAUSE, A FOREIGN KEY CLAUSE, OR A UNIQUE CLAUSE
IDENTIFIES COLUMN column-name MORE THAN ONCE
FOREIGN KEY name DOES NOT CONFORM TO THE DESCRIPTION OF A PARENT KEY OF
TABLE table-name
TABLE table-name DOES NOT HAVE A PRIMARY KEY
THE DEFINITION OF TABLE table-name IS INCOMPLETE BECAUSE IT LACKS A PRIMARY
INDEX OR A REQUIRED UNIQUE INDEX
column-name CANNOT BE A COLUMN OF A HASH KEY, PRIMARY KEY, A UNIQUE
CONSTRAINT, OR A PARENT KEY BECAUSE IT CAN CONTAIN NULL VALUES
A ROW IN A PARENT TABLE CANNOT BE DELETED BECAUSE THE CHECK CONSTRAINT
check-constraint RESTRICTS THE DELETION
THE CHECK CONSTRAINT SPECIFIED IN THE ALTER TABLE STATEMENT CANNOT BE
ADDED BECAUSE AN EXISTING ROW VIOLATES THE CHECK CONSTRAINT
THE REQUESTED OPERATION IS NOT ALLOWED BECAUSE A ROW DOES NOT SATISFY
THE CHECK CONSTRAINT check-constraint
THE CHECK CONSTRAINT constraint-name IS INVALID
A CHECK CONSTRAINT THAT IS DEFINED WITH column-name IS INVALID
THE statement STATEMENT IS NOT ALLOWED FOR object_type1 object_name BECAUSE
THE BIND OPTION DYNAMICRULES(RUN) IS NOT IN EFFECT FOR object_type2
auth-id DOES NOT HAVE THE PRIVILEGE TO PERFORM OPERATION operation ON
OBJECT object-name
auth-id DOES NOT HAVE THE PRIVILEGE TO PERFORM OPERATION operation
auth-id SPECIFIED IS NOT ONE OF THE VALID AUTHORIZATION IDS FOR REQUESTED
OPERATION
AN AUTHORIZATION ID CANNOT GRANT A PRIVILEGE TO ITSELF
AN AUTHORIZATION ID CANNOT REVOKE A PRIVILEGE FROM ITSELF
authid2 CANNOT HAVE THE privilege PRIVILEGE on_object REVOKED BY authid1
BECAUSE THE REVOKEE DOES NOT POSSESS THE PRIVILEGE OR THE REVOKER DID
NOT MAKE THE GRANT
INCONSISTENT GRANT/REVOKE KEYWORD keyword. PERMITTED KEYWORDS ARE
keyword-list
INVALID CLAUSE OR COMBINATION OF CLAUSES ON A GRANT OR REVOKE
ALL AUTHORIZATION FUNCTIONS HAVE BEEN DISABLED
THE SPECIFIED PRIVILEGES CANNOT BE GRANTED TO PUBLIC
bind-type AUTHORIZATION ERROR USING auth-id AUTHORITY PACKAGE = package-name
PRIVILEGE = privilege

DB2 10 for z/OS

451

YL&A DB2 10 for z/OS Reference Guide


-571
-573
-574
-575
-577
-578
-579
-580
-581
-582

-583
-584
-585
-586
-589
-590
-592
-593
-594
-601

-602
-603
-604
-607
-611
-612
-613

452

THE STATEMENT WOULD RESULT IN A MULTIPLE SITE UPDATE


TABLE table-name DOES NOT HAVE A UNIQUE KEY WITH THE SPECIFIED COLUMN
NAMES
THE SPECIFIED DEFAULT VALUE OR IDENTITY ATTRIBUTE VALUE CONFLICTS WITH THE
DEFINITION OF COLUMN column-name
OBJECT object-name (OBJECT TYPE object-type) CANNOT BE REFERENCED EXPLICITLY
OR IMPLICITLY
object-type object-name ATTEMPTED TO MODIFY DATA WHEN THE DEFINITION OF THE
FUNCTION OR PROCEDURE DID NOT SPECIFY THIS ACTION
THE RETURN STATEMENT WAS NOT EXECUTED FOR SQL FUNCTION function-name
object-type object-name ATTEMPTED TO READ OR MODIFY DATA WHEN THE DEFINITION
OF THE FUNCTION OR PROCEDURE DID NOT SPECIFY THIS ACTION
THE RESULT-EXPRESSIONS OF A CASE EXPRESSION CANNOT ALL BE NULL
THE DATA TYPES OF THE RESULT-EXPRESSIONS OF A CASE EXPRESSION ARE NOT
COMPATIBLE
THE SEARCH-CONDITION IN A SEARCHED-WHEN-CLAUSE OF A CASE IS NOT VALID IN
THE CONTEXT IN WHICH IT WAS SPECIFIED. THE SEARCH CONDITION CONTAINS A
QUANTIFIED PREDICATE OR AN IN PREDICATE THAT INCLUDES A FULLSELECT, AND
THESE ARE NOT ALLOWED IN THE SPECIFIED CONTEXT
THE USE OF FUNCTION OR EXPRESSION name IS INVALID BECAUSE IT IS NOT
DETERMINISTIC OR HAS AN EXTERNAL ACTION
INVALID USE OF NULL
THE COLLECTION collection-id APPEARS MORE THAN ONCE IN THE SET specialregister STATEMENT
THE TOTAL LENGTH OF THE CURRENT PATH SPECIAL REGISTER CANNOT EXCEED
2048 CHARACTERS
A POSITIONED DELETE OR UPDATE STATEMENT FOR CURSOR cursor-name
SPECIFIED A ROW OF A ROWSET, BUT THE CURSOR IS NOT POSITIONED ON A ROWSET
NAME name IS NOT UNIQUE IN THE CREATE OR ALTER FOR ROUTINE routine-name
NOT AUTHORIZED TO CREATE FUNCTIONS OR PROCEDURES IN WLM ENVIRONMENT
NOT NULL MUST BE SPECIFIED FOR column-name BECAUSE IT IS DEFINED AS A ROWID
(OR DISTINCT TYPE FOR ROWID), ROW CHANGE TIMESTAMP COLUMN, ROW BEGIN
COLUMN, ROW END COLUMN, OR COLUMN OF A PERIOD column-name
ATTEMPT TO CREATE A NULLABLE ROWID OR DISTINCT TYPE COLUMN column-name
THE NAME (VERSION OR VOLUME SERIAL NUMBER) OF THE OBJECT TO BE DEFINED
OR THE TARGET OF A RENAME STATEMENT IS IDENTICAL TO THE EXISTING NAME
(VERSION OR VOLUME SERIAL NUMBER) name OF THE OBJECT TYPE obj-type
TOO MANY COLUMNS, PERIODS, OR KEY-EXPRESSIONS SPECIFIED IN A CREATE INDEX
OR ALTER INDEX STATEMENT
A UNIQUE INDEX CANNOT BE CREATED BECAUSE THE TABLE CONTAINS ROWS WHICH
ARE DUPLICATES WITH RESPECT TO THE VALUES OF THE IDENTIFIED COLUMNS AND
PERIODS
A DATA TYPE DEFINITION SPECIFIES AN INVALID LENGTH, PRECISION, OR SCALE
ATTRIBUTE
OPERATION OR OPTION operation IS NOT DEFINED FOR THIS OBJECT
ONLY LOCKMAX 0 CAN BE SPECIFIED WHEN THE LOCK SIZE OF THE TABLESPACE IS
TABLESPACE OR TABLE
identifier IS A DUPLICATE NAME
THE PRIMARY KEY OR A UNIQUE CONSTRAINT IS TOO LONG OR HAS TOO MANY
COLUMNS AND PERIODS

DB2 10 for z/OS

YL&A DB2 10 for z/OS Reference Guide


-614

-615
-616
-618
-619
-620
-621
-622
-623
-624
-625
-626
-627
-628
-629
-631
-632
-633
-634
-635
-636
-637
-638
-639
-642
-643
-644
-646
-647
-650
-651
-652
-653

THE INDEX CANNOT BE CREATED OR THE LENGTH OF A COLUMN CANNOT BE


CHANGED BECAUSE THE SUM OF THE INTERNAL LENGTHS OF THE IDENTIFIED
COLUMNS IS GREATER THAN THE ALLOWABLE MAXIMUM
operation-type IS NOT ALLOWED ON A PACKAGE IN USE
obj-type1 obj-name1 CANNOT BE DROPPED BECAUSE IT IS REFERENCED BY obj-type2
obj-name2
OPERATION operation IS NOT ALLOWED ON SYSTEM DATABASES
OPERATION DISALLOWED BECAUSE THE WORK FILE DATABASE IS NOT STOPPED
KEYWORD keyword IN stmt-type STATEMENT IS NOT PERMITTED FOR A space-type
SPACE IN THE database-type DATABASEv
DUPLICATE DBID dbid WAS DETECTED AND PREVIOUSLY ASSIGNED TO database-name
FOR MIXED DATA IS INVALID BECAUSE THE MIXED DATA INSTALL OPTION IS NO
CLUSTER IS NOT VALID FOR table-name
TABLE table-name ALREADY HAS A PRIMARY KEY OR UNIQUE CONSTRAINT WITH
SPECIFIED COLUMNS AND PERIODS
TABLE table-name DOES NOT HAVE AN INDEX TO ENFORCE THE UNIQUENESS OF THE
PRIMARY OR UNIQUE KEY
THE ALTER STATEMENT IS NOT EXECUTABLE BECAUSE THE PAGE SET IS NOT
STOPPED
THE ALTER STATEMENT IS INVALID BECAUSE THE TABLE SPACE OR INDEX HAS USERMANAGED DATA SETS
THE CLAUSES ARE MUTUALLY EXCLUSIVE.
SET NULL CANNOT BE SPECIFIED BECAUSE FOREIGN KEY name CANNOT CONTAIN
NULL VALUES
FOREIGN KEY name IS TOO LONG OR HAS TOO MANY COLUMNS
THE TABLE CANNOT BE DEFINED AS A DEPENDENT OF table-name BECAUSE OF
DELETE RULE RESTRICTIONS
THE DELETE RULE MUST BE delete-rule
THE DELETE RULE MUST NOT BE CASCADE
THE DELETE RULES CANNOT BE DIFFERENT OR CANNOT BE SET NULL
RANGES SPECIFIED FOR PARTITION part-num ARE NOT VALID
DUPLICATE keyword KEYWORD OR CLAUSE
TABLE table-name CANNOT BE CREATED BECAUSE COLUMN DEFINITION IS MISSING
A NULLABLE COLUMN OF A FOREIGN KEY WITH A DELETE RULE OF SET NULL CANNOT
BE A COLUMN OF THE KEY OF A PARTITIONED INDEX
TOO MANY COLUMNS IN UNIQUE CONSTRAINTS
A CHECK CONSTRAINT OR THE VALUE OF AN EXPRESSION FOR A COLUMN OF AN
INDEX EXCEEDS THE MAXIMUM ALLOWABLE LENGTH KEY EXPRESSION
INVALID VALUE SPECIFIED FOR KEYWORD keyword IN OR CLAUSE keyword-or-clause
IN STATEMENT stmt-type
TABLE table-name CANNOT BE CREATED IN SPECIFIED TABLE SPACE table-space-name
BECAUSE IT ALREADY CONTAINS A TABLE
BUFFERPOOL bp-name FOR IMPLICIT OR EXPLICIT TABLESPACE OR INDEXSPACE name
HAS NOT BEEN ACTIVATED
THE ALTER INDEX CANNOT BE EXECUTED, REASON reason
TABLE DESCRIPTION EXCEEDS MAXIMUM SIZE OF OBJECT DESCRIPTOR.
VIOLATION OF INSTALLATION DEFINED EDIT OR VALIDATION PROCEDURE
TABLE table-name IN PARTITIONED TABLESPACE tspace-name IS NOT AVAILABLE
BECAUSE ITS PARTITIONED INDEX HAS NOT BEEN CREATED

DB2 10 for z/OS

453

YL&A DB2 10 for z/OS Reference Guide


-655
-658
-660

THE CREATE OR ALTER STOGROUP IS INVALID BECAUSE THE STORAGE GROUP


WOULD HAVE BOTH SPECIFIC AND NON-SPECIFIC VOLUME IDS
A object-type CANNOT BE DROPPED USING THE statement STATEMENT
INDEX index-name CANNOT BE CREATED OR ALTERED ON PARTITIONED TABLESPACE
tspace-name BECAUSE KEY LIMITS ARE NOT SPECIFIED

-661

object-type index-name CANNOT BE CREATED ON PARTITIONED TABLE SPACE


tspace-name BECAUSE THE NUMBER OF PARTITION SPECIFICATIONS IS NOT EQUAL
TO THE NUMBER OF PARTITIONS OF THE TABLE SPACE

-662

A PARTITIONED INDEX CANNOT BE CREATED ON A TABLE SPACE, OR A TABLE SPACE


CANNOT BE INDEX-CONTROLLED. TABLE SPACE tspace-name, REASON reason-code

-663

THE NUMBER OF KEY LIMIT VALUES IS EITHER ZERO, OR GREATER THAN THE NUMBER
OF COLUMNS IN THE KEY OF INDEX index-name

-665
-666
-667

THE PART CLAUSE OF AN ALTER STATEMENT IS OMITTED OR INVALID


stmt-verb object CANNOT BE EXECUTED BECAUSE function IS IN PROGRESS
THE CLUSTERING INDEX FOR A PARTITIONED TABLESPACE CANNOT BE EXPLICITLY
DROPPED
THE COLUMN CANNOT BE ADDED TO THE TABLE BECAUSE THE TABLE HAS AN EDIT
PROCEDURE DEFINED WITH ROW ATTRIBUTE SENSITIVITY
THE OBJECT CANNOT BE EXPLICITLY DROPPED. REASON reason-code
THE RECORD LENGTH OF THE TABLE EXCEEDS THE PAGE SIZE LIMIT
THE BUFFERPOOL ATTRIBUTE OF THE TABLESPACE CANNOT BE ALTERED AS
SPECIFIED BECAUSE IT WOULD CHANGE THE PAGE SIZE OF THE TABLESPACE
OPERATION DROP NOT ALLOWED ON TABLE table_name
THE PHYSICAL CHARACTERISTICS OF THE INDEX ARE INCOMPATIBLE WITH RESPECT
TO THE SPECIFIED STATEMENT. THE STATEMENT HAS FAILED. REASON reason-code
INSUFFICIENT VIRTUAL STORAGE FOR BUFFERPOOL EXPANSION
THE CONSTANT constant SPECIFIED FOR THE INDEX LIMIT KEY MUST CONFORM TO
THE DATA TYPE data-type OF THE CORRESPONDING COLUMN column-name
THE OBJECT name CANNOT BE CREATED BECAUSE A DROP IS PENDING ON THE
OBJECT
TOO MANY COLUMNS SPECIFIED FOR A TABLE, VIEW or TABLE FUNCTION
COLUMN column-name IN VIOLATION OF INSTALLATION DEFINED FIELD PROCEDURE.
RT: return-code, RS:
FIELD PROCEDURE procedure-name COULD NOT BE LOADED
THE SPECIFICATION FOR COLUMN, DISTINCT TYPE, FUNCTION, OR PROCEDURE dataitem CONTAINS INCOMPATIBLE CLAUSES
THE LENGTH OF LITERAL LIST BEGINNING string IS TOO LONG
INVALID FIELD TYPE, column-name
COLUMN DEFINED WITH A FIELD PROCEDURE CAN NOT COMPARE WITH ANOTHER
COLUMN WITH DIFFERENT FIELD PROCEDURE
FIELD TYPES INCOMPARABLE
INCORRECT DATA RETURNED FROM FIELD PROCEDURE, column-name,
TOO MANY COLUMNS DEFINED FOR A DEPENDENT TABLE
THE STATEMENT IS REJECTED BY DATA DEFINITION CONTROL SUPPORT.
THE REQUIRED REGISTRATION TABLE table-name DOES NOT EXIST
THE REQUIRED UNIQUE INDEX index-name FOR DDL REGISTRATION TABLE table-name
DOES NOT EXIST
THE COLUMN column-name IN DDL REGISTRATION TABLE OR INDEX table-name (indexname) IS NOT DEFINED PROPERLY

-668
-669
-670
-671
-672
-676
-677
-678
-679
-680
-681
-682
-683
-684
-685
-686
-687
-688
-689
-690
-691
-692
-693

454

DB2 10 for z/OS

YL&A DB2 10 for z/OS Reference Guide


-694
-695
-696
-697
-713
-715
-716
-717
-718
-719
-720
-721
-722
-723
-724
-725
-726
-728
-729
-730
-731
-732
-733
-734
-735
-736
-737
-739

THE SCHEMA STATEMENT CANNOT BE EXECUTED BECAUSE A DROP IS PENDING ON


THE DDL REGISTRATION TABLE table-name
INVALID VALUE seclabel SPECIFIED FOR SECURITY LABEL COLUMN OF TABLE tablename
THE DEFINITION OF TRIGGER trigger-name INCLUDES AN INVALID USE OF
CORRELATION NAME OR TRANSITION TABLE NAME name. REASON CODE= reason-code
OLD OR NEW CORRELATION NAMES ARE NOT ALLOWED IN A TRIGGER DEFINED WITH
THE FOR EACH STATEMENT CLAUSE. OLD_TABLE OR NEW_TABLE NAMES ARE NOT
ALLOWED IN A TRIGGER WITH THE BEFORE CLAUSE.
THE REPLACEMENT VALUE value FOR special-register IS INVALID
PROGRAM program-name WITH MARK release-dependency-mark FAILED BECAUSE IT
DEPENDS ON FUNCTIONS OF THE RELEASE FROM WHICH FALLBACK HAS OCCURRED
PROGRAM program-name PRECOMPILED WITH INCORRECT LEVEL FOR THIS RELEASE
bind-type FOR object-type object-name WITH MARK release-dependency-mark FAILED
BECAUSE object-type DEPENDS ON FUNCTIONS OF THE RELEASE FROM WHICH THE
FALLBACK OCCURRED
REBIND OF PACKAGE package-name FAILED BECAUSE IBMREQD OF ibmreqd IS INVALID
BIND ADD ERROR USING auth-id AUTHORITY PACKAGE
BIND ERROR, ATTEMPTING TO REPLACE PACKAGE = package_name WITH VERSION =
version2 BUT THIS VERSION ALREADY EXISTS
BIND ERROR FOR PACKAGE = pkg-id CONTOKEN = 'contoken'X IS NOT UNIQUE SO IT
CANNOT BE CREATED
bind-type ERROR USING auth-id AUTHORITY PACKAGE package-name DOES NOT EXIST
AN ERROR OCCURRED IN A TRIGGERED SQL STATEMENT IN TRIGGER trigger-name,
SECTION NUMBER section-number, INFORMATION RETURNED: SQLCODE sqlerror,
SQLSTATE sqlstate, AND MESSAGE TOKENS token-list
THE ACTIVATION OF THE object-type OBJECT object-name WOULD EXCEED THE
MAXIMUM LEVEL OF INDIRECT SQL CASCADING
THE SPECIAL REGISTER register AT LOCATION location WAS SUPPLIED AN INVALID
VALUE
BIND ERROR ATTEMPTING TO REPLACE PACKAGE = <package_name>. THERE ARE
ENABLE OR DISABLE ENTRIES CURRENTLY ASSOCIATED WITH THE PACKAGE
DATA TYPE data-type IS NOT ALLOWED IN DB2 PRIVATE PROTOCOL PROCESSING
A STORED PROCEDURE SPECIFYING COMMIT ON RETURN CANNOT BE THE TARGET OF
A NESTED CALL STATEMENT
THE PARENT OF A TABLE IN A READ-ONLY SHARED DATABASE MUST ALSO BE A TABLE
IN A READ-ONLY SHARED DATABASE
USER-DEFINED DATA SET dsname MUST BE DEFINED WITH SHAREOPTIONS(1,3)
THE DATABASE IS DEFINED ON THIS SUBSYSTEM WITH THE ROSHARE READ
ATTRIBUTE BUT THE TABLESPACE OR INDEX SPACE HAS NOT BEEN DEFINED ON THE
OWNING SUBSYSTEM
THE DESCRIPTION OF A TABLESPACE, INDEX SPACE, OR TABLE IN A ROSHARE READ
DATABASE MUST BE CONSISTENT WITH ITS DESCRIPTION IN THE OWNER SYSTEM
THE ROSHARE ATTRIBUTE OF A DATABASE CANNOT BE ALTERED FROM ROSHARE
READ
DATABASE dbid CANNOT BE ACCESSED BECAUSE IT IS NO LONGER A SHARED
DATABASE
INVALID OBID obid SPECIFIED
IMPLICIT TABLESPACE NOT ALLOWED
ALTER FUNCTION function-name FAILED BECAUSE FUNCTIONS CANNOT MODIFY DATA
WHEN THEY ARE PROCESSED IN PARALLEL

DB2 10 for z/OS

455

YL&A DB2 10 for z/OS Reference Guide


-740
-741
-742
-746
-747
-748
-750

-751
-752
-763
-764
-765
-766
-767
-768
-769
-770
-771
-773
-775
-776
-778
-779
-780
-781
-782
-783
-784
-785
-787
-797
-798
-802

456

FUNCTION name IS DEFINED WITH THE OPTION MODIFIES SQL DATA WHICH IS NOT
VALID IN THE CONTEXT IN WHICH IT WAS INVOKED
A WORK FILE DATABASE IS ALREADY DEFINED FOR MEMBER member-name
DSNDB07 IS THE IMPLICIT WORK FILE DATABASE
THE SQL STATEMENT IN AN EXTERNAL FUNCTION, TRIGGER, OR IN STORED
PROCEDURE name VIOLATES THE NESTING SQL RESTRICTION
TABLE table-name IS NOT AVAILABLE UNTIL THE AUXILIARY TABLES AND INDEXES FOR
ITS EXTERNALLY STORED COLUMNS HAVE BEEN CREATED
AN INDEX ALREADY EXISTS ON AUXILIARY TABLE
THE SOURCE TABLE table-name CANNOT BE RENAMED BECAUSE IT IS REFERENCED
IN EXISTING VIEW, MATERIALIZED QUERY TABLE, OR TRIGGER DEFINITIONS, IS A
CLONE TABLE, OR HAS A CLONE TABLE DEFINED FOR IT
object-type object-name (SPECIFIC NAME specific name) ATTEMPTED TO EXECUTE AN
SQL STATEMENT statement THAT IS NOT ALLOWED
THE CONNECT STATEMENT IS INVALID BECAUSE THE PROCESS ISNOT IN THE
CONNECTABLE STATE
INVALID TABLESPACE NAME table-space-name
A LOB TABLESPACE AND ITS ASSOCIATED BASE TABLESPACE MUST BE IN THE SAME
DATABASE
TABLE IS NOT COMPATIBLE WITH DATABASE
THE OBJECT OF A STATEMENT IS A TABLE FOR WHICH THE REQUESTED OPERATION IS
NOT PERMITTED
MISSING OR INVALID COLUMN SPECIFICATION FOR INDEX
AN AUXILIARY TABLE ALREADY EXISTS FOR THE SPECIFIED COLUMN OR PARTITION
SPECIFICATION OF CREATE AUX TABLE DOES NOT MATCH THE CHARACTERISTICS OF
THE BASE TABLE
TABLE table-name CANNOT HAVE A LOB COLUMN UNLESS IT ALSO HAS A ROWID, OR
AN XML COLUMN UNLESS IT ALSO HAS A DOCID COLUMN
INVALID SPECIFICATION OF A ROWID COLUMN
CASE NOT FOUND FOR CASE STATEMENT
STATEMENT SPECIFIED IN SQL ROUTINE IN NOT ALLOWED WITHIN A COMPOUND
STATMENT
USE OF CURSOR cursor-name IS NOT VALID
ENDING LABEL label DOES NOT MATCH THE BEGINNING LABEL
LABEL label SPECIFIED ON A GOTO, ITERATE, OR LEAVE STATEMENT IS NOT VALID
UNDO SPECIFIED FOR A HANDLER
CONDITION condition-name IS NOT DEFINED OR THE DEFINITION IS NOT IN SCOPE
A CONDITION OR SQLSTATE value SPECIFIED IS NOT VALID
SELECT LIST FOR CURSOR cursor-name IN FOR STATEMENT IS NOT VALID. COLUMN
column-name IS NOT UNIQUE
CONSTRAINT constraint-name CANNOT BE DROPPED
USE OF SQLCODE OR SQLSTATE IS NOT VALID
RESIGNAL STATEMENT ISSUED OUTSIDE OF A HANDLER
THE TRIGGER trigger-name IS DEFINED WITH AN UNSUPPORTED TRIGGERED SQL
STATEMENT
A VALUE CANNOT BE SPECIFIED FOR COLUMN column-name WHICH IS DEFINED AS
GENERATED ALWAYS
EXCEPTION ERROR 'exception-type' HAS OCCURRED DURING 'operation-type' OPERATION
ON 'data-type' DATA, POSITION 'position-number'

DB2 10 for z/OS

YL&A DB2 10 for z/OS Reference Guide


-803

-804
-805
-807
-808
-811
-812

-817
-818
-819
-820
-822
-840
-842
-843
-845

-846
-867
-870
-872
-873
-874
-875
-876
-877
-878
-879

AN INSERTED OR UPDATED VALUE IS INVALID BECAUSE THE INDEX IN INDEX SPACE


indexspace-name CONSTRAINS COLUMNS OF THE TABLE SO NO TWO ROWS CAN
CONTAIN DUPLICATE VALUES IN THOSE COLUMNS. RID OF EXISTING ROW IS X'rid'
AN ERROR WAS FOUND IN THE APPLICATION PROGRAM INPUT PARAMETERS FOR THE
SQL STATEMENT, REASON reason
DBRM OR PACKAGE NAME location-name.collection-id.dbrm-name-consistency-token NOT
FOUND IN PLAN plan-name. REASON reason
ACCESS DENIED: PACKAGE package-name IS NOT ENABLED FOR ACCESS FROM
connection-type connection-name
THE CONNECT STATEMENT IS NOT CONSISTENT WITH THE FIRST CONNECT
STATEMENT
THE RESULT OF AN EMBEDDED SELECT STATEMENT IS A TABLE OF MORE THAN ONE
ROW, OR THE RESULT OF THE SUBQUERY OF A BASIC PREDICATE IS MORE THAN ONE
VALUE
THE SQL STATEMENT CANNOT BE PROCESSED BECAUSE A BLANK COLLECTION-ID
WAS FOUND IN THE CURRENT PACKAGESET SPECIAL REGISTER WHILE TRYING TO
FORM A QUALIFIED PACKAGE NAME FOR PROGRAM program-name.consistency-token
USING PLAN plan-name
THE SQL STATEMENT CANNOT BE EXECUTED BECAUSE THE STATEMENT WILL RESULT
IN A PROHIBITED UPDATE OPERATION.
THE PRECOMPILER-GENERATED TIMESTAMP x IN THE LOAD MODULE IS DIFFERENT
FROM THE BIND TIMESTAMP y BUILT FROM THE DBRM z
THE VIEW CANNOT BE PROCESSED BECAUSE THE LENGTH OF ITS
PARSE TREE IN THE CATALOG IS ZERO
THE SQL STATEMENT CANNOT BE PROCESSED BECAUSE catalog-table CONTAINS A
VALUE THAT IS NOT VALID IN THIS RELEASE
THE SQLDA CONTAINS AN INVALID DATA ADDRESS OR INDICATOR VARIABLE ADDRESS
TOO MANY ITEMS RETURNED IN A SELECT OR INSERT LIST
A CONNECTION TO location-name ALREADY EXISTS
THE SET CONNECTION OR RELEASE STATEMENT MUST SPECIFY AN EXISTING
CONNECTION
A PREVIOUS VALUE EXPRESSION CANNOT BE USED BEFORE THE |NEXT VALUE
EXPRESSION GENERATES A VALUE IN THE CURRENT APPLICATION PROCESS |FOR
SEQUENCE sequence-name
INVALID SPECIFICATION OF AN IDENTITY COLUMN OR SEQUENCE OBJECT
object_type object_name. REASON CODE = reason_code
INVALID SPECIFICATION OF A ROWID COLUMN
THE NUMBER OF HOST VARIABLES IN THE STATEMENT IS NOT EQUAL TO THE NUMBER
OF DESCRIPTORS
A VALID CCSID HAS NOT YET BEEN SPECIFIED FOR THIS SUBSYSTEM
THE STATEMENT REFERENCED DATA ENCODED WITH DIFFERENT ENCODING
SCHEMES OR CCSIDS IN AN INVALID CONTEXT
THE ENCODING SCHEME SPECIFIED FOR THE object-type MUST BE THE SAME AS THE
CONTAINING TABLESPACE OR OTHER PARAMETERS
operand CANNOT BE USED WITH THE ASCII DATA REFERENCED
' object' CANNOT BE CREATED OR ALTERED, REASON ' reason'
CCSID ASCII IS NOT ALLOWED FOR THIS DATABASE OR TABLE SPACE
THE explain-object USED FOR EXPLAIN MUST BE ENCODED IN UNICODE. IT CANNOT BE
IN ASCII OR EBCDIC
CREATE or ALTER STATEMENT FOR obj-name CANNOT DEFINE A COLUMN, DISTINCT
TYPE, FUNCTION OR STORED PROCEDURE PARAMETER AS MIXED OR GRAPHIC WITH
ENCODING SCHEME encoding-scheme

DB2 10 for z/OS

457

YL&A DB2 10 for z/OS Reference Guide


-880
-881
-882
-900
-901
-902
-904
-905
-906
-908
-909
-910
-911
-913
-917
-918
-919
-922
-923
-924
-925
-926
-927
-929
-939
-947
-948
-950
-951
-952

458

SAVEPOINT savepoint-name DOES NOT EXIST OR IS INVALID IN THIS CONTEXT


A SAVEPOINT WITH NAME savepoint-name ALREADY EXISTS, BUT THIS SAVEPOINT
NAME CANNOT BE REUSED
SAVEPOINT DOES NOT EXIST
THE SQL STATEMENT CANNOT BE EXECUTED BECAUSE THE APPLICATION PROCESS IS
NOT CONNECTED TO AN APPLICATION SERVER
UNSUCCESSFUL EXECUTION CAUSED BY A SYSTEM ERROR THAT DOES NOT
PRECLUDE THE SUCCESSFUL EXECUTION OF SUBSEQUENT SQL STATEMENTS
POINTER TO THE ESSENTIAL CONTROL BLOCK (CT/RDA) HAS VALUE 0, REBIND
REQUIRED
UNSUCCESSFUL EXECUTION CAUSED BY AN UNAVAILABLE RESOURCE. REASON
reason-code, TYPE OR RESOURCE resource-type, AND RESOURCE NAME resource-name
UNSUCCESSFUL EXECUTION DUE TO RESOURCE LIMIT BEING EXCEEDED, RESOURCE
NAME = resource-name LIMIT = limit-amount1 CPU SECONDS ( limit-amount2 SERVICE
UNITS) DERIVED FROM limit-source
THE SQL STATEMENT CANNOT BE EXECUTED BECAUSE THIS FUNCTION IS DISABLED
DUE TO A PRIOR ERROR
bind-type ERROR USING auth-id AUTHORITY. BIND, REBIND OR AUTO-REBIND
OPERATION IS NOT ALLOWED
THE OBJECT HAS BEEN DELETED OR ALTERED
THE SQL STATEMENT CANNOT ACCESS AN OBJECT ON WHICH A DROP OR ALTER IS
PENDING
THE CURRENT UNIT OF WORK HAS BEEN ROLLED BACK DUE TO DEADLOCK OR
TIMEOUT. REASON reason-code, TYPE OF RESOURCE resource-type, AND RESOURCE
NAME resource-name
UNSUCCESSFUL EXECUTION CAUSED BY DEADLOCK OR TIMEOUT. REASON CODE
reason-code, TYPE OF RESOURCE resource-type, AND RESOURCE NAME resource-name
BIND PACKAGE FAILED
THE SQL STATEMENT CANNOT BE EXECUTED BECAUSE A CONNECTION HAS BEEN
LOST
A ROLLBACK OPERATION IS REQUIRED
AUTHORIZATION FAILURE: error-type ERROR. REASON reason-code
CONNECTION NOT ESTABLISHED: DB2 condition REASON reason-code, TYPE resourcetype, NAME resource-name
DB2 CONNECTION INTERNAL ERROR, function-code, return-code, reason-code
COMMIT NOT VALID IN IMS OR CICS ENVIRONMENT
ROLLBACK NOT VALID IN IMS, CICS OR RRSAF ENVIRONMENT
THE LANGUAGE INTERFACE (LI) WAS CALLED WHEN THE CONNECTING ENVIRONMENT
WAS NOT ESTABLISHED. THE PROGRAM SHOULD BE INVOKED UNDER THE DSN
COMMAND
FAILURE IN A DATA CAPTURE EXIT: token
ROLLBACK REQUIRED DUE TO UNREQUESTED ROLLBACK OF A REMOTE SERVER
THE SQL STATEMENT FAILED BECAUSE IT WILL CHANGE A TABLE DEFINED WITH DATA
CAPTURE CHANGES, BUT THE DATA CANNOT BE PROPAGATED
DISTRIBUTED OPERATION IS INVALID
THE LOCATION NAME SPECIFIED IN THE CONNECT STATEMENT IS INVALID OR NOT
LISTED IN THE COMMUNICATIONS DATABASE
OBJECT object-name OBJECT TYPE object-type IS IN USE AND CANNOT BE THE
TARGET OF THE SPECIFIED ALTER STATEMENT
PROCESSING WAS INTERRUPTED BY A CANCEL REQUEST FROM A CLIENT PROGRAM

DB2 10 for z/OS

YL&A DB2 10 for z/OS Reference Guide


-981
-989
-991
-992

THE SQL STATEMENT FAILED BECAUSE THE RRSAF CONNECTION IS NOT IN A STATE
THAT ALLOWS SQL OPERATIONS, REASON reason-code.
AFTER TRIGGER trigger-name ATTEMPTED TO MODIFY A ROW IN TABLE table-name
THAT WAS MODIFIED BY AN SQL DATA CHANGE STATEMENT WITHIN A FROM CLAUSE
CALL ATTACH WAS UNABLE TO ESTABLISH AN IMPLICIT CONNECT OR OPEN TO DB2.
RC1= rc1 RC2= rc2
PACKAGE package-name CANNOT BE EXECUTED OR DEPLOYED ON LOCATION
location-name

-1403

THE USERNAME AND/OR PASSWORD SUPPLIED IS INCORRECT

-1706

CREATE PROCEDURE FOR procedure-name MUST HAVE VALID LANGUAGE AND


EXTERNAL CLAUSES

-2001

THE NUMBER OF HOST VARIABLE PARAMETERS FOR A STORED PROCEDURE IS NOT


EQUAL TO THE NUMBER OF EXPECTED HOST VARIABLE PARAMETERS. ACTUAL
NUMBER
JAVA STORED PROCEDURE OR USER-DEFINED FUNCTION routine-name (SPECIFIC
NAME specific-name) HAS EXITED WITH AN EXCEPTION exception-string
ATTEMPT TO USE NEW FUNCTION BEFORE NEW FUNCTION MODE
THE NUMBER OF PARTITIONS, OR THE COMBINATION OF THE NUMBER OF TABLE
SPACE PARTITIONS AND THE CORRESPONDING LENGTH OF THE PARTITIONING LIMIT
KEY EXCEEDS THE SYSTEM LIMIT; OR THE COMBINATION OF THE NUMBER OF TABLE
SPACE PARTITIONS EXCEEDS THE MAXPARTITIONS FOR PARTITION BY GROWTH
TABLE SPACE
THE MAXIMUM NUMBER OF ALTERS ALLOWED HAS BEEN EXCEEDED FOR object-type
THE ALTER TABLE STATEMENT CANNOT BE EXECUTED BECAUSE COLUMN columnname IS MIXED DATA, OR THE DATA TYPE OR LENGTH SPECIFIED DOES NOT AGREE
WITH THE EXISTING DATA TYPE OR LENGTH
AN UNSUPPORTED DATA TYPE WAS ENCOUNTERED AS AN INCLUDE COLUMN
option SPECIFIED ON ALTER STATEMENT FOR routine-name routine-type IS NOT VALID
ALTER PROCEDURE STATEMENT CANNOT BE PROCESSED BECAUSE THE OPTIONS IN
EFFECT ARE NOT THE SAME AS THE ONES THAT WERE IN EFFECT (ENVID envid)
WHEN THE PROCEDURE OR VERSION WAS FIRST DEFINED
STATEMENT statement IS NOT ALLOWED WHEN USING A TRUSTED CONNECTION
TABLE table-name CANNOT BE DEFINED AS SPECIFIED IN THE statement STATEMENT
IN A COMMON CRITERIA ENVIRONMENT
EXPLAIN MONITORED STMTS FAILED WITH REASON CODE = yyyyy
EXCHANGE DATA STATEMENT SPECIFIED table1 and table2 BUT THE TABLES DO NOT
HAVE A DEFINED CLONE RELATIONSHIP
SYSTEM PARAMETER system-parameter VALUE parameter-value IS INCONSISTENT WITH
CLAUSE clause SPECIFIED ON statement-name STATEMENT
INVALID SPECIFICATION OF XML COLUMN table-name.column-name IS NOT DEFINED IN
THE XML VERSIONING FORMAT, REASON reason-code
THE NATIVE SQL ROUTINE STATEMENT FOR PACKAGE location-name.collectionid.programname. consistency-token STATEMENT NUMBER statement-number CANNOT BE
PROCESSED
THE MAXIMUM NUMBER OF ALTERS ALLOWED HAS BEEN EXCEEDED FOR object-type
THE ALTER TABLE STATEMENT CANNOT BE EXECUTED BECAUSE COLUMN column-name
IS MIXED DATA, OR THE DATA TYPE OR LENGTH SPECIFIED DOES NOT AGREE WITH
THE EXISTING DATA TYPE OR LENGTH
THE LOAD MODULE FOR THE PROCEDURE ASSUMES A PARAMETER VARCHAR OPTION
THAT IS NOT CONSISTENT WITH THE OPTION SPECIFIED ON THE CREATE PROCEDURE
STATEMENT FOR procedure-name

-4302
-4700
-4701

-4702
-4703

-4704
-4705
-4706

-4707
-4708
-4709
-4710
-4727
-4730
-4731
-4732
-4733
-4734

DB2 10 for z/OS

459

YL&A DB2 10 for z/OS Reference Guide


-4735
-4736
-4737
-4738
-4739
-5001
-5012
-7008
-16000

-16001

-16002
-16003
-16005

-16007
-16009
-16011
-16012
-16015

-16016
-16020
-16022
-16023
-16024
-16031
-16032
-16036
460

INVALID TABLE REFERENCE FOR TABLE LOCATOR


SQL TABLE FUNCTION function-name CONTAINS A PERIOD SPECIFICATION FOR
SYSTEM_TIME
STATEMENT statement IS NOT ALLOWED WHEN USING A TRUSTED CONNECTION
TABLE table-name CANNOT BE DEFINED AS SPECIFIED IN THE statement STATEMENT IN
A COMMON CRITERIA ENVIRONMENT
ENVIRONMENT SETTINGS (IDENTIFIED BY envid1) USED BY object-name ARE NOT THE
SAME AS THE ONES THAT WERE IN EFFECT (IDENTIFIED BYenvid2) WHEN OTHER
COLUMN MASKS AND ROW PERMISSIONS WERE DEFINED FOR TABLE table-name
TABLE table-name IS NOT VALID
HOST VARIABLE host-variable IS NOT EXACT NUMERIC WITH SCALE ZERO
object-name NOT VALID FOR OPERATION (reason-code)
AN XQUERY EXPRESSION CANNOT BE PROCESSED BECAUSE THE context-component
COMPONENT OF THE STATIC CONTEXT HAS NOT BEEN ASSIGNED. ERROR QNAME =
err:XPST0001
AN XQUERY EXPRESSION STARTING WITH TOKEN token CANNOT BE PROCESSED
BECAUSE THE FOCUS COMPONENT OF THE DYNAMIC CONTEXT HAS NOT BEEN
ASSIGNED. ERROR QNAME = err:XPDY0002
AN XQUERY EXPRESSION HAS AN UNEXPECTED TOKEN token FOLLOWING text.
EXPECTED TOKENS MAY INCLUDE: token-list. ERROR QNAME= ERR:XPST0003
AN EXPRESSION OF DATA TYPE value-type CANNOT BE USED WHEN THE DATA TYPE
expected-type IS EXPECTED IN THE CONTEXT. ERROR QNAME= err:XPTY0004
AN XQUERY EXPRESSION REFERENCES AN ELEMENT NAME, ATTRIBUTE NAME, |TYPE
NAME, FUNCTION NAME, NAMESPACE PREFIX, OR VARIABLE NAME undefined-name
THAT IS NOT DEFINED WITHIN THE STATIC CONTEXT. ERROR QNAME= ERR:XPST0008
THE XQUERY PATH EXPRESSION REFERENCES AN AXIS axis-type THAT IS NOT
SUPPORTED. ERROR QNAME = err:XQST0010
AN XQUERY FUNCTION NAMED function-name WITH number-of-parms PARAMETERS
IS NOT DEFINED IN THE STATIC CONTEXT. ERROR QNAME= err:XPST0017
THE RESULT OF AN INTERMEDIATE STEP EXPRESSION IN AN XQUERY PATH
EXPRESSION |ONTAINS AN ATOMIC VALUE. ERROR QNAME = err:XPTY0019
THE CONTEXT ITEM IN AN AXIS STEP MUST BE A NODE. ERROR QNAME =
err:XPTY0020
AN ELEMENT CONSTRUCTOR CONTAINS AN ATTRIBUTE NODE NAMED attribute-name
THAT FOLLOWS AN XQUERY NODE THAT IS NOT AN ATTRIBUTE NODE. ERROR QNAME
= ERR:XQTY0024
THE ATTRIBUTE NAME attribute-name CANNOT BE USED MORE THAN ONCE IN AN
ELEMENT CONSTRUCTOR. ERROR QNAME = err:XQTY0025
THE CONTEXT NODE IN A PATH EXPRESSION THAT BEGINS WITH AN INITIAL "/" OR "//"
DOES NOT HAVE AN XQUERY DOCUMENT NODE ROOT. ERROR QNAME =
err:XPDY0050
OPERANDS OF TYPES xquery-data-types ARE NOT VALID FOR OPERATOR
operator-name . ERROR QNAME = err:XPTY0004
THE XQUERY PROLOG CANNOT CONTAIN MULTIPLE DECLARATIONS FOR THE SAME
NAMESPACE PREFIX ns-prefix. ERROR QNAME = err:XQST0033
THE NAMESPACE PREFIX prefix-name CANNOT BE REDECLARED OR CANNOT BE
BOUND TO THE SPECIFIED URI. ERROR QNAME = err:XQST0070
XQUERY LANGUAGE FEATURE USING SYNTAX string IS NOT SUPPORTED
THE STRING string IS NOT A VALID URI. ERROR QNAME = err:XQST0046
THE URI THAT IS SPECIFIED IN A NAMESPACE DECLARATION CANNOT BE A ZEROLENGTH STRING
DB2 10 for z/OS

YL&A DB2 10 for z/OS Reference Guide


-16038
-16046
-16047
-16048
-16049
-16051

-16052
-16055
-16056
-16057
-16061
-16065
-16066
-16067
-16068
-16069
-16075
-16080
-16081
-16085
-16086
-16087
-16088

THE ARGUMENTS OF FN:DATETIME HAVE DIFFERENT TIMEZONES. ERROR


QNAME=ERR:FORG0008
A NUMERIC XQUERY EXPRESSION ATTEMPTED TO DIVIDE BY ZERO. ERROR QNAME =
err:FOAR0001
AN XQUERY EXPRESSION RESULTED IN ARITHMETIC OVERFLOW OR UNDERFLOW.
|ERROR QNAME= err:FOAR0002
AN XQUERY PROLOG CANNOT CONTAIN MORE THAN ONE decl-type DECLARATION.
ERROR QNAME = error-qname
THE LEXICAL VALUE value IS NOT VALID FOR THE type-name DATA TYPE IN THE
FUNCTION OR CAST. ERROR QNAME= err:FOCA0002
THE VALUE value OF DATA TYPE source-type IS OUT |OF RANGE FOR AN IMPLICIT OR
EXPLICIT CAST TO TARGET DATA TYPE target-type. ERROR QNAME = err:errorqname
NAN CANNOT BE USED AS A FLOAT OR DOUBLE VALUE IN A DATETIME OPERATION.
ERROR QNAME=ERR:FOCA0005
AN ARITHMETIC OPERATION INVOLVING A DATETIME VALUE RESULTED IN OVERFLOW.
ERROR QNAME=ERR:FODT0001
AN ARITHMETIC OPERATION INVOLVING A DURATION VALUE RESULTED IN OVERFLOW.
ERROR QNAME=ERR:FODT0002.
A TIMEZONE VALUE IS NOT VALID. ERROR QNAME=ERR:FODT0003.
THE VALUE value CANNOT BE CONSTRUCTED AS, OR CAST (USING AN IMPLICIT OR
EXPLICIT CAST) TO THE DATA TYPE data-type. ERROR QNAME = err:FORG0001
AN EMPTY SEQUENCE CANNOT BE CAST TO THE DATA TYPE data-type, ERROR
QNAME = err:FORG0006
THE ARGUMENT PASSED TO THE AGGREGATE FUNCTION function-name IS |NOT
VALID. ERROR QNAME = err:FORG0006
THE FLAGS ARGUMENT VALUE PASSED TO THE FUNCTION function-name IS NOT VALID.
ERROR QNAME= err:FORX0001
THE REGULAR EXPRESSION ARGUMENT VALUE PASSED TO THE FUNCTION functionname IS NOT VALID. ERROR QNAME= err:FORX0002
A REGULAR EXPRESSION ARGUMENT value PASSED TO THE FUNCTION function-name
MATCHES A ZERO-LENGTH STRING. ERROR QNAME= err:FORX0003
THE SEQUENCE TO BE SERIALIZED CONTAINS AN ITEM THAT IS AN ATTRIBUTE NODE.
ERROR QNAME = err:SENR0001
AN XQUERY EXPRESSION INCLUDES ONE OR MORE expression-type EXPRESSIONS
OUTSIDE THE XQUERY-UPDATE-CONSTANT OF AN XMLMODIFY FUNCTION. ERROR
QNAME=err:XUST0001.
THE XQUERY-UPDATE-CONSTANT IN THE XMLMODIFY FUNCTION IS NOT AN UPDATING
EXPRESSION OR AN EMPTY SEQUENCE EXPRESSION. ERROR QNAME=err:XUST0002.
THE TARGET NODE OF AN XQUERY expression-type EXPRESSION IS NOT VALID. ERROR
QNAME=err:error-name
THE REPLACEMENT SEQUENCE OF A REPLACE EXPRESSION CONTAINS INVALID
NODES FOR THE SPECIFIED TARGET NODE. ERROR QNAME=err:error-name.
THE RESULT OF APPLYING THE UPDATING EXPRESSIONS IN THE XMLMODIFY
FUNCTION IS NOT A VALID INSTANCE OF THE XQUERY AND XPATH DATA MODEL.
ADDITIONAL INFORMATION: information-1, information-2. ERROR QNAME=err:XUDY0021.
AN expression-type EXPRESSION HAS A BINDING OF A NAMESPACE PREFIX prefix-string
TO NAMESPACE URI uri-string, INTRODUCED TO AN ELEMENT NAMED element-name,
THAT CONFLICTS WITH AN EXISTING NAMESPACE BINDING OF THE SAME PREFIX TO A
DIFFERENT URI IN THE IN-SCOPE NAMESPACES OF ,THAT ELEMENT NODE. ERROR
QNAME=err:XUDY0023.

DB2 10 for z/OS

461

YL&A DB2 10 for z/OS Reference Guide


-16089

-16246
-16247

-16248
-16249
-16250

-16251
-16252
-16253
-16254
-16255

-16257
-16258

-16259
-16260
-16262
-16265
-16266

-20003
-20004
-20005
-20006
-20008
-20016

462

AN expression-type EXPRESSION AND POSSIBLY OTHER UPDATING EXPRESSIONS IN AN


XMLMODIFY FUNCTION INTRODUCE CONFLICTING NAMESPACE BINDINGS INTO AN
ELEMENT NAMED element-name. THE PREFIX prefix-string IS BOUND TO uri-string WHILE
ANOTHER BINDING OF THE SAME PREFIX USES A DIFFERENT NAMESPACE URI. ERROR
QNAME=err:XUDY0024.
INCOMPLETE ANNOTATION MAPPING AT OR NEAR LINE lineno IN XML SCHEMA
DOCUMENT uri. REASON CODE = reason-code.
SOURCE XML TYPE source-data-type CANNOT BE MAPPED TO TARGET SQL TYPE
target-data-type IN THE ANNOTATION AT OR NEAR LINE lineno IN XML SCHEMA
DOCUMENT uri
UNKNOWN ANNOTATION annotation-name AT OR NEAR LINE lineno IN XML SCHEMA
DOCUMENT uri
THE db2-xdb:expression ANNOTATION expression AT OR NEAR LINE lineno IN XML
SCHEMA DOCUMENT uri IS TOO LONG.
THE db2-xdb:defaultSQLSchema WITH VALUE schema-name AT OR NEAR LINE lineno
IN XML SCHEMA DOCUMENT uri CONFLICTS WITH ANOTHER db2xdb:defaultSQLSchema SPECIFIED IN ONE OF THE XML SCHEMA DOCUMENTS WITHIN
THE SAME XML SCHEMA.
DUPLICATE ANNOTATION DEFINED FOR object-name AT OR NEAR location IN XML
SCHEMA DOCUMENT uri
THE db2-xdb:rowSet NAME rowset-name SPECIFIED AT OR |NEAR LINE lineno IN THE
XML SCHEMA DOCUMENT uri IS ALREADY ASSOCIATED WITH ANOTHER TABLE
THE db2-xdb:condition ANNOTATION condition AT OR NEAR LINE lineno IN XML
SCHEMA DOCUMENT uri IS TOO LONG.
A db2-xdb:locationPath locationpath AT OR NEAR LINE lineno IN XML SCHEMA
DOCUMENT uri IS NOT VALID WITH REASON CODE reason-code.
A db2-xdb:rowSet VALUE rowset-name USED AT OR NEAR LINE lineno IN XML
SCHEMA DOCUMENT uri CONFLICTS WITH A db2-xdb:table ANNOTATION WITH THE
SAME NAME.
XML SCHEMA FEATURE feature SPECIFIED IS NOT SUPPORTED FOR DECOMPOSITION.
THE XML SCHEMA CONTAINS A RECURSIVE ELEMENT WHICH IS AN UNSUPPORTED
FEATURE FOR DECOMPOSITION. THE RECURSIVE ELEMENT IS IDENTIFIED AS
elementnamespace : elementname OF TYPE typenamespace : typename.
INVALID MANY-TO-MANY MAPPINGS DETECTED IN XML SCHEMA DOCUMENT uri1
NEAR LINE lineno1 AND IN XML SCHEMA DOCUMENT uri2 NEAR LINE lineno2.
XML SCHEMA ANNOTATIONS INCLUDE NO MAPPINGS TO ANY COLUMN OF ANY TABLE.
THE ANNOTATED XML SCHEMA HAS NO COLUMNS MAPPED FOR ROWSET rowsetname.
THE XML DOCUMENT CANNOT BE DECOMPOSED USING XML SCHEMA xsrobject-name
WHICH IS NOT ENABLED OR IS INOPERATIVE FOR DECOMPOSITION.
AN SQL ERROR OCCURRED DURING DECOMPOSITION OF DOCUMENT docid WHILE
ATTEMPTING TO INSERT DATA. INFORMATION RETURNED FOR THE ERROR INCLUDES
SQLCODE sqlcode, SQLSTATE sqlstate, AND MESSAGE TOKENS token-list.
GBPCACHE NONE CANNOT BE SPECIFIED FOR TABLESPACE OR INDEX IN GRECP
8K or 16K BUFFERPOOL PAGESIZE INVALID FOR A WORKFILE OBJECT
THE INTERNAL ID LIMIT OF limit HAS BEEN EXCEEDED FOR OBJECT TYPE object-type
LOBS CANNOT BE SPECIFIED AS PARAMETERS WHEN NO WLM ENVIRONMENT IS
SPECIFIED
UNSUPPORTED OPTION keyword SPECIFIED
THE VALUE OF THE INLINE LENGTH ASSOCIATED WITH object-name IS TOO BIG OR THE
INLINE LENGTH CLAUSE IS NOT ALLOWED IN THE CONTEXT
DB2 10 for z/OS

YL&A DB2 10 for z/OS Reference Guide


-20019
-20058
-20060
-20070
-20071
-20072
-20073
-20074
-20091
-20092
-20093

-20094
-20100
-20101
-20102
-20104
-20106

-20107
-20108

THE RESULT TYPE RETURNED FROM THE FUNCTION BODY CANNOT BE ASSIGNED TO
THE DATA TYPE DEFINED IN THE RETURNS CLAUSE
THE FULLSELECT SPECIFIED FOR MATERIALIZED QUERY TABLE table-name IS NOT
VALID
UNSUPPORTED DATA TYPE data-type ENCOUNTERED IN SQL object-type objectname
AUXILIARY TABLE table-name CANNOT BE CREATED BECAUSE COLUMN column-name IS
NOT A LOB COLUMN
WLM ENVIRONMENT NAME MUST BE SPECIFIED function-name
bind-type bind-subtype ERROR USING auth-id AUTHORITY OPERATION IS NOT ALLOWED
ON A package-type PACKAGE package-name
THE FUNCTION function-name CANNOT BE ALTERED BECAUSE IT IS REFERENCED IN
EXISTING VIEW OR MATERIALIZED QUERY TABLE DEFINITIONS
THE OBJECT object-name CANNOT BE CREATED BECAUSE THE FIRST THREE
CHARACTERS ARE RESERVED FOR SYSTEM OBJECTS
A VIEW NAME WAS SPECIFIED AFTER LIKE IN ADDITION TO THE INCLUDING IDENTITY
COLUMN ATTRIBUTES CLAUSE
A TABLE OR VIEW WAS SPECIFIED IN THE LIKE CLAUSE, BUT THE OBJECT CANNOT BE
USED IN THIS CNTEXT
THE TABLE table-name CANNOT BE CONVERTED TO OR FROM A MATERIALIZED
QUERY TABLE, OR THE MATERIALIZED QUERY TABLE PROPERTY CANNOT BE
ALTERED. REASON CODE = reason-code.
THE COLUMN column-name IS A GENERATED COLUMN AND CANNOT BE USED IN THE
BEFORE TRIGGER trigger-name.
AN ERROR OCCURRED WHEN BINDING A TRIGGERED SQL STATEMENT. INFORMATION
RETURNED: SECTION NUMBER : section-number SQLCODE sqlerror, SQLSTATE sqlstate,
AND MESSAGE TOKENS
THE FUNCTION function FAILED WITH REASON rc
CREATE OR ALTER STATEMENT FOR USER-DEFINED FUNCTION function-name
SPECIFIED THE option OPTION WHICH IS NOT ALLOWED FOR THE TYPE OF ROUTINE
AN ATTEMPT TO ALTER A CCSID FROM from-ccsid TO to-ccsid FAILED
THE CCSID FOR THE TABLE SPACE OR DATABASE CANNOT BE CHANGED BECAUSE
THE TABLE SPACE OR DATABASE ALREADY CONTAINS A TABLE THAT IS REFERENCED
IN EXISTING VIEW, OR MATERIALIZED QUERY TABLE DEFINITIONS OR AN EXTENDED
INDEX
HOST VARIABLE OR PARAMETER NUMBER position-number CANNOT BE USED AS
SPECIFIED BECAUSE REASON reason
A RESULT SET CONTAINS AN UNSUPPORTED DATA TYPE IN POSITION NUMBER positionnumber FOR CURSOR cursor-name OPENED BY STORED PROCEDURE procedure-name

-20110

CANNOT IMPLICITLY CONNECT TO A REMOTE SITE WITH A SAVEPOINT OUTSTANDING

-20111

CANNOT ISSUE SAVEPOINT, RELEASE SAVEPOINT, ROLLBACK TO SAVEPOINT FROM A


TRIGGER, FROM A USER-DEFINED FUNCTION, OR FROM A GLOBAL TRANSACTION
A WINDOW SPECIFICATION FOR AN OLAP SPECIFICATION IS NOT VALID. REASON CODE
= reason-code
AN SQL TABLE FUNCTION MUST RETURN A TABLE RESULT
CALL TO STORED PROCEDURE procedure FAILED BECAUSE THE RESULT SET
RETURNED FOR CURSOR cursor IS SCROLLABLE, BUT THE CURSOR IS NOT
POSITIONED BEFORE THE FIRST ROW
OPEN CURSOR cursor FAILED BECAUSE THE CURSOR IS SCROLLABLE BUT THE CLIENT
DOES NOT SUPPORT THIS

-20117
-20120
-20123
-20124

DB2 10 for z/OS

463

YL&A DB2 10 for z/OS Reference Guide


-20125
-20127
-20129
-20142
-20143
-20144
-20146
-20147
-20148
-20163
-20165
-20166
-20177
-20178
-20179

CALL TO STORED PROCEDURE procedure FAILED BECAUSE THE RESULT SET FOR
CURSOR cursor IS SCROLLABLE, BUT THE CLIENT DOES NOT SUPPORT THIS
VALUE SPECIFIED ON FETCH STATEMENT FOR ABSOLUTE OR RELATIVE IS TOO LARGE
FOR DRDA
LOCAL SPECIAL REGISTER IS NOT VALID AS USED
SEQUENCE sequence-name CANNOT BE USED AS SPECIFIED
THE ENCRYPTION OR DECRYPTION FUNCTION FAILED, BECAUSE THE ENCRYPTION
PASSWORD VALUE IS NOT SET
THE ENCRYPTION IS INVALID BECAUSE THE LENGTH OF THE PASSWORD WAS LESS
THAN 6 BYTES OR GREATER THAN 127 BYTES
THE DECRYPTION FAILED. THE DATA IS NOT ENCRYPTEd
THE ENCRYPTION FUNCTION FAILED. MULTIPLE PASS ENCRYPTION IS NOT
SUPPORTED
A RETURN STATEMENT DOES NOT EXIST OR WAS NOT INVOKED DURING THE
EXECUTION OF ROUTINE routine-name WITH SPECIFIC NAME specific-name
HEXADECIMAL CONSTANT GX IS NOT ALLOWED
AN SQL DATA CHANGE STATEMENT WITHIN A FROM CLAUSE IS NOT ALLOWED IN THE
CONTEXT IN WHICH IT WAS SPECIFIED
AN SQL DATA CHANGE STATEMENT WITHIN A SELECT SPECIFIED A VIEW view-name
WHICH IS NOT A SYMMETRIC VIEW OR COULD NOT HAVE BEEN DEFINED AS A
SYMMETRIC VIEW
SET DATA TYPE CLAUSE ON ALTER TABLE SPECIFIED FLOATING POINT, BUT THIS
CHANGE IS DISALLOWED
VIEW view-name ALREADY HAS AN INSTEAD OF operation TRIGGER |DEFINED

-20180

THE INSTEAD OF TRIGGER CANNOT BE CREATED BECAUSE THE VIEW view-name IS


DEFINED USING THE WITH CHECK OPTION
COLUMN column-name IN TABLE table-name CANNOT BE ALTERED AS SPECIFIED

-20181
-20182

COLUMN CANNOT BE ADDED TO INDEX index-name


PARTITIONING CLAUSE clause ON stmt-type STATEMENT FOR index-name IS NOT VALID

-20183

THE PARTITIONED, ADD PARTITION, ADD PARTITIONING KEY, ALTER PARTITION,


ROTATE PARTITION, OR PARTITION BY RANGE CLAUSE SPECIFIED ON CREATE OR
ALTER FOR name IS NOT VALID
CURSOR cursor-name IS NOT DEFINED TO ACCESS ROWSETS, BUT A CLAUSE WAS
SPECIFIED THAT IS VALID ONLY WITH ROWSET ACCESS

-20185
-20186
-20200
-20201
-20202
-20203
-20204
-20207

464

A CLAUSE SPECIFIED FOR THE DYNAMIC SQL STATEMENT BEING PROCESSED IS NOT
VALID
THE INSTALL OR REPLACE OF jar-id WITH URL url FAILED DUE TO REASON reason-code(reason-string).
THE INSTALL, REPLACE, REMOVE, OR ALTER OF jar-name FAILED DUE TO REASON
reason-code-(reason-string)
THE REMOVE OF jar-name FAILED AS class IS IN USE
USER-DEFINED FUNCTION OR PROCEDURE name HAS A JAVA METHOD WITH AN
INVALID SIGNATURE. THE ERROR IS AT OR NEAR PARAMETER number. THE SIGNATURE
IS signature.
THE USER-DEFINED FUNCTION OR PROCEDURE routine-name WAS UNABLE TO MAP TO
A SINGLE JAVA METHOd
THE INSTALL OR REMOVE OF jar-name SPECIFIED THE USE OF A DEPLOYMENT
DESCRIPTOR.

DB2 10 for z/OS

YL&A DB2 10 for z/OS Reference Guide


-20210
-20211
-20212
-20213
-20223
-20224
-20227
-20232
-20235
-20240
-20248
-20249
-20252
-20257
-20258
-20260
-20264
-20265
-20266
-20275
-20281
-20283
-20286
-20289
-20295
-20300

THE SQL STATEMENT CANNOT BE EXECUTED BECAUSE IT WAS PRECOMPILED AT A


LEVEL THAT IS INCOMPATIBLE WITH THE CURRENT VALUE OF THE ENCODING BIND
OPTION OR SPECIAL REGISTER
THE SPECIFICATION ORDER BY OR FETCH FIRST N ROWS ONLY IS INVALID
USER-DEFINED ROUTINE name ENCOUNTERED AN EXCEPTION ATTEMPTING TO LOAD
JAVA CLASS class-name FROM JAR jar-name. ORIGINAL |EXCEPTION: exception-string
STORED PROCEDURE procedure-name HAS RETURNED A DYNAMIC RESULT SET,
PARAMETER number, THAT IS NOT VALID
THE ENCRYPT_TDES OR DECRYPT FUNCTION FAILED. ENCRYPTION FACILITY NOT
AVAILABLE return-code, reason-code
ENCRYPTED DATA THAT WAS ORIGINALLY A BINARY STRING CANNOT BE DECRYPTED
TO A CHARACTER STRING
REQUIRED CLAUSE IS MISSING FOR ARGUMENT number OF expression
CHARACTER CONVERSION FROM CCSID from-ccsid TO to-ccsid FAILED WITH ERROR
CODE error-code FOR TABLE dbid.obid COLUMN column-number REQUESTED BY csectname
THE COLUMN column-name CANNOT BE ADDED OR ALTERED BECAUSE table-name IS A
MATERIALIZED QUERY TABLE
INVALID SPECIFICATION OF A SECURITY LABEL COLUMN column-name REASON CODE
reason-code
ATTEMPTED TO EXPLAIN ALL CACHED STATEMENTS OR A CACHED STATEMENT WITH
STMTID OR STMTTOKEN ID-token BUT THE REQUIRED EXPLAIN INFORMATION IS NOT
ACCESSIBLE.
THE PACKAGE package-name NEEDS TO BE REBOUND IN ORDER TO BE SUCCESSFULLY
EXECUTED (token)
DIAGNOSTICS AREA FULL. NO MORE ERRORS CAN BE RECORDED FOR THE NOT
ATOMIC STATEMENT
FINAL TABLE IS NOT VALID WHEN THE TARGET VIEW view-name OF THE SQL DATA
CHANGE STATEMENT IN A FULLSELECT HAS AN INSTEAD OF TRIGGER DEFINED
INVALID USE OF INPUT SEQUENCE ORDERING
THE ASSIGNMENT CLAUSE OF THE UPDATE OPERATION AND THE VALUES CLAUSE OF
THE INSERT OPERATION MUST SPECIFY AT LEAST ONE COLUMN THAT IS NOT AN
INCLUDE COLUMN
FOR TABLE table-name, primary-auth-id WITH SECURITY |LABEL primary-auth-id-seclabel IS
NOT AUTHORIZED TO PERFORM operation ON A ROW WITH SECURITY LABEL rowseclabel. THE RECORD IDENTIFIER (RID) OF THIS ROW IS rid-number.
SECURITY LABEL IS reason FOR primary-auth-id
ALTER VIEW FOR view-name FAILED
The XML NAME name IS NOT VALID. REASON CODE = reason-code
primary-auth-id DOES NOT HAVE THE MLS WRITE-DOWN PRIVILEGE
A DYNAMIC CREATE STATEMENT CANNOT BE PROCESSED WHEN THE VALUE |OF
CURRENT SCHEMA DIFFERS FROM CURRENT SQLID
DB2 CONVERTED STRING token-type token FROM from-ccsid TO to-ccsid, AND RESULTED
IN SUBSTITUTION CHARACTER
INVALID STRING UNIT unit SPECIFIED FOR FUNCTION function-name
THE EXECUTION OF A BUILT IN FUNCTION function RESULTED IN AN ERROR REASON
CODE reason-code
THE LIST OF COLUMNS SPECIFIED FOR THE clause CLAUSE IS NOT ALLOWED IN
COMBINATION WITH THE LIST OF COLUMNS FOR THE PARTITIONING KEY FOR THE
TABLE

DB2 10 for z/OS

465

YL&A DB2 10 for z/OS Reference Guide


-20304
-20305
-20306
-20310
-20311
-20312
-20313
-20314
-20315
-20316
-20327
-20328
-20329
-20330
-20331
-20332
-20337
-20338
-20339
-20340
-20345
-20353
-20354
-20355
-20356
-20361
-20362

466

INVALID INDEX DEFINITION INVOLVING AN XMLPATTERN CLAUSE OR A COLUMN |OF


DATA TYPE XML. REASON CODE = reason-code
AN XML VALUE CANNOT BE INSERTED OR UPDATED BECAUSE OF AN ERROR
DETECTED WHEN INSERTING OR UPDATING THE INDEX IDENTIFIED BY index-id ON
TABLE table-name. REASON CODE = reason-code
AN INDEX ON AN XML COLUMN CANNOT BE CREATED BECAUSE OF AN ERROR
DETECTED WHEN INSERTING THE XML VALUES INTO THE INDEX. REASON CODE =
reason-code
THE REMOVE OF jar-name1 FAILED, AS IT IS IN USE BY jar-name2
THE VALUE PROVIDED FOR THE NEW JAVA PATH IS ILLEGAL
THE ALTER OF JAR jar-id FAILED BECAUSE THE SPECIFIED PATH REFERENCES ITSELF
DEBUG MODE OPTION FOR ROUTINE routine-name CANNOT BE CHANGED
THE PARAMETER LIST DOES NOT MATCH THE PARAMETER LIST FOR ALL OTHER
VERSIONS OF ROUTINE routine-name
THE CURRENTLY ACTIVE VERSION FOR ROUTINE routine-name (routine-type) CANNOT BE
DROPPED
THE CURRENTLY ACTIVE VERSION FOR ROUTINE routine-name (type) CANNOT BE
DROPPED
THE DEPTH OF AN XML DOCUMENT EXCEEDS THE LIMIT OF 128 LEVELS
THE DOCUMENT WITH TARGET NAMESPACE namespace AND SCHEMA LOCATION
location HAS ALREADY BEEN ADDED FOR THE XML SCHEMA IDENTIFIED BY schema name
THE COMPLETION CHECK FOR THE XML SCHEMA FAILED BECAUSE ONE
OR MORE XML SCHEMA DOCUMENTS IS MISSING. ONE MISSING XML SCHEMA
DOCUMENT IS IDENTIFIED BY uri-type AS uri!
THE xsrobject-type IDENTIFIED BY XML uri-type1 uri1 AND XML uri-type2 uri2 IS NOT FOUND
IN THE XML SCHEMA REPOSITORY
THE XML COMMENT VALUE string IS NOT VALID
THE XML PROCESSING INSTRUCTION VALUE string IS NOT VALID
MORE THAN ONE xsrobject-type EXISTS IDENTIFIED BY XML uri-type1 uri1 AND uri-type2
uri2 EXISTS IN THE XML SCHEMA REPOSITORY.
THE DATA TYPE OF EITHER THE SOURCE OR TARGET OPERAND OF AN XMLCAST
SPECIFICATION MUST BE XML
XML SCHEMA name IS NOT IN THE CORRECT STATE TO PERFORM OPERATION operation
XML SCHEMA xmlschema-name INCLUDES AT LEAST ONE XML SCHEMA DOCUMENT IN
NAMESPACE namespace THAT IS NOT CONNECTED TO THE OTHER XML SCHEMA
DOCUMENTS
THE XML VALUE IS NOT A WELL-FORMED DOCUMENT WITH A SINGLE ROOT ELEMENT
AN OPERATION INVOLVING COMPARISON CANNOT USE OPERAND name DEFINED |AS
DATA TYPE type-name
INVALID SPECIFICATION OF A ROW CHANGE TIMESTAMP COLUMN FOR TABLE tablename
THE STATEMENT COULD NOT BE PROCESSED BECAUSE ONE OR MORE IMPLICITLY
CREATED OBJECTS ARE INVOLVED reason-code
THE TABLE WITH DBID = dbid AND OBID = obid CANNOT BE TRUNCATED BECAUSE
DELETE TRIGGERS EXIST FOR THE TABLE, OR THE TABLE IS THE PARENT TABLE IN A
REFERENTIAL CONSTRAINT
AUTHORIZATION ID authorization-name IS NOT DEFINED FOR THE TRUSTED CONTEXT
context-name
ATTRIBUTE attribute-name WITH VALUE value CANNOT BE DROPPED BECAUSE IT IS NOT
PART OF THE DEFINITION OF TRUSTED CONTEXT context-name
DB2 10 for z/OS

YL&A DB2 10 for z/OS Reference Guide


-20363
-20365
-20366
-20369
-20372
-20373
-20374
-20377
-20380
-20381
-20382
-29385
-20398
-20399
-20400
-20409
-20410
-20411
-20412
-20422
-20423
-20424
-20425
-20426
-20427
-20428
-20433
-20434

ATTRIBUTE attribute-name WITH VALUE value IS NOT A UNIQUE SPECIFICATION FOR


TRUSTED CONTEXT context-name
A SIGNALING NAN WAS ENCOUNTERED, OR AN EXCEPTION OCCURRED IN AN
ARITHMETIC OPERATION OR FUNCTION INVOLVING A DECFLOAT
TABLE WITH DBID=dbid.obid AND OBID= obid CANNOT BE TRUNCATED BECAUSE
UNCOMMITTED UPDATES EXIST ON THE TABLE WITH 'IMMEDIATE' OPTION SPECIFIED
IN THE STATEMENT
AN ALTER TRUSTED CONTEXT STATEMENT FOR context-name ATTEMPTED TO REMOVE
THE LAST CONNECTION TRUST ATTRIBUTE ASSOCIATED WITH THE TRUSTED CONTEXT
THE SYSTEM AUTHID CLAUSE OF A CREATE OR ALTER TRUSTED CONTEXT
STATEMENT FOR context-name SPECIFIED authorization-name, BUT ANOTHER TRUSTED
CONTEXT IS ALREADY DEFINED FOR THAT AUTHORIZATION ID.
A CREATE OR ALTER TRUSTED CONTEXT STATEMENT SPECIFIED authorization-name
MORE THAN ONCE OR THE TRUSTED CONTEXT IS ALREADY DEFINED TO BE USED |BY
THIS AUTHORIZATION ID OR PUBLIC.
AN ALTER TRUSTED CONTEXT STATEMENT FOR context-name SPECIFIED authorizationname BUT THE TRUSTED CONTEXT IS NOT CURRENTLY DEFINED TO BE USED BY THIS
AUTHORIZATION ID OR PUBLIC
AN ILLEGAL XML CHARACTER hex-char WAS FOUND IN AN SQL/XML EXPRESSION OR
FUNCTION ARGUMENT THAT BEGINS WITH STRING start-string
ALTER INDEX WITH REGENERATE OPTION FOR index-name FAILED. INFORMATION
RETURNED: SQLCODE sqlcode, SQLSTATE sqlstate, MESSAGE TOKENS token-list
ALTER INDEX WITH REGENERATE OPTION IS NOT VALID FOR index-name
CONTEXT ITEM CANNOT BE A SEQUENCE WITH MORE THAN ONE ITEM
THE STATEMENT CANNOT BE PROCESSED BECAUSE THERE ARE PENDING DEFINITION
CHANGES FOR OBJECT object-name OF TYPE object- type (REASON reason-code)
ERROR ENCOUNTERED DURING XML PARSING AT LOCATION n text
ERROR ENCOUNTERED DURING XML VALIDATION: LOCATION n; TEXT: text; XSRID
schema-ID
XML SCHEMA ERROR n text
AN XML DOCUMENT OR CONSTRUCTED XML VALUE CONTAINS A COMBINATION OF XML
NODES THAT CAUSES AN INTERNAL IDENTIFIER LIMIT TO BE EXCEEDED
THE NUMBER OF CHILDREN NODES OF AN XML NODE IN AN XML VALUE HAS
EXCEEDED THE LIMIT NUMBER OF CHILDREN NODES
A FETCH CURRENT CONTINUE OPERATION WAS REQUESTED FOR cursor-name BUT
THERE IS NO PRESERVED, TRUNCATED DATA TO RETURN
SERIALIZATION OF AN XML VALUE RESULTED IN CHARACTERS THAT COULD NOT BE
REPRESENTED IN THE TARGET ENCODING
A CREATE TABLE, OR DECLARE GLOBAL TEMPORARY TABLE STATEMENT FOR tablename ATTEMPTED TO CREATE A TABLE WITH ALL THE COLUMNS DEFINED AS HIDDEN
ERROR OCCURRED DURING TEXT SEARCH PROCESSING (server, index-name, text)
TEXT SEARCH SUPPORT IS NOT AVAILABLE reason-code
column-name (IN table-name) WAS SPECIFIED AS AN ARGUMENT TO A TEXT SEARCH
FUNCTION, BUT A TEXT INDEX DOES NOT EXIST FOR THE COLUMN
CONFLICTING TEXT SEARCH ADMINISTRATION STORED PROCEDURE RUNNING ON THE
SAME INDEX
ERROR OCCURRED DURING TEXT SEARCH ADMINISTRATION STORED PROCEDURE
error
URI SPECIFIED IN THE XMLSCHEMA CLAUSE IS AN EMPTY STRING
AN UNTYPED PARAMETER MARKER WAS SPECIFIED, BUT AN ASSUMED DATA TYPE
CANNOT BE DETERMINED FROM ITS USE
AN UPDATE OPERATION HAS SET ALL OF ITS TARGET COLUMNS TO UNASSIGNED

DB2 10 for z/OS

467

YL&A DB2 10 for z/OS Reference Guide


-20444
-20447
-20448
-20457
-20465
-20469
-20470
-20471
-20472
-20473

-20474
-20475
-20476
-20478

-20479
-20487
-20488
-20490
-20491
-20493
-20497
-20517
-20522

468

AN ERROR OCCURRED IN A KEY-EXPRESSION EVALUATION IN index-name


INFORMATION RETURNED: SQLCODE: sqlcode, SQLSTATE: sqlstate, MESSAGE TOKEN
token-list AND RID X rid
FORMAT STRING format-string IS NOT VALID FOR THE function-name FUNCTION
string-expression CANNOT BE INTERPRETED USING FORMAT STRING format-string FOR
THE TIMESTAMP_FORMAT FUNCTION.
THE PROCEDURE procedure-name HAS ENCOUNTERED AN UNSUPPORTED VERSION,
version, FOR PARAMETER number
THE BINARY XML VALUE IS INCOMPLETE OR CONTAINS UNRECOGNIZED DATA AT
LOCATION position WITH THE HEX DATA text
ROW OR COLUMN ACCESS CONTROL CANNOT BE ACTIVATED FOR TABLE table-name
FOR REASON reason-code. object-type object-name IS NOT IN A VALID STATE FOR
ACTIVATING ACCESS CONTROL FOR THIS TABLE
object-type1 object-name1 MUST BE DEFINED AS SECURE BECAUSE object-type2 objectname2 IS DEPENDENT ON IT
THE INSERT OR UPDATE IS NOT ALLOWED BECAUSE A RESULTING ROW DOES NOT
SATISFY ROW PERMISSIONS
PERMISSION OR MASK object-name CANNOT BE ALTERED AS SPECIFIED. REASON CODE
reason-code
THE INPUT ARGUMENT OF FUNCTION function-name THAT IS DEFINED WITH THE NOTSECURED OPTION MUST NOT REFERENCE COLUMN column-name FOR WHICH A
COLUMN MASK IS ENABLED AND THE COLUMN ACCESS CONTROL IS ACTIVATED FOR
THE TABLE
PERMISSION OR MASK CANNOT BE CREATED FOR THE object-name OBJECT OF THE
object-type TYPE. REASON CODE reason-code.
A COLUMN MASK IS ALREADY DEFINED FOR THE COLUMN column-name IN TABLE tablename (EXISTING MASK NAME mask-name)
THE function-name FUNCTION IS NOT ABLE TO USE FORMAT STRING format-string TO
INTERPRET THE ARGUMENT string-expression.
THE STATEMENT CANNOT BE PROCESSED BECAUSE COLUMN MASK mask-name
(DEFINED FOR COLUMN column-name) EXISTS AND THE COLUMN MASK CANNOT BE
APPLIED OR THE DEFINITION OF THE MASK CONFLICTS WITH THE REQUESTED
STATEMENT. REASON CODE reason-code.
THE SOURCE TABLE table-name CANNOT BE ALTERED AS SPECIFIED BECAUSE THE
TABLE IS INVOLVED IN ROW OR COLUMN ACCESS CONTROLS. REASON CODE reasoncodereason-code.
HASH ORGANIZATION CLAUSE IS NOT VALID FOR table-name
SPECIFIED HASH SPACE IS TOO LARGE FOR THE IMPLICITLY CREATED TABLE SPACE.
REASON reason-code. (PARTITION partition-number)
A VERSIONING CLAUSE WAS SPECIFIED FOR TABLE table-name, BUT THE TABLE
CANNOT BE USED AS A SYSTEM PERIOD TEMPORAL TABLE. REASON CODE = reasoncode.
INVALID SPECIFICATION OF PERIOD period-name. REASON CODE = reason-code.
A TIMESTAMP WITHOUT TIME ZONE VALUE CANNOT BE ASSIGNED TO A TIMESTAMP
WITH TIME ZONE TARGET
A STRING REPRESENTATION OF A DATETIME VALUE THAT CONTAINS A TIME ZONE
CANNOT BE IMPLICITLY CAST TO A TARGET DEFINED AS DATETIME WITHOUT TIME
ZONE
XMLMODIFY ATTEMPTED TO UPDATE A COLUMN WHICH WAS NOT SPECIFIED IN THE
UPDATE SET CLAUSE
INVALID SPECIFICATION OF WITHOUT OVERLAPS CLAUSE. REASON CODE reason-code.

DB2 10 for z/OS

YL&A DB2 10 for z/OS Reference Guide


-20523
-20524
-20525
-20527
-20528
-20531
-30000
-30002
-30005
-30020
-30021

-30025

-30030

-30040

-30041

-30050
-30051
-30052
-30053
-30060
-30061
-30070
-30071
-30072
-30073
-30074
-30080

TABLE table-name WAS SPECIFIED AS A HISTORY TABLE, BUT THE TABLE DEFINITION IS
NOT VALID FOR A HISTORY TABLE. REASON CODE = reason-code.
INVALID PERIOD SPECIFICATION OR PERIOD CLAUSE FOR PERIOD period-name.
REASON CODE = reason-code.
THE REQUESTED ACTION IS NOT VALID FOR TABLE table-name BECAUSE THE TABLE IS
THE WRONG TYPE OF TABLE. REASON CODE = reason-code
period-name IS NOT A PERIOD IN TABLE table-name
THE TARGET OF THE DATA CHANGE OPERATION IS A TABLE table-name, WHICH
INCLUDES A PERIOD period-name. A ROW THAT THIS DATA CHANGE OPERATION
ATTEMPTED TO MODIFY WAS ALSO MODIFIED BY ANOTHER TRANSACTION.
THE VERSION NUMBER actual-version SPECIFIED IN A BINARY XML VALUE IS NOT
SUPPORTED. THE HIGHEST SUPPORTED VERSION IS supported-version.
EXECUTION FAILED DUE TO A DISTRIBUTION PROTOCOL ERROR THAT WILL NOT
AFFECT THE SUCCESSFUL EXECUTION OF SUBSEQUENT COMMANDS OR SQL
STATEMENTS: REASON reason-code (sub-code)
THE SQL STATEMENT CANNOT BE EXECUTED DUE TO A PRIOR CONDITION IN A CHAIN
OF STATEMENTS
EXECUTION FAILED BECAUSE FUNCTION NOT SUPPORTED BY THE SERVER: LOCATION
location-name PRODUCT ID product-identifier REASON reason-code (sub-code)
EXECUTION FAILED DUE TO A DISTRIBUTION PROTOCOL ERROR THAT CAUSED
DEALLOCATION OF THE CONVERSATION: REASON < reason-code (sub-code)>
EXECUTION FAILED DUE TO A DISTRIBUTION PROTOCOL ERROR THAT WILL AFFECT
THE SUCCESSFUL EXECUTION OF SUBSEQUENT COMMANDS OR SQL STATEMENTS:
MANAGER manager AT LEVEL level NOT SUPPORTED ERROR
EXECUTION FAILED BECAUSE FUNCTION IS NOT SUPPORTED BY THE SERVER WHICH
CAUSED TERMINATION OF THE CONNECTION: LOCATION location PRODUCT ID
pppvvrr REASON reason-code (sub-code)
COMMIT REQUEST WAS UNSUCCESSFUL, A DISTRIBUTION PROTOCOL VIOLATION HAS
BEEN DETECTED, THE CONVERSATION HAS BEEN DEALLOCATED. ORIGINAL
SQLCODE= original-sqlcode AND ORIGINAL SQLSTATE= original-sqlstate
EXECUTION FAILED DUE TO UNAVAILABLE RESOURCES THAT WILL NOT AFFECT THE
SUCCESSFUL EXECUTION OF SUBSEQUENT COMMANDS OR SQL STATEMENTS.
REASON < reason-code> TYPE OF RESOURCE < resource-type> RESOURCE NAME <
resource-name> PRODUCT ID < pppvvrrm> RDBNAME < rdbname>
EXECUTION FAILED DUE TO UNAVAILABLE RESOURCES THAT WILL AFFECT THE
SUCCESSFUL EXECUTION OF SUBSEQUENT COMMANDS AND SQL STATEMENTS.
REASON < reason-code> TYPE OF RESOURCE < resource-type> RESOURCE NAME <
resource-name> PRODUCT ID < pppvvrrm> RDBNAME < rdbname>
< command-or-SQL-statement-type> COMMAND OR SQL STATEMENT INVALID WHILE BIND
PROCESS IN PROGRESS
BIND PROCESS WITH SPECIFIED PACKAGE NAME AND CONSISTENCY TOKEN NOT
ACTIVE
PROGRAM PREPARATION ASSUMPTIONS ARE INCORRECT
OWNER AUTHORIZATION FAILURE
RDB AUTHORIZATION FAILURE
RDB NOT FOUND
< command> COMMAND NOT SUPPORTED ERROR
< object-type> OBJECT NOT SUPPORTED ERROR
< parameter>:< subcode> PARAMETER NOT SUPPORTED ERROR
< parameter>:< subcode> PARAMETER VALUE NOT SUPPORTED ERROR
REPLY MESSAGE WITH codepoint (svrcod) NOT SUPPORTED ERROR
COMMUNICATION ERROR code (subcode)

DB2 10 for z/OS

469

YL&A DB2 10 for z/OS Reference Guide


-30081
-30082
-30090
-30104
-30105
-30106

prot COMMUNICATION ERROR DETECTED. API= api, LOCATION= loc, FUNCTION= func,
ERROR CODES= rc1 rc2 rc3
CONNECTION FAILED FOR SECURITY REASON reason-code ( reason-string)
REMOTE OPERATION INVALID FOR APPLICATION EXECUTION ENVIRONMENT
ERROR IN BIND OPTION option AND BIND VALUE value
BIND OPTION option1 IS NOT ALLOWED WITH BIND OPTION
INVALID INPUT DATA DETECTED FOR A MULTIPLE ROW INSERT OPERATION. INSERT
PROCESSING IS TERMINATED

Resource Types
Type Code
00000100
00000200
00000201
00000202
00000205
00000210
00000220
00000230
00000240
00000300
00000301
00000302
00000303
00000304
00000305
00000306
00000307
00000400
00000401
00000402
00000500
00000600
00000602
00000603
00000604
00000605
00000606
00000700
00000701
00000800
00000801

Type of Resource
Database
Table space
Index space
Table space
Compression Dictionary
Partition
Data set
Temporary file
Database procedure
Page
Index minipage
Table space page
Index space page
Table space RID
Index access/table space RID
Index access/table space page
Index space EOF
ICF catalog
Authorization function
Security Server
Storage group
EDM pool space
EDM DBD Space
EDM DYNAMIC STATEMENT Space
EDM skeleton storage
EDM above-the-bar
EDM below-th-bar
Buffer pool space
Group buffer pool
Plan
Package

00000802
00000900
00000901
00000903
00000904
00000905
00000906

BINDLOCK01 through BINDLOCK20


32KB data area
Sort storage
Hash anchor
RIDLIST storage
IRLM storage
DB2

470

Name, Content, Format


DB
DB.SP
DB.SP
RD.DB.TS
DB.SP
DB.SP.PT
DSN
SZ
DBP
DB.SP.PG
DB.SP.PG.MP
DB.SP.PG
DB.SP.PG
DB.SP.RID
DB.SP.RID
DB.SP.PG
DB.SP.01
IC
SAF/RACF return/reason codes
SG

BP
GBP
PL
COLLECTION. PACKAGE.
CONTOKEN
BINDLOCK01 through BINDLOCK20

DB.SP.PG.AI

MEMBER
DB2 10 for z/OS

YL&A DB2 10 for z/OS Reference Guide


00000907
00000908
00000909
0000090A
00000A00
00000A10
00000A11
00000A12
00000A13
00000A14
00000B00
00000C00
00000C01
00000D00
00000D01
00000D02
00000E00
00000F00

Data Space
Basic Floating Point Extensions Facility
Extended Time-of-Day (TOD) Clock
XML storage
Table
Alias
Distinct type
User-defined function
Stored procedure
Sequence
View
Index
Index
DBID/OBID
DBID/OBID
OBID
SU limit exceeded
Auxiliary column

00000F01
00000F81
00001000
00001001

LOB lock
XML Lock
DDF
System conversation

00001002

Agent conversation

00001003

CNOS processing

00001004
00001005
00001007
00001008
00001102
00002000
00002001
00002002
00002003
00002004
00002005
00002006
00002007
00002008
00002009
00002010
00002011
00002100
00002101
00002102
00002103
00002104
00002105
00002200

CDB (Communication database)


DB access agent
TCP/IP domain name
TCP/IP service name
Bootstrap data set (BSDS)
Table space CS-claim class
Table space RR-claim class
Table space write-claim class
Index space CS-claim class
Index space RR-claim class
Index space write-claim class
Table space partition CS-claim class
Table space partition RR-claim class
Table space partition write-claim class
Index space partition CS-claim class
Index space partition RR-claim class
Index space partition Write-claim class
Table space DBET entry
Index space DBET entry
Table space partition DBET entry
Index space partition DBET entry
DBET hash chain lock timeout
Logical partition DBET entry
Routine Parameter Storage

DB2 10 for z/OS

MEMBER

RD.CR.TB
RELDEP. OWNER. ALIAS. RD.CR.AL
SC.DT
SC.SN
SC.SN
RD.CR.VW
RD.CR.IX
CR.IX
RD.DI.OI
DI.OI
OI
CN
DI.OI. ROWID. COLN
DI.OI.DOCID.COLN
DIX.PIX. ROWID. VRSN
DIX.PIX.DOCID
LOCATION or SUBSYSTEM ID
LU.MODE. RTNCD. FDBK2. RCPRI.
RCSEC. SENSE
LU.MODE. RTNCD. FDBK2. RCPRI.
RCSEC. SENSE
LU. MODE. RTNCD. FDBK2. RCPRI.
RCSEC. SENSE
LOCATION. AUTHORIZATION ID. PL
LOCATION
LINKNAME. DOMAIN. ERRNO
LOCATION. SERVICE. ERRNO
MEMBER
DB.SP
DB.SP
DB.SP
DB.SP
DB.SP
DB.SP
DB.SP.PT
DB.SP.PT
DB.SP.PT
DB.SP.PT
DB.SP.PT
DB.SP.PT
DB.SP
DB.SP
DB.SP.PT
DB.SP.PT
INTERNAL LOCK NN
DB.SP.PT
DBP
471

YL&A DB2 10 for z/OS Reference Guide


00002201
00002300
00003000
00003002
00003072
00003073
00003328
00003329
00003330
00003840
00004000

472

Debug Agent Storage


ICSF encryption and decryption facilities
Code (release maintenance level or
system parameter)
Number of Stored Procedures
Index
Index
Release dependency
OBID limit exceeded
LOB column
Profile exception threshold exceeded

DBP
REL, APAR, ZPARM

PID.PTYPE.PNAME

DB2 10 for z/OS

*258590*

Das könnte Ihnen auch gefallen