db2 reference guide 2up letter

217
COMPUTER ASSOCIATES Reference Guide for DB2 UDB for z/OS and OS/390 Instant Access to Essential DB2 v7 Information COMPUTER ASSOCIATES INTERNATIONAL One Computer Associates Plaza Islandia, NY 11749, USA +1-631 DIAL CAI (342-5224) 1-800 225-5224

Upload: srinivas-reddy

Post on 14-Apr-2015

170 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: DB2 Reference Guide 2up Letter

COMPUTER ASSOCIATES Reference Guide

for DB2 UDB for z/OS and OS/390

Instant Access to Essential DB2 v7 Information

COMPUTER ASSOCIATES INTERNATIONAL One Computer Associates Plaza

Islandia, NY 11749, USA +1-631 DIAL CAI (342-5224)

1-800 225-5224

Page 2: DB2 Reference Guide 2up Letter

DB2 Reference Guide Our Reference Guide is an easy-to-use booklet that gives you instant access to information, such as SQL- and DB2-related system commands, utility syntax, catalog tables, SQL return codes, system limits, and much more.

See IBM DB2 Command Reference, IBM DB2 SQL Reference, IBM DB2 Reference Summary, other IBM references, and the various Computer Associates User Guides for complete descriptions of commands and syntax.

NOTATION CONVENTIONS: UPPER CASE characters Must be entered as shown. Lower case characters User-specified variable.

( ) Parenthesis must be entered where shown. / OR condition. { } Enclose optional parameters, choose only 1. {{ }} Enclose optional parameters, choose 1 or more. [ ] Enclose required parameters, choose only 1. [[ ]] Enclose required parameters, choose 1 or more.

Syntax example.

Parameter not enclosed in any of the above Required parameter.

Indentation For readability only. , after parameter Parameter(s) may be repeated and comma is

required between the repeated parameters. , before parameter

Comma required for that parameter.

: after parameter Parameter(s) may be repeated and colon is required between the repeated parameters.

; Semicolon must be entered where shown. Underline Default parameter or abbreviation for a command. Italics Subordinate block.

--PROPRIETARY AND CONFIDENTIAL INFORMATION--

These education materials and related computer software program (hereinafter referred to as the "Education Materials") is for the end user’s informational purposes only and is subject to change or withdrawal by Computer Associates International, Inc. ("CA") at any time. These Education Materials may not be copied, transferred, reproduced, disclosed or distributed, in whole or in part, without the prior written consent of CA. These Education Materials are proprietary information and a trade secret of CA. Title to these Education Materials remains with CA, and these Education Materials are protected by the copyright laws of the United States and international treaties. All authorized reproductions must be marked with this legend.

RESTRICTED RIGHTS LEGEND

TO THE EXTENT PERMITTED BY APPLICABLE LAW, CA PROVIDES THIS DOCUMENTATION "AS IS" WITHOUT WARRANTY OF ANY KIND, INCLUDING WITHOUT LIMITATION, ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NONINFRINGEMENT. IN NO EVENT WILL CA BE LIABLE TO THE END USER OR ANY THIRD PARTY FOR ANY LOSS OR DAMAGE, DIRECT OR INDIRECT, FROM THE USE OF THIS DOCUMENTATION, INCLUDING WITHOUT LIMITATION, LOST PROFITS, BUSINESS INTERRUPTION, GOODWILL OR LOST DATA, EVEN IF CA IS EXPRESSLY ADVISED OF SUCH LOSS OR DAMAGE.

THE USE OF ANY PRODUCT REFERENCED IN THIS DOCUMENTATION AND THIS DOCUMENTATION IS GOVERNED BY THE END USER’S APPLICABLE LICENSE AGREEMENT.

The manufacturer of this documentation is Computer Associates International, Inc.

Provided with "Restricted Rights" as set forth in 48 C.F.R. Section 12.212, 48 C.F.R. Sections 52.227-19(c)(1) and (2) or DFARS Section 252.227.7013(c)(1)(ii) or applicable successor provisions.

Page 3: DB2 Reference Guide 2up Letter

For DB2 UDB for z/OS and OS/390 Table of Contents

2002 Computer Associates International iii

TABLE OF CONTENTS Unicenter Database Management for DB2 for z/OS and OS/390 Solutions ...............v

Unicenter Database Performance Management Suite:v Unicenter Database Administration Suite:...............vi Unicenter Database Backup and Recovery Suite:....vi

1. SQL ...................................................................... 1-1 Syntax Elements.................................................... 1-1 Queries .................................................................. 1-2 Commands ............................................................ 1-5 Naming Definitions............................................. 1-22 SQL Functions .................................................... 1-26 Durations............................................................. 1-37 SQL Reserved Words ......................................... 1-38 Data Types .......................................................... 1-40

2. Utilities ................................................................. 2-1 On-line DB2.......................................................... 2-1 Stand-Alone Utilities .......................................... 2-11 Authorities Required........................................... 2-13

3. Commands........................................................... 3-1 DB2 Commands.................................................... 3-1 DSN Commands ................................................... 3-5 CICS Attachment Facility ..................................... 3-9 TSO Commands.................................................. 3-10 MVS IRLM Commands...................................... 3-11 IMS Commands .................................................. 3-12

4. SYSTEM TABLES ............................................. 4-1 Catalog Tables ...................................................... 4-1 Directory Tables.................................................. 4-74

5. USER TABLES ................................................... 5-1 PLAN_TABLE ..................................................... 5-1 DSN_STATEMNT_TABLE ................................ 5-5 DSN_FUNCTION_TABLE ................................. 5-7

6. Miscellaneous System Information.................... 6-1 SQLCA ................................................................. 6-1 SQLDA ................................................................. 6-3 SQL Limits............................................................ 6-6 DB2 Limits............................................................ 6-7 RLST Table........................................................... 6-9 Security Authorizations ...................................... 6-11

Administrative Authorities Hierarchy ..............6-11 Table Privileges ...............................................6-12 Plan Privileges.................................................6-12 Package Privileges...........................................6-12 Collection Privileges........................................6-12 Database Privileges .........................................6-12 Use Privileges ..................................................6-13 System Privileges .............................................6-13 Schema Privileges............................................6-13 Distinct Type and JAVA Class Privileges ........6-13 Routine Privileges............................................6-13

Page Formats....................................................... 6-14 Tablespace Format ..........................................6-14 Nonsegmented Space Map Page......................6-14

Page 4: DB2 Reference Guide 2up Letter

CA Reference Guide Table of Contents

iv 2002 Computer Associates International

Segmented Space Map Page............................ 6-14 LOB High Level Space Map Page................... 6-14 LOB Low Level Space Map Page .................... 6-15 LOB Map Page ................................................ 6-15 LOB Data Page ............................................... 6-15 Index Page Set Space Map Page ..................... 6-15 User Data Page Format .................................. 6-15 User Data Row Formats.................................. 6-16 Column Formats.............................................. 6-16 Index Page Format .......................................... 6-17

DSNZPARM Parameter Information ..................6-18 Lock Modes .........................................................6-27

Read-Only Select ............................................. 6-27 INSERT ... VALUES(...) or INSERT ... subselect7............................. 6-27 UPDATE or DELETE, without cursor ............ 6-27 Select with FOR UPDATE OF ........................ 6-28 UPDATE or DELETE with cursor .................. 6-28

IFCIDs - Performance Trace Records .................6-29 Class 1: Background Events............................ 6-29 Class 2: Subsystem-related Events .................. 6-29 Class 3: SQL-related Events............................ 6-29 Class 4: Buffer Manager I/O and EDM Pool Requests............... 6-30 Class 5: Log Manager ..................................... 6-30 Class 6: Summary Lock Information ............... 6-30 Class 7: Detailed Lock Information ................ 6-31 Class 8: Data Manager Detail ........................ 6-31 Class 9: Sort Detail ......................................... 6-31 Class 10: Bind, Commands, and Utilities........ 6-31 Class 11: Dispatching ..................................... 6-31 Class 12: Storage Manager............................. 6-32 Class 13: Edit and Validation Exits ................ 6-32 Class 14: In and Out of DB2 ........................... 6-32 Class 15: Installation-defined Performance Record.................... 6-32 Class 16: Distributed Processing .................... 6-32 Class 17: Claim and Drain Detail................... 6-32 Class 18: Reserved .......................................... 6-33 Class 19: Reserved .......................................... 6-33 Class 20: Data Sharing Summary ................... 6-33 Class 21: Data Sharing Detail ........................ 6-33 Class 22-29: Reserved ..................................... 6-33 Class 30-32: Available for Local Use ............. 6-33

7. Return Codes .......................................................7-1 SQL Return Codes.................................................7-1 SQLSTATE/SQLCODE Cross Reference ..........7-21 SQLSTATE Class Codes.....................................7-28 CAF Return Codes...............................................7-29 Resource Type Codes ..........................................7-30

8. QMF Information................................................8-1 QMF Commands ...................................................8-1 QMF Edit Codes....................................................8-7 QMF Usage Codes.................................................8-9 QMF Form Variables.............................................8-9 QMF QBE KEYWORDS........................................8-10

Page 5: DB2 Reference Guide 2up Letter

For DB2 UDB for z/OS and OS/390 Unicenter DB2 Management Solutions

2002 Computer Associates International v

Unicenter Database Management for DB2 for z/OS and OS/390 Solutions

CA’s Unicenter Database Management solutions for DB2 provide integrated tools with the power and flexibility required to proactively manage all database resources and related applications. Database Management tools improve service levels, data availability, and IT responsiveness across DB2 databases. The products are on the three major concerns for database management:

• Database Performance Management

• Database Administration

• Database Backup and Recovery

CA’s Unicenter Database Management Solutions for DB2 for z/OS and OS/390 can help you to:

• Achieve the highest database performance levels possible.

• Minimize backup/recovery times and maximize data availability.

• Automate arduous administrative tasks and dramatically reduce their completion time.

• Migrate more easily to new releases of DB2 for z/OS and OS390.

Unicenter Database Performance Management Suite:

Unicenter Database Analyzer: Performs “lights out” analysis of DB2 databases, takes specified corrective actions automatically, if needed.

Unicenter CA-Insight: Monitors and automatically optimizes the DB2 environment.

Unicenter Subsystem Analyzer: Analyzes DB2 subsystem performance and resource use.

Unicenter Detector: Analyzes DB2 application performance down to the SQL statement level.

Unicenter Plan Analyzer: Analyzes DB2 plan and package use; recommends SQL; reports on access path choices, SQL syntax, and more.

Unicenter SQL Ease: Enables programmers to generate, test, and tune embedded SQL.

Unicenter Index Expert: Analyzes SQL usage and recommends optimal indexes.

Unicenter Rapid Reorg: High-speed reorganization of DB2 tablespaces and index spaces in which the data has become disorganized due to frequent adding, updating, and deleting. Provides full read-write access to data during reorgs.

Unicenter Bind Analyzer: Automates binds in DB2 and minimizes DB2 application BIND activity.

Page 6: DB2 Reference Guide 2up Letter

CA Reference Guide Unicenter DB2 Management Solutions

vi 2002 Computer Associates International

Unicenter Data Compressor: Provides data compression and analysis for DB2.

Unicenter Database Administration Suite:

Unicenter RC/Query: Simplifies analysis and maintenance of DB2 environments.

Unicenter RC/Update: Provides complete DB2 object management and reduces development time by allowing developers to create, copy, browse test tables and data.

Unicenter RC/Secure: Provides intelligent DB2 security administration.

Unicenter RC/Migrator: Automates change migrations in a multi-subsystem DB2 environment.

Unicenter RC/Compare: Compares and synchronizes DB2 schemas.

Unicenter RC/Extract: Extracts and distributes referentially related DB2 data.

Unicenter RC/Merger: Companion to RC/Migrator, allows large data/object migrations without overhead of unloading/loading

Unicenter RI Editor: Simplifies editing of referentially related tables in DB2.

Unicenter RI Manager: Manages DB2 system- and application-enforced RI relationships.

Unicenter Fast Load: Loads data into DB2 tables.

Unicenter Fast Unload: Unloads DB2 data.

Unicenter Fast Index: Adds indexes to large DB2 tables.

Unicenter Partition Expert: Simplifies partition maintenance, increases data availability, and eliminates “hot spots.”

Unicenter Package Analyzer: Manages DB2 packages.

Unicenter Database Backup and Recovery Suite:

Unicenter Quick Copy: Makes high-speed backup of DB2 data.

Unicenter LogCompress: Compresses archive log data sets so you can store more on DASD.

Unicenter Merge/Modify: Produces image copies without restricting access, merge copies, and automates cleanup of system recovery table.

Unicenter Recovery Analyzer: The Brains of a Recovery. Generates and coordinates the jobs (could be thousands) to perform a recovery.

Unicenter Fast Recover: Performs quick concurrent recovery of tablespaces, partitions and indexes in a single job stream.

Page 7: DB2 Reference Guide 2up Letter

For DB2 UDB for z/OS and OS/390 Unicenter DB2 Management Solutions

2002 Computer Associates International vii

Unicenter Fast Check: To check referential structures. In a single pass of the data: check index, check disk, and DSNCOPY check—all without taking the data off line

Unicenter Log Analyzer: Provides detailed analysis of active and archive logs. You can also create UNDO SQL that will undo a transaction.

Unicenter Log Analyzer SMF Audit Trace Option: Displays audit trace data not recorded in the DB2 log; an add-on to Log Analyzer.

Page 8: DB2 Reference Guide 2up Letter

CA Reference Guide Unicenter DB2 Management Solutions

viii 2002 Computer Associates International

Evaluate the Benefit of Unicenter Database Management Solutions for DB2 for z/OS and OS/390—Today!

Now that you are aware of CA’s extensive Database Management Solutions, we invite you to take the next step.

• Explore the CA Rescue Program. Our product experts will meet with you on site to explore how our Unicenter Database Management Solutions save money and improve your database environment. To schedule a free Conversion Analysis, please call 1-888-226-7390.

• Contact Your Local Sales Representative. A CA sales rep can provide more information and collateral to aid in your decision to purchase database management solutions. Your rep can schedule on site demonstrations, and provide answers to your important questions. For more information on our DB2 solutions please call 1-800-850-7528.

• Explore the CA Web Site, CA.COM. The Unicenter Database Management Solutions web site contains a wealth of information to help you research your purchasing decision. Find out more about our latest tape releases, gain access to select online collateral, order posters, subscribe to our monthly eNews updates, and research the database and platform compatibility of our products.

• Develop Your Training Plan. CA Education provides both DB2 and Unicenter Database Management courses to help your team quickly transform these tools into bottom-line results. Our training solutions transfer the specific skills you need to streamline implementation, improve productivity, and achieve a faster return on investment. Catalog courses include training on:

· DB2: Introduction · DB2: Introduction – Web-Based Training · Advantage CA-IDMS/DB Database: Logical Database

Design · QMF: Query Management Facility Comprehensive · DB2: SQL Application Programming · DB2: Advanced SQL and Tuning Techniques · DB2: Database Administration I: Object Creation &

Maintenance · DB2: Database Admin II: Intro to Internal

Structures & Process · DB2: Essentials for System Operators · Unicenter CA-Insight: DB2 Performance and Tuning · Unicenter RC/Query · Unicenter RC/Update · Unicenter Plan Analyzer · Unicenter RC/Migrator · Unicenter Database Analyzer · Unicenter Log Analyzer · Unicenter Recovery Analyzer · Unicenter Subsystem Analyzer · Unicenter Detector · Unicenter SQL Ease Courses are available in CA Learning Centers and on-site at your location of choice. More information is available at www.ca.com/education.

Make the decision that will make you proud, join the CA family and experience the superior support, service, and technology of the company that develops The Software That Manages eBusiness™.

Page 9: DB2 Reference Guide 2up Letter

For DB2 UDB for z/OS and OS/390 Unicenter DB2 Management Solutions

2002 Computer Associates International ix

Page 10: DB2 Reference Guide 2up Letter

For DB2 UDB for z/OS and OS/390 SQL Syntax Elements

© 2002 Computer Associates International 1-1

1. SQL

Syntax Elements

Expressions

expression: {+ | –} [ function | (expression) | constant | column-name | host-variable | special-register | labeled-duration | case-expression | cast-specification] Multiple occurrences of these expression elements would be separated by an operator.

operator: [ CONCAT | || | / | * | + | – ] Note that CONCAT is the same as ||.

special-register: [CURRENT APPLICATION ENCODING SCHEME | [CURRENT DATE | CURRENT_DATE] | CURRENT DEGREE | [CURRENT {LOCALE} LC_CTYPE | CURRENT LC_CTYPE] | CURRENT MEMBER | CURRENT OPTIMIZATION HINT | CURRENT PACKAGESET | [CURRENT {FUNCTION} PATH | CURRENT_PATH] | CURRENT PRECISION | CURRENT RULES | CURRENT SERVER | CURRENT SQLID | [CURRENT TIME | CURRENT_TIME] | [CURRENT TIMESTAMP | CURRENT_TIMESTAMP] | CURRENT TIMEZONE | USER ] The forms with the underscore follow the SQL standard.

labeled-duration: [ function | (expression) | constant | column-name | host-variable ] [ YEAR{S} | MONTH{S} | DAY{S} | HOUR{S} | MINUTE{S} | SECOND{S} | MICROSECOND{S} ]

case-expression: CASE [searched-when | simple-when ] { ELSE NULL | ELSE result-expression} END

searched-when: WHEN search-condition THEN [result-expression | NULL]

simple-when: expression [ WHEN expression THEN [result-expression | NULL] ]

cast-specification: CAST ([expression | NULL | parameter-marker] as data-type)

data-type: {schema.} [built-in-data-type | distinct-type-name]

Predicates

basic-predicate: [expression [= | <> | > | < | >= | <= | ¬= | ¬> | ¬<] [expression | (fullselect)] | (row-value-expression) [= | <>] (row-value-expression)]

BETWEEN-predicate: expression {NOT} BETWEEN expression AND expression

Page 11: DB2 Reference Guide 2up Letter

SQL CA Reference Guide Syntax Elements

1-2 © 2002 Computer Associates International

EXISTS-predicate: {NOT} EXISTS (fullselect)

IN-predicate: [expression {NOT} IN [ (fullselect) | (expression2,)] | (row-value-expression) {NOT} IN (fullselect2)]

LIKE-predicate: match-expression {NOT} LIKE pattern-expression {ESCAPE escape-expression}

pattern-expression/escape-expression: [constant | special-register | host-variable | CAST specification | scalar function ({constant | special-register | CAST specification | host-variable }) | {{ constant CONCAT special-register CONCAT host-variable CONCAT CAST specification CONCAT scalar function ({ constant | special-register | host-variable})}} | cast specification ]

NULL-predicate: expression IS {NOT} NULL

quantified-predicate: [expression [= | <> | > | < | >= | <= | ¬= | ¬> | ¬<] [ALL | ANY | SOME] (fullselect) | (row-value-expression) = [SOME | ANY] (fullselect2) | (row-value-expression) <> ALL (fullselect2)]

Search Conditions

search-condition: {NOT} [predicate | (search-condition)] Multiple occurrences of these search conditions would be separated by a connector.

connector: [AND | OR]

Queries

Subselect

subselect: select-clause from-clause {where-clause} {group-by-clause} {having-clause}

select-clause: SELECT {ALL | DISTINCT} [ * | [expression { {AS} column-name} | table-name.* | view-name.* | correlation-name.*], ]

from-clause: FROM table-spec,

table-spec: [[table-name | view-name | table-locator-reference] { correlation-clause } | {TABLE} (fullselect) {correlation-clause} | table-function-reference | joined-table ]

table-locator-reference: TABLE (table-locator-variable LIKE table-name)

Page 12: DB2 Reference Guide 2up Letter

For DB2 UDB for z/OS and OS/390 SQL Queries

© 2002 Computer Associates International 1-3

table-function-reference: TABLE ( function-name ({ expression | TABLE transition_table_name}, )) correlation-clause

correlation-clause: {AS} correlation-name {(column-name,)}

joined-table: [ table-spec {INNER | [LEFT | RIGHT | FULL] {OUTER} } JOIN table-spec ON join-condition | (joined-table) ]

join-condition: for INNER, LEFT OUTER and RIGHT OUTER: search-condition for FULL OUTER: full-join-expression = full-join-expression

Multiple occurrences of these full join conditions may be separated by the AND connector.

full-join-expression: [column-name | cast-function] | [COALESCE | VALUE] ([column-name | cast-function] [,column-name | , cast-function])

where-clause: WHERE search-condition

group-by-clause: GROUP BY column-name,

having-clause: HAVING search-condition

Fullselect

fullselect: [subselect | (fullselect)] {[ UNION {ALL} [subselect | (fullselect) ]]}

SELECT Statement

select-statement: fullselect {update-clause {{ optimize-for-clause | with-clause | query-no-clause}} | order-by-clause {{ read-only-clause | optimize-for-clause | with-clause | query-no-clause | fetch-first-clause }}}

update-clause: FOR UPDATE {OF column-name}

optimize-for-clause: OPTIMIZE FOR integer ROW{S}

with-clause: WITH [CS | UR | RR{KEEP UPDATE LOCKS} | RS{KEEP UPDATE LOCKS} ]

order-by-clause: ORDER BY sort-key{ASC | DESC},

sort-key: [column-name | integer | expression]

read-only-clause: FOR [FETCH | READ] ONLY

Page 13: DB2 Reference Guide 2up Letter

SQL CA Reference Guide Queries

1-4 © 2002 Computer Associates International

query-no-clause: QUERYNO integer

fetch-first-clause: FETCH FIRST [1 | integer] [row | rows] ONLY

Embedded SELECT:

select-clause INTO host-variable, from-clause {where-clause} {group-by-clause} {having-clause} {WITH [ RR | RS | CS | UR ]} {query-no-clause} {fetch-first-clause}

Page 14: DB2 Reference Guide 2up Letter

For DB2 UDB for z/OS and OS/390 SQL Commands

© 2002 Computer Associates International 1-5

Commands

ALLOCATE cursor-name CURSOR FOR RESULT SET rs-locator-variable

ALTER DATABASE dbname [[ BUFFERPOOL bpname | INDEXBP bpname | STOGROUP stogroup-name | CCSID ccsid-value ]] There are two different ALTER FUNCTION commands: one for external scalar or external table, and one for SQL scalar.

External Scalar:

ALTER [FUNCTION function-name {( parameter-type, )} | SPECIFIC FUNCTION specific-name] options-list

options-list: [[ EXTERNAL {NAME [ ‘string’ | identifier ]} LANGUAGE [ ASSEMBLE | C | COBOL | JAVA | PLI ] PARAMETER STYLE [ DB2SQL | JAVA ] [ NOT DETERMINISTIC | DETERMINISTIC ] [ RETURNS NULL ON NULL INPUT | CALLED ON NULL INPUT] [ READS SQL DATA | CONTAINS SQL | MODIFIES SQL DATA | NO SQL] [ NO EXTERNAL ACTION | EXTERNAL ACTION ] [ NO SCRATCHPAD | SCRATCHPAD length] [ NO FINAL CALL | FINAL CALL ] [ ALLOW PARALLEL | DISALLOW PARALLEL ] [ NO DBINFO | DBINFO ] CARDINALITY integer [ 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 [ INHERIT SPECIAL REGISTERS | DEFAULT SPECIAL REGISTERS ]]] Synonyms included for clauses are VARIANT for NOT DETERMINISTIC NOT VARIANT for DETERMINISTIC NOT NULL CALL for RETURNS NULL ON NULL INPUT NULL CALL for CALLED ON NULL INPUT

parameter-type: [ data-type {AS LOCATOR} | TABLE LIKE [table-name | view-name] AS LOCATOR ]

data type: see CREATE TABLE ‘string’: external-java-routine-name:

[{ jar-name:} method-name {method-signature }] jar-name:

[{schema-name.} jar-id] method-name:

[{ package-id[* | / ]}class-id{* | !}method-id] method-signature:

{( java-datatype, )}

Page 15: DB2 Reference Guide 2up Letter

SQL CA Reference Guide Commands

1-6 © 2002 Computer Associates International

SQL Scalar:

ALTER [FUNCTION function-name {( parameter-type, )} | SPECIFIC FUNCTION function-name] option-list

options-list: {LANGUAGE SQL} {STATIC DISPATCH} {CALLED ON NULL INPUT} {NOT DETERMINISTIC | DETERMINISTIC} {EXTERNAL ACTION | NO EXTERNAL ACTION} {READS SQL DATA | CONTAINS SQL}

ALTER INDEX index-name [[ BUFFERPOOL bpname | CLOSE [YES | NO] | COPY [ NO | YES ] | PIECESIZE integer [K | M | G] | using-block | free-block | gbpcache-block ]] | [PART integer { VALUES (constant, )} {{using-block | free-block | gbpcache-block }}] using-block : see CREATE INDEX free-block : see CREATE INDEX gbpcache-block : see CREATE INDEX

External Procedure:

ALTER PROCEDURE procedure-name option-list3 option-list3:

[[ DYNAMIC RESULT [ SET | SETS ] integer | EXTERNAL {NAME [ ‘string’ | identifier ]} | LANGUAGE [ ASSEMBLE | C | COBOL | COMPJAVA | JAVA | PLI | REXX ] | PARAMETER STYLE [ DB2SQL | GENERAL | GENERAL WITH NULLS | JAVA ] | [NOT DETERMINISTIC | DETERMINISTIC] | [CONTAINS SQL | READS SQL DATA | MODIFIES SQL DATA | NO SQL] | [NO DBINFO | DBINFO] | [NO COLLID | COLLID collection-id ] | [ WLM ENVIRONMENT [ name | (name, *) ] | NO WLM ENVIRONMENT ] | 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 ] | [INHERIT SPECIAL REGISTERS | DEFAULT SPECIAL REGISTERS ] | CALLED ON NULL INPUT ]] Synonyms included for clauses are RESULT SET for DYNAMIC RESULT SET RESULT SETS for DYNAMIC RESULT SETS VARIANT for NOT DETERMINISTIC NOT VARIANT for DETERMINISTIC STANDARD CALL for DB2SQL SIMPLE CALL for GENERAL SIMPLE CALL WITH NULLS for GENERAL WITH NULLS

Page 16: DB2 Reference Guide 2up Letter

For DB2 UDB for z/OS and OS/390 SQL Commands

© 2002 Computer Associates International 1-7

SQL Procedure:

ALTER PROCEDURE procedure-name [[ DYNAMIC RESULT [SET | SETS] integer] | [NOT DETERMINISTIC | DETERMINISTIC] | [CONTAINS SQL | READS SQL DATA | MODIFIES SQL DATA] | [NO COLLID | COLLID collection-id ] [WLM ENVIRONMENT [name | ( name, * )] | NO WLM ENVIRONMENT] | 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] | [INHERIT SPECIAL REGISTERS | DEFAULT SPECIAL REGISTERS] | CALLED ON NULL INPUT ]] Synonyms included for clauses are RESULT SET for DYNAMIC RESULT SET RESULT SETS for DYNAMIC RESULT SETS VARIANT for NOT DETERMINISTIC NOT VARIANT for DETERMINISTIC NULL CALL for CALLED ON NULL INPUT

ALTER STOGROUP stogroup-name [[ ADD VOLUMES ([ volume-id, | '*', ]) | REMOVE VOLUMES ([ volume-id, | '*', ]) ]]

ALTER TABLE table-name [[ ALTER { COLUMN } column-alteration | ADD [ column-definition | unique-constraint | referential-constraint | check-constraint ] | VALIDPROC [program-name | NULL] | AUDIT [ NONE | CHANGES | ALL] | DATA CAPTURE [ NONE | CHANGES] | DROP [ PRIMARY KEY | [ FOREIGN KEY constraint-name | CONSTRAINT constraint-name | CHECK constraint-name | UNIQUE constraint-name] | [ADD | DROP] RESTRICT ON DROP ]]

column-alteration: column-name SET DATA TYPE [VARCHAR | CHARACTER VARYING | CHAR VARYING ] (integer)

column-definition: column-name data-type {{ NOT NULL | {WITH} DEFAULT {constant | USER | CURRENT SQLID | NULL | cast-function-name ( [ constant | USER | CURRENT SQLD | NULL ] ) } | GENERATED [ ALWAYS | BY DEFAULT ] {as-identity clause} | references-clause | check-constraint | FIELDPROC program-name {(constant,)} }}

data-type: see CREATE TABLE check-constraint:

{CONSTRAINT constraint-name} CHECK (check-condition)

Page 17: DB2 Reference Guide 2up Letter

SQL CA Reference Guide Commands

1-8 © 2002 Computer Associates International

referential-constraint: {CONSTRAINT constraint-name} FOREIGN KEY (column-name,) references-clause

references-clause: REFERENCES table-name {(column-name,)} {ON DELETE [RESTRICT | CASCADE | SET NULL | NO ACTION]}

unique-constraint: {CONSTRAINT constraint-name} [ PRIMARY KEY | UNIQUE ] (column-name,)

as-identity clause: AS IDENTITY {({{ START WITH [ 1 | numeric constant ] | INCREMENT BY [ 1 | numeric constant ] | [ NO CACHE | CACHE 20 | CACHE integer ] | [ NOCYCLE | CYCLE ] MAXVALUE numeric constant | MINVALUE numeric constant }},)}

ALTER TABLESPACE {dbname.} tsname [[ BUFFERPOOL bpname | LOCKSIZE [ANY | TABLESPACE | TABLE | PAGE | ROW | LOB] | LOCKMAX [SYSTEM | integer] | CLOSE [YES | NO] | PART integer | FREEPAGE integer | PCTFREE integer | USING [VCAT catalog-name | STOGROUP stogroup-name] | PRIQTY integer | SECQTY integer | ERASE [YES | NO] | COMPRESS [YES | NO] | GBPCACHE [CHANGED | ALL | SYSTEM | NONE] | LOCKPART [NO | YES] | MAXROWS integer | TRACKMOD [YES | NO] | LOG [YES | NO] | CCSID ccsid-value ]]

ASSOCIATE {RESULT SET} LOCATOR{S} (rs-locator-variable,) WITH PROCEDURE [procedure-name | host-variable]

BEGIN DECLARE SECTION Marks beginning of host variable declaration section.

CALL [procedure-name | host-variable] {( [expression | NULL | TABLE transition-table-name], )| USING DESCRIPTOR descriptor-name }

CLOSE cursor-name

COMMENT ON [[ TABLE [table-name | view-name] | DISTINCT TYPE distinct-type-name | FUNCTION function-name {( parameter-type, )} | ALIAS alias-name | INDEX index-name | PROCEDURE procedure-name | SPECIFIC FUNCTION specific-name | TRIGGER trigger-name | COLUMN [table-name | view-name].column-name] IS string-constant] | [table-name | view-name] ( column-name IS string-constant, )]

parameter type: data-type {AS LOCATOR}

data-type: see CREATE TABLE

Page 18: DB2 Reference Guide 2up Letter

For DB2 UDB for z/OS and OS/390 SQL Commands

© 2002 Computer Associates International 1-9

COMMIT {WORK}

Type 1 and Type 2 CONNECT:

CONNECT {TO [location-name | host-variable] {authorization} | RESET | authorization}

authorization: USER host-variable USING host-variable

CREATE ALIAS alias-name FOR [table-name | view-name]

CREATE [ AUXILIARY | AUX] TABLE aux-table-name IN {dbname.} tsname STORES table-name COLUMN column-name {PART integer}

CREATE DATABASE dbname {{ STOGROUP [SYSDEFLT | stogroup-name] | BUFFERPOOL bpname | INDEXBP bpname | AS [WORKFILE | TEMP] {FOR member-name} | CCSID [ ASCII | EBCID | UNICODE ] }}

CREATE DISTINCT TYPE distinct-type-name AS source-data-type WITH COMPARISIONS WITH COMPARISIONS is not valid for source-data-types of BLOB, CLOB, or DBCLOB, otherwise it is required.

source-data-type: [SMALLINT | [INTEGER | INT] | [DEC | NUMERIC | DECIMAL] {( integer {, integer })} | [ FLOAT {( integer )} | REAL | DOUBLE {PRECISION }] | [[ CHARACTER | CHAR ] {( integer )} | [[[ CHARACTER | CHAR ] VARYING] | [VARCHAR] ( integer )] { FOR [SBCS | MIXED ] DATA } {CCSID [ EBCDIC | ASCII | UNICODE ]}] | [[ CHARACTER | CHAR ] LARGE OBJECT | CLOB] (integer {K | M | G}) {FOR [SBCS | MIXED | BIT] DATA} {CCSID [ EBCDIC | ASCII | UNICODE ]} | [BINARY LARGE OBJECT | BLOB] (integer { K | M | G }) | [GRAPHIC {( integer )} | VARGRAPHIC (integer) | DBCLOB (integer { K | M | G })] {CCSID [ EBCDIC | ASCII | UNICODE ]} | DATE | TIME | TIMESTAMP | ROWID There are four types of functions: External Scalar, External Table, Sourced, and SQL Scalar.

External Scalar:

CREATE FUNCTION function-name ({parameter-declaration,}) RETURNS [data-type2 {AS LOCATOR} | data-type3 CAST FROM data-type4 {AS LOCATOR}] option-list

Page 19: DB2 Reference Guide 2up Letter

SQL CA Reference Guide Commands

1-10 © 2002 Computer Associates International

option-list: {{ SPECIFIC specific-name} | PARAMETER CCSID [EBCDIC | ASCII | UNICODE] }} EXTERNAL {NAME [ ’string’ | identifier ]} LANGUAGE [ASSEMBLE | C | COBOL | PLI | JAVA] {{ [PARAMETER STYLE DB2SQL | PARAMETER STYLE JAVA] | [NOT DETERMINISTIC | DETERMINISTIC] | FENCED | [RETURNS NULL ON NULL INPUT | CALLED ON NULL INPUT] | [READS SQL DATA | NO SQL | MODIFIES SQL DATA | CONTAINS SQL] | [EXTERNAL ACTION | NO EXTERNAL ACTION] | [NO SCRATCHPAD | SCRATCHPAD {100 | length}] | [NO FINAL CALL | FINAL CALL] | [ALLOW PARALLEL | DISALLOW PARALLEL] | [NO DBINFO | DBINFO] | [NO COLLID | COLLID collection-id] | [WLM ENVIRONMENT [name | ( name )] | [ASUTIME NO LIMIT | ASUTIME LIMIT integer ] | [STAY RESIDENT NO | STAY RESIDENT YES] | [PROGRAM TYPE SUB | PROGRAM TYPE MAIN] | [SECURITY DB2 | SECURITY [USER | DEFINER] | [INHERIT SPECIAL REGISTERS | DEFAULT SPECIAL REGISTERS] | RUN OPTIONS run-time-options }}

parameter-declaration: {parameter-name} [parameter-type]

parameter-type: see ALTER FUNCTION

data-type: see CREATE TABLE DISALLOW PARALLEL becomes default if any of the following are specified: NOT DETERMINISTIC, EXTERNAL ACTION, FINAL CALL, MODIFIES SQL, SCRATCHPAD. See ALTER FUNCTION for synonyms included for clauses.

External Table: CREATE FUNCTION function-name

({parameter-declaration,}) RETURNS TABLE (column-name data-type {AS LOCATOR},) option-list

Page 20: DB2 Reference Guide 2up Letter

For DB2 UDB for z/OS and OS/390 SQL Commands

© 2002 Computer Associates International 1-11

option-list: {{ [ SPECIFIC specific-name | PARAMETER CCSID [ASCII | EBCDIC | UNICODE] }} EXTERNAL { NAME [‘string’ | identifier] } LANGUAGE [ ASSEMBLE | C | COBOL | PLI ] PARAMETER STYLE DB2SQL DISALLOW PARALLEL {{ [ NOT DETERMINISTIC | DETERMINISTIC ] | FENCED | [ RETURNS NULL ON NULL INPUT | CALLED ON NULL INPUT ] | [ READS SQL DATA | NO SQL | CONTAINS SQL ] | [ EXTERNAL ACTION | NO EXTERNAL ACTION ] | [ NO SCRATCHPAD | SCRATCHPAD {100 | length} ] [ FINAL CALL | NO FINAL CALL ] | [ NO DBINFO | DBINFO ] | CARDINALITY integer | [ NO COLLID | COLLID collection-id ] | WLM ENVIRONMENT [ name | (name) ] | [ASUTIME NO LIMIT | ASUTIME LIMIT integer] | [STAY RESIDENT NO | STAY RESIDENT YES] | [PROGRAM TYPE SUB | PROGRAM TYPE MAIN] | [SECURITY DB2 | SECURITY [ USER | DEFINER ]] | [INHERIT SPECIAL REGISTERS | DEFAULT SPECIAL REGISTERS] | RUN OPTIONS run-time-options }}

parameter-declaration: {parameter-name} [parameter-type]

parameter-type: see ALTER FUNCTION

data-type: see CREATE TABLE See ALTER FUNCTION for synonyms included for clauses.

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-declaration,})]

parameter-declaration: {parameter-name} parameter-type

parameter-type: see ALTER FUNCTION data-type: see CREATE TABLE

SQL Scalar: CREATE FUNCTION function-name

({parameter-declaration,}) [RETURNS data-type2 | option list]

parameter-declaration: parameter-name data-type1

data-type: see CREATE TABLE

Page 21: DB2 Reference Guide 2up Letter

SQL CA Reference Guide Commands

1-12 © 2002 Computer Associates International

option-list: {{SPECIFIC specific-name | PARAMETER CCSID [ASCII | EBCDIC | UNICODE] | LANGUAGE SQL | [NOT DETERMINISTIC | DETERMINISTIC] | [EXTERNAL ACTION | NO EXTERNAL ACTION] | [READS SQL DATA | CONTAINS SQL DATA] | STATIC DISPATCH | CALLED ON NULL INPUT}} RETURN [expression |NULL] See ALTER FUNCTION for ‘Synonyms included for’ clauses.

CREATE GLOBAL TEMPORARY TABLE table-name [( column-spec, ) | LIKE [table-name | view-name] | { CCSID [ASCII | EBCDIC | UNICODE] }]

column-spec: column-name data-type {NOT NULL}

data-type: see CREATE TABLE

CREATE {TYPE 2} {UNIQUE {WHERE NOT NULL} } INDEX index-name ON [table-name (column-name {ASC | DESC},) | aux-table-name] {{ using-block | free-block | gbpcache-block | DEFINE [YES | NO]}} {CLUSTER {(part-values-spec,)} } {{BUFFERPOOL bpname | CLOSE [YES | NO] | DEFER [NO | YES] | COPY [NO | YES] | PIECESIZE integer [K | M | G] }}

part-values-spec: PART integer VALUES(constant,) {{ using-block | free-block | gbpcache-block }}

using-block: USING [ VCAT catalog-name | STOGROUP stogroup-name {{ PRIQTY [12 | integer] | SECQTY integer | ERASE [NO | YES] }} ]

free-block: [[ FREEPAGE [0 | integer] | PCTFREE [10 | integer] ]]

gbpcache-block: GBPCACHE [CHANGED | ALL | NONE]

Page 22: DB2 Reference Guide 2up Letter

For DB2 UDB for z/OS and OS/390 SQL Commands

© 2002 Computer Associates International 1-13

External Procedure: CREATE PROCEDURE procedure-name

({parameter-declaration,}) option-list option-list:

{{[DYNAMIC RESULT SET 0 | DYNAMIC RESULT SET {S} integer] | PARAMETER CCSID [ASCII | EBCDIC | UNICODE]}} EXTERNAL {NAME [‘string’ | identifier]} LANGUAGE [ASSEMBLE | C | COBOL | PLI | COMPJAVA | JAVA | REXX] {PARAMETER STYLE} {DB2SQL | GENERAL | JAVA | GENERAL WITH NULLS} {NOT DETERMINISTIC | DETERMINISTIC} {FENCED} {CALLED ON NULL INPUT} {MODIFIES SQL DATA | NO SQL | CONTAINS SQL | READS SQL DATA} {NO DBINFO | DBINFO} {NO COLLID | COLLID collection-id} {WLM ENVIRONMENT [name | (name,*)] | NO WLM ENVIRONMENT} {ASUTIME NO LIMIT | ASUTIME LIMIT integer} {STAY RESIDENT NO | STAY RESIDENT YES} {PROGRAM TYPE [ SUB | MAIN ]} {SECURITY DB2 | SECURITY [ USER | DEFINER ]} {RUN OPTIONS run-time-options} {COMMIT ON RETURN NO | COMMIT ON RETURN YES} INHERIT SPECIAL REGISTERS | DEFAULT SPECIAL REGISTERS} See ALTER PROCEDURE and ALTER FUNCTION for ‘Synonyms included for’ clauses.

parameter-declaration: {IN | OUT | INOUT} {parameter-name} parameter-type

parameter-type: see ALTER FUNCTION string: see ALTER FUNCTION SQL Procedure: CREATE PROCEDURE procedure-name

{(parameter-declaration,)} option list parameter-declaration:

{IN | OUT | INOUT} parameter-name parameter-type data-type:

[built-in-datatype | TABLE LIKE table-name AS LOCATOR]

Page 23: DB2 Reference Guide 2up Letter

SQL CA Reference Guide Commands

1-14 © 2002 Computer Associates International

option-list: {{[DYNAMIC RESULT SET 0 | DYNAMIC RESULT SET {S} integer] | PARAMETER CCSID [ASCII | EBCDIC | UNICODE]}} EXTERNAL {NAME [‘string’ | identifier]} LANGUAGE SQL {{ [NOT DETERMINISTIC | DETERMINISTIC] | FENCED | CALLED ON NULL INPUT | [MODIFIES SQL DATA | CONTAINS SQL | READS SQL DATA] | NO DBINFO | [NO COLLID | COLLID collection-id] | [WLM ENVIRONMENT [name | (name,*)]] | [ASUTIME NO LIMIT | ASUTIME LIMIT integer] | [STAY RESIDENT NO | STAY RESIDENT YES] | [PROGRAM TYPEMAIN | PROGRAM TYPESUB] | [SECURITY DB2 | SECURITY USER | SECURITY DEFINER] | RUN OPTIONS run-time-options | [COMMIT ON RETURN NO | COMMIT ON RETURN YES] | [INHERIT SPECIAL REGISTERS | DEFAULT SPECIAL REGISTERS] }} See ALTER PROCEDURE and ALTER FUNCTION for ‘Synonyms included for’ clauses.

CREATE STOGROUP stogroup-name VOLUMES ([volume-id | '*'],) VCAT catalog-name

CREATE SYNONYM synonym FOR auth-id.[table-name | view-name]

CREATE TABLE table-name [( [column-definition | unique-constraint | referential-constraint | check-constraint], ) | LIKE [table-name | view-name] {INCLUDING IDENTITY { COLUMN ATTRIBUTES }} {{ IN [{dbname.} tsname | DATABASE dbname] | EDITPROC program-name | VALIDPROC program-name | AUDIT [NONE | CHANGES | ALL] | OBID integer | DATA CAPTURE [NONE | CHANGES] | WITH RESTRICT ON DROP | CCSID [ASCII | EBCDIC | UNICODE] }}

column-definition: column-name data-type {{ NOT NULL | {CONSTRAINT constraint-name} [UNIQUE | PRIMARY KEY | references clause | { CHECK ( check-condition ) }] FOR [BIT | MIXED | SBCS] DATA | GENERATED [ALWAYS | BY DEFAULT] {as identity clause} {WITH} DEFAULT {constant | USER | CURRENT SQLID | NULL | cast-function-name ([ constant | USER | CURRENT SQLID | NULL ])} | references-clause | check-constraint | FIELDPROC program-name {( constant, )} }} GENERATED is only valid for ROWID datatype or distinct type based on ROWID.

data-type: [built-in-data-type | distinct-type-name]

Page 24: DB2 Reference Guide 2up Letter

For DB2 UDB for z/OS and OS/390 SQL Commands

© 2002 Computer Associates International 1-15

built-in-data-type: [SMALLINT | [INTEGER | INT] | [DECIMAL | DEC | NUMERIC {( integer{ ,integer } ) | [FLOAT{( integer )} | REAL | DOUBLE{ PRECISION }] | [[ CHARACTER | CHAR ] {( integer )}] | [[ CHARACTER | CHAR ] VARYING | VARCHAR]( integer )] {FOR [SBCS | MIXED | BIT] DATA} | [[ CHARACTER | CHAR ] LARGE OBJECT | CLOB) ]] {integer{ K | M | G }} {( FOR [ SBCS | MIXED | BIT ]} DATA ]] [BINARY LARGE OBJECT | BLOB] (integer { K | M | G })} | [GRAPHIC {( integer )} | VARGRAPHIC (integer) | DBCLOB {( integer{K | M | G} )}}] | DATE | TIME | TIMESTAMP | ROWID]

unique-constraint: {CONSTRAINT constraint-name} [PRIMARY KEY | UNIQUE] (column-name,)

referential-constraint: {CONSTRAINT constraint-name} FOREIGN KEY {constraint-name} (column-name,) references-clause

references-clause: REFERENCES table-name {(column-name,)} {ON DELETE [ RESTRICT | CASCADE | SET NULL | NO ACTION]}

check-constraint: {CONSTRAINT constraint-name} CHECK (check-condition)

as-identity-clause: see ALTER TABLE CREATE {LARGE | LOB} TABLESPACE tsname

{IN [DSNDB04 | dbname]} {{ using-block | free-block | gbpcache-block | trackmod-block | LOG [YES | NO] }} {DSSIZE integer G} {MEMBER CLUSTER | NUMPARTS integer {( PART integer [[ using-block | free-block | gbpcache-block | trackmod-block | COMPRESS [NO | YES] ]] )} {MEMBER CLUSTER} | SEGSIZE integer} {{ BUFFERPOOL bpname | LOCKSIZE [ANY | TABLESPACE | TABLE | PAGE | ROW | LOB] | LOCKMAX [SYSTEM | integer] | CLOSE [YES | NO] | COMPRESS [NO | YES] | CCSID [ASCII | EBCDIC | UNICODE] | LOCKPARTS [NO | YES] | MAXROWS integer }}

partition-spec: PART integer {{ using-block | free-block | gbpcache-block | COMPRESS [NO | YES] }}

using-block: USING [ VCAT catalog-name | STOGROUP stogroup-name {{ PRIQTY integer | SECQTY integer | ERASE [NO | YES] }} ]

free-block: [[ FREEPAGE [0 | integer] | PCTFREE [5 | integer] ]]

gbpcache-block: GBPCACHE [CHANGED | ALL | SYSTEM | NONE]

trackmod-block: TRACKMOD[YES | NO]

Page 25: DB2 Reference Guide 2up Letter

SQL CA Reference Guide Commands

1-16 © 2002 Computer Associates International

CREATE TRIGGER trigger-name [NO CASCADE BEFORE | AFTER] [INSERT | DELETE | UPDATE{OF column-name,}] ON table-name {REFERENCING [OLD {AS} correlation-name | NEW {AS} correlation-name | OLD_TABLE {AS} identifier | NEW_TABLE {AS} identifier ] [FOR EACH ROW | FOR EACH STATEMENT] MODE DB2SQL trigger-action OLD_TABLE, NEW_TABLE and FOR EACH STATEMENT are only valid for AFTER triggers

trigger-action: {WHEN ( search-condition )} {BEGIN ATOMIC triggered-SQL-statement; END}

CREATE VIEW view-name {(column-name,)} AS fullselect {WITH [CASCADE | LOCAL] CHECK OPTION}

DECLARE cursor-name {[ INSENSITIVE | SENSITIVE STATIC ] SCROLL} CURSOR {WITH HOLD | WITH RETURN} FOR [select-statement | statement-name]

DECLARE GLOBAL TEMPORARY TABLE table-name [( column-definition, ) | LIKE [table-name | view-name] {INCLUDING IDENTITY { COLUMN ATTRIBUTES }} | AS (fullselect) DEFINITION ONLY { as-attribute }] {CCSID [ASCII | EBCDIC | UNICODE] | ON COMMIT [DELETE | PRESERVE ] ROWS}

column-definition: see CREATE TABLE

DECLARE statement-name, STATEMENT

DECLARE [table-name | view-name] TABLE (column-spec,)

column-spec: column-name [built-in-data-type | distinct-type-name] {NOT NULL | NOT NULL WITH DEFAULT}

DECLARE host-variable, VARIABLE { CCSID integer | [CCSID EBCDIC | CCSID ASCII | CCSID UNICODE] } {FOR[SBCS DATA | MIXED DATA | BIT DATA] }

Searched delete: DELETE FROM [table-name | view-name] {correlation-name} {WHERE search-condition} {WITH [RR | CS | RS]} {QUERY NO integer}

Cursor-positioned delete: DELETE FROM [table-name | view-name] {correlation-name} WHERE CURRENT OF cursor-name

DESCRIBE [statement-name | TABLE host-variable] INTO descriptor-name {USING [NAMES | LABELS | ANY | BOTH]}

DESCRIBE CURSOR [cursor-name | host-variable] INTO descriptor-name

DESCRIBE INPUT statement-name INTO descriptor-name

Page 26: DB2 Reference Guide 2up Letter

For DB2 UDB for z/OS and OS/390 SQL Commands

© 2002 Computer Associates International 1-17

DESCRIBE PROCEDURE [procedure-name | host-variable] INTO descriptor-name

DROP [ ALIAS alias-name | DATABASE dbname | [DISTINCT | DATA] TYPE distinct-type-name RESTRICT | FUNCTION function-name {(parameter-type,)} RESTRICT | INDEX index-name | PROCEDURE procedure-name RESTRICT | SPECIFIC FUNCTION specific-name RESTRICT | STOGROUP stogroup-name | SYNONYM synonym-name | TABLE table-name | TABLESPACE {dbname.} tsname | TRIGGER trigger-name RESTRICT | VIEW view-name | [PACKAGE | PROGRAM] collection-id.package-id { {VERSION} version-id} ]

parameter-type: data-type {AS LOCATOR}

data type: See CREATE TABLE

END DECLARE SECTION

EXECUTE statement-name {USING [host-variable, | DESCRIPTOR descriptor-name]}

EXECUTE IMMEDIATE [ statement-string | host-variable ]

EXPLAIN [PLAN | ALL] {SET QUERYNO=integer} FOR explainable-sql-statement

FETCH { [ INSENSITIVE | SENSITIVE ] } { [ NEXT | PRIOR | FIRST | LAST | CURRENT | BEFORE | AFTER | ABSOLUTE [ host-variable | integer-constant ] | RELATIVE [host-variable | integer-constant ] } {FROM} cursor-name {single-fetch-clause}

single-fetch-clause: INTO [ host-variable, | DESCRIPTOR descriptor-name ]

FREE LOCATOR host-variable, GRANT [CREATE | PACKADM]

[ON | IN] COLLECTION [collection-id, | *] TO [auth-id | PUBLIC], {WITH GRANT OPTION}

GRANT [DBADM | DBCTRL | DBMAINT | CREATETAB | CREATETS | DISPLAYDB | DROP | IMAGCOPY | LOAD | RECOVERDB | REORG | REPAIR | STARTDB | STATS | STOPDB], ON DATABASE dbname, TO [auth-id | PUBLIC], {WITH GRANT OPTION}

GRANT USAGE ON [DISTINCT TYPE distinct-type-name, | JAR jar name,] TO [authid | PUBLIC], {WITH GRANT OPTION} DATA can be used as a synonym for DISTINCT.

Page 27: DB2 Reference Guide 2up Letter

SQL CA Reference Guide Commands

1-18 © 2002 Computer Associates International

GRANT EXECUTE ON [FUNCTION [ function name {(parameter-type,)}, | * ] | SPECIFIC FUNCTION specific-name, | PROCEDURE [procedure-name, | * ]] TO [authid | PUBLIC], {WITH GRANT OPTION}

parameter-type: data-type {AS LOCATOR}

data-type: See CREATE TABLE

GRANT [ ALL | [BIND | COPY | [EXECUTE | RUN] ], ] ON [PACKAGE | PROGRAM] [collection-id.[* | package-id] ], TO [auth-id | PUBLIC], {WITH GRANT OPTION}

GRANT [BIND | EXECUTE], ON PLAN plan-name, TO [auth-id | PUBLIC], {WITH GRANT OPTION}

GRANT [ALTERIN | CREATEIN | DROPIN], ON SCHEMA [schema-name, | * ] TO [authid | PUBLIC], {WITH GRANT OPTION}

GRANT [ARCHIVE | BINDADD | BINDAGENT | BSDS | CREATEALIAS | CREATEDBA | CREATEDBC | CREATESG | CREATETMTAB | DISPLAY | MONITOR1 | MONITOR2 | RECOVER | STOPALL | STOSPACE | SYSADM | SYSCTRL | SYSOPR | TRACE], TO [auth-id | PUBLIC], {WITH GRANT OPTION}

GRANT [ ALL {PRIVILEGES} | [ALTER | DELETE | INDEX | INSERT | SELECT | REFERENCES {(column-name,)} | UPDATE{(column-name,)}] | TRIGGER],] ON {TABLE} [table-name | view-name], TO [auth-id | PUBLIC | PUBLIC AT ALL LOCATIONS], {WITH GRANT OPTION}

GRANT USE OF [BUFFERPOOL bpname, | ALL BUFFERPOOLS | STOGROUP stogroup-name, | TABLESPACE [{dbname.}tsname],] TO [auth-id | PUBLIC], {WITH GRANT OPTION}

HOLD LOCATOR host-variable, INCLUDE [SQLCA | SQLDA | member-name]

INSERT INTO [table-name | view-name] { ( column-name, ) } { OVERRIDING USER VALUE } [ VALUES [ expression | DEFAULT | NULL, | ( [ expression | DEFAULT | NULL ], ) ] | fullselect { WITH [ RR | RS | CS ] } { QUERYNO integer }]

fullselect: See SELECT statement

LABEL ON [ [TABLE [table-name | view-name] | ALIAS alias-name | COLUMN [table-name.column-name |

Page 28: DB2 Reference Guide 2up Letter

For DB2 UDB for z/OS and OS/390 SQL Commands

© 2002 Computer Associates International 1-19

view-name.column-name] IS string-constant] | [table-name | view-name] ( [column-name IS string-constant], ) ]

LOCK TABLE table-name {PART integer} IN [SHARE | EXCLUSIVE] MODE

OPEN cursor-name {USING [host-variable, | DESCRIPTOR descriptor-name]}

PREPARE statement-name {INTO descriptor-name { USING [NAMES | LABELS | ANY | BOTH ]}} [FROM [string-expression | {ATTRIBUTES attr-host-variable} FROM host-variable]

attr-host-variable must be a valid attribute-string.

attribute-string: { [ INSENSITIVE | SENSITIVE STATIC ] | SCROLL | WITH HOLD | WITH RETURN | fetch-first-clause | [read-only-clause | update-clause] | optimize-clause | isolation-clause }

RELEASE [ location-name | host-variable | CURRENT | ALL {SQL} | ALL PRIVATE ]

RELEASE {TO} SAVEPOINT savepoint-name

RENAME {TABLE} source-table-name TO target-identifier

REVOKE [CREATE | PACKADM] [IN | ON] COLLECTION [collection-id, | *] FROM [auth-id | PUBLIC], {BY [auth-id, | ALL]}

REVOKE [DBADM | DBCTRL | DBMAINT | CREATETAB | CREATETS | DISPLAYDB | DROP | IMAGCOPY | LOAD | RECOVERDB | REORG | REPAIR | STARTDB | STATS | STOPDB], ON DATABASE dbname, FROM [auth-id | PUBLIC], {BY [auth-id, | ALL]}

REVOKE USAGE ON [DISTINCT TYPE distinct-type-name, | JAR jar-name,] FROM [AUTHID | PUBLIC], BY [authid, | ALL] RESTRICT

REVOKE EXECUTE ON [FUNCTION [function-name{(parameter-type,)}, | *] | SPECIFIC FUNCTION specific-name, | PROCEDURE [procedure-name, | *]] FROM [authid | PUBLIC], BY [authid, | ALL] RESTRICT

Parameter-type: See GRANT EXECUTE for function or procedure.

REVOKE [ ALL | [BIND | COPY | [ EXECUTE | RUN ], ] ON [PACKAGE | PROGRAM] [collection-id.[ * | package-id ]], FROM [auth-id | PUBLIC], {BY [ auth-id, | ALL ]}

Page 29: DB2 Reference Guide 2up Letter

SQL CA Reference Guide Commands

1-20 © 2002 Computer Associates International

REVOKE [BIND | EXECUTE], ON PLAN plan-name, FROM [auth-id | PUBLIC], {BY [auth-id, | ALL]}

REVOKE [ALTERIN | CREATEIN | DROPIN], ON SCHEMA [schema-name, | *] FROM [authid | PUBLIC], BY [authid | ALL]

REVOKE [ARCHIVE | BINDADD | BINDAGENT | BSDS | CREATEALIAS | CREATEDBA | CREATEDBC | CREATESG | CREATETMTAB | DISPLAY | MONITOR1 | MONITOR2 | RECOVER | STOPALL | STOSPACE | SYSADM | SYSCTRL | SYSOPR | TRACE], FROM [auth-id | PUBLIC], {BY [auth-id, | ALL]}

REVOKE [ ALL {PRIVILEGES} | [ALTER | DELETE | INDEX | INSERT | SELECT | REFERENCES | UPDATE | TRIGGER],] ON {TABLE} [table-name | view-name], FROM [auth-id | PUBLIC | PUBLIC AT ALL LOCATIONS], {BY [auth-id, | ALL]}

REVOKE USE OF [ BUFFERPOOL bpname, | ALL BUFFERPOOLS | STOGROUP stogroup-name, | TABLESPACE [{dbname.}tsname], ] FROM [auth-id | PUBLIC], {BY [auth-id, | ALL]}

ROLLBACK {WORK} {TO SAVEPOINT { savepoint-name }}

SAVEPOINT savepoint-name {UNIQUE} ON ROLLBACK RETAIN CURSORS { ON ROLLBACK RETAIN LOCKS }

SET [item-reference=[expression | NULL] | (item-reference,)= [([expression | NULL], | VALUES[[expression | NULL] | ([expression | NULL],)]],]

item-reference: [host-variable | transition-variable]

transition variable: {correlation-name.} column-name

SET CURRENT {APPLICATION } ENCODING SCHEMA {=} [string-constant | host-variable]

SET CONNECTION [location-name | host-variable]

SET CURRENT DEGREE= [string-constant | host-variable]

SET [ { CURRENT }{ LOCALE } LC_CTYPE | CURRENT LC_CTYPE ]= [string-constant | host-variable]

SET CURRENT OPTIMIZATION HINT= [string-constant | host-variable]

SET CURRENT PACKAGESET= [USER | string-constant | host-variable]

Page 30: DB2 Reference Guide 2up Letter

For DB2 UDB for z/OS and OS/390 SQL Commands

© 2002 Computer Associates International 1-21

SET [CURRENT {FUNCTION} PATH | CURRENT_PATH] = [schema-name | SYSTEM PATH | USER | {CURRENT{FUNCTION}}PATH | CURRENT_PATH | host-variable | string-constant]

SET CURRENT PRECISION = [string-constant | host-variable]

SET CURRENT RULES= [string-constant | host-variable]

SET CURRENT SQLID= [USER | string-constant | host-variable]

SET host-variable=special-register

SIGNAL SQLSTATE sqlstate-string-constant (diagnostic-string-constant)

Searched update: UPDATE [table-name | view-name] {correlation-name} SET assignment-clause {WHERE search-condition} {WITH [RR | CS | RS]} {QUERYNO integer}

Cursor-positioned update: UPDATE [table-name | view-name] SET assignment-clause WHERE CURRENT OF cursor-name

assignment clause: [ column-name=[expression | NULL | (scalar-fullselect) ] | [ (column-name,) = ( [ [expression| NULL], | row fullselect ] ) ]

VALUES [expression | (expression,)] VALUES [[expression | NULL} | (expression | NULL,)]

INTO host-variable,

WHENEVER [ NOT FOUND | SQLERROR | SQLWARNING ] [ CONTINUE | [GOTO | GO TO] host-label ]

Page 31: DB2 Reference Guide 2up Letter

SQL CA Reference Guide Naming Definitions

1-22 © 2002 Computer Associates International

Naming Definitions alias-name:

Qualified or unqualified name designating an alias when preceded by the keyword ALIAS. Otherwise, it designates a table or view and can be local or remote. Rules for naming are same as for table-name or view-name below. A fully qualified alias-name can refer to a server that is not the current server, but the table or view of that alias must be local to that server.

auth-id: Short identifier designating a set of privileges. It can also designate a user or group of users, but this property is not controlled by DB2.

aux-table-name: Qualified or unqualified name designating an auxiliary table. For auxiliary table name rules see table-name.

bpname: Identifies a buffer pool. The 4KB buffer pools are named BP0, BP1, BP2, BP49. The 32K buffer pools are named BP32K, and BP32K1, BP32K2, BP32K9.

built-in-data-type: Qualified or unqualified name that identifies an IBM-supplied data type.

cast-function-name: A name that matches the name of the distinct type for the column. Can only be specified for columns defined as distinct type.

catalog-name: Short identifier designating an ICF catalog.

check-condition: Statement used to specify table check constraints.

collection-id: Long identifier identifying a package collection.

column-name: Qualified or unqualified name designating a column of a table or view. Unqualified, it is a long identifier; qualified, it is a qualifier followed by a period and a long identifier. Qualifier is a table, view, correlation name, synonym, or alias.

constant: A constant or “literal” specifies a value. There are two types of constants; string constants which are either character or graphic, and numeric constants which are integer, floating-point, or decimal. All constants have the attribute NOT NULL.

constraint-name: Short identifier designating check or referential constraint on a table.

correlation-name: Long identifier designating a table, view, or individual rows of a table or view.

cursor-name: Long identifier designating an SQL cursor.

data type: Every column of a DB2 table has a data type, defining a “set” of data the column will contain and the length of the data field. See Data Types in this section for additional information.

Page 32: DB2 Reference Guide 2up Letter

For DB2 UDB for z/OS and OS/390 SQL Naming Definitions

© 2002 Computer Associates International 1-23

dbname: Short identifier designating a data base.

distinct-type-name: Qualified or unqualified name that designates a distinct data type

descriptor-name: Host-identifier designating an SQLDA; it may be preceded by a colon.

explainable-sql-statement: Any static or dynamic SQL statement except for a statement-string.

function-name: Qualified or unqualified name that designates a user-defined function, a cast-function generated when a distinct type was created, or a built-in function.

host-label: Identifies a host language statement.

host-variable: Sequence of tokens designating a host variable which includes at least one host-identifier.

index-name: Qualified or unqualified name of an index. Unqualified, it is a long identifier; in an SQL statement, it is implicitly qualified by the authorization ID of that statement. Qualified, it is a short identifier followed by a period and a long identifier.

large: A partitioned tablespace that contains more than 64GB of compressed or uncompressed data.

location-name: Location identifier designating a data base management system.

member-name: Name of a member of the partitioned data set.

package-id: Short identifier designating a package.

package-name: Name of object created during the bind of a package. Name consists of location-name, collection-id, package-id, and version-id separated by periods. Version ID allows multiple versions of a package to have the same first three qualifiers in the name.

parameter-marker: A question marker (?) that appears where a host variable could appear if the statement were a static SQL statement.

password: Using DB2 storage groups, password is the control or master integrated catalog password. It protects the data sets and is passed to VSAM when the data sets are used by DB2. Using User Defined data sets, password is defined by you, using VSAM access method services. It is passed to VSAM when the data sets are used by DB2.

plan-name: Short identifier designating an application plan.

procedure-name: Name designating a user-written program that can be invoked through an SQL CALL statement, i.e. a stored procedure.

Page 33: DB2 Reference Guide 2up Letter

SQL CA Reference Guide Naming Definitions

1-24 © 2002 Computer Associates International

program-name: Short identifier designating an exit routine or a stored procedure.

result-expression: Specifies an expression that follows the THEN and ELSE keywords of the CASE expression. ALL result expressions must be compatible.

rs-loc-var: Name designating a 4-byte variable used by DB2 to uniquely identify a query result set returned by a stored procedure.

schema-name: A schema name or authorization id used to qualify an object. Objects qualified with a schema name are distinct types, stored procedures, triggers, user-defined functions, built-in data-types and built-in functions.

specific-name: Qualified or unqualified name that designates a unique name for a user-defined function.

statement-name: Long identifier designating a prepared SQL statement.

statement-string: The statement string must be one of the following SQL statements: ALTER, INSERT, COMMENT ON, LABEL ON, COMMIT, LOCK TABLE, CREATE, REVOKE, DELETE, ROLLBACK, DROP, SET CURRENT DEGREE, EXPLAIN, SET CURRENT SQLID, GRANT, and UPDATE.

source-table-name: Qualified or unqualified identifier of an existing table on the server to be renamed.

stogroup-name: Short identifier designating a storage group.

string constant: A string constant specifies a varying-length character string. It is represented by a sequence of characters that starts and ends with a string delimiter, either an apostrophe (‘) or a quotation mark (“). The number of bytes between the delimiter must not be greater than 254. An X followed by a sequence of characters that starts and ends with a string delimiter can be used to specify characters that do not have a keyboard representation in hexadecimal notation.

synonym-name: Long identifier designating a synonym when preceded by the keyword SYNONYM. Otherwise, it designates a local table or local view and can be used wherever the name of a table or view can be used in an SQL statement. A qualified name is never interpreted as a synonym.

table-locator-variable: A host variable with a table locator type.

Page 34: DB2 Reference Guide 2up Letter

For DB2 UDB for z/OS and OS/390 SQL Naming Definitions

© 2002 Computer Associates International 1-25

table-name: Qualified or unqualified name that designates a table. Period required between any of the parts. Fully qualified, it has 3 parts; 1st is a location-name designating the DBMS at which the table is stored, 2nd is the authorization ID of the owner of the table, 3rd is a long identifier. A 2-part table-name is implicitly qualified by the location-name of the current server. A 1-part or unqualified table-name is a long identifier with 2 implicit qualifiers; 1st implicit qualifier is the location-name of the current server, 2nd is the authorization ID. Authorization ID is owner of plan or package for static statements, or the CURRENT SQLID for dynamic statements.

target-name: New unqualified name for a table.

trigger-name: A qualified or unqualified name that designates a trigger.

tsname: Short identifier designating a table space of an identified data base. If a data base is not identified, a table-space-name designates a table space of data base DSNDB04.

version-id: An identifier up to 64 bytes long assigned to a package when the package is created.

view-name: Qualified or unqualified name that designates a view. Period required between any of the parts. Fully qualified, it has 3 parts; 1st is a location-name designating the DBMS at which the view is stored, 2nd is the authorization ID of the owner of the view, 3rd is a long identifier. A 2-part view-name is implicitly qualified by the location-name of the current server. A 1-part or unqualified view-name is a long identifier with 2 implicit qualifiers: 1st implicit qualifier is the location-name of the current server, 2nd is the authorization ID. Authorization ID is owner of plan or package for static statements, or the CURRENT SQLID for dynamic statements.

volume-id: Label used to direct the placement of objects on specific mass storage devices.

Page 35: DB2 Reference Guide 2up Letter

SQL CA Reference Guide SQL Functions

1-26 © 2002 Computer Associates International

SQL Functions

Column Functions

AVG ({ ALL | DISTINCT } expression)

COUNT ([ * | DISTINCT expression ])

COUNT_BIG ( * | DISTINCT expression )

MAX ({ ALL | DISTINCT } expression)

MIN ({ ALL | DISTINCT } expression)

[STDDEV | STDDEV_POP] ({ ALL | DISTINCT } expression)

STDDEV_SAMP ({ ALL | DISTINCT } expression)

SUM ({ ALL | DISTINCT } expression)

[VARIANCE | VAR | VAR_POP] ({ ALL | DISTINCT } expression)

[VARIANCE_SAMP | VAR_SAMP] ({ ALL | DISTINCT } expression)

Scalar Functions

[ABS | ABSVAL] (expression) ABS(BONUS) 1000.00

(in BONUS format, returning the absolute value of –1000.00.)

ACOS (expression) ACOS (ANGLE) +0.1572969586431309E+00

(in double precision floating-point format, returning the arcosine of ANGLE, value .98765432. Valid numeric values for expression are –1 to 1.)

ADD_MONTHS (date-expression, expression) ADD_MONTHS (HIREDATE,3) ‘2002-11-30’)

(in date format, returning the date plus 3 months; when date-expression is ‘2002-08-31’, and the day is last day of the month, the last day of the resulting month will be returned.)

ASIN (expression) ASIN (ANGLE) +0.1413499368151766E+01

(in double precision floating-point format, returning the arcsine of ANGLE, value .98765432. Valid numeric values for expression are –1 to 1.)

ATAN (expression) ATAN (ANGLE) +0.7791870626446206E+00

(in double precision floating-point format, returning the arctangent of ANGLE, value .98765432.)

ATANH (expression) ATANH (ANGLE) +0.2540702142243786E+01

(in double precision floating-point format, returning the hyperbolic arc target of ANGLE, value .98765432. valid numeric values for expression are –1 to 1.)

Page 36: DB2 Reference Guide 2up Letter

For DB2 UDB for z/OS and OS/390 SQL SQL Functions

© 2002 Computer Associates International 1-27

ATAN2 (expression1, expression2) ATAN2 (XCOORD, YCOORD)

+0.110714871779409E+01 (in double precision floating-point format, returning the arc tangent of XCOORD, value 2 and YCOORD, value 4.)

BLOB (expression {,integer}) BLOB(LASTNAME) ‘E2D4C9E3C8’

(in BLOB format returning the BLOB representation of LASTNAME data type VARCHAR(15) value ‘SMITH’.)

CCSID_ENCODING (expression) CCSID_ENCODING (500) EBCDIC

(in CHAR(8) format, returning the encoding scheme for CCSID 500, the value EBCDIC.)

[CEIL | CEILING] (expression) CEIL(MIN(SALARY)/12) 1279.00000000

(in DECIMAL(15,8) format, returning the smallest integer value that is greater than or equal to MIN (SALARY)/12, data type DECIMAL (15,15-7) VALUE 1278.33333333.)

CHAR (datetime-expression {,ISO | USA | EUR | JIS | LOCAL]})

CHAR(HIREDATE,USA) ‘08/09/2002’ (in CHAR(10) format)

CHAR (character-expression{,integer}) CHAR(FIRSTNAME, 8) ‘PHILIP’

(in CHAR(8) format, returning a fixed length character string representation of FIRSTNME data type VARCHAR(12) value ‘PHILIP’. For FIRSTNAME with length greater than 8 a warning message is returned.)

CHAR (integer-expression) CHAR(EDLEVEL) ‘14bbbb’

(in CHAR (6) format, returning the character string representation of EDLEVEL data type SMALLINT, value 14. In CHAR (11) format for INTEGER data type.)

CHAR (decimal-expression {,decimal-character}) CHAR(SALARY,’,’ ‘0017750,00’

(in CHAR(2+p) Format, where p is the precision of the decimal expression, returning the character representation of SALARY DEC(9,2) value 17750.00 substituting’,’ for the default period decimal marker.)

CHAR (floating-point-expression) CHAR(XCOORD) ‘2.0E0’

(in CHAR(24) format, returning the character representation of XCOORD, data type DOUBLE, value 2.)

CHAR (rowid-expression) CHAR(EMP_ROWID)

‘…………………………………’ (in CHAR(40) format, returning bit data that does not have an associated CCSID.)

Page 37: DB2 Reference Guide 2up Letter

SQL CA Reference Guide SQL Functions

1-28 © 2002 Computer Associates International

CLOB (EXPRESSION{,integer}) CLOB(LASTNAME) ‘SMITH’

(in CLOB format returning the CLOB representation of LASTNAME, data type VARCHAR (15), value ‘SMITH’.)

[COALESCE | VALUE] (expression, expression,) COALESCE (ZIP,‘00000-0000’) ‘00000-0000’

(In ZIP’s format, returning the first non-null value in the list. COALESCE conforms to standard SQL.)

[CONCAT | “ | | ”] (expression1, expression2) CONCAT (LASTNAME, FIRSTNAME)

‘SMITHPHILIP’ (in CHAR format returning the link of two strings into one string expression for LASTNAME, data type VARCHAR(15), value SMITH’ and FIRSTNAME, data type VARCHAR(12), value ‘PHILIP’.)

COS(expression) COS (ANGLE) +0.5506493986967134E+00

(in double precision floating-point format, returning the cosine of ANGLE, VALUE .9876532.)

COSH(expression) COSH (ANGLE) +0.1528689204821580E+01

(in double precision floating-point format, returning the hyperbolic cosine of ANGLE, VALUE .9876532.)

DATE(expression) DATE(‘2002059’) 2002-02-28

(in DATE format, returns the date)

DAY(expression) DAY(CURRENT DATE) 8

(in INTEGER format, if today is ’2002-12-08’.)

DAYOFMONTH(expression) DAYOFMONTH(HIREDATE) 8

(in INTEGER format, returning the day part of the HIREDATE, value ‘2002-12-08.)

DAYOFWEEK(expression) DAYOFWEEK(HIREDATE) 1

(in INTEGER format, returning a value from 1 to 7 representing the day of the week where 1 is Sunday and 7 is Saturday for the value of HIREDATE, value ‘2002-12-08’ minus 15 days.)

DAYOFWEEK_ISO(expression) DAYOFWEEK_ISO (HIREDATE) 7

(in INTEGER format, returning a value from 1 to 7 representing the day of the week where 1 is Monday and 7 is Sunday for the value of HIREDATE, value ‘2002-12-08’.)

DAYOFYEAR(expression) DAYOFYEAR(HIREDATE) 342

(in INTEGER format, returning a value from 1 to 366 where 1 is January 1 for the value HIREDATE, value ‘2002-12-08’.)

Page 38: DB2 Reference Guide 2up Letter

For DB2 UDB for z/OS and OS/390 SQL SQL Functions

© 2002 Computer Associates International 1-29

DAYS(expression) DAYS(HIREDATE) 731192

(in INTEGER format, the number of days for HIREDATE value ‘2002-12-08’ since 12/31/0000)

DBCLOB(expression{,integer}) DBCLOB(GRAPHIC-DATA) âjâoârâdâaân

ârâeânâe. (in DBCLOB format returning the DBCLOB representation of GRAPHIC_DATA datatype VARGRAPHIC(50) value ‘JORDANRENE’.

[DEC | DECIMAL] ([ numeric-expression | string-expression ] {,precision-integer {,scale-integer{, decimal-character }}} ])

DECIMAL(EDUCLVL,3,0) 019. (in DECIMAL(3,0) format, with a precision of 3 [total # of digits] and a scale of 0 [digits to right of decimal])

DEGREES(expression) DEGREES(ANGLE)

5658842415386325E+02 (in double precision floating-point format returning the number of degrees expressed in radians for ANGLE, value .98765432.)

DIGITS(expression) DIGITS(SALARY) 005245000

(in CHAR(9) format, if the data type of SALARY is DECIMAL(9,2) and the value is $52,450)

[DOUBLE | DOUBLE-PRECISION | FLOAT] ([ numeric-expression | string-expression ])

DOUBLE((SALARY+COMM) /12) +0.1597529166600000E+04 (returns the double precision floating-point format representation of (SALARY +COMM/12), value 1597.5291666.)

EXP(expression) EXP(BASE_DATA)

+0.2890703256906984E+03 (in double precision floating point returns the exponential function of BASE_DATA data type DECIMAL (6,5) value 5.66667.)

FLOAT(expression) FLOAT(BONUS)/2 +0.5000000000000E+03

(in FLOAT format)

FLOOR(expression) FLOOR (MIN(SALARY+COMM) / 12)

1380.0000000 (in DECIMAL (15,7) format, returning the largest integer value less than or equal to MIN (SALARY + COMM) / 12), data type DECIMAL (15,15-8) VALUE 1380.5833333.)

GRAPHIC ([ character-expression | graphic-expression ]{,integer})

GRAPHIC(LASTNAME) âSâMâIâTâH (Returning a fixed length graphic string representation of LASTNAME data type VARCHAR(15), value ‘SMITH’.)

Page 39: DB2 Reference Guide 2up Letter

SQL CA Reference Guide SQL Functions

1-30 © 2002 Computer Associates International

HEX(expression) HEX(DEPT) ‘C5F1F1’

(in CHAR(6) format, if the data type of DEPT is CHAR(3) and the value is ‘E11’)

HOUR(expression) HOUR(081500.) 8

(in INTEGER format, returns the hour portion)

IDENTITY_VAL_LOCAL( ) IDENTITY_VAL_LOCAL( )

0000000000000000000000000000001. (in DECIMAL (31, 0) format, returning the most recently-assigned value for an identity column)

IFNULL(expression, expression) IFNULL (BONUS,0) .00

(in DECIMAL (9,2) format, returning the first non-null value in a list of only two expressions. BONUS data type DECIMAL(9,2,), value is NULL.)

INSERT(expression1, expression2, expression3, expression4)

CHAR (INSERT(WORKDEPT, 2,0,’-‘ || JOB || ’-‘),20) E-OPERATORS-1-1 (in CHAR(20) format returning a fixed length character representation of the value for WORKDEPT, value ‘E11’ with the expression in JOB, value ‘OPERATOR’ inserted beginning at position 2 deleting 0 bytes.

INTEGER(expression,) INTEGER(AVG(SALARY)) 44083

(in INTEGER format, after truncating the calculated average salary)

JULIAN_DAY(expression) JULIAN_DAY(HIREDATE) 2452617

(in INTEGER format returning the number of days from Janurary1, 4712 B.C. to the date specified.)

LAST_DAY(date_expression) LAST_DAY (HIREDATE) 2002-12-31

(in DATE format, returns a date that represents the last day of the month for ‘2002-12-08’)

[LCASE | LOWER] (expression) LCASE (LASTNAME) lee

(in VARCHAR (15) FORMAT returning the value of LASTNAME, value ‘LEE’ in lower case.)

LEFT (string, integer) LEFT (WORKDEPT, 1) E

(in CHAR (1) format returning the leftmost characters from WORKDEPT, value ‘E11’ for a length of 1.)

LENGTH(expression) LENGTH(LASTNAME) 7

(in INTEGER format, if the data type of LASTNAME is VARCHAR(20) and the value is ‘Johnson’; note that if the data type is fixed-length CHAR(20), the result would be 20!)

Page 40: DB2 Reference Guide 2up Letter

For DB2 UDB for z/OS and OS/390 SQL SQL Functions

© 2002 Computer Associates International 1-31

LOCATE(search-string, source-string {,start}) LOCATE(‘M’, LASTNAME, 4) 5

(in INTEGER format returns the starting position of the first occurrence of search string in LASTNAME, value ‘YAMAMOTO’ beginning search at position 4.)

[LOG | LN] (expression) LOG(BASE_DATA)

+0.1734601643623227E+01 (in double precision floating-point format returning the natural logarithm of BASE_DATA, value 5.6667.)

LOG10(expression) LOG10(BASE_DATA)

+0.7533279221258787E+00 (in double precision floating-point format returning the base 10 logarithm of BASE_DATA, data type DECIMAL (6,5), value 5.66667.)

LTRIM(expression) LTRIM (FIRSTNME) ‘SYBIL’

(in VARCHAR format returning FIRSTNAME, value ‘bbbSYBIL’ without the leading blanks. Synonymous with STRIP (FIRSTNME, L).)

MAX(expression, expression) MAX( ‘A’, ‘C’, ‘X’ ) ‘X’

(returns the maximum value from a set of values)

MICROSECOND(expression) MICROSECOND(TIMESTAMP

(‘2002-03-05-10.30.30.999998’)) 999998 (in INTEGER format)

MIDNIGHT_SECONDS(expression) MIDNIGHT_SECONDS (CURRENT TIME)

43121 (in INTEGER format returning a value from 0 to 86400 representing the number of seconds from midnight to the time specified.)

MIN(expression ,expression) MIN( ‘A’, ‘C’, ‘X’) ‘A’

(returns the minimum value from a set of values)

MINUTE(expression) MINUTE(081500.) 15

(in INTEGER format)

MOD(expression, expression) MOD(5,2) 1

(in INTEGER format returning the remainder of the calculation 5-(5/2)*2.)

MONTH(expression) MONTH(INSURCOV) 12

(in INTEGER format, if the date of INSURCOV is ‘2002-12-08’)

MULTIPLY_ALT(exact-numeric-expression, exact-numeric-expression)

MULTIPLY_ALT(SALARY, 1.05) 44100.00 (in DECIMAL(11,2) format, the result of multiplying salary 42000.00)

Page 41: DB2 Reference Guide 2up Letter

SQL CA Reference Guide SQL Functions

1-32 © 2002 Computer Associates International

NEXT_DAY(date-expression, expression) NEXT_DAY(CURRENT DATE, ‘MON’)

2002-12-09-00.00.00.000000 (returns a timestamp that represents the first weekday, named by ‘MON’ , that is later than the CURRENT DATE of ‘2002-12-08’)

NULLIF(expression, expression) NULLIF(500-50, 450) NULL

(if the value of two arguments are not equal, the value of the first argument is returned.)

POSSTR(source-string, search-string) POSSTR(LASTNAME, ‘M’) 3

(in INTEGER format returning the starting position of the first occurrence of search-string, ‘M’ within source-string, LASTNAME value ‘YAMAMOTO’.)

POWER(expression1, expression2) POWER (INT1, INT2) 16

(in INTEGER format returning the value of INT1, value 2, raised to the power of INT2, value 4.)

QUARTER(expression) QUARTER (HIREDATE) 2

(in INTEGER format returning a number 1 to 4 representing the quarter of the year the date HIREDATE, value ‘1972-06-19’ occurs.)

RADIANS(expression) RADIANS (ANGLE)

+0.1723781975554568E-01 (in double precision floating-point format returning the number of radians of ANGLE value .9765432 expressed in degrees.)

RAISE_ERROR (sqlstate, diagnostic_string) select empo,

case when sex = ‘m’ then ‘male’ when sex = ‘f’ then ‘female’ else raise_error (‘71001’,’no gender’) ‘SQLCODE = -438, ERROR: APPLICATION RAISED ERROR WITH DIAGNOSTIC TEXT: no gender’ (in CHAR or VARCHAR format)

RAND ({expression}) RAND( ) +0.3763304037863064E+00

(in double precession floating-point format returning a random number between 0 and 1. If the optional seed value is used it must range from 0 to 2147483646.)

REAL ([ numeric-expression | string-expression ]) Real( EMPNO) +0.300000000E+03

(in simple precision floating-point returning the value of EMPNO, data type CHAR(6) value‘000300‘.)

REPEAT (expression, integer) REPEAT (FIRSTNAME, 2) PHILIPPHILIP

(in VARCHAR format returning the value of FIRSTNAME, value ‘PHILIP‘ repeated 2 times.)

Page 42: DB2 Reference Guide 2up Letter

For DB2 UDB for z/OS and OS/390 SQL SQL Functions

© 2002 Computer Associates International 1-33

REPLACE (expression1,expression2,expression3) REPLACE (JOB,’REP’, ‘SALES’)

FIELDSALES (in VARCHAR format returning the value for JOB with value ‘FIELDREP‘ having replaced all occurrences of ‘REP‘ with ‘SALES‘. If ‘REP‘ were not found the value of JOB would be returned unchanged.)

RIGHT (string, integer) RIGHT (WORKDEPT,2) 21

(in CHAR format returning the 2 right most characters of WORKDEPT, data type CHAR(3) value ‘E21‘.)

ROUND(expression1,expression2) ROUND (MIN(SALARY)/12,2 1278.33000000

(in DECIMAL (15,8) format, returning MIN(SALARY) /12, value 1278.33333333 data type, DEC (15,15-7) rounded to 2 places right of the decimal.)

ROUND_TIMESTAMP(timestamp-expression) {,format-string}

ROUND_TIMESTAMP((CURRENT TIMESTAMP) 2002-12-09-00.00.00.000000 (returns a timestamp, rounded to the unit specified by the format-string. If format- string is not specified, the current timestamp of ‘2002-12-08-14.28.49.179227 is rounded to the nearest day, as if ’DD’ is specified for format-string.

ROWID(expression) SELECT EMPNO

FROM EMP WHERE EMP_ROWID = ROWID (X’4000000038000104000 F02010000000000021C’) ‘000300’ (casts the value of the input expression as a rowid)

RTRIM(expression) RTRIM(JOB) ’CLERK’

(in VARCHAR format returning JOB, value ‘CLERK bbb‘ without the trailing blanks. Synonymous with STRIP (JOB,T).)

SECOND(expression) SECOND(081500.) 0

(in INTEGER format)

SIGN(expression) SIGN(BONUS) -1.00

(in DECIMAL format returning an indicator of the sign for BONUS, value –1000.00. Indicator values are: -1 for <0, 0 for 0, and 1 for > 0.)

SIN(expression) SIN(ANGLE) +0.8347366289524786E+00

(in double precision floating-point format returning the sine of ANGLE, value .98765432.)

Page 43: DB2 Reference Guide 2up Letter

SQL CA Reference Guide SQL Functions

1-34 © 2002 Computer Associates International

SINH(expression) SINH(ANGLE) +0.1156239890739822E+01

(in double precision floating-point format returning the hyperbolic sine of ANGLE, value .98765432.)

SMALLINT([ numeric-expression | string-expression ]) SMALLINT(BONUS/12) 33

(in SMALLINT format returning a small integer representation of BONUS/12, value 33.33333333, using truncation.)

SPACE(expression) SPACE(LENGTH(LASTNAME)) ‘ ’

(in VARCHAR format returning a SBCS string of blanks for the length of LASTNAME, value ‘SMITH’.)

SQRT(expression) SQRT(EDLEVEL)

+0.3741657386773941E+01 (in double precision floating-point format returning the square root of EDLEVEL, value 14.)

STRIP(expression, {B | L | T},{strip-character}) STRIP(REMARKS, L, ‘*’) ‘NEW PROD’

(in a string expression, returns the value ‘NEW PROD’ from a value of ‘**NEW PROD’ in the REMARKS column. If the second argument is omitted, the strip-character is removed from the beginning and the end, if third argument is omitted, a blank is assumed.)

SUBSTR(expression, start{,length} ) SUBSTR(DESCRIP,1,6) ‘FURNIS’

(in CHAR(6) format, if DESCRIP contains the value ‘FURNISHINGS’)

TAN(expression) TAN(ANGLE) +0.151591308540088E+01

(in double precision floating-point format returning the target of ANGLE, value .98765432.)

TANH(expression) TANH(ANGLE) +0.7563603426340487E+00

(in double precision floating-point format returning the hyperbolic target of ANGLE, value .98765432.)

TIME(expression) TIME(‘23.48.12’) + 2 HOURS 01.48.12

(in TIME format)

TIMESTAMP(expression {,expression} ) TIMESTAMP(HIREDATE,‘08.15.00’)

2002-09-12-08.15.00.000000 (in TIMESTAMP format)

TIMESTAMP_FORMAT(string-expression, format-string)

TIMESTAMP_FORMAT(‘2002-12-08 16:10:10’, ‘YYYY-MM-DD HH24:MI:SS’ 2002-12-08-16.10.10.000000 (returns a valid TIMESTAMP, in the only valid string format of ’YYYY-MM-DD HH24:MM:SS’)

Page 44: DB2 Reference Guide 2up Letter

For DB2 UDB for z/OS and OS/390 SQL SQL Functions

© 2002 Computer Associates International 1-35

TRANSLATE( string-expression { ,to-string{ ,from-string {,‘ ’ | ,pad-character} } } )

TRANSLATE(JOB, ‘OUT’, FIELD) ‘OUT REP’ (in CHAR format returning the value of JOB, value ‘FIELDREP’ translating each occurrence of ‘FIELD’ to ‘OUT’ using the default pad character of space .)

[TRUNCATE | TRUNC] (expression1, expression2) TRUNC(MIN(SALARY/12) ,3) 1278.333

(in DECIMAL format returning the value of MIN (SALARY/12) value 1278.33333333 truncated at 3 digits right of the decimal.)

TRUNC_TIMESTAMP (timestamp-expression) {,format-string}

TRUNC_TIMESTAMP (CURRENT TIMESTAMP, ‘YEAR’) 2002-01-01-00.00.00.000000 (returns a timestamp, value from ‘2002-12-08-16.10.10.012000’ truncated to the YEAR unit specified.)

[UCASE | UPPER] (expression) UCASE(LASTNAME) ‘LEE’

(in VARCHAR format returning the value of LASTNAME value ‘lee’ in uppercase.)

[VALUE | COALESCE] (expression, expression,) VALUE(ZIP,‘00000-0000’) ‘00000-0000’

(in ZIP’s format, returning the first non-null value in the list)

VARCHAR(character-expression{,integer}) VARCHAR(JOB,5) ‘CLERK’

(in VARCHAR format returning the value of JOB, data type CHAR(8), value ‘CLERK’. For JOB with length greater than 5 a warning message is returned.)

VARCHAR(data-time-expression) VARCHAR(HIREDATE) ‘2000-07-07’

(in install or precompiler option DATE FORMAT returning a varying-length string representation of HIREDATE data type DATE, value ‘2000-07-07’.)

VARCHAR(integer-expression) VARCHAR(EDLEVEL) ‘14’

(in VARCHAR format returning the character string representation of EDEVEL data type SMALLINT, value 14.)

VARCHAR(decimal-expression {,decimal-character}) VARCHAR(SALARY,’ , ’ ) ‘17750,35’

(in VARCHAR format returning the character representation of SALARY DEC(9,2) value 17750.00 substituting ‘ , ’ for the default period decimal marker.)

VARCHAR(floating-point-expression) VARCHAR(XCOORD ) ‘2.0E0’

(in VARCHAR format the character representation of XCOORD data type DOUBLE value2.)

VARCHAR(rowid-expression) VARCHAR(EMP_ROWID ) ‘……………..’

(in VARCHAR format returning a bit string that does not have an associated CCSID.)

Page 45: DB2 Reference Guide 2up Letter

SQL CA Reference Guide SQL Functions

1-36 © 2002 Computer Associates International

VARCHAR_FORMAT(timestamp-expression, format-string)

VARCHAR_FORMAT (CURRENT TIME, ’YYYY-MM-DD HH24:MI:SS’) ‘2002-12-08 15:39:53’ (returns a character representation of a timestamp in the format indicated by format-string from the current timestamp value of ‘2002-12-08-15.39.53.012310’.)

VARGRAPHIC(character-expression{,integer} | graphic-expression {,integer}))

HEX(VARGRAPHIC('SCHOOL')) ‘42A242834288429642964293’ (in CHAR(24) format, after translating the CHAR(6) string to its VARGRAPHIC(6) (12-byte) equivalent, then each byte to its two-byte hexadecimal representation)

WEEK(expression) WEEK(HIREDATE) 50

(in INTEGER format returning a value from 1 to 54 representing the week of the year for HIREDATE data type DATE, value ‘2002-12-08’.)

WEEK_ISO(expression) WEEK_ISO(HIREDATE) 49

(in INTEGER format returning a value from 1 to 53 representing the week of the year for ‘2002-12-08’. The week starts with Monday and includes 7 days. Week 1 is the first week of the year to contain a Thursday, which is equivalent to the first week containing January 4.

YEAR(expression) YEAR(BIRTHDATE) 1954

(in INTEGER format)

Page 46: DB2 Reference Guide 2up Letter

For DB2 UDB for z/OS and OS/390 SQL Durations

© 2002 Computer Associates International 1-37

Durations Date Durations

CURRENT DATE – BIRTHDATE 00410508. (in DEC(8,0) format, if born 41 years, 5 months, and 8 days ago)

Time Durations END_TIME – START_TIME 083000.

(in DEC(6,0) format, if eight-and-a-half hours have elapsed)

CURRENT TIMEZONE –060000. (the special register CURRENT TIMEZONE is a time duration in DEC(6,0) format, and the value above is what it would be set to if 6 hours behind GMT)

Timestamp Durations CURRENT TIMESTAMP – CURRENT

TIMEZONE 20020602151500.000000 (in DEC(20,6) format, at 9:30 a.m. on June 2, 2002, if current time zone is 6 hours behind GMT)

Labeled Durations ORDER_DATE + 90 DAYS ‘2002-08-31’

(in DATE format, for orders placed on June 2, 2002)

END_TIME – 8 HOURS ‘09.00.00’ (in TIME format, if end time is 5 p.m.)

CURRENT TIMESTAMP + 1 MICROSECOND one microsecond from now (in TIMESTAMP format)

Page 47: DB2 Reference Guide 2up Letter

SQL CA Reference Guide SQL Reserved Words

1-38 © 2002 Computer Associates International

SQL Reserved Words

Standard Reserved Words:

ADD AFTER ALL ALLOCATE ALLOW ALTER AND ANY APPLICATION AS ASSOCIATE ASUTIME AUDIT AUX AUXILIARY BEFORE BEGIN BETWEEN BUFFERPOOL BY CALL CAPTURE CASCADED CASE CAST CCSID CHAR CHARACTER CHECK CLOSE CLUSTER COLLECTION COLLID COLUMN COMMENT COMMIT CONCAT CONDITION CONNECT CONNECTION CONSTRAINT CONTAINS CONTINUE CREATE COUNT CURRENT CURRENT_DATE CURRENT_LC_

CTYPE CURRENT_PATH CURRENT_TIME CURRENT_TIME-

STAMP CURSOR DATA DATABASE DAY DAYS DBINFO DB2SQL DECLARE DEFAULT

DELETE DESCRIPTOR DETERMINISTIC DISALLOW DISTINCT DO DOUBLE DROP DSNHATTR DSSIZE DYNAMIC EDITPROC ELSE ELSEIF ENCODING END END-EXEC

(COBOL only) ERASE ESCAPE EXCEPT EXECUTE EXISTS EXIT EXTERNAL FENCED FETCH FIELDPROC FINAL FOR FROM FULL FUNCTION GENERAL GENERATED GET GLOBAL GO GOTO GRANT GROUP HANDLER HAVING HOUR HOURS IF IMMEDIATE IN INDEX INHERIT INNER INOUT INSENSITIVE INSERT INTO IS ISOBID JAR JAVA JOIN KEY LABEL

LANGUAGE LC_CTYPE LEAVE LEFT LIKE LOCAL LOCALE LOCATOR LOCATORS LOCK LOCKMAX LOCKSIZE LONG LOOP MICROSECOND MICROSEC-

ONDS MINUTE MINUTES MODIFIES MONTH MONTHS NO NOT NULL NULLS NUMPARTS OBID OF ON OPEN OPTIMIZATION OPTIMIZE OR ORDER OUT OUTER PACKAGE PARAMETER PART PATH PIECESIZE PLAN PRECISION PREPARE PRIQTY PRIVILEGES PROCEDURE PROGRAM PSID QUERYNO READS REFERENCES RELEASE RENAME REPEAT RESTRICT RESULT RESULT_SET_

LOCATOR RETURN RETURNS

Page 48: DB2 Reference Guide 2up Letter

For DB2 UDB for z/OS and OS/390 SQL SQL Reserved Words

© 2002 Computer Associates International 1-39

REVOKE RIGHT ROLLBACK RUN SAVEPOINT SCHEMA SCRATCHPAD SECOND SECONDS SECQTY SECURITY SELECT SENSITIVE SET SIMPLE SOME SOURCE SPECIFIC

STANDARD STATIC STAY STOGROUP STORES STYLE SUBPAGES SYNONYM SYSFUN SYSIBM SYSPROC SYSTEM TABLE TABLESPACE THEN TO TRIGGER UNION

UNIQUE UPDATE USER USING VALIDPROC VALUES VARIANT VCAT VIEW VOLUMES WHEN WHERE WITH WLM YEAR YEARS

Page 49: DB2 Reference Guide 2up Letter

SQL CA Reference Guide Data Types

1-40 © 2002 Computer Associates International

Data Types

Data Type Byte Counts Data Type

Byte Count (add 1 if nulls are allowed)

INTEGER or INT 4 SMALLINT 2

FLOAT(n) or REAL 4 (if n from 1 to 21) 8 (if n from 22 to 53)

DECIMAL(x,y) INTEGER (x/z)+1, where x is the precision CHAR(n) N (max 255)

CLOB 6 VARCHAR(n) n + 2

LONG VARCHAR 2 x (INTEGER(INTEGER(m-i-k)/j)/2) where: m = max row size

i = sum of all not LONG col byte counts j = num of LONG columns in table

k = num of LONG columns that allow nulls DBCLOB 6

BLOB 6 DATE 4 TIME 3

TIMESTAMP 10 GRAPHIC(n) 2n

VARGRAPHIC(n) 2n + 2 LONG VARGRAPHIC (see LONG VARCHAR above)

ROWID 19 DISTINCT TYPE The length of the source data type upon which the

distinct type was based.

Data Conversion

OUTPUT

INPUT

S M A L L I N T

I NTEGER

DECI

MAL

FLOAT

CHAR

VARCHAR

CLOB

GRAPHIC

VARGRAPHIC

DBCLOB

BLOB

DATE

TI

ME

TI

MESTAMP

ROWID

SMALLINT D X X X INTEGER X D X X DECIMAL X X D X FLOAT X X X D CHAR D X X Y Y Y X X CHAR MIXED

D X X Y Y Y X

VARCHAR X D X Y Y Y X X VARCHAR MIXED

X D X Y Y Y X

GRAPHIC Y Y Y D X X VAR-GRAPHIC

Y Y Y X D X

DATE EXTNL

D

TIME EXTNL

D

TIMESTAMP EXTERNAL

X X D

ROWID D

Note: X = allowable data conversion D = allowable data conversion and default is used when input data

type is not specified Y = conversion applies when either the input data or the target

table is Unicode

CLOB, BLOB, and DBCLOB input field types cannot be converted to another field type.

Page 50: DB2 Reference Guide 2up Letter

For DB2 UDB for z/OS and OS/390 Utilities On-line DB2

© 2002 Computer Associates International 2-1

2. Utilities

On-line DB2

DSNU UTILITY (utility-name) INDSN ( data-set-name { ( member-name ) } ) {{ CONTROL ( [ NONE | control-option: ] ) | DB2I ( [ NO | YES ] ) | DISCDSN ( data-set-name) | COPYDSN ( data-set-name) { COPYDSN2 ( data-set-name ) } | RCPYDSN1 ( data-set-name ) { RCPYDSN2 ( data-set-name ) } | RECDSN ( data-set-name) | PUNCHDSN ( data-set-name) | EDIT [ NO | SPF | TSO) ] | RESTART ( [ NO | CURRENT | PHASE | PREVIEW ] ) | SUBMIT ( [ NO | YES | PROMPT ] ) | SYSTEM ([ DSN | subsystem-name | group-attach ]) | UID ( utility-id) | UNIT ( [ SYSDA | unit-name ] ) | VOLUME ( vol-ser) }}

CATMAINT UPDATE

CHECK DATA [[ TABLESPACE {dbname.}tsname {PART integer} ]] { { SCOPE [PENDING | AUXONLY | ALL | REFONLY] | AUXERROR [REPORT | INVALIDATE] | FOR EXCEPTION [ [ IN table-name1 USE table-name2 ] ] {DELETE [NO | YES {LOG [ YES | NO ]}]} | EXCEPTIONS [ 0 | integer ] | ERRDDN [ SYSERR | ddname ] | WORKDDN [ SYSUT1 | ddname ] [ ,SORTOUT | ,ddname2 ] | SORTDEVT device-type | SORTNUM integer }}

CHECK INDEX [ LIST listdef-name | (index-name {PART integer},) | (ALL) TABLESPACE {dbname.}tsname {PART integer} ] {{ WORKDDN [SYSUT1 | ddname] | SORTDEVT device-type | SORTNUM integer }}

CHECK LOB TABLESPACE {dbname.}lob-tsname {EXCEPTIONS [ 0 | integer ]} | {{ WORKDD [ SYSUT1 | ddname1 ] {[ ,SORTOUT | ,ddname2 ] } | SORTDEVT device-type | SORTNUM integer }}

Page 51: DB2 Reference Guide 2up Letter

Utilities CA Reference Guide On-line DB2

2-2 © 2002 Computer Associates International

COPY [[ [LIST listdef-name data-set-spec image-copy-spec | [[ table-space-spec | index-name-spec ] image-copy-spec {DSNUM [ ALL | integer ]} data-set-spec] ] {PARALLEL { (num-objects) }} {TAPEUNITS { (num-tape-units) }} {checkpage}] | [LIST listdef-name data-set-spec | [table-space-spec | index-name-spec] {DSNUM [ ALL | integer ]} data-set-spec] CONCURRENT | [LIST listdef-name | [table-space-spec | index-name-spec] {DSNUM [ALL | integer]} ] data-set-spec FILTERDDN (ddname) CONCURRENT ]] {SHRLEVEL [ REFERENCE | CHANGE ]}

image-copy-spec: {FULL [YES | NO] | CHANGELIMIT{(percent_val1{,percent_val2}) REPORTONLY}

table-space-spec: TABLESPACE (dbname.) tsname

index-name-spec: [INDEXSPACE {dbname.} index-space-name | INDEX {creator-id.} index-name]

data-set-spec: [COPYDDN ([ ddname1 {,ddname2} | ,ddname2 ]) {RECOVERYDDN ( [ddname3 {,ddname4} | ,ddname4] )} | RECOVERYDDN ( [ddname3 {,ddname4} | ,ddname4] )]

COPYTOCOPY [LIST list-def-name from-copy-spec data-set-spec | [ts-num-spec | index-name-spec] from-copy-spec data-set-spec]

ts-num-spec: table-space-spec { DSNUM [ ALL | integer ]

table-space-spec: TABLESPACE { dbname. } tsname

index-name-spec: [ INDEXSPACE { dbname. } indexname | INDEX { creator-id. } index-name ] { DSNUM [ ALL | integer ] }

from-copy-spec: [ FROMLASTCOPY | FROMLASTFULLCOPY | FROMLASTINCRCOPY | FROMCOPY dsn {FROMVOLUME [CATALOG | volser { FROM SEQNO n } ] }]

data-set-spec: [ COPYDDN ( [ ddname1 { ,ddname2 } | ,ddname2 ] ) { RECOVERYDDN ( [ ddname3 { ,ddname4 } | ,ddname4 ] )} | RECOVERYDDN ( [ ddname3 { ,ddname4 } | ,ddname4 ] ) ]

Page 52: DB2 Reference Guide 2up Letter

For DB2 UDB for z/OS and OS/390 Utilities On-line DB2

© 2002 Computer Associates International 2-3

DIAGNOSE [ {{ TYPE (integer,) | ALLDUMPS {( X‘abend code’, )} | NODUMPS {( X‘abend code’, )} | DISPLAY [ OBD {dbname.} tsname {ALL | TABLES | INDEXES} | SYSUTIL | MEPL | AVAILABLE | DBET [DATABASE dbname | TABLESPACE {dbname.} tsname | INDEX index-name] ] | WAIT [[ MESSAGE message-id {INSTANCE integer} | TRACEID [ X‘trace-id’ | integer ] { INSTANCE integer }] ] | ABEND [ MESSAGE message-id {INSTANCE integer} | TRACEID [X‘trace-id’ | integer] {INSTANCE integer} ] {NODUMP} }} | END ]

EXEC SQL [DECLARE cursor-name CURSOR FOR select-statement | non-select dynamic SQL statement] ENDEXEC

dynamic SQL statements: [ ALTER | COMMENT ON | COMMIT | CREATE | DELETE | DROP | EXPLAIN | GRANT | INSERT | LABEL ON | LOCK TABLE | RENAME | REVOKE | ROLLBACK | SET CURRENT DEGREE | SET CURRENT LOCALE LC_TYPE | SET CURRENT OPTIMIZATION HINT | SET PATH | SET CURRENT PRECISION | SET CURRENT RULES | SET CURRENT SQLID | UPDATE ]

LISTDEF list-name [[ [INCLUDE | EXCLUDE] { TABLESPACES | INDEXSPACES { COPY [NO | YES] }} [LIST referenced-listname | [[DATABASE dbname | TABLESPACE {dbname.} tsname | INDEXSPACE { dbname. } index-name | TABLE {creator-id.} table-name | INDEX {creator-id.} index-name ] {PARTLEVEL {( integer )}} ] { RI } { ALL | BASE | LOB } ]]

Page 53: DB2 Reference Guide 2up Letter

Utilities CA Reference Guide On-line DB2

2-4 © 2002 Computer Associates International

LOAD {DATA} [INDDN [SYSREC | ddname] | INCURSOR cursor-name] {PREFORMAT} {{ [{ RESUME NO } {SHRLEVEL NONE} { REPLACE {copy-spec}} {statistics-spec} | RESUME YES { SHRLEVEL [NONE | CHANGE] }] | KEEPDICTIONARY | REUSE | LOG [YES | NO { NOCOPYPEND }] | WORKDDN ([ SYSUT1 | ddname1 ] [ ,SORTOUT | ,ddname2 ]) | SORTKEYS [0 | integer] | FORMAT [UNLOAD | SQL/DS] | FLOAT ([ S390 | IEEE ]) | [EBCDIC | ASCII | UNICODE] | CCSID (integer,) | NOSUBS | ENFORCE [CONSTRAINTS | NO] | ERRDDN [SYSERR | ddname] | MAPDDN [SYSMAP | ddname] | DISCARD [SYSDISC | ddname] | DISCARDS [0 | integer] | SORTDEVT device-type | SORTNUM integer | CONTINUEIF (start { :end }) = [X‘byte-string’ | ‘character-string’] }} [[into-table-spec]]

into-table-spec: INTO TABLE table-name {IGNORE FIELDS [YES | NO]} {{{ PART integer {PREFORMAT} {[RESUME_NO {REPLACE {REUSE} {copy-spec}} | RESUME YES] {KEEPDICTIONARY} [INDDN [SYSREC | ddname] DISCARDDN ddname | INCURSOR cursor-name] } WHEN [SQL/DS = ‘table-name’ | field selection criteria] | (field specification,) }}

statistics-spec: STATISTICS {{ [TABLE {( ALL )}{SAMPLE integer} | TABLE (table-name) {SAMPLE integer} { COLUMN ([ ALL | column-name, ]) }] | INDEX ([ ALL {correlation-stat-spec} | index-name {correlation-stat-spec} ]) | REPORT [NO | YES] | UPDATE [ALL | ACCESSPATH | SPACE | NONE] | HISTORY [ALL | ACCESSPATH | SPACE | NONE] | FORCEROLLUP [YES | NO] }}

correlation-stat-spec: {KEYCARD} {{FREQVAL NUMCOLS [1 | integer] COUNT[10 | integer]}}

field-selection-criterion: [field-name | (start{:end})] = [X‘byte-string’ | ‘character-string’ | G‘graphic-string’ | N‘graphic-string’]

Page 54: DB2 Reference Guide 2up Letter

For DB2 UDB for z/OS and OS/390 Utilities On-line DB2

© 2002 Computer Associates International 2-5

copy-spec: {COPYDDN ([ [SYSCOPY | ddname1] {,ddname2} | ,ddname2 ]) } {RECOVERYDDN (ddname3 { ,ddname4 })}

field-specification: field-name {POSITION ( start {:end} )} { CHAR {MIXED} {( length )} | VARCHAR {MIXED} | GRAPHIC {EXTERNAL} {(length)} | VARGRAPHIC | SMALLINT | INTEGER {EXTERNAL} {( length )} | DECIMAL { PACKED | ZONED | EXTERNAL {( length{,[ 0 | scale ]} )} } | FLOAT {EXTERNAL} {(length)} | DATE EXTERNAL {( length )} | TIME EXTERNAL {( length )} | ROWID | BLOB | CLOB {mixed} | DBCLOB | TIMESTAMP EXTERNAL {( length )} } {NULLIF field-selection-criterion | DEFAULTIF field-selection-criterion}

MERGECOPY [LIST listdef-name | TABLESPACE {dbname.} tsname {DSNUM [ ALL | integer ]} {{ WORKDDN [SYSUT1 | ddname] | NEWCOPY [ {NO} [copyddn-spec | recoveryddn-spec] | YES {copyddn-spec} { recoveryddn-spec }] }}

copyddn-spec: COPYDDN ([ SYSCOPY | ddname1 ] {,ddname2} | ,ddname2)

recoveryddn-spec: RECOVERYDDN (ddname3 { ,ddname4 })

MODIFY RECOVERY [LIST listdef-name | TABLESPACE {dbname.} tsname] {DSNUM [ ALL | integer ]} DELETE [AGE [integer | (*)] | DATE [ integer | (*) ]]

MODIFY STATISTICS [LIST listdef-name | TABLESPACE {dbname.} tsname | INDEXSPACE {dbname.} indexspace-name | INDEX {creator-id.} index-name] DELETE [ALL | ACCESSPATH | SPACE] [AGE [(integer) | ( * )] | DATE [ (integer) | ( * ) ]]

OPTIONS {{ {PREVIEW | LISTDEFDD ddname | TEMPLATEDD ddname | event-spec} } | OFF | KEY key-value}

event-spec: EVENT ([ ITEM ERROR, [HALT | SKIP], | WARNING, [RC4 | RC0 | RC8], ])

QUIESCE [LIST listdef-name | [ TABLESPACE {dbname.}tsname {PART integer} | TABLESPACESET {TABLESPACE} {dbname.} tsname ]] {WRITE [ YES | NO ]}

Page 55: DB2 Reference Guide 2up Letter

Utilities CA Reference Guide On-line DB2

2-6 © 2002 Computer Associates International

REBUILD INDEX [(index-name{PART integer},) | (ALL) TABLESPACE {dbname.}tsname {PART integer}] [LIST listdef-name ] {{REUSE | WORKDDN ([SYSUT1 | ddname) | SORTDEVT device-type | SORTNUM integer | SORTKEYS | STATISTICS {{{REPORT [NO | YES] | UPDATE [ALL | ACCESSPATH | SPACE | NONE] | correlation-stats-spec} | HISTORY [ALL | ACCESSPATH | SPACE | NONE] | FORCEROLLUP [YES | NO] }} }}

correlation-stats-spec: {{KEYCARD | FREQVAL NUMCOLS [1 | integer] COUNT {10 | integer]}}

RECOVER [LIST listdef-name | object {DSNUM [ ALL | integer ] {TORBA x’byte-string | TOLOGPOINT x’byte-string’} {{{REUSE | parallel-spec}} | LOGONLY} | object {DSNUM [ALL | integer] recover-options-spec | object PAGE page-number { CONTINUE }] {LOCALSITE | RECOVERYSITE}

object: [TABLESPACE {dbname.}tsname | INDEXSPACE {dbname.} index-space-name | INDEX {creator-id.} index-name]

parallel-spec: PARALLEL {( num-objects )} {TAPEUNITS { (num-tape-units) }}

recover-options-spec: [TOCOPY data-set-name {TOVOLUME [CATALOG | vol-ser {TOSEQNO integer}] {REUSE}} | TOLASTCOPY {REUSE} | TOLASTFULLCOPY {REUSE} | ERROR RANGE

REORG INDEX [LIST listdef-name | index-name] {{ REUSE | PART integer | [SHRLEVEL NONE | SHRLEVEL[ REFERENCE [ DEADLINE [ NONE | timestamp | label-dur-expression ] drain-spec | SHRLEVEL CHANGE [DEADLINE [NONE | timespace | label-dur-expression] drain-spec change-spec ] }} {{ LEAFDISTLIMIT {200 | integer} | REPORTONLY}} | UNLOAD [CONTINUE {statistics-spec} | PAUSE {statistics-spec} | ONLY ]] | WORKDDN ([ SYSUT1 | ddname ]) | PREFORMAT | FASTSWITCH [YES | NO] }}

drain-spec: {{DRAIN WAIT integer | RETRY integer [RETRY DELAY 300 | RETRY DELAY integer] }}

Page 56: DB2 Reference Guide 2up Letter

For DB2 UDB for z/OS and OS/390 Utilities On-line DB2

© 2002 Computer Associates International 2-7

change-spec: {{MAXRO [300 | integer | DEFER] | DRAIN [WRITERS | ALL] | LONGLOG [CONTINUE | TERM | DRAIN] | DELAY [1200 | integer] | TIMEOUT [ABEND | TERM]}}

label-dur-expression: [CURRENT DATE | CURRENT TIMESTAMP] [+ | -] constant [YEARS{S} | MONTH{S} | DAY{S} | HOUR{S} | MINUTE{S} | SECOND{S} | MICROSECOND{S}]

statistics-spec: STATISTICS {{REPORT [NO | YES] | UPDATE[ALL | ACCESSPATH | SPACE | NONE] | correlation-stats-spec | HISTORY [ALL | ACCESSPATH | SPACE | NONE] | FORCEROLLUP [YES | NO]

correlation-stats-spec: {{KEYCARD | FREQVAL NUMCOLS [1 | integer] COUNT [10 | integer]}}

REORG TABLESPACE [LIST listdef-name | {dbname.} tsname] {{ REUSE | PART [integer | integer1:integer2] | LOG [YES | NO] | SORTDATA | NOSYSREC | SORTKEYS | COPYDDN ([ [SYSCOPY | ddname1] {,ddname2} | ,ddname2]) | RECOVERYDDN (ddname3 { ,ddname4 }) | [SHRLEVEL NONE | SHRLEVEL REFERENCE deadline-spec } | SHRLEVEL CHANGE deadline-spec drain-spec MAPPINGTABLE table-name {{ MAXRO[300 | integer | DEFER] | DRAIN [WRITERS | ALL] | LONGLOG [CONTINUE | TERM | DRAIN] | DELAY[1200 | integer] | TIMEOUT [ ABEND | TERM] }}] | [OFFPOSLIMIT {10 | integer} INDREFLIMIT {10 | integer} {REPORTONLY}] | [ UNLOAD [CONTINUE | PAUSE] {{ KEEPDICTIONARY] | statistic-spec }} | UNLOAD ONLY | UNLOAD EXTERNAL {NOPAD} {{ FROM TABLE table-spec }} ] PUNCHDDN [SYSPUNCH | ddname] | DISCARDDN [SYSDISC | ddname] | reorg-ts-options | DISCARD {NOPAD} [[FROM TABLE table-spec]] }}

drain-spec: {DRAINWAIT integer} {RETRY integer [ RETRY DELAY 300 | RETRY DELAY integer ]}

deadline-spec: DEADLINE [NONE | timestamp | label-dur-expression]

reorg-ts-options: {{ UNLDDN [ SYSREC|ddname] | WORKDDN ([ SYSUT1 | ddname1 ] [,SORTOUT | ,ddname2 ]) | SORTDEVT device-type | SORTNUM integer | PREFORMAT }}

Page 57: DB2 Reference Guide 2up Letter

Utilities CA Reference Guide On-line DB2

2-8 © 2002 Computer Associates International

label-dur-expression: see REORG INDEX

table-spec: table-name {WHEN(selection correlation-spec)}

selection-condition-spec: [predicate | (selection-condition)] {AND | OR {predicate | (selection-condition)}}

predicate: [basic-predicate | BETWEEN predicate | IN predicate | LIKE predicate | NULL predicate]

statistic-spec: See LOAD

REPAIR [{ OBJECT } {LOG [ YES | NO ]} [ set-statement | locate-block], | dbd-statement ]] | level-id-statement ]

set-statement: SET [ TABLESPACE {dbname.}tsname [NOCOPYPEND | NORCVRPEND | NOAUXWARN | NOAUXCHKP | NOCHECKPEND] {PART integer} | INDEX [(index-name {PART integer}) | (ALL) TABLESPACE {dbname.}tsname] [NORCVRPEND | NOCOPYPEND | NORBDPEND | NOCHECKPEND]

locate-block: LOCATE [ [ TABLESPACE {dbname.} tsname [{ PART integer } PAGE [integer | x’byte-string’] | RID x’byte-string’ | KEY literal INDEX index-name] | INDEX index-name {PART integer} PAGE [integer | x’byte-string’] [[ verify-statement | replace-statement | delete-statement | dump-statement ]] ] | TABLESPACE {dbname.} tsname ROWID x’byte-string’ VERSION x’byte-string’ [ delete-statement | dump-statement ]]

verify-statement: VERIFY {OFFSET [0 | integer | X‘byte-string’]} DATA [X‘byte-string’ | ‘character-string’]

replace-statement: REPLACE [ RESET | OFFSET [0 | integer | X‘byte-string’] DATA [X‘byte-string’ | ‘character-string’] ]

delete-statement: DELETE

dump-statement: DUMP{ {{ OFFSET [0 | integer | X‘byte-string’] | LENGTH[X‘byte-string’ | integer] | PAGES[X‘byte-string’ | integer | *] }} | MAP {pages} | DATA {pages} }

dbd-statement: DBD [ DROP DATABASE dbname DBID X‘dbid’ | [TEST | DIAGNOSE | REBUILD] DATABASE dbname {OUTDDN ddname} ]

Page 58: DB2 Reference Guide 2up Letter

For DB2 UDB for z/OS and OS/390 Utilities On-line DB2

© 2002 Computer Associates International 2-9

level-id-statement: LEVELID [TABLESPACE {dbname.}tsname | INDEX index-name] {PART integer}

REPORT [ RECOVERY [ [TABLESPACE [LIST listdef-name | {dbname.}tsname] {INDEX_NONE | INDEX ALL} {info options} ] | [INDEXSPACE [{dbname.}index-space-name | LIST listdef-name] | INDEX [{creator-id.}index-name | LIST listdef-name] ] {{DSNUM [ALL | integer] | CURRENT | SUMMARY | LOCALSITE | RECOVERYSITE | ARCHLOG [1 | 2 | ALL] }}] | TABLESPACESET {TABLESPACE} {dbname.}tsname]

RUNSTATS TABLESPACE [ {dbname.}tsname | LIST listdef-name ] {PART integer} {TABLE ({ALL}) {SAMPLE {25 | integer}} | TABLE (table-name) {SAMPLE{25 | integer} } {COLUMN {(ALL | colname,)} } } {{ INDEX ([ALL| {creator-id.} index-name { PART integer }] {correlation-stat-spec} {{SHRLEVEL [REFERENCE | CHANGE] | REPORT [NO | YES] | UPDATE [ALL | ACCESSPATH | SPACE | NONE] | HISTORY [ALL | ACCESSPATH | SPACE | NONE] | FORCEROLLUP [ YES | NO ]

correlation-stats-spec: {{ KEYCARD | FREQVAL NUMCOLS [1 | integer] COUNT [10 | integer] }}

RUNSTATS INDEX [LIST listdef-name | ({creator-id.} index-name {PART integer} {correlation-stat-spec},) | (ALL) TABLESPACE {dbname.} tsname {correlation-stat-spec}] {{SHRLEVEL [REFERENCE | CHANGE] | REPORT [NO | YES] | UPDATE [ALL | ACCESSPATH | SPACE | NONE] | HISTORY [ ALL | ACCESSPATH | SPACE | NONE] FORCEROLLUP [YES | NO ] }}

correlation-stat-spec: see RUNSTATS TABLESPACE

STOSPACE STOGROUP ([stogroup-name, | *])

TEMPLATE template-name {common-options} {disk-options | tape-options}

common-options: {{ UNIT [SYSALLDA | name] | DSN name-expression | MODELDCB dsname | BUFNO [30 | integer] | DATACLAS name | MGMTCLAS name | STORCLAS name | [ RETPD integer | EXPDL ’date’ ] | VOLUMES (volser,) | VOLCNT integer | GDGLIMIT [ integer | 99 ] | DISP ([ NEW | OLD | SHR | MOD ] , [DELETE | KEEP | CATLG | UNCATLG] , [ DELETE | KEEP | CATLG | UNCATLG ]) | UNCUT integer }}

Page 59: DB2 Reference Guide 2up Letter

Utilities CA Reference Guide On-line DB2

2-10 © 2002 Computer Associates International

disk-options: {{ SPACE {( primary, secondary )} [CYL | TRK | MB] | PCTPRIME [integer | 100] | MAXPRIME integer | NBRSECND [10 | integer ] }}

tape-options: {{ STACK [YES | NO] | JES3DD ddname | TRTCH [NONE | COMP | NOCOMP] }}

UNLOAD [DATA from-table-spec {{ from-table-spec }} | source-spec {{ from-table-spec }} | LIST listdef-name ] unload-spec

from-table-spec: FROM TABLE table-name {HEADER OBID | HEADER [ NONE | CONST ['string' | X'hex-string] ]} {{ SAMPLE decimal | LIMIT integer | (field-specification,) | WHEN (selection-condition) }}

field-specification: field-name {{ POSITION (*) | POSITION (start )} | CHAR {( length )} {TRUNCATE} | VARCHAR {( length )} {STRIP {BOTH | TRAILING | LEADING} { 'strip-char '| X'strip-char ' }} {TRUNCATE} | GRAPHIC{EXTERNAL} {(length )} {TRUNCATE} | VARGRAPHIC {( length )} STRIP { BOTH | TRAILING | LEADING} {X'strip-char '} {TRUNCATE} | SMALLINT | INTEGER {EXTERNAL { (length) }} | DECIMAL {PACKED | ZONED | EXTERNAL} {( length { , [0 | scale] }) | FLOAT {EXTERNAL} {( length )} | DOUBLE | REAL | DATE EXTERNAL {( length )} | TIME EXTERNAL {( length )} | TIMESTAMP EXTERNAL {( length )} | CONSTANT [ 'string ' | X'hex-string ' ] | ROWID | BLOB {( length )} {TRUNCATE} | CLOB {( length )} {TRUNCATE} DBCLOB {( length )} { TRUNCATE }}

source-spec: TABLESPACE {dbname.} tsname {PART [ integer | int1:int2 ]} {[FROMCOPY data-set-name {FROMVOLUME [CATALOG | vol-ser ]} | FROMCOPYDDN ddname ] }

Page 60: DB2 Reference Guide 2up Letter

For DB2 UDB for z/OS and OS/390 Utilities On-line DB2

© 2002 Computer Associates International 2-11

unload-spec: {{ {PUNCHDDN SYSPUNCH | PUNCHDDN [ ddname | template-name ]} | {UNLDDN SYSREC | UNLDDN [ ddname | template-name ]} | {EBCDIC | ASCII | UNICODE} | CCSID(integer,) | NOSUBS | NOPAD | {FLOAT S390 | FLOAT IEEE} | {MAXERR 1 | MAXERR integer} | {SHRLEVEL CHANGE ISOLATION CS | SHRLEVEL [ CHANGE ISOLATION UR | REFERENCE ]} }}

Page 61: DB2 Reference Guide 2up Letter

Utilities CA Reference Guide Stand-Alone Utilies

2-12 © 2002 Computer Associates International

Stand-Alone Utilities

DSNJLOGF (Preformat Active Log) //EXEC PGM=DSNJLOGF

DSNJU003 (Change Log Inventory)

NEWLOG statement: NEWLOG DSNAME=data-set-name [new-active-log | new-archive-log] {STARTIME=startime,ENDTIME=endtime}

new-active-log: [,COPY1 | ,COPY2] {,STARTRBA=startrba,ENDRBA=endrba}

new-archive-log: {[ ,COPY1VOL | ,COPY2VOL ]=vol-id ,STARTRBA=startrba,ENDRBA=endrba ,UNIT=unit-id} {,CATALOG=[NO | YES]} {STRTLRSN=strtlrsn, ENDLRSN=endlrsn}

DELETE statement: DELETE DSNAME=data-set-name {[ ,COPY1VOL | ,COPY2VOL ]=vol-id}

CRESTART statement: CRESTART [CREATE create-spec | CANCEL]

create-spec: { {,STARTRBA=startrba} {,ENDRBA=endrba} | ,ENDLRSN=endlrsn} { ,CHKPTRBA=chkptrba } { { ,FORWARD=[YES | NO] } {,BACKOUT=[YES | NO] } | ,CSRONLY}

NEWCAT statement: NEWCAT VSAMCAT=catalog-name

DDF statement: DDF [[ [LOCATION=location-name | LUNAME=luname | [PASSWORD=password | NOPASSWD ] | [GENERIC=gluname | NGENRIC] | {PORT=port} | RESPORT=resport ]]

CHECKPT statement: CHECKPT STARTRBA=startrba [,ENDRBA=endrba ,TIME=time {,ENDLRSN= endlrsn} | ,CANCEL]

HIGHRBA statement: HIGHRBA [ STARTRBA=startrba {,OFFLRBA=offlrba} ,TIME=time | OFFLRBA=offlrba ]

DSNJU004 (Print Log Map) // EXEC PGM=DSNJU004 {MEMBER [ * | DDNAME | (member-name,) ]}

Page 62: DB2 Reference Guide 2up Letter

For DB2 UDB for z/OS and OS/390 Utilities Stand-Alone Utilities

© 2002 Computer Associates International 2-13

DSN1CHKR {PARM={DUMP | FORMAT | HASH(hex-constant,) | MAP=[ANCHOR(id,integer,.) | RID(integer,hex-constant,.) | HASH(hex-constant,integer,.) | PAGE(integer,hex-constant,.)] } }

DSN1COMP {{{ 32K | PAGESIZE( [4K | 8K | 16K | 32K] )} | {DSSIZE(integer G) | LARGE} | NUMPARTS {integer} | FREEPAGE(integer) | PCTFREE(integer) | FULLCOPY | REORG | ROWLIMIT(integer) | MAXROWS(integer)}}

DSN1COPY {{ CHECK | [32K | PAGESIZE ( [4K | 8K | 16K | 32K] )] [FULLCOPY | INCRCOPY | SEGMENT | INLCOPY] | [DSSIZE (integer G) | LARGE | LOB] | NUMPARTS (integer) | PRINT {( hex-constant,hex-constant )} | PIECESIZ (integer [K | M | G] ) | VALUE ([ string | hex-string ]) | OBIDXLAT | RESET }}

DSN1LOGP {{ [{ RBASTART ( hex-constant ) } {RBAEND ( [FFFFFFFFFFFF | hex-constant] )} | LRSNSTART (hex-constant) {LRSNEND ( [ FFFFFFFFFFFF | hex-constant ] )} ] | DATAONLY([NO | YES]) | SYSCOPY([NO | YES]) | DBID(hex-constant) | OBID(hex-constant) | [[PAGE(hex-constant)]] | [[RID(hex-constant)]] | [[URID (hex-constant)]] | [[LUWID(luwid)]] | [TYPE(hex-constant) | SUBTYPE(hex-constant) {value/offset –statement} ] | SUMMARY([ NO |YES |ONLY ]) {FILTER} }}

value/offset-statement: VALUE/OFFSET {VALUE(hex-constant) OFFSET(hex-constant)}

DSN1PRNT {{ [32K | PAGESIZE ( [4K | 8K | 16K | 32K] )] | [FULLCOPY | INCRCOPY | INLCOPY] | [DSSIZE (integer G) | LARGE | LOB ] | NUMPARTS (integer) | [PRINT (hex-constant,hex-constant) | PIECESIZ (integer [K | M | G ]) | VALUE ([ string | hex-constant ]) | FORMAT {EXPAND { SWONLY }} }}

DSN1SDMP START TRACE (trace-parameters) {SELECT [ [ function,offset,data-spec,] ]} {ACTION ( action (abend-code) )} {AFTER ( [ 1 | integer ] )} {FOR ( [ 1 | integer ] )}

Page 63: DB2 Reference Guide 2up Letter

Utilities CA Reference Guide Authorities Required

2-14 © 2000 Computer Associates International

Authorities Required Utility Authorization Required CATMAINT Installation SYSADM CHECK SYSADM, SYSCTRL, DBADM, DBCTRL,

DBMAINT, or STATS COPY or COPYTOCOPY

SYSADM, SYSCTRL, DBADM, DBCTRL, DBMAINT, or IMAGCOPY

DIAGNOSE SYSADM, SYSCTRL, DBADM, DBCTRL, or REPAIR

DSNJU003 Data set access DSNJU004 Data set access DSN1CHKR Data set access DSN1COMP Data set access DSN1COPY Data set access DSN1LOGP Data set access DSN1PRNT Data set access DSN1SDMP SYSADM,SYSOPR, TRACE, MONITOR1, or

MONITOR2 EXEC SQL None for stmt, but EXECUTE IMMEDIATE

authority needed LISTDEF SELECT on SYSINDEXES, SYSTABLES,

SYSTABLESPACE and to run utility LOAD SYSADM, SYSCTRL, DBADM, DBCTRL, or

LOAD, or Table Ownership MERGECOPY SYSADM, SYSCTRL, DBADM, DBCTRL,

DBMAINT, or IMAGCOPY MODIFY RECOVERY

SYSADM, SYSCTRL, DBADM, DBCTRL, DBMAINT, or IMAGCOPY

MODIFY STATISTICS

SYSADM, SYSCTRL, DBADM, DBCTRL. DBMAINT

OPTIONS No privileges needed QUIESCE SYSADM, SYSCTRL, DBADM, DBCTRL,

DBMAINT, or IMAGCOPY REBUILD SYSADM, SYSCTRL, DBCTRL, DBADM,

RECOVERDB RECOVER SYSADM, SYSCTRL, DBADM, DBCTRL, or

RECOVERDB REORG SYSADM, SYSCTRL, DBADM, DBCTRL, or

REORG REPAIR SYSADM, SYSCTRL, DBADM, DBCTRL, or

REPAIR REPORT SYSADM, SYSCTRL, DBADM, DBCTRL, or

RECOVERDB RUNSTATS SYSADM, SYSCTRL, DBADM, DBCTRL,

DBMAINT, or STATS STOSPACE SYSADM, SYSCTRL, or STOSPACE TEMPLATE No privileges needed UNLOAD SELECT on table or DBADM for DB or

SYSADM, SYSCTRL

Page 64: DB2 Reference Guide 2up Letter

Computer Associates Table of Contents

© 2002 Computer Associates International 2-15

Page 65: DB2 Reference Guide 2up Letter

For DB2 UDB for z/OS and OS/390 Commands DB2 Commands

© 2002 Computer Associates International 3-1

3. Commands

DB2 Commands

-ALTER BUFFERPOOL(bpname) {{ VPSIZE(integer) | VPTYPE ([ PRIMARY | DATASPACE ]) | HPSIZE (integer) | VPSEQT(integer) | VPPSEQT(integer) | VPXPSEQT (integer) | HPSEQT(integer) | DWQT(integer) | VDWQT(integer1,integer2) | CASTOUT(YES | NO) | PGSTEAL ([ LRU | FIFO ] )}}

-ALTER GROUPBUFFERPOOL (gbpname | structure-name) {{GBPCACHE(YES | NO) | AUTOREC (YES | NO) | RATIO(ratio) | CLASST(integer) | GBPOOLT(integer) | GBPCHKPT(integer) }}

-ALTER UTILITY (utility-id) REORG {{DEADLINE (NONE | timestamp) | MAXRO (integer | DEFER) | LONGLOG (CONTINUE | TERM | DRAIN) | DELAY (integer) }}

-ARCHIVE LOG { SCOPE(MEMBER) | SCOPE(GROUP) | MODE(QUIESCE) {TIME(nnn )} {WAIT(NO | YES )} | CANCEL OFFLOAD }

-CANCEL [ THREAD(token) | DDF THREAD(luwid | token) ] {DUMP} {NOBACKOUT}

-DISPLAY ARCHIVE

-DISPLAY BUFFERPOOL { (ACTIVE) | (*) | (bpname, )} {{ DETAIL(INTERVAL | *) | LIST(ACTIVE | *) | LSTATS (ACTIVE | *) | DBNAME([ * | dbname, | dbname1:dbname2 | dbname* ]) | SPACENAM([ * | spacename, | spacename1:spacename2 | name* ]) | CASTOWNR(YES | NO) GBPDEP(YES | NO) }}

-DISPLAY DATABASE ([ dbname, | * | dbname1:dbname2 | dbname* | *dbname | *dbname* | *dbstring1*dbstring2* ]) {{USE | CLAIMERS | LOCKS | LPL | WEPR} | {{ SPACENAM([ spacename, | * | spacename1:spacename2 | spacename* | *spacename | *spacename* | *spacestring1*spacestring2* ]) {USE | CLAIMERS | LOCKS | LPL | WEPR} {ONLY}} | ONLY} {{PART([ integer, | integer1:integer2 ]) | LIMIT([ 50 | integer | * ]) | AFTER | ADVISORY ({ ICOPY, | AUXW}) | ACTIVE | RESTRICT ({ACHKP, | CHKP | COPY | GRECP | LPL | RBDP | RECP | REORP | RO | STOP | UT | UTRO | UTRW | UTUT | UT* | WEPR} )}}

-DISPLAY DDF {DETAIL}

-DISPLAY FUNCTION SPECIFIC {( *.*) | (schema.specific-function-name, | schema.partial-name*, )} {SCOPE(LOCAL | GROUP )}

-DISPLAY GROUP {DETAIL}

Page 66: DB2 Reference Guide 2up Letter

Commands CA Reference Guide DB2 Commands

3-2 © 2002 Computer Associates International

-DISPLAY GROUPBUFFERPOOL {{[ (*) | ([ gbpname | structure-name],)] | TYPE(* | GCONN | MCONN) | NOCACHE) | MDETAIL(INTERVAL | *) | GDETAIL(INTERVAL | *) | CONNLIST(NO | YES) }}

-DISPLAY LOCATION {( *) | ([ location-name | partial-location* | <luname> | ipaddr], )} {DETAIL}

-DISPLAY LOG -DISPLAY PROCEDURE

{( *.*) | [([ (schema.procedure-name), | schema.partial-name*, | procedure-name, | partial-name*, ] )} {SCOPE(LOCAL | GROUP )}

-DISPLAY RLIMIT

-DISPLAY THREAD {( [ connection-name | partial-connection*],) | (* )} {TYPE([ ACTIVE | INDOUBT | * | INACTIVE | POSTPONED ] )} {LOCATION[([ location-name | partial-location*],) | (*)] | LUWID([ luwid | partial-luwid* | token],) } {DETAIL} {RRSURID [(rrs-urid,) | (*) ]} {SCOPE(MEMBER | GROUP )}

-DISPLAY TRACE {( * | PERFM | ACCTG | STAT | AUDIT | MONITOR )} {DEST([ GTF | SMF | SRV | OPn], )} {{ PLAN([ * | plan-name, ]) | AUTHID([ * | auth-id, ]) | CLASS([ * | integer, ]) | TNO([ * | integer, ]) | LOCATION([ * | location-name, | <luname> | nnn.nnn.nnn.nnn ] )}} {DETAIL(output-type )} {COMMENT(string )} {SCOPE(LOCAL | GROUP )}

-DISPLAY UTILITY([ utility-id | partial-id* | * ]) {MEMBER(member-name, )}

-MODIFY TRACE ([ PERFM | ACCTG | STAT | AUDIT | MONITOR ]) CLASS([ * | integer, ]) TNO(integer) IFCID([ * | ifcid-nbr, ]) {COMMENT(string )}

-RECOVER BSDS

-RECOVER INDOUBT {connection-name} ACTION([ COMMIT | ABORT ]) [ ID([ correlation-id, | * ]) | NID(network-id,) | LUWID([ luwid | token],) ]

-RECOVER POSTPONED {CANCEL}

-RESET GENERICLU [ ([ luname | netid.luname],) | (*) ]

-RESET INDOUBT [ LUNAME([ luname, | * ]) {FORCE} | LOCATION(location-name,) | IPADDR ([ nnn.nnn.nnn.nnn:port, | * ]) {FORCE} | LUWID([ luwid | token],) {LOCATION(location-name )} ]

Page 67: DB2 Reference Guide 2up Letter

For DB2 UDB for z/OS and OS/390 Commands DB2 Commands

© 2002 Computer Associates International 3-3

-SET ARCHIVE { DEFAULT | {COUNT(integer )} {TIME([ minutes{,seconds} | ,seconds | 1440 | NOLIMIT ] )} }

-SET LOG [CHKTIME(integer) | SUSPEND | LOGLOAD(integer) | RESUME]

-SET SYSPARM [LOAD(DZNPARM | load-module-name) | RELOAD | STARTUP]

-START DATABASE([ dbname, | * | dbname1:dbname2 | dbname* | *dbname | *dbname* | *dbstring1*dbstring2* ]) {SPACENAM([ * | space-name, | spacename1:spacename2 | spacename* | *spacename | *spacename* | *spacestring1*spacestring2 ]) {PART([ integer, | integer1:integer2 ] )} {ACCESS([ RW | RO | UT | FORCE ] )}

-START DB2 {{ PARM([ DSNZPARM | module-name ]) | ACCESS([ * | MAINT ]) | LIGHT(NO | YES) | MSTR(jcl-substitution) | DBM1(jcl-substitution) | DIST(jcl-substitution) }}

-START DDF

-START FUNCTION SPECIFIC {( *.* | schema.specific-function-name, | schema.partial-name*, )} {SCOPE(LOCAL | GROUP )}

-START PROCEDURE {( *.* | schema.procedure-name, | schema.partial-name*, | procedure-name, | partial-name*, )} {SCOPE(LOCAL | GROUP )}

-START RLIMIT {ID=id}

-START TRACE ([ PERFM | ACCTG | STAT | AUDIT | MONITOR ]) {DEST([ GTF | SMF | SRV | OPn | OPX], )} {{ PLAN([ * | plan-name, ]) | AUTHID([ * | auth-id, ]) | CLASS([ * | integer, ]) | IFCID ([ * | ifcid-nbr, ]) | BUFSIZE([ * | k-bytes ]) | TDATA([ CORRELATION | TRACE | CPU | DISTRIBUTED],) | LOCATION([ * | location-name, | <luname> | ipaddr ] )}} {COMMENT (string )} {SCOPE(LOCAL | GROUP )}

-STOP DATABASE ([ dbname, | * | dbname1:dbname2 | dbname* | *dbname | * dbname* | *dbstring1*dbstring2* ]) {SPACENAM([ * | space-name, | spacename1:spacename2 | spacename* | *spacename | * spacename* | *spacestring1*spacestring2* ]) {PART([ integer, | integer1:integer2 ] )}} {AT(COMMIT )}

-STOP DB2 {MODE([ QUIESCE | FORCE ] )} {CASTOUT([ YES | NO ] )}

Page 68: DB2 Reference Guide 2up Letter

Commands CA Reference Guide DB2 Commands

3-4 © 2002 Computer Associates International

-STOP DDF {MODE[(QUIESCE) | (FORCE) | (SUSPEND) [CANCEL(n) | WAIT(n) ] ]}

-STOP FUNCTION SPECIFIC {( *.* | schema.specific-function-name, | schema.partial-name*, )} {ACTION(QUEUE | REJECT )} {SCOPE(LOCAL | GROUP )}

-STOP PROCEDURE {( *.* | schema.procedure-name, | schema.partial-name*, | procedure-name, | partial-name*, )} {ACTION(QUEUEIREJECT )} {SCOPE(LOCAL | GROUP )}

-STOP RLIMIT

-STOP TRACE ([ PERFM | ACCTG | STAT | AUDIT | MONITOR | * ]) {DEST([ GTF | SMF | SRV | OPn], )} {{ PLAN([ * | plan-name, ]) | AUTHID([ * | auth-id, ]) | CLASS([ * | integer, ]) | TNO([ * | integer, ]) | LOCATION([ * | location-name, | <luname> | ipaddr ] )}} {COMMENT(string )} {SCOPE(LOCAL | GROUP )}

-TERM UTILITY([ utility-id | partial-utility-id* | * ])

Page 69: DB2 Reference Guide 2up Letter

For DB2 UDB for z/OS and OS/390 Commands DSN Commands

© 2002 Computer Associates International 3-5

DSN Commands BIND PACKAGE({location-name.}collection-id)

{{ OWNER(auth-id) | QUALIFIER(qualifier-name) }} [ MEMBER(dbrm-member-name) {LIBRARY(dbrm-pds-name )} | COPY(collection-id.package-id) {COPYVER(version-id )} | {OPTIONS([ COMPOSITE | COMMAND ] )} {{DEFER(PREPARE) | NODEFER(PREPARE) | ACTION[(REPLACE) {REPLVER(version-id )} | (ADD)] | CURRENTDATA([ YES | NO ]) | DBPROTOCOL ([ DRDA | PRIVATE ]) | DEGREE([ 1 | ANY ]) | DYNAMICRULES([ RUN | BIND | DEFINEBIND | DEFINERUN | INVOKEBIND | INVOKERUN ]) | IMMEDWRITE([ NO | PH1 | YES ]) | [ ENABLE(*) | [ENABLE | DISABLE] ([ BATCH | DLIBATCH | DB2CALL | CICS | IMS | IMSBMP | IMSMPP | REMOTE | RRSAF],)] {{ DLIBATCH(connection-name,) | CICS(applid,) | IMSBMP(imsid,) | IMSMPP(imsid,) | REMOTE ([ location-name | <luname>],) }} | ENCODING ([ ASCII | EBCDIC | UNICODE | ccsid ]) | EXPLAIN ([ NO | YES ]) | FLAG([ I | W | E | C ]) | ISOLATION ([ RR | RS | CS | UR | NC ]) | KEEPDYNAMIC ([ NO | YES ]) | RELEASE ([ COMMIT | DEALLOCATE ]) | {NOREOPT(VARS) | REOPT(VARS )} | PATH ([ schema-name, | USER, ]) | OPTHINT(‘hint-id’) | SQLERROR([ NOPACKAGE | CONTINUE ]) | VALIDATE([ RUN | BIND ]) }}

Page 70: DB2 Reference Guide 2up Letter

Commands CA Reference Guide DSN Commands

3-6 © 2002 Computer Associates International

BIND {PLAN(plan-name )} {{ OWNER(auth-id) | QUALIFIER(qualifier-name) }} [[ MEMBER(dbrm-member-name,) {LIBRARY (dbrm-pds-name, )} | PKLIST({location-name. | *.} [collection-id | *].[package-id | *],) ]] {NODEFER(PREPARE) | DEFER(PREPARE )} {{ ACQUIRE([ USE | ALLOCATE ]) | ACTION [(REPLACE) {RETAIN} | (ADD)] | CACHESIZE (decimal-value) | CURRENTDATA([ YES | NO ]) | CURRENTSERVER(location-name) | DBPROTOCOL ([ DRDA | PRIVATE ]) | DEGREE([ 1 | ANY ]) | DISCONNECT([ EXPLICIT | AUTOMATIC | CONDITIONAL ]) | DYNAMICRULES ([ RUN | BIND ]) | [ ENABLE(*) | [ENABLE | DISABLE] ([ BATCH | DLIBATCH | DB2CALL | CICS | IMS | IMSBMP | IMSMPP | RRSAF],)] {{ DLIBATCH(connection-name,) | CICS(applid,) | IMSBMP(imsid,) | IMSMPP(imsid,) }} | ENCODING ([ ASCII | EBCDIC | UNICODE | ccsid ]) | EXPLAIN ([ NO | YES ]) | FLAG([ I | W | E | C ]) | IMMEDWRITE ([ NO | PH1 | YES ]) | ISOLATION([ RR | RS | CS | UR ]) | KEEPDYNAMIC([ NO | YES ]) | RELEASE ([ COMMIT | DEALLOCATE ]) | {NOREOPT(VARS) | REOPT(VARS )} | PATH([ schema-name, | USER, ]) | OPTHINT (‘hint-id’) | SQLRULES ([ DB2 | STD ]) | VALIDATE([ RUN | BIND ]) }}

DCLGEN TABLE ([ table-name | view-name ]) {OWNER(owner-name )} {AT(location-name )} LIBRARY(library-name {( member-name )} {/password} ) {{ ACTION([ ADD | REPLACE ]) | LANGUAGE ([ COBOL | PLI | C | COB2 | IBMCOB | CPP ]) | NAMES(prefix) | STRUCTURE(structure-name) | {APOST | QUOTE} | LABEL([ NO | YES ]) | DBCSSYMBOL([ G | N ]) | DBCSDELIM([ YES | NO ]) | COLSUFFIX([ NO | YES ]) | INDVAR([ NO | YES ]) }}

END

FREE PACKAGE [ ({location-name.}[collection-id | *].[package-id | *] {.(version-id | * )},) | (*) ] {FLAG([ I | W | E | C ] )}

FREE PLAN([ plan-name, | * ]) {FLAG[I | W | E | C ]}

Page 71: DB2 Reference Guide 2up Letter

For DB2 UDB for z/OS and OS/390 Commands DSN Commands

© 2002 Computer Associates International 3-7

REBIND PACKAGE [ ({location-name.}[collection-id | *].[package-id | *] {.([ version-id | * ]),} | (*) ) {{ OWNER(auth-id) | QUALIFIER(qualifier-name) | CURRENTDATA ([ YES | NO ]) | DBPROTOCOL ([ DRDA | PRIVATE ]) | DEFER(PREPARE) | NODEFER(PREPARE) | DEGREE([ 1 | ANY ]) | DYNAMICRULES ([ RUN | BIND | DEFINE | INVOKE ]) | [ENABLE(*) | [ENABLE | DISABLE] ([ BATCH | DLIBATCH | DB2CALL | CICS | IMS | IMSBMP | IMSMPP | REMOTE | RRSAF],) ] {{ DLIBATCH(connection-name,) | CICS(applid,) | IMSBMP(imsid,) | IMSMPP(imsid,) | REMOTE ([ location-name | <luname>],) }} | ENCODING ([ ASCII | EBCDIC | UNICODE | ccsid ]) | EXPLAIN ([ NO | YES ]) | FLAG([ I | W | E | C ]) | IMMEDWRITE([ NO | PH1 | YES ]) | ISOLATION([ RR | RS | CS | UR | NC ]) | KEEPDYNAMIC([ NO | YES ]) | RELEASE ([ COMMIT | DEALLOCATE ]) | {NOREOPT(VARS) | REOPT(VARS )} | PATH ([ schema-name, | USER, ]) | PATHDEFAULT | OPTHINT(‘hintid’) | VALIDATE ([ RUN | BIND ]) }}

REBIND PLAN([ plan-name, | * ]) {{ OWNER(auth-id) | QUALIFIER(qualifier-name) | [ PKLIST({[ location-name. | *. ]} [collection-id | *] [.package-id | .*],) | NOPKLIST] [NODEFER(PREPARE) | DEFER(PREPARE)] ACQUIRE([ USE | ALLOCATE ]) | CACHESIZE (decimal-value) | CURRENTDATA([ YES | NO ]) | CURRENTSERVER(location-name) | DBPROTOCOL ([ DRDA | PRIVATE ]) | DEGREE([ 1 | ANY ]) | DISCONNECT([ EXPLICIT | AUTOMATIC | CONDITIONAL ]) | DYNAMICRULES([ RUN | BIND ]) | [ ENABLE(*) | [ENABLE | DISABLE] ([ BATCH | DLIBATCH | DB2CALL | CICS | IMS | IMSBMP | IMSMPP | RRSAF],)] {{ DLIBATCH(connection-name,) | CICS(applid,) | IMSBMP(imsid,) | IMSMPP(imsid,) }} | ENCODING ([ ASCII | EBCDIC | UNICODE | ccsid ]) | EXPLAIN ([ NO | YES ]) | FLAG([ I | W | E | C ]) | IMMEDWRITE ([ NO | PH1 | YES ]) | ISOLATION([ RR | RS | CS | UR ]) | KEEPDYNAMIC([ NO | YES ]) | RELEASE([ COMMIT | DEALLOCATE ]) | {NOREOPT(VARS) | REOPT(VARS )} | {PATH([ schema-name, | USER, ]) | PATHDEFAULT} | OPTHINT(‘hint-id’) | SQLRULES ([ DB2 | STD ]) | VALIDATE([ RUN | BIND ]) }}

Page 72: DB2 Reference Guide 2up Letter

Commands CA Reference Guide DSN Commands

3-8 © 2002 Computer Associates International

REBIND TRIGGER PACKAGE ({location-name.} [collection-id | *].[package-id | * ]) {{CURRENTDATA ([ YES | NO ]) | ENCODING([ ASCII | EBCDIC | UNICODE | ccsid ]) | EXPLAIN([ YES | NO ]) | FLAG([ I | W | E | C ]) | IMMEDWRITE ([ NO | PH1 | YES ]) | ISOLATION([ RR | RS | CS | UR | NC ]) | RELEASE([ COMMIT | DEALLOCATE ])

RUN [ PROGRAM(program-name) {PLAN(plan-name )} | [CP PLAN(plan-name) ] {LIBRARY(library-name )} {PARMS(parameter-string )}

SPUFI

Page 73: DB2 Reference Guide 2up Letter

For DB2 UDB for z/OS and OS/390 Commands CICS Attachment Facility

© 2002 Computer Associates International 3-9

CICS Attachment Facility

DSNC {destination} db2-command

DSNC DISCONNECT plan-name

DSNC DISPLAY [PLAN {plan-name} | TRANSACTION {trans-id} | STATISTICS] {destination}

DSNC MODIFY [DESTINATION old new | TRANSACTION trans-id integer]

DSNC STOP [QUIESCE | FORCE]

DSNC STRT {rct-suffix} {,ssid}

Page 74: DB2 Reference Guide 2up Letter

Commands CA Reference Guide TSO Commands

3-10 © 2002 Computer Associates International

TSO Commands

DSN { SYSTEM ([ DSN | subsystem-name | group-attachment-name ] )} | {RETRY([ 0 | integer ] )} | {TEST(integer )} | {GROUP([ YES | NO ] )}

DSNH INPUT(data-set-name) {{clist-parm(s )}}

Page 75: DB2 Reference Guide 2up Letter

For DB2 UDB for z/OS and OS/390 Commands MVS IRLM Commands

© 2002 Computer Associates International 3-11

MVS IRLM Commands

MODIFY irlmproc,ABEND {,DUMP | ,NODUMP}

MODIFY irlmproc,DIAG [,DELAY | ,PLOCK | ,ALL | ,NONE | ,HANG]

MODIFY irlmproc,PURGE,db2name

MODIFY irlmproc,SET [,CSA=nnn | ,DEADLOCK=nnnn | ,LTE=nnnn | ,TIMEOUT=nnnn,subsystem-name | ,TRACE[10 | nnn ]]

MODIFY irlmproc,STATUS {,irlmx | ,ALLD | ,ALLI | ,MAINT | ,STOR | ,TRACE}

START irlmproc, {{ DEADLOK='iiii,kkkk' | IRLMGRP=‘irlm-group-name’ | IRLMID=n | IRLMNM=irlmname | LOCKTABL=irlmltnm | MAXCSA=nnn | MAXUSRS=nnn | PC=[YES | NO] | PGPROT=[YES | NO] | SCOPE=[LOCAL | GLOBAL | NODISCON] | TRACE [NO | YES ]}},

STOP irlmproc

TRACE CT, [ WTRSTART=parmlibmem {,WRAP | ,NOWRAP} | WTRSTOP=jobname | ON, COMP=irlmnm {,SUB=([ DBM | EXP | INT | SLM | XCF | XIT ] )} | OFF ]

Page 76: DB2 Reference Guide 2up Letter

Commands CA Reference Guide IMS Commands

3-12 © 2002 Computer Associates International

IMS Commands

/CHANGE [ SUBSYS subsystem-name | SUBSYS ALL | SUBSYS subsystem-name OASN schedule-number ] RESET

/DISPLAY [ SUBSYS subsystem, | SUBSYS ALL | OASNSUBSYS subsystem, | OASN SUBSYS ALL ]

/SSR subsystem-command

/START SUBSYS [subsystem, | ALL]

/STOP SUBSYS [subsystem, | ALL]

/TRACE SET [ON | OFF] {TABLE [ALL | SUBS ]} {OPTION [NOLOG | LOG ]}

Page 77: DB2 Reference Guide 2up Letter

For DB2 UDB for z/OS and OS/390 System Tables Catalog Tables

© 2002 Computer Associates International 4-1

4. System Tables

Catalog Tables Legend: SYSIBM.Tablename (DSNDB06.Tablespacename) SYSIBM.Indexname Unique/Nonunique (Index columns) Table description. Underlined Columns are updateable. Bold Columns modifiable with RUNSTATS. Default is –1 unless

noted otherwise.

IPNAMES (SYSDDF) DSNFPX01 U (LINKNAME) Contains a row for every remote DRDA server DB2 can access using TCP/IP. Rows in this table can be inserted, updated, and deleted. Column Name Data Type Description LINKNAME CHAR(8) The value must match the value

specified in the LINKNAME column of the associated row in SYSIBM.LOCATIONS.

SECURITY_OUT CHAR(1) Defines the DRDA security option used when local DB2 SQL applications connect to any remote server associated with this TCP/IP host. A Already Verified; an outbound

connection request contains an Authorization ID, e.g., the DB2 user’s authorization ID or a translated ID, and no password.

R RACF PassTicket; an outbound connection request contains a Userid and a RACF PassTicket. The value specified in the LINKNAME is used as the RACF PassTicket.

P Password; an outbound connection Requests contain an authorization ID and a password. Password obtained from SYSIBM.USERNAMES. Value of USERNAMES must be set to ‘O’.

USERNAMES CHAR(1) Controls the outbound authorization ID translation that occurs when an authorization ID is sent by DB2 to a remote server. O Indicates an outbound ID is

subject to translation. No translation or “come from” checking is performed on inbound IDs.

blank No translation occurs. IBMREQD CHAR(1) Whether the row came from the basic

Machine Readable Material (MRM) tape: Y/N/other. If other, release dependency indicator.

IPADDR VARCHAR (254)

Contains the IP address or domain name of a remote TCP/IP host. IPADDR must be specified as follows:If the column contains a left justified character string of 4 numeric values delimited by decimal point, DB2 assumes the value to be an IP address in dotted decimal format; for example, ‘756.45.321.09’. All other values are interpreted as a TCP/IP domain name resolved by the TCP/IP gethostbyname socket call.

Page 78: DB2 Reference Guide 2up Letter

System Tables CA Reference Guide Catalog Tables

4-2 © 2002 Computer Associates International

LOCATIONS (SYSDDF) DSNFCX01 U (LOCATION) Contains a row for every accessible remote server. Requesters are not defined in this table. The row associates a location with the TCP/IP or SNA network attributes for the remote server. Rows in this table can be inserted, updated, and deleted. Column Name Data Type Description LOCATION CHAR(16) Unique location name for the

accessible server. LINKNAME CHAR(8) Identifies the VTAM or TCP/IP

attributes associated with this location. For any LINKNAME specified, one or both of the following must be true: • A row exists in SYSIBM.LUNAMES

whose LUNAME matches the value in LINKNAME (VTAM attributes).

• A row exists in SYSIBM.IPNAMES whose LINKNAME matches the value in LINKNAME (TCP/IP attributes).

IBMREQD CHAR(1) Whether the row came from the basic MRM tape: Y/N/other. If other, release dependency indicator.

PORT CHAR(32) If TCP/IP is used for outbound DRDA connections when the following statement is true, (a row exists in SYSIBM.IPNAMES where LINKNAME matches a row in SYSIBM.LOCATIONS), If the specified row is found, the value of PORT is: blank Default DRDA port (446)

used. non-blank If the value is left justified

1-5 numeric, the value is assumed to be a TCP/IP port number.

If any other value exists, it is assumed to be a TCP/IP service name.

TPN VARCHAR(64) Used only when the local DB2 begins an SNA conversation with another server. A zero length indicates default TPN value. For DRDA conversations, the DRDA default X’07F6C4C2’ is used. Column is not used for DB2 private protocol. For SQL/DS, it will contain the resource ID of the SQL/DS machine.

LULIST (SYSDDF) DSNFLX01 U (LINKNAME,LUNAME) DSNFLX02 U or N (LUNAME) This table allows multiple LU names to be specified for a given LOCATION. The same value for the LUNAME column cannot appear in both the SYSIBM.LUNAMES table and the SYSIBM.LULIST table. Rows in this table can be inserted, updated, and deleted. Column Name Data Type Description LINKNAME CHAR(8) Value of the LINKNAME column in the

SYSIBM.LOCATIONS table with which this row is associated. This is also the value of LUNAME column in SYSIBM.LUNAMES table. 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.

LUNAME CHAR(8) The VTAM logical unit name (LUNAME) of the remote database system. This LUNAME must not exist in the LUNAME column of SYSIBM.LUNAMES.

IBMREQD CHAR(1) Whether the row came from the basic MRM tape: Y/N/other. If other, release dependency indicator.

Page 79: DB2 Reference Guide 2up Letter

For DB2 UDB for z/OS and OS/390 System Tables Catalog Tables

© 2002 Computer Associates International 4-3

Page 80: DB2 Reference Guide 2up Letter

System Tables CA Reference Guide Catalog Tables

4-4 © 2002 Computer Associates International

LUMODES (SYSDDF) DSNFMX01 U (LUNAME,MODENAME) Each row provides VTAM with conversation limits for a specific combination of LUNAME and MODENAME. This table is accessed only during the initial conversation limit negotiation between DB2 and a remote LU. This negotiation is called change-number-of-sessions (CNOS) processing. Rows in this table can be inserted, updated, and deleted. Column Name Data Type Description LUNAME CHAR(8) LUNAME of server involved in CNOS

processing. MODENAME CHAR(8) Name of a logon mode description in

the VTAM logon mode table. CONVLIMIT SMALLINT Max. no. of active conversations

between the local DB2 and server for this mode. Used to override the no. of the DSESLIM parm in the VTAM APPL definition statement for this mode.

IBMREQD CHAR(1) Whether the row came from the basic MRM tape: Y/N/other. If other, release dependency indicator.

LUNAMES (SYSDDF) DSNFNX01 U (LUNAME) The table must contain a row for each remote SNA client or server that communicates with DB2. Rows in this table can be inserted, updated, and deleted. Column Name Data Type Description LUNAME CHAR(8) LU name of one or more accessible

systems. Blank indicates undefined requesters. All other columns for a given row are for clients and servers associated with the rows LU name.

SYSMODENAME CHAR(8) Mode used to establish intersystem conversations. Blank indicates default mode IBMDB2LM.

SECURITY_IN CHAR(1) Defines the security options accepted by this DB2 when an SNA client connects. V Verify; an incoming connection

must include a userid and password, a userid and RACF PassTicket, or a Kerberos security ticket.

A Already Verified; a request does not need a password. If sent, the password is checked. An incoming request is accepted if it contains a userid, a userid and password, a userid and RACF PassTicket, or a Kerberos security ticket. If USERNAMES contains an ‘I’ or ‘B’, RACF is not invoked for requests containing userid only.

SECURITY_OUT CHAR(1) Defines the security options used when local DB2 SQL applications connect to any remote server associated with this LUNAME. A Already Verified; an Outbound

connection request contains an authorization ID, e.g., the DB2 user’s authorization ID and no password.

R RACF PassTicket; an Outbound connection request contains a userid and a RACF PassTicket. The server’s LU name is used as the RACF PassTicket application name.

P Password; an outbound connection request contains an authorization ID and a password. The password is obtained form SYSIBM.USERNAMES table or RACF depending on the value of ENCRYPTPSWDS column. USERNAMES must equal ‘B’ or ‘O’.

Page 81: DB2 Reference Guide 2up Letter

For DB2 UDB for z/OS and OS/390 System Tables Catalog Tables

© 2002 Computer Associates International 4-5

Column Name Data Type Description ENCRYPTPSWDS CHAR(1) Applies only to DB2 for z/OS and

OS/390 partners. Provides connectivity with prior releases of DB2 that cannot support RACF PassTickets: N No (Default); passwords are not in

internal RACF encrypted format. Y Yes, for outbound requests the

encrypted password is extracted from RACF and sent to the server. For inbound requests, the password is treated as encrypted.

MODESELECT CHAR(1) Whether to use SYSIBM.MODESELECT table: N Uses default mode IBMDB2LM or

IBMRDB Y Searches SYSIBM.MODESELECT

for appropriate mode name. USERNAMES CHAR(1) Controls inbound and outbound

authorization ID translation and “come from” checking. I Inbound ID is subject to translation

and “come from” checking. No translation is performed on outbound IDs.

O Outbound ID is subject to translation. No translation or “come from” checking is performed on inbound IDs.

B Both inbound translation and “come from” checking and outbound translation are performed on request.

blank - No translation. GENERIC CHAR(1) Whether DB2 should identify itself to

the partner LU by its real LU name or a generic LU name; specified by this row:N Real VTAM name of this DB2. Y VTAM generic LU name for this

DB2. IBMREQD CHAR(1) Whether the row came from the basic

MRM tape: Y/N/other. If other, release dependency indicator.

MODESELECT (SYSDDF) DSNFDX01 U (LUNAME,AUTHID,PLANNAME) 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 Data Type Description AUTHID CHAR(8) Authorization ID of the request for data

from another subsystem. Default is blank, indicating that the specified MODENAME applies to all auth IDs.

PLANNAME CHAR(8) Plan name associated with SQL request. Default is blank, indicating the specified MODENAME applies to all plan names.

LUNAME CHAR(8) LU name associated with the SQL request.

MODENAME CHAR(8) Name of logon mode in the VTAM logon mode table. Used in support of the outgoing SQL request. If blank, default mode IBMDB2LM is used for DB2 private protocol connections and IBMRDB is used for DRDA connections.

IBMREQD CHAR(1) Whether the row came from the basic MRM tape: Y/N/other. If other, release dependency indicator.

Page 82: DB2 Reference Guide 2up Letter

System Tables CA Reference Guide Catalog Tables

4-6 © 2002 Computer Associates International

SYSAUXRELS (SYSOBJ) DSNOXX01 N (TBOWNER,TBNAME) DSNOXX02 N (AUXTBOWNER, AUXTBNAME) Contains a row for every auxiliary table created for a LOB column. Column Name Data Type Description TBOWNER CHAR(8) Authorization ID of base table owner. TBNAME VARCHAR(18) Base table name. COLNAME VARCHAR(18) LOB column name in base table. PARTITION SMALLINT If base table is partitioned contains

partition number, otherwise 0. AUXTBOWNER CHAR(8) Authorization ID of auxiliary table

owner. AUXTBNAME VARCHAR(18) Auxiliary table name. AUXRELOBID INTEGER Internal identifier for relationship

between auxiliary and base table. IBMREQD CHAR(1) Whether the row came from the basic

MRM tape: Y/N/other. If other, release dependency indicator.

SYSCHECKDEP (SYSSTR) DSNSDX01 U (TBOWNER,TBNAME,CHECKNAME,COLNAME) Contains one row for each reference to a column in a table check constraint. Column Name Data Type Description TBOWNER CHAR(8) Authorization ID of the owner for which

the check constraint is defined. TBNAME VARCHAR(18) Name of the table for which the check

constraint is defined. CHECKNAME VARCHAR

(128) Check constraint name.

COLNAME VARCHAR(18) Name of column referenced by the check constraint.

IBMREQD CHAR(1) Whether the row came from the basic MRM tape: Y/N/other. If other, release dependency indicator.

SYSCHECKS (SYSSTR) DSNSCX01 U (TBOWNER,TBNAME,CHECKNAME) Contains one row for each table check constraint. Column Name Data Type Description TBOWNER CHAR(8) Authorization ID of the owner of the

table on which the table check constraint is defined.

CREATOR CHAR(8) Authorization ID of the creator of the table check constraint.

DBID SMALLINT Internal identifier of the database for the check constraint.

OBID SMALLINT Internal identifier of the table check constraint.

TIMESTAMP TIMESTAMP Time when the table check constraint was created.

RBA CHAR(6) The log RBA when the check constraint was created. Column contains BIT data.

IBMREQD CHAR(1) Whether the row came from the basic MRM tape: Y/N/other. If other, release dependency indicator.

TBNAME VARCHAR(18) Name of the table for which the check constraint is defined.

CHECKNAME VARCHAR (128)

The table check constraint name.

CHECKCONDITION VARCHAR (3800)

The text of the table check constraint.

SYSCHECKS2 (SYSSTR) DSNCHX01 U (TBOWNER,TBNAME,CHECKNAME) Contains one row for each table check constraint. Column Name Data Type Description TBOWNER CHAR(8) Authorization ID of the owner of the

table on which the table check constraint is defined.

Page 83: DB2 Reference Guide 2up Letter

For DB2 UDB for z/OS and OS/390 System Tables Catalog Tables

© 2002 Computer Associates International 4-7

Column Name Data Type Description TBNAME VARCHAR(18) Name of the table on which the check

constraint is defined. CHECKNAME VARCHAR

(128) Table check constraint name

PATHSCHEMAS VARCHAR (254)

SQL path at the time the check constraint was created. The path is used to resolve unqualified cast function names that are used in the constraint definition.

IBMREQD CHAR(1) Whether the row came from the basic MRM tape: Y/N/other. If other, release dependency indicator.

SYSCOLAUTH (SYSDBASE) Records UPDATE or REFERENCES privileges held by users on individual columns of a table or view. Column Name Data Type Description GRANTOR CHAR(8) Authorization ID of the user who

granted the privileges. Could also be PUBLIC or PUBLIC *.

GRANTEE CHAR(8) Authorization ID of the user who holds the privilege, or the name of application plan or package that uses the privilege.

GRANTEETYPE CHAR(1) Type of grantee: blank GRANTEE is an auth ID P GRANTEE is an application

plan or package CREATOR CHAR(8) Authorization ID of the owner of table

or view on which the update privilege is held.

TNAME VARCHAR(18) Name of the table or view. TIMESTAMP CHAR(12) Internal use only. DATEGRANTED CHAR(6) Date the privilege was granted,

yymmdd. TIMEGRANTED CHAR(8) Time the privilege was granted,

hhmmssth. COLNAME VARCHAR(18) Name of the column to which the

UPDATE privilege applies. IBMREQD CHAR(1) Whether the row came from the basic

MRM tape: Y/N/other. If other, release dependency indicator.

LOCATION CHAR(16) Unused. COLLID CHAR(18) If the GRANTEE is a package its

collection name. Blank otherwise. CONTOKEN CHAR(8) If the GRANTEE is a package, the

consistency token of the DBRM from which the package was derived. Blank otherwise.

PRIVILEGE CHAR(1) Indicates privilege this row describes. R REFERENCES privilege blank UPDATE privilege

GRANTEDTS TIMESTAMP Time when the GRANT was executed.

SYSCOLDIST (SYSSTATS) DSNTNX01 N (TBOWNER,TBNAME,NAME) Contains one or more rows for the first key column of an index key. Rows in this table can be inserted, updated, and deleted. Column Name Data Type Description FREQUENCY SMALLINT No longer used. See FREQUENCYF. STATSTIME TIMESTAMP The date and time when RUNSTATS

last updated the statistics. IBMREQD CHAR(1) Whether the row came from the basic

MRM tape: Y/N/other. If other, release dependency indicator.

TBOWNER CHAR(8) Authorization ID of the owner of the table containing the column.

TBNAME VARCHAR(18) Name of the table containing the column.

Page 84: DB2 Reference Guide 2up Letter

System Tables CA Reference Guide Catalog Tables

4-8 © 2002 Computer Associates International

Column Name Data Type Description NAME VARCHAR(18) Name of the column. If

NUMCOLUMNS is > 1 contains first column name in the set associated with statistics.

COLVALUE VARCHAR (254)

Contains the data of a frequently occurring value. Statistics are not collected on a ROWID column. Column contains bit data.

TYPE CHAR(1) Type of statistics gathered: C Cardinality F Frequent value

CARDF FLOAT Number of distinct values for column group. Only valid for TYPE C statistics.

COLGROUPCOLNO VARCHAR (254)

Identifies the set of columns associated with statistics. If a single column, length equal zero. Otherwise column is an array of SMALLINT numbers with the dimension equal to NUMCOLUMNS.

NUMCOLUMNS SMALLINT Number of columns associated with statistics.

FREQUENCYF FLOAT Percentage of rows in a table containing the value in COLVALUE when the number is multiplied by 100. Statistics are not collected on ROWID column.

SYSCOLDIST_HIST (SYSHIST) DSNHFX01 N (TBOWNER.TBNAME.NAME.STATSTIME) Contains the same rows that are added or changed in SYSCOLDIST. Rows in this table can be inserted, updated, and deleted. Column Name Data Type Description STATSTIME TIMESTAMP If RUNSTATS updated the statistics,

the date and time when the last invocation of RUNSTATS updated the statistics.

TBOWNER CHAR(8) Authorization ID of the owner of the table that contains the column.

TBNAME VARCHAR(18) Name of the table that contains the column.

NAME VARCHAR(18) 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.

COLVALUE VARCHAR (255)

Contains the data of a frequently occurring value. Statistics are not collected an index on a ROWID column. If the value has a non-character data type, the data might not be printable.

TYPE CHAR(1) The type of statistics gathered: C Cardinality F Frequent value

CARDF FLOAT(8) Number of distinct values for the column group. This number is valid only for TYPE C statistics. The value is -1 if statistics have not been gathered.

COLGROUPCOLNO VARCHAR (254)

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.

NUMCOLUMNS SMALLINT Identifies the number of columns associated with the statistics.

Page 85: DB2 Reference Guide 2up Letter

For DB2 UDB for z/OS and OS/390 System Tables Catalog Tables

© 2002 Computer Associates International 4-9

Column Name Data Type Description FREQUENCYF FLOAT(8) 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%. Statistics are not collected for an index on a ROWID column. The value is -1 if statistics have not been gathered.

IBMREQD CHAR(1) Whether the row came from the basic MRM tape: Y/N/other. If other, release dependency indicator.

SYSCOLDISTSTATS (SYSSTATS) DSNTPX01 N (TBOWNER,TBNAME,NAME,PARTITION) Contains zero or more rows per partition for the first key column of a partitioned index. Rows in this table can be inserted, updated, and deleted. Column Name Data Type Description FREQUENCY SMALLINT No longer used. See FREQUENCYF. STATSTIME TIMESTAMP The date and time when RUNSTATS

last updated the statistics. IBMREQD CHAR(1) Whether the row came from the basic

MRM tape: Y/N/other. If other, release dependency indicator.

PARTITION SMALLINT Partition number for the table space containing the table in which the column is defined.

TBOWNER CHAR(8) Authorization ID of the owner of the table containing the column.

TBNAME VARCHAR(18) Name of the table containing the column.

NAME VARCHAR(18) Name of the column. If NUMCOLUMNS is > 1 contains the first column name in the set associated with statistics.

COLVALUE VARCHAR (254)

Contains the data of a frequently occurring value. Statistics are not collected on ROWID column. Column contains bit data.

TYPE CHAR(1) Type of statistics gathered: C Cardinality F Frequent value

CARDF FLOAT Number of distinct values for column group. Only valid for TYPE C statistics.

COLGROUPCOLNO VARCHAR (254)

Identifies the set of columns associated with statistics. If a single column, length equal zero. Otherwise column is an array of SMALLINT numbers with the dimension equal to NUMCOLUMNS.

NUMCOLUMNS SMALLINT Number of columns associated with statistics.

FREQUENCYF FLOAT Percentage of rows in a table containing the value in COLVALUE when the number is multiplied by 100. Statistics are not collected on ROWID column.

SYSCOLSTATS (SYSSTATS) DSNTCX01 U (TBOWNER,TBNAME,NAME,PARTITION) Contains partition statistics for selected columns, one row for each partition. Rows in this table can be inserted, updated, and deleted. Column Name Data Type Description HIGHKEY CHAR(8) Highest value of the column within the

partition. Blank if stats not gathered or for indicator columns. Column contains bit data.

HIGH2KEY CHAR(8) Second highest value of the column within the partition. Blank if stats not gathered or for indicator columns. Column contains bit data.

Page 86: DB2 Reference Guide 2up Letter

System Tables CA Reference Guide Catalog Tables

4-10 © 2002 Computer Associates International

Column Name Data Type Description LOWKEY CHAR(8) Lowest value of the column within the

partition. Blank if stats not gathered or for indicator columns. Column contains bit data.

LOW2KEY CHAR(8) Second lowest value of the column within the partition. Blank if stats not gathered or for indicator columns. Column contains bit data.

COLCARD INTEGER Number of distinct column values in the partition.

STATSTIME TIMESTAMP The date and time when RUNSTATS last updated the statistics. If value is ‘0001-01-02.00.00.00.000000’ an ALTER TABLE changed length of VARCHAR column.

IBMREQD CHAR(1) Whether the row came from the basic MRM tape: Y/N/other. If other, release dependency indicator.

PARTITION SMALLINT Partition number for the table space containing the table in which the column is defined.

TBOWNER CHAR(8) Authorization ID of the owner of the table containing the column.

TBNAME VARCHAR(18) Name of the table containing the column.

NAME VARCHAR(18) Name of the column. COLCARDDATA VARCHAR

(1000) Internal use only.

SYSCOLUMNS (SYSDBASE) DSNDCX01 U (TBCREATOR,TBNAME,NAME) DSNDCX02 N (TYPESCHEMA, TYPENAME) Contains one row for every column of each table and view. Column Name Data Type Description NAME VARCHAR(18) Name of the column. TBNAME VARCHAR(18) Name of the table or view that contains

the column. TBCREATOR CHAR(8) Authorization ID of the owner of the

table or view that contains the column. COLNO SMALLINT Numerical place of the column in the

table or view that contains the column. COLTYPE CHAR(8) Type of column:

INTEGER full-word binary SMALLINT half-word binary FLOAT floating-point numeric CHAR fixed-length character VARCHAR variable-length characterLONGVAR variable-length characterDECIMAL packed decimal GRAPHIC fixed-length DBCS VARG variable-length DBCS LONGVARG variable-length DBCS DATE date TIME time TIMESTMP timestamp BLOB binary large object CLOB character large object DBCLOB double-byte character

large object ROWID ROW ID data type DISTINCT distinct data type

Page 87: DB2 Reference Guide 2up Letter

For DB2 UDB for z/OS and OS/390 System Tables Catalog Tables

© 2002 Computer Associates International 4-11

Column Name Data Type Description LENGTH SMALLINT The length attribute of the column or, in the

case of a decimal column, its precision: INTEGER 4 SMALLINT 2 FLOAT 4 or 8 CHAR length of string VARCHAR max. length of string LONGVAR max. length of string DECIMAL precision of number GRAPHIC number of DBCS chars. VARG max. # of DBCS chars. LONGVARG max. # of DBCS chars. DATE 4 TIME 3 TIMESTMP 10 BLOB 4 length of field in base

table, max. length of LOB in LENGTH2.

CLOB 4 length of field in base table, max. length of CLOB in LENGTH2.

DBCLOB 4 length of field in base table, max. length of DBCLOB in LENGTH2.

ROWID 17 DISTINCT length of source data type The number does not include the internal prefixes used to record the actual length and null state, where applicable.

SCALE SMALLINT Scale of decimal data, or 0 if not decimal.

NULLS CHAR(1) Whether the column can contain null values: Y/N. The value can be N for a view col. derived from an expression or a function, however such a col. allows nulls when referenced in an outer select.

COLCARD INTEGER No longer used. See COLCARDF. HIGH2KEY CHAR(8) Second highest value of the column.

Blank if stats have not been gathered or for indicator columns. If key has non-character data type, data may not be printable, as column contains bit data.

LOW2KEY CHAR(8) Second lowest value of the column. Blank if stats have not been gathered or for indicator columns. If key has non-character data type, data may not be printable, as column contains bit data.

UPDATES CHAR(1) Whether column can be updated: N if column was derived from a function

or expression, or a column with a row ID data type (or a distinct type based on a row ID type)

Y if columns are for a read-only view or if columns are defined with AS IDENTITY and GENERATED ALWAYS

IBMREQD CHAR(1) Whether the row came from the basic MRM tape: Y/N/other. If other, release dependency indicator.

REMARKS VARCHAR (254)

A character string provided by the user with the COMMENT ON statement.

Page 88: DB2 Reference Guide 2up Letter

System Tables CA Reference Guide Catalog Tables

4-12 © 2002 Computer Associates International

Column Name Data Type Description DEFAULT CHAR(1) Meaningful for columns only if the

SYSTABLES TYPE column is T (table) or G (created temporary table): A ROWID with GENERATE ALWAYS B Depends on the data type D ROWID with GENERATED BY

DEFAULT N No default value Y Nulls or based on data type I AS IDENTITY with GENERATED

ALWAYS J AS IDENTITY with GENERATED BY

DEFAULT S SQL ID of the process U Value of the USER special register at

execution time 1 String data 2 Floating point number 3 Decimal value 4 Integer value 5 Hex string

KEYSEQ SMALLINT Column’s relative position within table's primary key, or 0 if it is not part of primary key.

FOREIGNKEY CHAR(1) Applies to character columns only. B Column contains bit data. S Indicates SBCS data if encoding

scheme is Unicode or MIXDATA field=YES on DSNTIPF.

Any other value indicates MIXED data if encoding scheme is Unicode or MIXDATA field=YES on DSNTIPF else indicates SBCS.

FLDPROC CHAR(1) Whether column has a field proc: Y/N. Blank. The column is for views defined prior to Version 7.

LABEL VARCHAR(30) Column label provided by the user with a LABEL ON statement, otherwise an empty string.

STATSTIME TIMESTAMP The date and time when RUNSTATS last updated the statistics. The default value is '0001-01-01.00.00.00.000000'.A value ‘0001-01-02.00.00.00.000000’, indicates an ALTER TABLE statement was executed to change the length of a VACHAR column. RUNSTATS should be run to update the statistics before they are used.

DEFAULTVALUE VARCHAR (512)

Meaningful for columns only if SYSTABLES TYPE column is T (table) or G (global temporary table). When the DEFAULT column is 1, 2, 3, 4, or 5, it contains the default value. If the default value is a string constant or hexadecimal constant, DEFAULT is 1 or 5. If the default value is a numeric constant, DEFAULT is 2, 3, or 4.

COLCARDF FLOAT Estimated number of distinct values in the column. For an indicator contains number of LOBs not null with length >0. Value is –1 if stats not gathered. Value is –2 for first column of index of auxiliary table.

COLSTATUS CHAR(1) Indicates status of column definition: blank complete I incomplete; LOB tablespace,

auxiliary table, or index on auxiliary table not yet created.

LENGTH2 INTEGER Maximum length of data retrieved from column: 0 Not LOB or ROWID

column 40 ROWID column

returned value is the length

1 to 2147483647 For LOB column max. value

DATATYPEID INTEGER Internal identifier of data type.

Page 89: DB2 Reference Guide 2up Letter

For DB2 UDB for z/OS and OS/390 System Tables Catalog Tables

© 2002 Computer Associates International 4-13

Column Name Data Type Description SOURCETYPEID INTEGER Internal identifier of source type.

0 for built-in data types. TYPESCHEMA CHAR(8) If COLTYPE is distinct, schema of

distinct type. Otherwise, SYSIBM. TYPENAME VARCHAR(18) If COLTYPE is distinct, name of distinct

type. Otherwise, same as COLTYPE column.

CREATEDTS TIMESTAMP Timestamp when column was created. A value of ‘0001-01-01.00.00.00.000000’ is for columns created before V6 migration.

SYSCOLUMNS_HIST (SYSHIST) DSNHEX01 N (TBCREATOR.TBNAME.NAME.STATSTIME) Contains one row for every column of each table and view. Rows in this table can be inserted, updated, and deleted. Column Name Data Type Description NAME VARCHAR(18) Name of the column. TBNAME VARCHAR(18) Name of the table or view that contains

the column. TBCREATOR CHAR(8) Authorization ID of the owner of the

table or view that contains the column. COLNO SMALLINT Numeric place of the column in the

table or view. COLTYPE CHAR(8) 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 DECIMAL Decimal GRAPHIC Fixed-length graphic

string VARG Varying-length graphic

string LONGVARG Varying-length graphic

string DATE Date TIME Time TIMESTMP Timestamp BLOB Binary large object CLOB Character large object DBCLOB Double-byte character

large object ROWID Row ID data type DISTINCT Distinct type Whether a column described as VARCHAR, LONGVAR, CLOB, VARG, LONGVARG, DBCLOB, or BLOB is a long string column depends on its length attribute.

Page 90: DB2 Reference Guide 2up Letter

System Tables CA Reference Guide Catalog Tables

4-14 © 2002 Computer Associates International

Column Name Data Type Description LENGTH SMALLINT 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 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 TIMESTMP 10 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 DBCLOB column is found in LENGTH2.

ROWID 17 DISTINCT Length of source data

type LENGTH2 INTEGER 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 of the LOB.

NULLS CHAR(1) Whether the column can contain null values: N No Y Yes

HIGH2KEY CHAR(8) 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.

LOW2KEY CHAR(8) 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.

Page 91: DB2 Reference Guide 2up Letter

For DB2 UDB for z/OS and OS/390 System Tables Catalog Tables

© 2002 Computer Associates International 4-15

Column Name Data Type Description STATSTIME TIMESTAMP 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-01-02.00.00.00.000000', this indicates that an ALTER TABLE statement was executed to change the length of a VARCHAR column.

COLCARDF FLOAT(8) 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.

IBMREQD CHAR(1) Whether the row came from the basic MRM tape: Y/N/other. If other, release dependency indicator.

SYSCONSTDEP (SYSOBJ) DSNCCX01 N (BSCHEMA, BNAME, BTYPE) DSNCCX02 N (DTBCREATOR, DTBNAME) Records dependencies on check constraints or user-defined defaults for column data. Column Name Data Type Description BNAME VARCHAR(18) Object name on which dependency

exists. BSCHEMA CHAR(8) Schema for object on which

dependency exists. BTYPE CHAR(1) Object type on which dependency

exists. F Function instance.

DTBNAME VARCHAR(18) Table name on which dependency applies.

DTBCREATOR CHAR(8) Authorization ID for owner of table to which dependency applies.

DCONSTNAME VARCHAR (128)

For DTYPE = C Check constraint unqualified nameD Column name

DTYPE CHAR(1) Object type: C Check constraint D User-defined default constant

IBMREQD CHAR(1) Whether the row came from the basic MRM tape: Y/N/other. If other, release dependency indicator.

SYSCOPY (SYSCOPY) DSNUCH01 N (DBNAME,TSNAME,START_RBA,TIMESTAMP) DSNUCX01 N (DSNAME) Contains information needed for recovery. Column Name Data Type Description DBNAME CHAR(8) Name of the database. TSNAME CHAR(8) Name of the target table space or

index space. DSNUM INTEGER Data set number within table space.

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.

Page 92: DB2 Reference Guide 2up Letter

System Tables CA Reference Guide Catalog Tables

4-16 © 2002 Computer Associates International

Column Name Data Type Description ICTYPE CHAR(1) Operation type:

A ALTER B REBUILD INDEX D CHECK DATA LOG(NO) F full image copy I copy full NO P partial recovery point Q QUIESCE R LOAD REPLACE LOG(YES) S LOAD REPLACE LOG(NO) T terminated utility W REORG LOG(NO) X REORG LOG(YES) Y LOAD LOG(NO) Z LOAD LOG(YES)

ICDATE CHAR(6) Date of entry: yymmdd. START_RBA CHAR(6) 48-bit positive integer containing the

LRSN (relative byte location in a non–data-sharing environment) of a point in the DB2 recovery log. Column contains bit data. For ICTYPE: I or F starting point for all updates

since image copy was taken P point after log-application

phase of point-in-time recovery

Q point after all data sets have been successfully quiesced

R or S end of log before start of the LOAD utility and before any data changed

T the end of log when utility is terminated

Other end of log before start of RELOAD phase of LOAD or REORG utility

FILESEQNO INTEGER Tape file sequence number of the copy.

DEVTYPE CHAR(8) Device type the copy is on. IBMREQD CHAR(1) Whether the row came from the basic

MRM tape: Y/N/other. If other, release dependency indicator.

DSNAME CHAR(44) For ICTYPE P, I, or F, DSNAME is the name of the data set. Otherwise, it contains database name and table space, or index name. Blank for any row migrated from a release prior to Version 4.

ICTIME CHAR(6) Time at which row was inserted in the form: hhmmss

SHRLEVEL CHAR(1) SHRLEVEL parm on COPY (for ICTYPE F or I only): C change R reference blank does not describe image copy

DSVOLSER VARCHAR (1784)

Volume serial numbers of the data set; 6-byte numbers separated by commas. Blank if data set is catalogued.

TIMESTAMP TIMESTAMP Date and time when row was inserted (from ICDATE and ICTIME).

ICBACKUP CHAR(2) Specifies the type of image copy: blank local site primary copy LB local site backup copy RP recovery site primary copy RB recovery site backup copy

ICUNIT CHAR(1) Indicates device used for image copy: D DASD T Tape blank Medium is not tape or DASD.

Page 93: DB2 Reference Guide 2up Letter

For DB2 UDB for z/OS and OS/390 System Tables Catalog Tables

© 2002 Computer Associates International 4-17

Column Name Data Type Description STYPE CHAR(1) If ICTYPE=T, this field indicates which

COPY utility was terminated by the TERM UTILITY command or the START DATABASE with ACCESS(FORCE): F full image copy I incremental image copy If ICTYPE=A, V length of VARCHAR column

increased If ICTYPE = F, blank DB2 Image Copy C DFSMS concurrent copy R LOAD REPLACE (YES) S LOAD REPLACE (NO) W REORG LOG (NO) X REORG LOG (YES) If ICTYPE = R, S, W, or X, A REORG pending status was

reset. If ICTYPE = P, L the operation is RECOVER

TORBA LOGONLY. If ICTYPE = Q, W the option is WRITE(YES). Blank for all other values of ICTYPE.

PIT_RBA CHAR(6) When ICTYPE = P, this field contains the LRSN for the point in the DB2 log or the stop location of a point-in-time-recovery

GROUP_MEMBER CHAR(8) DB2 data sharing member name of the DB2 subsystem that performed the operation. Blank if not part of DB2 data sharing at the time of operation.

OTYPE CHAR(1) Object type for recovery information: I Index space T Table space

LOWDSNUM INTEGER Lowest partition number in range for SYSCOPY records created via REORG or LOAD REPLACE to reset REORG pending. Version number of index for SYSCOPY records created via COPY of an index space.

HIGHDSNUM INTEGER Highest partition number in a range for SYSCOPY records created via REORG or LOAD REPLACE to reset REORG pending.

COPYPAGESF FLOAT(8) Number of pages written to the copy data set.

NPAGESF FLOAT(8) The number of pages in the tablespace or index at the time of INLINE COPY.

CPAGESF FLOAT(8) Total number of changed pages. JOBNAME CHAR(8) Job name of the utility. AUTHID CHAR(8) Authorization ID of the utility.

SYSDATABASE (SYSDBAUT) DSNDDH01 U (NAME) DSNDDX02 N (GROUP_MEMBER) Contains one row for each database, except for database DSNDB01. Column Name Data Type Description NAME CHAR(8) Database name. CREATOR CHAR(8) Authorization ID of owner of database. STGROUP CHAR(8) Name of default storage group of

database. Blank for system database. BPOOL CHAR(8) Name of default buffer pool of the table

space. Blank for system table space. DBID SMALLINT Internal identifier for database. If more

than 32511 databases have been created the DBID is negative

IBMREQD CHAR(1) Whether the row came from the basic MRM tape: Y/N/other. If other, release dependency indicator.

Page 94: DB2 Reference Guide 2up Letter

System Tables CA Reference Guide Catalog Tables

4-18 © 2002 Computer Associates International

Column Name Data Type Description CREATEDBY CHAR(8) Authorization ID of user who created it.ROSHARE CHAR(1) Not used. TIMESTAMP TIMESTAMP The value is:

0001-01-01-00.00.00.000000. TYPE CHAR(8) Type of database:

blank Not a work file database or a TEMP database

W Is a work file database T Database was created as

TEMP, used for declared temporary tables.

GROUP_MEMBER CHAR(8) The DB2 data sharing member name of the DB2 subsystem that uses this work file database. 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 (indicated by the TYPE column).

CREATEDTS TIMESTAMP Time the CREATE statement for this database was executed.

ALTEREDTS TIMESTAMP Time of the most recent ALTER DATABASE executed against this database.

ENCODING_SCHEME CHAR(1) Default encoding scheme for the database. E EBCDIC A ASCII U Unicode blank For DSNDB04, work files, and a TEMP database.

SBCS_CCSID INTEGER Default SBCS CCSID for the database. Databases created prior to V5 or a TEMP database will contain zero.

DBCS_CCSID INTEGER Default DBCS CCSID for the database. Databases created prior to V5 or a TEMP database will contain zero.

MIXED_CCSID INTEGER Default MIXED CCSID for the database. Databases created prior to V5 or a TEMP database will contain zero.

INDEXBP CHAR(8) Name of default buffer pool for indexes, default is BP0.

SYSDATATYPES (SYSOBJ) DSNODX01 U (SCHEMA,NAME) DSNODX02 U (DATATYPEID) Contains one row for each distinct type defined to the system. Column Name Data Type Description SCHEMA CHAR(8) Schema of distinct type. OWNER CHAR(8) Owner of distinct type. NAME CHAR(18) Name of distinct type. CREATEDBY CHAR(8) Authorization ID that created distinct

type. SOURCESCHEMA CHAR(8) Source data type schema. SOURCETYPE CHAR(18) Source type name. METATYPE CHAR(1) Class of data type: T = Distinct type. DATATYPEID INTEGER Internal identifier of distinct type. SOURCETYPEID INTEGER Internal identifier of source type. LENGTH INTEGER Max length or precision of distinct type

that is sourced from IBM-defined DECIMAL data type.

SCALE SMALLINT Scale for a distinct type that is sourced from IBM-defined DECIMAL data type. Otherwise 0.

SUBTYPE CHAR(1) Subtype for distinct type, based on subtype of source type B FOR BIT DATA S FOR SBCS DATA M FOR MIXED DATA blank source type is not character

type CREATEDTS TIMESTAMP Time distinct type was created.

Page 95: DB2 Reference Guide 2up Letter

For DB2 UDB for z/OS and OS/390 System Tables Catalog Tables

© 2002 Computer Associates International 4-19

Column Name Data Type Description ENCODING_SCHEME CHAR(1) Encoding scheme of distinct type:

A ASCII E EBCDIC U Unicode

IBMREQD CHAR(1) Whether the row came from the basic MRM tape: Y/N/other. If other, release dependency indicator.

REMARKS VARCHAR (254)

User-provided character string via COMMENT ON statement.

SYSDBAUTH (SYSDBAUT) DSNADH01 N (GRANTEE,NAME) DSNADX01 N (GRANTOR,NAME) One or more rows for each user who is granted a database privilege for the database. Column Name Data Type Description GRANTOR CHAR(8) Authorization ID of user who granted

the privileges. Could also be PUBLIC or PUBLIC *.

GRANTEE CHAR(8) Authorization ID of user who holds the privileges. Could also be PUBLIC or PUBLIC *.

NAME CHAR(8) Database name. TIMESTAMP CHAR(12) Internal use only. DATEGRANTED CHAR(6) Date the privileges were granted:

yymmdd. TIMEGRANTED CHAR(8) Time the privileges were granted:

hhmmssth. GRANTEETYPE CHAR(1) Unused. AUTHHOWGOT CHAR(1) Authorization level of the user from

whom the privileges were received: blank N/A C DBCTL D DBADM L SYSCTRL M DBMAINT S SYSADM

CREATETABAUTH CHAR(1) Whether GRANTEE can create tables within the database: (see legend **)

CREATETSAUTH CHAR(1) Whether GRANTEE can create table spaces in the database: (see legend **)

DBADMAUTH CHAR(1) Whether GRANTEE has DBADM authority over database: (see legend **)

DBCTRLAUTH CHAR(1) Whether GRANTEE has DBCTRL authority over database: (see legend **)

DBMAINTAUTH CHAR(1) Whether GRANTEE has DBMAINT authority over database: (see legend **)

DISPLAYDBAUTH CHAR(1) Whether GRANTEE can issue DISPLAY command for database: (see legend **)

DROPAUTH CHAR(1) Whether GRANTEE can issue the ALTER DATABASE and DROP DATABASE statements

IMAGCOPYAUTH CHAR(1) Whether GRANTEE can use the COPY, MERGECOPY, MODIFY, and QUIESCE on the database: (see legend **)

LOADAUTH CHAR(1) Whether GRANTEE can LOAD tables in the database: (see legend **)

REORGAUTH CHAR(1) Whether GRANTEE can REORG table spaces and indexes in the database: (see legend **)

RECOVERDBAUTH CHAR(1) Whether the GRANTEE can use the RECOVER and REPORT utilities on tablespaces in the database

REPAIRAUTH CHAR(1) Whether GRANTEE can DIAGNOSE and REPAIR table spaces and indexes in the database: (see legend **)

STARTDBAUTH CHAR(1) Whether the GRANTEE can use the START command against the database

STATSAUTH CHAR(1) Whether GRANTEE can run CHECK and RUNSTATS on the database: (see legend **)

Page 96: DB2 Reference Guide 2up Letter

System Tables CA Reference Guide Catalog Tables

4-20 © 2002 Computer Associates International

Column Name Data Type Description STOPAUTH CHAR(1) Whether GRANTEE can STOP the

database: (see legend **) IBMREQD CHAR(1) Whether the row came from the basic

MRM tape: Y/N/other. If other, release dependency indicator.

GRANTEDTS TIMESTAMP Time GRANT statement was executed. Legend **:

blank privilege not held G privilege held with GRANT option Y privilege held without GRANT option

SYSDBRM (SYSPLAN) Contains one row for each DBRM of each application plan. Column Name Data Type Description NAME CHAR(8) Name of the DBRM. TIMESTAMP CHAR(8) Consistency Token. PDSNAME CHAR(44) Name of Partitioned Data Set (PDS) of

which DBRM is a member. PLNAME CHAR(8) Application plan of which this DBRM is

a part. PLCREATOR CHAR(8) Authorization ID of owner of application

plan. PRECOMPTIME CHAR(8) Time of precompilation: hhmmssth

unless LEVEL precompile option is used.

PRECOMPDATE CHAR(6) Date of precompilation: yymmdd unless LEVEL precompile option is used.

QUOTE CHAR(1) SQL string delimiter for SQL statements in the DBRM: N apostrophe Y quotation mark

COMMA CHAR(1) Decimal point representation for SQL statements in the DBRM: N period Y comma

HOSTLANG CHAR(1) The host language used: B Assembler C OS/VS COBOL D C F FORTRAN P PL/1 2 VS COBOL II 3 IBM COBOL 4 C++

IBMREQD CHAR(1) Whether the row came from the basic MRM tape: Y/N/other. If other, release dependency indicator.

CHARSET CHAR(1) Indicates if the system CCSID for SBCS was 290 (Katakana) at precompile: A No K Yes

MIXED CHAR(1) Indicates if MIXED option was in effect at precompile: Y/N.

DEC31 CHAR(1) Indicates if DEC31 option was in effect at precompile: blank No Y Yes

VERSION VARCHAR(64) Version identifier for the DBRM. PRECOMPTS TIMESTAMP Time that DBRM was precompiled.

SYSDUMMY1 (SYSSTR) Contains one row, used for SQL statements for which a table reference is required, but the contents of the table are unimportant. Column Name Data Type Description IBMREQD CHAR(1) Whether the row came from the basic

MRM tape: Y/N/other. If other, release dependency indicator.

Page 97: DB2 Reference Guide 2up Letter

For DB2 UDB for z/OS and OS/390 System Tables Catalog Tables

© 2002 Computer Associates International 4-21

SYSFIELDS (SYSDBASE) Contains one row for every column that has a field procedure. Column Name Data Type Description TBCREATOR CHAR(8) Authorization ID of owner of table that

contains the column. TBNAME VARCHAR(18) Name of table that contains the

column. COLNO SMALLINT Numerical place of this column in table.NAME VARCHAR(18) Name of the column. FLDTYPE CHAR(8) Data type of the encoded values in the

field. INTEGER large integer SMALLINT small integer FLOAT floating-point CHAR fixed-length character

string VARCHAR variable-length character

string DECIMAL decimal GRAPHIC fixed-length graphic stringVARG variable-length graphic

string LENGTH SMALLINT Length attribute of the field or, for a

decimal field, its precision: INTEGER 4 SMALLINT 2 FLOAT 8 CHAR length of string VARCHAR max. length of string DECIMAL precision of number GRAPHIC # of DBCS characters VARG max. # of DBCS chars.

SCALE SMALLINT Scale if FLDTYPE is DECIMAL, else 0.FLDPROC CHAR(8) For a row describing a field procedure,

the name of the procedure. WORKAREA SMALLINT For a row describing a field procedure,

size (in bytes), of work area required for encoding and decoding of the field procedure.

IBMREQD CHAR(1) Whether the row came from the basic MRM tape: Y/N/other. If other, release dependency indicator.

EXITPARML SMALLINT For a row describing a field procedure, length of the field procedure parameter value block.

PARMLIST VARCHAR (254)

For a row describing a field procedure, the parameter list following FIELDPROC in the statement that created the column, with insignificant blanks removed.

EXITPARM VARCHAR (1530)

For a row describing a field procedure, the parameter value block of the field procedure.

SYSFOREIGNKEYS (SYSDBASE) Contains one row for every column of every foreign key. Column Name Data Type Description CREATOR CHAR(8) Authorization ID of the owner of the

table that contains the column. TBNAME VARCHAR(18) Name of the table containing the

column. RELNAME CHAR(8) Name of the constraint for which the

column is part of the foreign key. COLNAME VARCHAR(18) Name of the column. COLNO SMALLINT Numerical place of column in its table. COLSEQ SMALLINT Numerical place of the column in the

foreign key. IBMREQD CHAR(1) Whether the row came from the basic

MRM tape: Y/N/other. If other, release dependency indicator.

Page 98: DB2 Reference Guide 2up Letter

System Tables CA Reference Guide Catalog Tables

4-22 © 2002 Computer Associates International

SYSINDEXES (SYSDBASE) DSNDXX01 U (CREATOR,NAME) DSNDXX02 N (DBNAME,INDEXSPACE) DSNDXX03 U (TBCREATOR,TBNAME,CREATOR,NAME) Contains one row for every index. Column Name Data Type Description NAME VARCHAR(18) Name of the index. CREATOR CHAR(8) Authorization ID of owner of the index. TBNAME VARCHAR(18) Name of table on which the index is

defined. TBCREATOR CHAR(8) Authorization ID of owner of table. UNIQUERULE CHAR(1) Whether index is unique:

D no (duplicates are allowed) U yes P yes, primary index (unique). Used

to enforce referential integrity C yes, index used to enforce

UNIQUE constraint N Yes, defined with UNIQUE

WHERE NOT NULL R Yes, used to enforce uniqueness of

a non-primary parent key G Yes, used to enforce uniqueness of

values in a column defined as ROWID GENERATED BY DEFAULT.

COLCOUNT SMALLINT Number of columns in the key. CLUSTERING CHAR(1) Whether CLUSTER was specified

when index was created: Y/N. CLUSTERED CHAR(1) Whether table is actually clustered by

index: N no, less than a significant

number of rows are in clustering order, or statistics have not been gathered.

Y yes, more than a significant number of rows are in clustering order

blank not applicable DBID SMALLINT Internal ID of the database. OBID SMALLINT Internal ID of the index fan set

descriptor. ISOBID SMALLINT Internal ID of the index page set

descriptor. DBNAME CHAR(8) Name of the database that contains the

index. INDEXSPACE CHAR(8) Name of the index space. FIRSTKEYCARD INTEGER No longer used. See

FIRSTKEYCARDF. FULLKEYCARD INTEGER No longer used. See

FULLKEYCARDF. NLEAF INTEGER No. of active leaf pages in the index.

The value is –1 if statistics have not been gathered.

NLEVELS SMALLINT No. of levels in the index tree. The value is –1 if statistics have not been gathered.

BPOOL CHAR(8) Name of the buffer pool used for the index.

PGSIZE SMALLINT Size of leaf pages in index, in bytes. ERASERULE CHAR(1) Whether data sets are erased when

dropped: Y/N. The value is meaningless if the index is partitioned

DSETPASS CHAR(8) Not used. CLOSERULE CHAR(1) Whether data sets are candidates for

closure when the limit on the number of open data sets is reached: Y/N.

SPACE INTEGER No. of kilobytes of DASD storage allocated to index (from STOSPACE). For partitioned index space, the value is total kilobytes of DASD storage allocated to all partitions in the storage group.

Page 99: DB2 Reference Guide 2up Letter

For DB2 UDB for z/OS and OS/390 System Tables Catalog Tables

© 2002 Computer Associates International 4-23

Column Name Data Type Description IBMREQD CHAR(1) Whether the row came from the basic

MRM tape: Y/N/other. If other, release dependency indicator.

CLUSTERRATIO SMALLINT %, multiplied by 100, of rows that are in clustering order. For partitioned index, weighted average of all index partitions in terms of the number of rows in the partition. 0 if statistics not run. –2 if index is for auxiliary table.

CREATEDBY CHAR(8) Primary authorization ID of the user who created the index.

IOFACTOR SMALLINT Internal use only. PREFETCHFACTOR SMALLINT Not used. STATSTIME TIMESTAMP The date and time when RUNSTATS

last updated the statistics. The default value is 0001-01-01.00.00.00.000000.

INDEXTYPE CHAR(1) The index type: 2 Type-2 index blank Type-1 index

FIRSTKEYCARDF FLOAT Number of distinct values of the first key column. If RUNSTATS not run value is -1.

FULLKEYCARDF FLOAT Number of distinct values in the full key. If statistics not run value is -1

CREATEDTS TIMESTAMP Time when the CREATE statement was executed for the index.

ALTEREDTS TIMESTAMP Time the most recent ALTER INDEX was issued for this index.

PIECESIZE INTEGER Maximum size of a data set in KB for non-partitioning indexes. A value of (0) indicates that the index is a partitioning index or the index was created in a DB2 release prior to Version 5.

COPY CHAR(1) Whether COPY YES was specified for index: Y Yes, index can be copied.

SYSIBM.SYSLGRNX recording is enabled.

N No, index cannot be copied. SYSIBM.SYSLGRNX recording not enabled.

COPYLRSN CHAR(6) Value is RBA or LRSN (LRSN data sharing only). If index is currently COPY YES value is RBA or LRSN when created or altered to COPY YES. If index is currently COPY NO from create value is X‘000000000000.’ Otherwise, if COPY NO from an alter, COPYLRSN value is unchanged.

CLUSTERRATIOF FLOAT Percentage of rows that are in clustering sequence when multiplied by 100. For partitioning indexes it contains a weighted average for all partitions in terms of number of rows in the partition. 0 if stats not gathered. –2 if index is for auxiliary table.

SPACEF FLOAT(8) Kilobytes of DASD storage. The value is -1 if statistics have not been gathered.

REMARKS VARCHAR (254)

A character field string provided by the user with the COMMENT ON statement.

SYSINDEXES_HIST (SYSHIST) DSNHHX01 N (TBOWNER,TBNAME,NAME,STATSTIME) DSNHHX02 N (CREATOR.NAME) Contains the same rows that are added or changed in SYSINDEXES. Rows in this table can be inserted, updated, and deleted. Column Name Data Type Description NAME VARCHAR(18) Name of the index. CREATOR CHAR(8) Authorization ID of the owner of the

index. TBNAME VARCHAR(18) Name of the table on which the index is

defined.

Page 100: DB2 Reference Guide 2up Letter

System Tables CA Reference Guide Catalog Tables

4-24 © 2002 Computer Associates International

TBCREATOR VARCHAR(18) Authorization ID of the owner of the table.

CLUSTERING CHAR(1) Whether CLUSTER was specified when the index was created: N No Y Yes

NLEAF INTEGER Number of active leaf pages in the index. The value is -1 if statistics have not been gathered.

NLEVELS SMALLINT 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.

STATSTIME TIMESTAMP 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'.

FIRSTKEYCARDF FLOAT(8) 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.

FULLKEYCARDF FLOAT(8) Number of distinct values of the key. The value is -1 if statistics have not been gathered.

CLUSTERRATIOF FLOAT(8) 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 value is 0 if statistics have not been gathered. The value is -2 if the index is for an auxiliary table.

SPACEF FLOAT(8) Number of kilobytes of DASD storage allocated to the index space partition. The value is -1 if statistics have not been gathered.

IBMREQD CHAR(1) Whether the row came from the basic MRM tape: Y/N/other. If other, release dependency indicator.

SYSINDEXPART (SYSDBASE) DSNDRX01 U (IXCREATOR,IXNAME,PARTITION) DSNDRX02 N (STORNAME) Contains one row for each unpartitioned index and one row for each partition of an index. Column Name Data Type Description PARTITION SMALLINT Partition number. 0 if index not

partitioned for both PQTY and SQTY. IXNAME VARCHAR(18) Name of the index. IXCREATOR CHAR(8) Authorization ID of owner of the index. PQTY INTEGER Primary space allocation in units of 4

kilobytes of storage blocks. 0 if a storage group is not used and RUNSTATS INDEX with UPDATE ALL or SPACE is not executed.

SQTY SMALLINT Secondary space allocation in units of 4 kilobytes. 0 if a storage group is not used and RUNSTATS INDEX with UPDATE ALL or SPACE is not executed. If value is too large for column, value is 32767 and value is stored in SECQTYI.

STORTYPE CHAR(1) Type of storage allocation: E explicit, STORNAME is an

Integrated Catalog Facility (ICF) catalog

I implicit, STORNAME names a storage group

STORNAME CHAR(8) Name of storage group or ICF catalog used for space allocation.

Page 101: DB2 Reference Guide 2up Letter

For DB2 UDB for z/OS and OS/390 System Tables Catalog Tables

© 2002 Computer Associates International 4-25

Column Name Data Type Description VCATNAME CHAR(8) Name of ICF catalog used for space

allocation. CARD INTEGER Not used. See CARDF. FAROFFPOS INTEGER Not used. See FAROFFPOSF. LEAFDIST INTEGER 100 times the avg. no. of leaf pages

between successive active leaf pages of the index. The value is –1 if statistics have not been gathered

NEAROFFPOS INTEGER Not used. IBMREQD CHAR(1) Whether the row came from the basic

MRM tape: Y/N/other. If other, release dependency indicator.

LIMITKEY1 VARCHAR (512)

The high value of the limit key of the partition in an internal format. 0 if index is not partitioned. Column contains bit data.

FREEPAGE SMALLINT No. of pages loaded before a page is left as free space.

PCTFREE SMALLINT Percentage of each leaf or nonleaf page left as free space.

SPACE INTEGER No. of kilobytes of DASD storage allocated to the index space partition (from STOSPACE). The value is 0 if STOSPACE or RUNSTATS has not been run. The value is –1 if the index was defined with the DEFINE NO clause.

STATSTIME TIMESTAMP 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.

INDEXTYPE CHAR(1) Unused. GBPCACHE CHAR(1) Group buffer pool cache option

specified for this index or index partition: blank Only changed pages are

cached in group buffer pool A Changed and unchanged pages

are cached in group buffer pool.N No date cached in group buffer

pool. FAROFFPOSF FLOAT No. of referenced rows far from

optimum position because of inserts into a full page. Not applicable for index of auxiliary tables. Value is –1 if statistics are not gathered.

NEAROFFPOSF FLOAT No. of referenced rows near from optimum position because of inserts into a full page. Not applicable for index of auxiliary tables. Value is –1 if statistics are not gathered.

CARDF FLOAT No. of keys in the index that refer to data rows or LOBs.

SECQTYI INTEGER Secondary space allocation in units of 4K. 0 if storage group not used.

IPREFIX CHAR(1) First character of the instance qualifier for this index’s data set name. I or J are valid values; default is I.

ALTEREDTS TIMESTAMP Time of most recent ALTER INDEX execution. Otherwise ‘0001-01-01.00.00.00.000000.’

SPACEF FLOAT(8) Kilobytes of DASD storage. The value is -1 if statistics have not been gathered.

DSNUM INTEGER Number of data sets. The value is -1 if statistics have not been gathered.

EXTENTS INTEGER Number of data set extents. The value is -1 if statistics have not been gathered.

Page 102: DB2 Reference Guide 2up Letter

System Tables CA Reference Guide Catalog Tables

4-26 © 2002 Computer Associates International

Column Name Data Type Description PSEUDO_DEL_ ENTRIES

INTEGER 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.

LEAFNEAR INTEGER Number of leaf pages physically near previous leaf page for successive active leaf pages. The value is -1 if statistics have not been gathered.

LEAFFAR INTEGER 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.

SYSINDEXPART_HIST (SYSHIST) DSNHGX01 N(IXCREATOR,IXNAME,PARTITION,STATSTIME) Contains the same rows that are added or changed in SYSINDEXPART. Rows in this table can be inserted, updated, and deleted. Column Name Data Type Description PARTITION SMALLINT Partition number. Zero if index is not

partitioned. IXNAME VARCHAR(18) Name of the index. IXCREATOR CHAR(8) Authorization ID of the owner of the

index. PQTY INTEGER Primary space allocation in units of

4KB storage blocks. SECQTYI INTEGER Secondary space allocation in units of

4KB storage. LEAFDIST INTEGER 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.

SPACEF FLOAT(8) Number of kilobytes of DASD storage allocated to the index space partition. The value is -1 if statistics have not been gathered.

STATSTIME TIMESTAMP 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'.

FAROFFPOSF FLOAT(8) 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.

NEAROFFPOSF FLOAT(8) 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. The value is -1 if statistics have not been gathered.

CARDF FLOAT(8) Number of keys in the index that refer to data rows or LOBs. The value is -1 if statistics have not been gathered.

EXTENTS INTEGER Number of data set extents. The value is -1 if statistics have not been gathered.

PSEUDO_DEL_ ENTRIES

INTEGER Number of psuedo deleted entries. The value is -1 if statistics have not been gathered.

DSNUM INTEGER Data set number within the table space. 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.

IBMREQD CHAR(1) Whether the row came from the basic MRM tape: Y/N/other. If other, release dependency indicator.

Page 103: DB2 Reference Guide 2up Letter

For DB2 UDB for z/OS and OS/390 System Tables Catalog Tables

© 2002 Computer Associates International 4-27

LEAFNEAR INTEGER Number of leaf pages physically near previous leaf page for successive active leaf pages. The value is -1 if statistics have not been gathered.

LEAFFAR INTEGER 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.

Page 104: DB2 Reference Guide 2up Letter

System Tables CA Reference Guide Catalog Tables

4-28 © 2002 Computer Associates International

SYSINDEXSTATS (SYSSTATS) DSNTXX01 U (OWNER,NAME,PARTITION) One row for each partition of a partitioned index. Rows can be inserted, updated and deleted. Column Name Data Type Description FIRSTKEYCARD INTEGER For the index partition, no. of distinct

values of the first key column. FULLKEYCARD INTEGER For the index partition, no. of distinct

values of the key. NLEAF INTEGER No. of active leaf pages in index

partition. NLEVELS SMALLINT No. of levels in the partition index tree. IOFACTOR SMALLINT Unused. PREFETCHFACTOR SMALLINT Unused. CLUSTERRATIO SMALLINT %, multiplied by 100, of rows that are in

clustering order for the index partition. Value is 0 if statistics have not been gathered.

STATSTIME TIMESTAMP The date and time when RUNSTATS last updated the statistics.

IBMREQD CHAR(1) Whether the row came from the basic MRM tape: Y/N/other. If other, release dependency indicator.

PARTITION SMALLINT Partition number of the index. OWNER CHAR(8) Authorization ID of owner of the index. NAME VARCHAR(18) Name of the index. KEYCOUNT INTEGER Number of rows in the partition. FIRSTKEYCARDF FLOAT No. of distinct values of the first key

column for the index partition. FULLKEYCARDF FLOAT No. of distinct values of the key for the

index partition. KEYCOUNTF FLOAT Number of rows in the partition. CLUSTERRATIOF FLOAT Percentage of rows that are in

clustering sequence, when multiplied by 100, for this index partition. 0 if stats are not gathered.

SYSINDEXSTATS_HIST (SYSHIST) DSNHIX01 N (OWNER,NAME,PARTITION,STATSTIME) Contains the same rows that are added or changed in SYSINDEXSTATS. Rows in this table can be inserted, updated, and deleted. Column Name Data Type Description NLEAF INTEGER Number of active leaf pages in the

index partition. The value is -1 if statistics have not been gathered.

NLEVELS SMALLINT Number of levels in the partition index tree. The value is -1 if statistics have not been gathered.

STATSTIME TIMESTAMP 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 SMALLINT Partition number of the index. OWNER CHAR(8) Authorization ID of the owner of the

index. NAME VARCHAR(18) Name of the index. FIRSTKEYCARDF FLOAT(8) For the index partition, number of

distinct values of the first key column. The value is -1 if statistics have not been gathered.

FULLKEYCARDF FLOAT(8) For the index partition, number of distinct values of the key. The value is -1 if statistics have not been gathered.

KEYCOUNTF FLOAT(8) Total number of rows in the partition. The value is -1 if statistics have not been gathered.

Page 105: DB2 Reference Guide 2up Letter

For DB2 UDB for z/OS and OS/390 System Tables Catalog Tables

© 2002 Computer Associates International 4-29

Column Name Data Type Description CLUSTERRATIOF FLOAT(8) For the index partition, the value, when

multiplied by 100, is the percentage of rows that are in clustering order. The value is 0 if statistics have not been gathered.

IBMREQD CHAR(1) Whether the row came from the basic MRM tape: Y/N/other. If other, release dependency indicator.

SYSJARCLASS_SOURCE (SYSJAUXB) DSNJSX01 U (AUXID, AUXVER) Auxiliary table for SYSIBM.SYSCONTENTS. Contains the source code for a JAVA stored procedure. Rows in this table can be inserted, updated, and deleted. Column Name Data Type Description AUXID VARCHAR(17) Auxiliary id. AUXVER SMALLINT AUXVALUE CLOB(10M) Contents of the class in the JAR file.

SYSJARCONTENTS (SYSJAVA) DSNJCX01 N (JARSCHEMA.JAR_ID) Contains the Java class source for the installed jar file. Rows in this table can be inserted, updated, and deleted. Column Name Data Type Description JARSCHEMA CHAR(8) The schema of the JAR file. JAR_ID CHAR(18) The name of the JAR file. CLASS VARCHAR

(128) The class name contained in the JAR file.

CLASS_SOURCE_ ROWID

ROWID ID used to support CLOB data type.

CLASS_SOURCE CLOB(10M) The contents of the class in the JAR file.

IBMREQD CHAR(1) Whether the row came from the basic MRM tape: Y/N/other. If other, release dependency indicator.

SYSJARDATA (SYSJAUXA) DSNJDX01 U (AUXID, AUXVER) Auxiliary table for SYSIBM.SYSJAROBJECTS. Rows in this table can be inserted, updated, and deleted. Column Name Data Type Description AUXID VARCHAR(17) JAR DATA id. AUXVER SMALLINT AUXVALUE BLOB(100M) The contents of the JAR file.

SYSJAROBJECTS (SYSJAVA) DSNJOX01 U (JARSCHEMA.JAR_ID) Contains binary large object representing the installed jar file. Records the contents of each JAR file. Rows in this table can be inserted, updated, and deleted. Column Name Data Type Description JARSCHEMA CHAR(8) The schema of the JAR file. JAR_ID CHAR(18) The name of the JAR file. OWNER CHAR(8) Authorization ID of the owner of the

JAR object. JAR_DATA_ROWID ROWID ID used to support BLOB data type. JAR_DATA BLOB(100M) The contents of the JAR file. PATH VARCHAR

(1024) The URL path of the source JAR file.

CREATEDTS TIMESTAMP Time when the JAR object was created.

ALTEREDTS TIMESTAMP Time when the JAR object was altered. IBMREQD CHAR(1) Whether the row came from the basic

MRM tape: Y/N/other. If other, release dependency indicator.

Page 106: DB2 Reference Guide 2up Letter

System Tables CA Reference Guide Catalog Tables

4-30 © 2002 Computer Associates International

Page 107: DB2 Reference Guide 2up Letter

For DB2 UDB for z/OS and OS/390 System Tables Catalog Tables

© 2002 Computer Associates International 4-31

SYSJAVAOPTS (SYSJAVA) DSNJVX01 N (JARSCHEMA.JAR_ID) Contains build options that are used during INSTALL_JAR. Rows in this table can be inserted, updated, and deleted. Column Name Data Type Description JARSCHEMA CHAR(8) The schema of the JAR file. JAR_ID CHAR(18) The name of the JAR file. BUILDSCHEMA CHAR(8) Schema name for BUILDNAME. BUILDNAME CHAR(18) Procedure used to create the routine. BUILDOWNER CHAR(8) Authorization ID used to create the

routine. DBRMLIB VARCHAR

(128) PDS name where DBRM is located.

HPJCOMPILE_OPTS VARCHAR (256)

HPJ compile options used to install the routine.

BIND_OPTS VARCHAR (1024)

Bind options used to install the routine.

POBJECT_LIB VARCHAR (128)

PDSE name where program object is located.

IBMREQD CHAR(1) Whether the row came from the basic MRM tape: Y/N/other. If other, release dependency indicator.

SYSKEYCOLUSE (SYSOBJ) DSNCUX01 N(TBCREATOR.TBNAME.CONSTNAME.COLSEQ) Contains a row for every column in a unique constraint (primary or unique key) from the SYSIBM.SYSTABCONST table. Column Name Data Type Description CONSTNAME VARCHAR

(128) Name of the constraint.

TBCREATOR CHAR(8) Authorization ID of the owner of the table on which the constraint is defined.

TBNAME VARCHAR(18) Name of the table on which the constraint is defined.

COLNAME VARCHAR(18) Name of the column. COLSEQ SMALLINT Numeric position of the column in the

key (the first position in the key is 1). COLNO SMALLINT Numeric position of the column in the

table on which the constraint is defined.

IBMREQD CHAR(1) Whether the row came from the basic MRM tape: Y/N/other. If other, release dependency indicator.

SYSKEYS (SYSDBASE) DSNDKX01 U (IXCREATOR,IXNAME,COLNAME) Contains one row for each column of an index key. Column Name Data Type Description IXNAME VARCHAR(18) Name of the index. IXCREATOR CHAR(8) Authorization ID of owner of the index. COLNAME VARCHAR(18) Name of the column of the key. COLNO SMALLINT Numeric position of column in the

table. COLSEQ SMALLINT Numeric position of column in the key. ORDERING CHAR(1) Order of the column in the key:

A Ascending D Descending

IBMREQD CHAR(1) Whether the row came from the basic MRM tape: Y/N/other. If other, release dependency indicator.

SYSLINKS (SYSDBASE) Contains one row for every physical link in the DB2 catalog. Column Name Data Type Description CREATOR CHAR(8) Authorization ID of owner of the child

table of the link. TBNAME VARCHAR(18) Name of child table in the link.

Page 108: DB2 Reference Guide 2up Letter

System Tables CA Reference Guide Catalog Tables

4-32 © 2002 Computer Associates International

Column Name Data Type Description LINKNAME CHAR(8) Name of the link. PARENTNAME VARCHAR(18) Name of parent table in the link. PARENTCREATOR CHAR(8) Authorization ID of owner of parent

table in the link. CHILDSEQ SMALLINT Cluster order of child table within its

parent. DBNAME CHAR(8) Name of database containing the link. DBID SMALLINT Internal DB2 identifier of the database. OBID SMALLINT Internal DB2 identifier of the link. COLCOUNT SMALLINT Number of columns in the ordering key

for the link. 0 if no ordering key. INSERTRULE CHAR(1) Type of insert rule for the link:

F FIRST L LAST O ONE U UNIQUE

IBMREQD CHAR(1) Whether the row came from the basic MRM tape: Y/N/other. If other, release dependency indicator.

SYSLOBSTATS (SYSSTATS) DSNLNX01 U (DBNAME, NAME) Contains one row for each LOB table space. Column Name Data Type Description STATSTIME TIMESTAMP Timestamp of statistical RUNSTATS

update. AVGSIZE INTEGER Average LOB size, in bytes, in LOB

tablespace. FREESPACE INTEGER Number of kilobytes of free space in

LOB tablespace. ORGRATIO DECIMAL(5,2) Ratio of organization in the LOB

tablespace. Value 1 indicating perfect organization. The greater the value exceeds 1, the greater the disorganization.

DBNAME CHAR(8) Name of the database containing this LOB tablespace.

NAME CHAR(8) Name of this LOB tablespace. IBMREQD CHAR(1) Whether the row came from the basic

MRM tape: Y/N/other. If other, release dependency indicator.

SYSLOBSTATS_HIST (SYSHIST) DSNHJX01 N (DBNAME.NAME.STATSTIME) Contains the rows that are added or changed in SYSLOBSTATS. Rows in this table can be inserted, updated, and deleted. Column Name Data Type Description STATSTIME TIMESTAMP Timestamp of RUNSTATS statistics

update. FREESPACE INTEGER Number of pages of free space in the

LOB table space. ORGRATIO DECIMAL(5,2) Ratio of organization in the LOB table

space. A value of indicates perfect organization of the LOB table space. The greater the value exceeds 1, the more disorganized the LOB table space.

DBNAME CHAR(8) Name of the database that contains the LOB table space named in NAME.

NAME CHAR(8) Name of the LOB table space. IBMREQD CHAR(1) Whether the row came from the basic

MRM tape: Y/N/other. If other, release dependency indicator.

SYSPACKAGE (SYSPKAGE) DSNKKX01 U (LOCATION,COLLID,NAME,VERSION) DSNKKX02 U (LOCATION,COLLID,NAME,CONTOKEN) Contains one row for each package. Column Name Data Type Description

Page 109: DB2 Reference Guide 2up Letter

For DB2 UDB for z/OS and OS/390 System Tables Catalog Tables

© 2002 Computer Associates International 4-33

Column Name Data Type Description LOCATION CHAR(16) Always contains blanks. COLLID CHAR(18) Name of the package collection or

schema name for trigger package. NAME CHAR(8) Name of the package. CONTOKEN CHAR(8) Consistency token for the package

from a DBRM: the level as specified by the LEVEL option at precompile or the timestamp indicating when package program was precompiled.

OWNER CHAR(8) Authorization ID of package owner. For a trigger package, the value is the authorization ID of the trigger owner which is current authorization ID (plan or package owner for static CREATE TRIGGER or current SQLID for dynamic CREATE TRIGGER).

CREATOR CHAR(8) Authorization ID of the owner of the creator of the package version. For trigger package: if dynamic SQL, then primary authorization ID of CREATE TRIGGER issuer; if static SQL, then authorization ID of plan or package owner.

TIMESTAMP TIMESTAMP Timestamp when package was created.

BINDTIME TIMESTAMP Timestamp when package was last bound.

QUALIFIER CHAR(8) Implicit name for unqualified tables, views, aliases, and indexes.

PKSIZE INTEGER Size of the base section of the package, in bytes.

AVGSIZE INTEGER Average size of those sections of the package containing SQL statements, in bytes.

SYSENTRIES SMALLINT Number of enabled or disabled entries for this package in SYSIBM.SYSPKSYSTEM. 0, if all connections are enabled.

VALID CHAR(1) Indicates whether the package is valid:A The ALTER statement changed the

description of the table of a view referred to by the package, but package is still valid.

H The ALTER TABLE statement changed the description of the table or base table of a view referred to by the package. The change invalidates the package for DB2 releases prior to V5.

N NO Y YES

OPERATIVE CHAR(1) Whether package can be allocated: Y/N.

VALIDATE CHAR(1) Whether validity checking can be deferred until run time: B All checking must be performed at

bind time R Checking deferred to runtime if

tables, views, or privileges do not exist at bind time

ISOLATION CHAR(1) Isolation level when package last bound or rebound: R RR (repeatable read) S CS (cursor stability) T RS (read stability) U UR (uncommitted read) blank Isolation level for the plan

executing the package RELEASE CHAR(1) Value used for RELEASE when

package last bound or rebound: C at COMMIT D at DEALLOCATION blank not specified, and therefore

the value specified for the plan executing the package.

Page 110: DB2 Reference Guide 2up Letter

System Tables CA Reference Guide Catalog Tables

4-34 © 2002 Computer Associates International

Column Name Data Type Description EXPLAIN CHAR(1) Whether information on package

statements was added to owner’s PLAN_TABLE: Y/N.

QUOTE CHAR(1) SQL string delimiter for SQL statements in the package: N apostrophe Y quotation mark

COMMA CHAR(1) Decimal point representation for SQL in the package: N period Y comma

HOSTLANG CHAR(1) Host language for the package's DBRM: B Assembler language C OS/VS COBOL D C F FORTRAN P PL/1 2 VS COBOL II or IBM COBOL

Release I 3 IBM COBOL 4 C++ blank for package bound remotely. If

trigger package TYPE = T. CHARSET CHAR(1) Indicates whether the system CCSID

for SBCS was 290 (Katakana) at precompile: K Yes A No

MIXED CHAR(1) If mixed data was in effect at precompile: Y/N.

DEC31 CHAR(1) If DEC31 option was in effect when the package program was in precompile: Y/N.

DEFERPREP CHAR(1) Indicates CURRENTDATA option when package was bound or rebound: A Data currency required and

inhibit blocking for all cursors B Data currency not required for

ambiguous cursors C Data currency required for

ambiguous cursors blank If package created before

CURRENTDATA option was available

SQLERROR CHAR(1) SQLERROR option on most recent subcommand that bound or rebound the package: C CONTINUE N NOPACKAGE

REMOTE CHAR(1) Package source: C Package created by BIND

COPY D Package created by

BINDCOPY with the OPTIONS (command).

K Package copied from package originally bound on behalf of a remote requester.

L Package was copied with the OPTIONS (command) from a package originally bound by a remote requester.

N Package bound locally from a DBRM

Y Package bound on behalf of a remote requester.

PCTIMESTAMP TIMESTAMP Date and time of program precompile. Or 0001-01-01-00.00.00.000000 if LEVEL precompile option is used or package came from a non-DB2 location.

IBMREQD CHAR(1) Whether the row came from the basic MRM tape: Y/N/other. If other, release dependency indicator.

VERSION VARCHAR(64) Version identifier for the package. For trigger package value is blank (TYPE=T).

Page 111: DB2 Reference Guide 2up Letter

For DB2 UDB for z/OS and OS/390 System Tables Catalog Tables

© 2002 Computer Associates International 4-35

Column Name Data Type Description PDSNAME VARCHAR(44) For package bound locally, the name

of the PDS library in which the package’s DBRM is a member. For package locally copied, the value in SYSPACKAGE PDSNAME for the source package. Otherwise, the product signature of the bind requester followed by requester’s location name (if DB2) or requester’s LUNAME enclosed in brackets.

DEGREE CHAR(3) The DEGREE option used when package last bound: ANY DEGREE(ANY) 1 DEGREE(1) blank if package was migrated

GROUP_MEMBER CHAR(8) The DB2 sharing member name of the DB2 subsystem that performed the most recent bind. Blank if the DB2 subsystem was not in a DB2 sharing environment when the bind was performed.

Page 112: DB2 Reference Guide 2up Letter

System Tables CA Reference Guide Catalog Tables

4-36 © 2002 Computer Associates International

Column Name Data Type Description DYNAMICRULES CHAR(1) The DYNAMICRULES option used

when the package was last bound: B BIND. Dynamic SQL

statements are executed with DYNAMICRULES bind behavior.

D DEFINEBIND. When package runs under active stored procedure or user-defined function, dynamic SQL in package is executed with DYNAMICRULES define behavior. When package is not run under an active stored procedure or user-defined function, dynamic SQL in package is executed with DYNAMICRULES bind behavior.

E DEFINERUN. When package runs under active stored procedure or user-defined function, dynamic SQL in package is executed with DYNAMICRULES defined behavior. When package is not run under an active stored procedure or user-defined function, dynamic SQL in package is executed with DYNAMICRULES run behavior.

H INVOKEBIND. When package runs under active stored procedure or user-defined dynamic SQL in package is executed with DYNAMICRULES invoke behavior. When package is not run under an active stored procedure or user-defined function dynamic SQL in package is executed with DYNAMICRULES bind behavior.

I INVOKERUN. When package runs under active stored procedure or user-defined dynamic SQL in package is executed with DYNAMICRULES invoke behavior. When package is not run under an active stored procedure or user-defined function dynamic SQL in package is executed with DYNAMICRULES run behavior.

R RUN. Dynamic SQL is executed with DYNAMICRULES run behavior.

blank DYNAMICRULES is not specified for the package. Package uses the DYNAMICRULES value of the plan calling the package at execution time.

REOPTVAR CHAR(1) Whether the access path was determined again at execution time using input variables: N Bind option NOREOPT(VARS)

access path determination at BIND.

Y Bind option REOPT(VARS) access path determined at execution for SQL statements with variables.

Page 113: DB2 Reference Guide 2up Letter

For DB2 UDB for z/OS and OS/390 System Tables Catalog Tables

© 2002 Computer Associates International 4-37

Column Name Data Type Description DEFERPREPARE CHAR(1) PREPARE processing deferred until

OPEN is executed: N Bind option NODEFER

(PREPARE); processing is not deferred.

Y Bind option DEFER (PREPARE); processing is deferred.

blank Bind option not specified; it is inherited from plan.

KEEPDYNAMIC CHAR(1) Whether prepared dynamic statements are to be purged at each commit point:N Bind options KEEPDYNAMIC (NO);

statements are destroyed at commit.

Y Bind option KEEPDYMANIC (YES); statements are kept past commit.

PATHSCHEMAS VARCHAR (254)

SQL path specified on BIND or REBIND. Used to resolve unqualified data type, function and stored procedures. If PATH bind option is not specified, value has zero length and DB2 uses default of SYSIBM, SYSFUNC, SYSPROC, or package qualifier.

TYPE CHAR(1) Type of package. Indicates how package was created: blank BIND PACKAGE T CREATE TRIGGER

DBPROTOCOL CHAR(1) Whether remote access using three-part names is implemented with DRDA or DB2 private protocol access: D DRDA P DB2 private protocol

FUNCTIONTS TIMESTAMP Timestamp when function was resolved. Set by BIND and REBIND, not by AUTOBIND.

OPTHINT CHAR(8) Value of OPTHINT is bind option, identifying rows from authid. PLAN_TABLE to be used as input to the optimizer. Blank if no rows input to optimizer.

ENCODING_CCSID INTEGER 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 default CCSID as

specified on panel DSNTIPF at installation time. Used when the package was bound prior to Version 7.

IMMEDWRITE CHAR(1) Indicates when writes of updated group buffer pool dependent pages are to be done. This option is only applicable for data sharing 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 buffer pool dependent pages are written at or before phase one commit.

Blank A migrated package. RELBOUND CHAR(1) The release when the package was

bound or rebound. Blank Bound prior to Version 7 K Bound on Version 7

Page 114: DB2 Reference Guide 2up Letter

System Tables CA Reference Guide Catalog Tables

4-38 © 2002 Computer Associates International

SYSPACKAUTH (SYSPKAGE) DSNKAX01 N (GRANTOR,LOCATION,COLLID,NAME) DSNKAX02 N (GRANTEE,LOCATION,COLLID,NAME, BINDAUTH,COPYAUTH,EXECUTEAUTH) DSNKAX03 N (LOCATION,COLLID,NAME) Records the privileges held by DB2 users over packages. Column Name Data Type Description GRANTOR CHAR(8) Authorization ID of user who granted

the privileges. Could also be PUBLIC or PUBLIC *.

GRANTEE CHAR(8) Authorization ID of user who holds privileges or name of an application plan that uses privileges.

LOCATION CHAR(16) Always contains blanks. COLLID CHAR(18) Name of package collection. NAME CHAR(8) Name of package on which privileges

are held. An (*) if privileges held on all packages in a collection.

CONTOKEN CHAR(8) Unused. TIMESTAMP TIMESTAMP Timestamp when privilege was

granted. GRANTEETYPE CHAR(1) Type of grantee.

blank An authorization ID. P An application plan.

AUTHHOWGOT CHAR(1) Authorization level of the grantor: Blank N/A A PACKADM (on collection *) C DBCTL D DBADM L SYSCTRL M DBMAINT P PACKADM (on specific

collection) S SYSADM

BINDAUTH CHAR(1) Whether grantee can use the BIND or REBIND: (see legend **)

COPYAUTH CHAR(1) Whether grantee can COPY package: (see legend **)

EXECUTEAUTH CHAR(1) If grantee can run programs that use the package: (see legend **)

IBMREQD CHAR(1) Whether the row came from the basic MRM tape: Y/N/other. If other, release dependency indicator.

Legend **:

blank privilege not held G privilege held with GRANT option Y privilege held without GRANT option

SYSPACKDEP (SYSPKAGE) DSNKDX01 N (DLOCATION,DCOLLID,DNAME, DCONTOKEN) DSNKDX02 N (BQUALIFIER,BNAME,BTYPE) DSNKDX03 N (BQUALIFIER,BNAME,BTYPE,DTYPE) Records the dependencies of packages on tables, views, synonyms, table spaces, indexes, aliases, functions and stored procedures. Column Name Data Type Description BNAME VARCHAR(18) Name of an object the package is

dependent on. BQUALIFIER CHAR(8) If BNAME identifies a tablespace, the

name of its database. Otherwise, the authorization ID of the owner of BNAME

Page 115: DB2 Reference Guide 2up Letter

For DB2 UDB for z/OS and OS/390 System Tables Catalog Tables

© 2002 Computer Associates International 4-39

Column Name Data Type Description BTYPE CHAR(1) Object identified by BNAME and

BQUALIFIER: A alias F user-defined function or cast

function I index O stored procedure P partition tablespace R table space S synonym T table V view

DLOCATION CHAR(16) Always contains blanks. DCOLLID CHAR(18) Name of the collection. DNAME CHAR(8) Name of the package (DBRM). DCONTOKEN CHAR(8) Consistency token for the package

from a DBRM: the level as specified by the LEVEL option at precompile or the timestamp indicating when package program was precompiled.

IBMREQD CHAR(1) Whether the row came from the basic MRM tape: Y/N/other. If other, release dependency indicator.

DOWNER CHAR(8) Package owner DTYPE CHAR(1) Package type:

T Trigger package blank Not trigger package

SYSPACKLIST (SYSPKAGE) DSNKLX01 N (LOCATION,COLLID,NAME) DSNKLX02 U (PLANNAME,SEQNO,LOCATION,COLLID, NAME) Contains one or more rows for every DB2 package bound into a plan Column Name Data Type Description PLANNAME CHAR(8) Name of the plan. SEQNO SMALLINT Sequence no. of this entry in the

package list. LOCATION CHAR(16) Location of the package. Blank if local.

Asterisk (*) if location is to be determined at run time.

COLLID CHAR(18) Collection name for the package. An * indicates collection name determined at runtime.

NAME CHAR(8) Name of the package. (*) means the entire collection.

TIMESTAMP TIMESTAMP Timestamp when row was created. IBMREQD CHAR(1) Whether the row came from the basic

MRM tape: Y/N/other. If other, release dependency indicator.

SYSPACKSTMT (SYSPKAGE) DSNKSX01 U (LOCATION,COLLID,NAME,CONTOKEN, SEQNO) Contains one or more rows for every SQL statement belonging to a package. Rows where SEQNO, STMTNO, and SECTNO are zero are for internal use. Column Name Data Type Description LOCATION CHAR(16) Always contains blanks. COLLID CHAR(18) Name of the collection. NAME CHAR(8) Name of the package (DBRM). CONTOKEN CHAR(8) Consistency token for the package

from a DBRM: the level as specified by the LEVEL option at precompile or the timestamp indicating when package program was precompiled.

SEQNO SMALLINT Sequence number of the row in respect to a statement in the package. The numbering starts with 0.

Page 116: DB2 Reference Guide 2up Letter

System Tables CA Reference Guide Catalog Tables

4-40 © 2002 Computer Associates International

Column Name Data Type Description STMTNO SMALLINT Statement number of corresponding

statement in the package source program. Statement nos. > 32767 displayed as zero or a negative number, see STMTNOI for statement number. To convert a negative statement number, add 65536 to it.

SECTNO SMALLINT Section number of the statement. BINDERROR CHAR(1) Whether an SQL error was detected at

bind: Y yes N no

IBMREQD CHAR(1) Whether the row came from the basic MRM tape: Y/N/other. If other, release dependency indicator.

VERSION VARCHAR(64) Version identifier for the package. STMT VARCHAR

(254) All or a portion of the text for the SQL that the row represents.

ISOLATION CHAR(1) Isolation level for the SQL statement specified in the WITH clause, or blank if WITH was not specified at the statement level (in which case, the isolation level defaults to that of the package or plan): R RR (repeatable read) T RS (read stability) S CS (cursor stability) U UR (uncommitted read) L KEEP UPDATE LOCKS for RS X KEEP UPDATE LOCKS for RR

STATUS CHAR(1) The status of the binding statement: A Distributed; uses DB2 private

protocol. Statement is parsed and executed at the server using defaults for input variables.

B Distributed; uses DB2 private protocol. Statement will be parsed and executed using input values.

C Compiled; statement bound using defaults for input values.

E Explain; statement is an EXPLAIN done at bind time using defaults for input values.

F Parsed; statement did not successfully bind. The statement will be rebound at execution time using values for input variables during access path selection.

G Compiled; statements bound successfully. REOPT was specified to rebind statement at execution using input values.

H Parsed; statement is DDL or another SQL statement that did not bind successfully. Rebind will occur at execution using default input values.

I Indefinite; statement is dynamic bound at execution using defaults for input values.

J Indefinite; statement is dynamic bound at execution using input values.

K Control; CALL statement L Bad; statement is in error, bind

continues, but statement cannot be executed.

blank Statement is non-executed or bound prior to Version 5.

Page 117: DB2 Reference Guide 2up Letter

For DB2 UDB for z/OS and OS/390 System Tables Catalog Tables

© 2002 Computer Associates International 4-41

Column Name Data Type Description ACCESSPATH CHAR(1) For static statements, indicates if the

access path for the statement is based on user-specified optimization hints. For static statement indicates if access path was determined using hints. H hints used blank hints not used or no access

path associated with statement For dynamic statements, the value is blank.

STMTNOI INTEGER Statement number of corresponding statement in package source program.

SECTNOI INTEGER Section number of statement. EXPLAINABLE CHAR(1) 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 Version 7.

QUERYNO INTEGER The query number of the SQL statement in the source program. SQL statements bound prior to Version 7 have a default value of -1. Statements bound in Version 7 or later use 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.

SYSPARMS (SYSOBJ) DSNOPX01 U (SCHEMA, SPECIFICNAME, ROUTINETYPE, ROWTYPE, ORDINAL) DSNOPX02 N (TYPESCHEMA, TYPENAME, ROUTINETYPE, CAST_FUNCTION, OWNER, SCHEMA, SPECIFICNAME) DSNOPX03 N (TYPESCHEMA, TYPENAME) Contains a row for each parameter of a routine or column for table parameters. Column Name Data Type Description SCHEMA CHAR(8) Routine schema. OWNER CHAR(8) Routine owner. NAME CHAR(18) Routine name. SPECIFICNAME CHAR(18) Routine specific name. ROUTINETYPE CHAR(1) Type of routine:

F User-defined function or cast function

P Stored procedure CAST_FUNCTION CHAR(1) Is routine a cast function: Y/N PARMNAME CHAR(18) Parameter name ROUTINEID INTEGER Internal identifier of routine. ROWTYPE CHAR(1) Parameter type:

P Input parm O Output parm B Both input and output parm R Result before casting C Result after casting S For input parms to user-defined

functions sourced on a built-in function

Page 118: DB2 Reference Guide 2up Letter

System Tables CA Reference Guide Catalog Tables

4-42 © 2002 Computer Associates International

Column Name Data Type Description ORDINAL SMALLINT For ROWTYPE = B, O, P, or S value is

the number of the parameter in the routine signature. For ROWTYPE = C or R value is 0. For ROWTYPE = S with parameter CCSID specified, value is 0.

TYPESCHEMA CHAR(8) Schema of data type of parameter. TYPENAME CHAR(18) Name of data type of parameter. DATATYPEID INTEGER Internal identifier of data type of

parameter. SOURCETYPEID INTEGER Internal identifier of source type. Value

is 0 for built-in data type. LOCATOR CHAR(1) Indicates locator value, not actual

value, is passed as input when routine is called: Y Locator value N Actual value

TABLE CHAR(1) Data type of column for table parameter: Y Table parameter N Not table parameter

TABLE_COLNO SMALLINT Column number of table for table parameters. Otherwise 0.

LENGTH INTEGER Length of parameter, for DECIMAL value is precision.

SCALE SMALLINT Scale of data type of parameter. SUBTYPE CHAR(1) Subtype for distinct type, based on

subtype of source type: B FOR BIT DATA S FOR SBCS DATA M FOR MIXED DATA blank Source type is not character

type CCSID INTEGER CCSID of data type for character,

graphic, date, time, and timestamp data types. For string parameters when ROWTYPE = S and ORDINAL = 0.

CAST_FUNCTION_ID INTEGER Internal identifier of function used to cast argument if function is sourced on another function or result. Otherwise value is 0. Not applicable for stored procedures.

ENCODING_SCHEME CHAR(1) Encoding scheme of parameter: A ASCII E EBCDIC U Unicode blank Source type is not character,

graphic, or datetime type IBMREQD CHAR(1) Whether the row came from the basic

MRM tape: Y/N/other. If other, release dependency indicator.

SYSPKSYSTEM (SYSPKAGE) DSNKYX01 N (LOCATION,COLLID,NAME,CONTOKEN, SYSTEM,ENABLE) The systems that have been enabled or disabled for every package. Column Name Data Type Description LOCATION CHAR(16) Blank. COLLID CHAR(18) Name of collection. NAME CHAR(8) Name of package. CONTOKEN CHAR(8) Consistency token for the package

from a DBRM: the level as specified by the LEVEL option at precompile or the timestamp indicating when package program was precompiled.

SYSTEM CHAR(8) Package environment: BATCH TSO batch CICS Customer Information

Control System DB2CALL Call Attachment Facility DLIBATCH DLI batch support facility IMSBMP IMS BMP region IMSMPP IMS MPP or IFP region REMOTE remote application server

Page 119: DB2 Reference Guide 2up Letter

For DB2 UDB for z/OS and OS/390 System Tables Catalog Tables

© 2002 Computer Associates International 4-43

Column Name Data Type Description ENABLE CHAR(1) Indicates if the connections

represented by the row are enabled or disabled: Y/N.

CNAME CHAR(20) Identifies connection or connections: If SYSTEM = BATCH or DB2CALL then blank. Blank, also, if row applies to all servers or connections for the environment. If SYSTEM = REMOTE, LU name for a database server, requester’s location (if DB2), or requester’s LUNAME. Otherwise, name of a single connection.

IBMREQD CHAR(1) Whether the row came from the basic MRM tape: Y/N/other. If other, release dependency indicator.

SYSPLAN (SYSPLAN) DSNPPH01 U (NAME) Contains one row for each application plan. Column Name Data Type Description NAME CHAR(8) Name of the application plan. CREATOR CHAR(8) Authorization ID of owner of application

plan. BINDDATE CHAR(6) Date on which most recent BIND was

performed: yymmdd. VALIDATE CHAR(1) Whether validity checking can be

deferred until run time: B All checking must be performed

during BIND R Checking deferred to run time if

tables, views, or privileges do not exist at bind time.

ISOLATION CHAR(1) Isolation level: R Repeatable read (RR) T Read stability (RS) S Cursor stability (CS) U Uncommitted read (UR)

VALID CHAR(1) Whether plan is valid (can be run without rebinding): N No Y Yes A Table has been altered, but no

rebinding is needed H Table has been altered invalidating

the plan for releases of DB2 prior to Version 5.

OPERATIVE CHAR(1) Whether plan can be allocated: N No, explicit BIND or REBIND

required Y Yes

BINDTIME CHAR(8) Time of the BIND: hhmmssth. PLSIZE INTEGER Size of the base section of the plan in

bytes. IBMREQD CHAR(1) Whether the row came from the basic

MRM tape: Y/N/other. If other, release dependency indicator.

AVGSIZE INTEGER Average size of plan sections containing SQL statements processed at bind time.

ACQUIRE CHAR(1) When resources are acquired: A at allocation U at first use

RELEASE CHAR(1) When resources are released: C at commit D at deallocation

EXREFERENCE CHAR(1) Unused. All values are N. EXSTRUCTURE CHAR(1) Unused. All values are N. EXCOST CHAR(1) Unused. All values are N. EXPLAN CHAR(1) Whether plan was bound with

EXPLAIN YES: Y/N.

Page 120: DB2 Reference Guide 2up Letter

System Tables CA Reference Guide Catalog Tables

4-44 © 2002 Computer Associates International

Column Name Data Type Description EXPREDICATE CHAR(1) CURRENTDATA option when package

was bound: B Data currency not required and

blocking allowed for ambiguous cursors.

C Data currency required and blocking not allowed for ambiguous cursors.

N Blocking not allowed for ambiguous cursors, plan created before CURRENTDATA option was available.

BOUNDBY CHAR(8) Primary authorization ID of binder of the plan.

QUALIFIER CHAR(8) Implicit qualifier for all unqualified table, view, index, and alias names in static SQL statements.

CACHESIZE SMALLINT Cache size in bytes. 0 indicates none used.

PLENTRIES SMALLINT Number of package list entries for this plan. Negative value indicates plan was bound after fall-back to a prior release.

DEFERPREP CHAR(1) Plan bound with DEFER(PREPARE): Y/N.

CURRENTSERVER CHAR(16) Current server specification when plan was last bound. Blank if none was specified.

SYSENTRIES SMALLINT Number of enabled or disabled entries or rows in SYSPLSYSTEM for this plan. A negative of that number means the plan was bound after fall-back to a prior release. A negative value or zero means all connections are enabled.

DEGREE CHAR(3) The DEGREE option used when package last bound: ANY DEGREE(ANY) 1 DEGREE(1) blank a migrated package

SQLRULES CHAR(1) The SQLRULES option used when plan last bound: D or blank SQLRULES(DB2) S SQLRULES(STD) blank a migrated plan

DISCONNECT CHAR(1) The DISCONNECT option used when plan last bound: E or blank DISCONNECT(EXPLICLT) A DISCONNECT

(AUTOMATIC) C DISCONNECT

(CONDITIONAL) blank a migrated plan

GROUP_MEMBER CHAR(8) The DB2 data sharing member name of the DB2 subsystem that performed the most recent bind. This is blank if the DB2 subsystem was not part of a DB2 data sharing environment.

DYNAMICRULES CHAR(1) The DYNAMICRULES option used when the plan was last bound: B Bind. Dynamic SQL

statements are executed with DYNAMIC RULES bind behavior.

blank Run. Dynamic SQL statements in the plan are executed with DYNAMICRULES run behavior.

BOUNDTS TIMESTAMP Timestamp the plan was bound. REOPTVAR CHAR(1) Access path is determined again at

execution time. N Bind option NOREOPT(VARS)

access path is determined at bind. Y Bind option REOPT (VARS)

access path is determined again at execution for SQL statements with variable values.

Page 121: DB2 Reference Guide 2up Letter

For DB2 UDB for z/OS and OS/390 System Tables Catalog Tables

© 2002 Computer Associates International 4-45

Column Name Data Type Description KEEPDYNAMIC CHAR(1) Purging of dynamically prepared

statements at commit. N Bind option KEEPDYNAMIC (NO):

statements are purged. Y Bind option KEEPDYNAMIC

(YES): statements are kept past commit, or rollback.

PATHSCHEMAS VARCHAR (254)

SQL path specified on BIND or REBIND. Used to resolve unqualified data type, function and stored procedures. If PATH bind option not specified, value has zero length and DB2 uses default of SYSIBM, SYSFUNC, SYSPROC, or plan qualifier.

DBPROTOCOL CHAR(1) Whether remote access for SQL with three-part names is implemented with DRDA or DB2 private: D DRDA P DB2 private protocol

FUNCTIONTS TIMESTAMP Timestamp when function was resolved. Set by BIND and REBIND, not by AUTOBIND.

OPTHINT CHAR(8) Value of OPTHINT bind option, identifying rows from authid. PLAN_TABLE to be used as input to the optimizer. Blank if no rows input to optimizer.

ENCODING_CCSID INTEGER 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 default CCSID as specified

on panel DSNTIPF at installation time. Used when the plan was bound prior to Version 7.

IMMEDWRITE CHAR(1) For data sharing environments, this indicates when writes of updated group buffer pool dependent pages are to be done. 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 pages.

1 Bind option IMMEDWRITE(PH1) indicates that updated group buffer pool dependent pages are written at or before phase one commit.

Blank A migrated package. RELBOUND CHAR(1) The release when the package was

bound or rebound. Blank Bound prior to Version 7. K Bound on Version 7.

SYSPLANAUTH (SYSPLAN) DSNAPH01 N (GRANTEE,NAME,EXECUTEAUTH) DSNAPX01 N (GRANTOR) Records the privileges held by users over application plans. Column Name Data Type Description GRANTOR CHAR(8) Authorization ID of user who granted

the privileges. GRANTEE CHAR(8) Authorization ID of user who holds the

privileges. Could be PUBLIC, for a grant to PUBLIC.

Page 122: DB2 Reference Guide 2up Letter

System Tables CA Reference Guide Catalog Tables

4-46 © 2002 Computer Associates International

Column Name Data Type Description NAME CHAR(8) Name of the application plan on which

the privileges are held. TIMESTAMP CHAR(12) Internal use only. DATEGRANTED CHAR(6) Date privileges were granted: yymmdd.TIMEGRANTED CHAR(8) Time privileges were granted:

hhmmssth. GRANTEETYPE CHAR(1) Not used. AUTHHOWGOT CHAR(1) Authorization level of user from whom

privileges were received: blank not applicable C DBCTL D DBADM L SYSCTRL M DBMAINT S SYSADM

BINDAUTH CHAR(1) Whether GRANTEE can use BIND, REBIND, or FREE against the plan: blank privilege not held G privilege held with GRANT

option Y privilege held without GRANT

option EXECUTEAUTH CHAR(1) Whether GRANTEE can run programs

that use the plan: blank privilege not held G privilege held with GRANT

option Y privilege held without GRANT

option IBMREQD CHAR(1) Whether the row came from the basic

MRM tape: Y/N/other. If other, release dependency indicator.

GRANTEDTS TIMESTAMP Time GRANT statement was executed.

SYSPLANDEP (SYSPLAN) DSNGGX01 N (BCREATOR,BNAME,BTYPE) Records the dependencies of plans on tables, views, synonyms, table spaces, indexes, aliases, functions and stored procedures. Column Name Data Type Description BNAME VARCHAR(18) Name of object the plan depends on. BCREATOR CHAR(8) If BNAME is a table space, its

database. Otherwise, authorization ID of owner of BNAME.

BTYPE CHAR(1) Type of object BNAME: A alias F user-defined function or cast

function I index O stored procedure P partitioned table space R table space S synonym T table V view

DNAME CHAR(8) Name of the plan. IBMREQD CHAR(1) Whether the row came from the basic

MRM tape: Y/N/other. If other, release dependency indicator.

SYSPLSYSTEM (SYSPKAGE) DSNKPX01 N (NAME,SYSTEM,ENABLE) Contains zero or more rows for every plan. Column Name Data Type Description NAME CHAR(8) Plan name. SYSTEM CHAR(8) System environment:

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

ENABLE CHAR(1) Whether connections are enabled: Y/N.

Page 123: DB2 Reference Guide 2up Letter

For DB2 UDB for z/OS and OS/390 System Tables Catalog Tables

© 2002 Computer Associates International 4-47

Column Name Data Type Description CNAME CHAR(8) Connection name(s). If SYSTEM =

BATCH or DB2CALL then blank. Blank, also, if row applies to all connections for the environment. Otherwise, name of a single connection.

IBMREQD CHAR(1) Whether the row came from the basic MRM tape: Y/N/other. If other, release dependency indicator.

SYSPROCEDURES (SYSPKAGE) DSNKCX01 U (PROCEDURE,AUTHID,LUNAME) Prior to V6, users were required to use SYSPROCDURES to define stored procedures. In V6 and V7, SYSROUTINES catalog table contains information about stored procedures. During installation of V6 and V7 any rows in SYSPROCEDURES with non-blank AUTHID and LUNAME were copied and formatted as SYSROUTINES rows. Though not used, SYSPROCEDURES is available for V5 fallback. Column Name Data Type Description PROCEDURE CHAR(18) Name of the stored procedure

specified on the SQL CALL statement. AUTHID CHAR(8) The authorization ID of the user

running the SQL application that used the SQL CALL statement. Contains the value of the authorization ID after outbound and inbound name translation operations, when the SQL CALL statement is received from a remote location.

LUNAME CHAR(8) The LUNAME of the system that issued the SQL CALL statement. If LUNAME is blank, the values in this row apply to all systems, including local DB2 system. If LUNAME contains the local DB2’s LUNAME, the row applies to local applications. If the LUNAME contains the LUNAME of a remote client, the row applies to SQL CALL statements received from a remote client.

LOADMOD CHAR(8) The member name of the MVS load module that DB2 should load to satisfy the stored procedure request. If the value of LANGUAGE is COMPJAVA, column value not used.

LINKAGE CHAR(1) The linkage convention used to pass parameters to the stored procedure: N The SIMPLE WITH NULLS

convention is used where an indicator array is passed to the stored procedure. Null input parameters are allowed.

blank The SIMPLE linkage convention is used where input parameters cannot be null

COLLID CHAR(18) The name of the package collection to use when the stored procedure is executed. Blank indicates that the package collection is the same as the package collection of the program that issued the SQL CALL statement.

LANGUAGE CHAR(8) The programming language used to create the stored procedure. Possible values are ASSEMBLE, PLI, COBOL, C, REXX, or COMPJAVA.

ASUTIME INTEGER Number of service units permitted for a single invocation of this stored procedure. If 0, no limit. DB2 cancels the stored procedure if it uses more service units than allowed by ASUTIME value.

Page 124: DB2 Reference Guide 2up Letter

System Tables CA Reference Guide Catalog Tables

4-48 © 2002 Computer Associates International

Column Name Data Type Description STAYRESIDENT CHAR(1) Determines whether stored procedure

load module is deleted from memory when the stored procedure ends: Y Load module remains resident in

memory after stored procedure ends

blank Load module deleted from memory after stored procedure ends

IBMREQD CHAR(1) Whether the row came from the basic MRM tape: Y/N/other. If other, release dependency indicator.

RUNOPTS VARCHAR (254)

The Language Environment (for MVS and VM) run-time options to use this stored procedure. If this column contains an empty string, the installation default Language Environment run-time options are used. If LANGUAGE is COMPJAVA, value is the stored procedure program name (class.method).

PARMLIST VARCHAR (3000)

Defines the parameter list expected by the stored procedure.

RESULT_SETS SMALLINT Max. number of query results sets that can be returned by this stored procedure. Zero indicates no query result sets.

WLM_ENV CHAR(18) Name of the WLM environment running the stored procedure. Blank indicates the stored procedure is run in the DB2-managed SPAS.

PGM_TYPE CHAR(1) Indicates a main routine or subroutine: M Stored procedure runs as main

routine S Stored procedure runs as

subroutine EXTERNAL_SECURITY CHAR(1) Whether a special RACF environment

is required to control non-SQL resource access: N RACF access to non-SQL not

required Y RACF environment should be

automatically created by DB2 each time the stored procedure is invoked.

COMMIT_ON_RETURN CHAR(1) Whether the unit of work is always committed upon successful return: N Unit of work is to continue Y Unit of work is committed Null is the same as ‘N’.

SYSRELS (SYSDBASE) DSNDLX01 N (REFTBCREATOR,REFTBNAME) Contains one row for each defined relationship within the database. Column Name Data Type Description CREATOR CHAR(8) Authorization ID of owner of dependent

table of relationship. TBNAME VARCHAR(18) Name of dependent table of

relationship. RELNAME CHAR(8) Name of the constraint. REFTBNAME VARCHAR(18) Name of parent table in relationship. REFTBCREATOR CHAR(8) Authorization ID of owner of parent

table. COLCOUNT SMALLINT Number of columns in foreign key. DELETERULE CHAR(1) Type of delete rule for referential

constraint: C CASCADE R RESTRICT N SET NULL A NO ACTION

IBMREQD CHAR(1) Whether the row came from the basic MRM tape: Y/N/other. If other, release dependency indicator.

Page 125: DB2 Reference Guide 2up Letter

For DB2 UDB for z/OS and OS/390 System Tables Catalog Tables

© 2002 Computer Associates International 4-49

Column Name Data Type Description RELOBID1 SMALLINT Internal ID of constraint with respect to

the database that contains the parent table.

RELOBID2 SMALLINT Internal ID of constraint with respect to the database that contains the dependent table.

TIMESTAMP TIMESTAMP Date and time constraint was defined. IXOWNER CHAR(8) Owner of unique non-primary index

used for the parent key. Contains all 9’s if enforcing index is dropped. Blank if enforcing index is primary index.

IXNAME VARCHAR(18) Name of unique non-primary index used for the parent key. Contains all 9’s if enforcing index is dropped. Blank if enforcing index is primary index.

SYSRESAUTH (SYSGPAUT) DSNAGH01 N (GRANTEE,QUALIFIER,NAME,OBTYPE) DSNAGX01 N (GRANTOR,QUALIFIER,NAME,OBTYPE) Records collection privileges CREATE IN and PACKADM ON, distinct type USE privileges, bufferpool, storage group and table space USE privileges. Column Name Data Type Description GRANTOR CHAR(8) Authorization ID of user who granted

the privilege. GRANTEE CHAR(8) Authorization ID of user who holds the

privilege. Could also be public for a grant to PUBLIC.

QUALIFIER CHAR(8) The qualifier of the table space (database name), if privilege is for table space OBTYPE = R. The schema name if privilege is for distinct type OBTYPE = D. Otherwise blank.

NAME CHAR(18) Name of storage group, table space, buffer pool, collection, or distinct type. Could be ALL when USE OF ALL BUFFERPOOLS is granted.

GRANTEETYPE CHAR(1) Internal use only. AUTHHOWGOT CHAR(1) Authorization level of user from whom

privileges were received: blank not applicable C DBCTL D DBADM L SYSCTRL M DBMAINT S SYSADM P PACKADM, on specific

collection A PACKADM, on collection *

OBTYPE CHAR(1) Object type: B buffer pool C collection D distinct type S storage group R table space J JAR (JAVA ARchive file)

TIMESTAMP CHAR(12) Internal use only. DATEGRANTED CHAR(6) Date privilege was granted in the form

yymmdd. TIMEGRANTED CHAR(8) Time privilege was granted: hhmmssth.USEAUTH CHAR(1) Whether privilege is held with GRANT

option: G privilege held with GRANT option Y privilege held without GRANT

option PACKADM, when OBTYPE is a collection (C) and QUALIFIER is PACKADM. CREATE IN when OBTYPE is a collection (C) and QUALIFIER is blank.

IBMREQD CHAR(1) Whether the row came from the basic MRM tape: Y/N/other. If other, release dependency indicator.

GRANTEDTS TIMESTAMP Time GRANT statement was executed.

Page 126: DB2 Reference Guide 2up Letter

System Tables CA Reference Guide Catalog Tables

4-50 © 2002 Computer Associates International

SYSROUTINEAUTH (SYSOBJ) DSNOAX01 N (GRANTOR,SCHEMA,SPECIFICNAME, ROUTINETYPE,GRANTEETYPE,EXECUTEAUTH) DSNOAX02 N (GRANTEE,SCHEMA,SPECIFICNAME, ROUTINETYPE,GRANTEETYPE, EXECUTEAUTH, GRANTEDTS) DSNOAX03 N (SCHEMA,SPECIFICNAME,ROUTINETYPE) Contains rows describing privileges help by users on routines, for example, user-defined functions, cast functions, or stored procedures. Column Name Data Type Description GRANTOR CHAR(8) Authorization ID of user who granted

the privilege. GRANTEE CHAR(8) Authorization ID of user who holds the

privilege or the name of the package or plan that uses the privilege. Value could also be PUBLIC.

SCHEMA CHAR(8) Routine schema. SPECIFICNAME CHAR(18) Specific name of routine. Value of “*” if

privilege is held on all routines in the schema.

GRANTEDTS TIMESTAMP Time when grant was executed. ROUNTINETYPE CHAR(1) Routine type:

F user-defined function or cast function

P stored procedure GRANTEETYPE CHAR(1) Grantee type:

blank authorization ID P application plan or package. If

COLLID is not blank grantee is a package.

R internal use only. AUTHHOWGOT CHAR(1) Authorization level of the user from

whom privileges were received. blank not applicable 1 grantor had privilege on

schema.* at time of grant. L SYSCTRL S SYSADM

EXECUTEAUTH CHAR(1) If grantee can execute routine: Y privilege held without grant option. G privilege held with grant option.

COLLID CHAR(18) Collection name, if grantee is a package. Otherwise blank.

CONTOKEN CHAR(8) Consistency token of the DBRM, if grantee is a package. Otherwise blank.

IBMREQD CHAR(1) Whether the row came from the basic MRM tape: Y/N/other. If other, release dependency indicator.

Page 127: DB2 Reference Guide 2up Letter

For DB2 UDB for z/OS and OS/390 System Tables Catalog Tables

© 2002 Computer Associates International 4-51

SYSROUTINES (SYSOBJ) DSNOFX01 U (NAME, PARM_COUNT,

PARM_SIGNATURE,ROUTINETYPE, SCHEMA, PARM1, PARM2, PARM3,

PARM4, PARM5, PARM6, PARM7, PARM8, PARM9, PARM10, PARM11, PARM12, PARM13,

PARM14, PARM15, PARM16, PARM17, PARM18, PARM19, PARM20, PARM21, PARM22, PARM23, PARM24, PARM25, PARM26, PARM27, PARM28,

PARM29, PARM30) DSNOFX02 U (SCHEMA, SPECIFICNAME, ROUTINETYPE) DSNOFX03 N (NAME, SCHEMA, CAST_FUNCTION,

PARM_COUNT, PARM_SIGNATURE, PARM1) DSNOFX04 U (ROUTINEID) DSNOFX05 N (SOURCESCHEMA, SOURCESPECIFIC,

ROUTINETYPE) DSNOFX06 N (SCHEMA, NAME, ROUTINETYPE,

PARM_COUNT) DSNOFX07 U (NAME.PARM_COUNT.ROUTINETYPE.

SCHEMA.PARM_SIGNATURE.PARM1. PARM2.PARM3.PARM4.PARM5.PARM6.

PARM7.PARM8.PARM9.PARM10.PARM11. PARM12.PARM13.PARM14.PARM15.

PARM16.PARM17.PARM18.PARM19.PARM20. PARM21.PARM22.PARM23.PARM24.PARM25. PARM26.PARM27.PARM28.PARM29.PARM30)

DSNOFX08 N (JARSCHEMA.JAR_ID) Contains one row for every routine, for example, a user-defined function, cast function, or stored procedure. Column Name Data Type Description SCHEMA CHAR(8) Routine schema. OWNER CHAR(8) Routine owner. NAME CHAR(18) Routine name. ROUTINETYPE CHAR(1) Routine type:

F user-defined function or cast function

P stored procedure CREATEDBY CHAR(8) Authorization ID that created the

routine. SPECIFICNAME CHAR(18) Specific name of routine. ROUTINEID INTEGER Internal identifier of routine. RETURN_TYPE INTEGER Internal identifier of result data type of

function. If table function, value is –2. ORIGIN CHAR(1) Routine origin:

E external user-defined function or stored procedure

U sourced on user-defined function or built-in function

S system-generated function FUNCTION_TYPE CHAR(1) Function type:

C column function S scalar function T table function blank stored procedure,

ROUTINETYPE = P PARM_COUNT SMALLINT Number of parameters for routine. LANGUAGE CHAR(8) Routine implementation language;

values are ASSEMBLE, PLI, COBOL, C COMPJAVA, JAVA, REXX, SQL. Otherwise blank, if ORIGIN is not E.

COLLID CHAR(18) Package collection name used when routine is executed. If package collection used to execute is the same as package collection invoking routine value is blank.

SOURCESCHEMA CHAR(8) For source built-in function value is SYSIBM. For ORIGIN = U and ROUTINETYPE = F value is source user-defined function schema. Otherwise, blank.

SOURCESPECIFIC CHAR(18) For ORIGIN = U and ROUTINETYPE = F value is specific name of source user-defined function or source built-in function. Otherwise, blank.

Page 128: DB2 Reference Guide 2up Letter

System Tables CA Reference Guide Catalog Tables

4-52 © 2002 Computer Associates International

Column Name Data Type Description DETERMINISTIC CHAR(1) Deterministic option for external

function or a stored procedure: Y Deterministic (consistent

results) N Indeterminate (results may

differ given input values) blank ORIGIN is not E, for a function

(ROUTINETYPE = F) EXTERNAL_ACTION CHAR(1) External action option for external

function: E Function has external side

effects. Number of invocations is important.

N Function has no side effects. blank ORIGIN is not E, for a function

(ROUTINETYPE = F) or it is a stored procedure (ROUTINETYPE = P).

NULL_CALL CHAR(1) CALLED ON NOT NULL INPUT option for external function: Y Function should be called if any

parameter value is NULL. N Function should not be called if

any parameter value is NULL. blank ORIGIN is not E, for a function

and ROUTINETYPE = F. CAST_FUNCTION CHAR(1) Indicates if routine is a cast function:

Y Cast function. N Not a cast function.

SCRATCHPAD CHAR(1) SCRATCHPAD option for external function: Y Function has a SCRATCHPAD. N Function has no

SCRATCHPAD. blank ORIGIN is not E, for a function

(ROUTINETYPE = F) or it is a stored procedure (ROUTINETYPE = P)

SCRATCHPAD_ LENGTH

INTEGER If ORIGIN is E, for a function (ROUTINETYPE = F) and NO SCRATCHPAD was not specified, value is the length of the SCRATCHPAD. Otherwise, value is 0.

FINAL_CALL CHAR(1) FINAL CALL option for external function: Y Final call will be made to

function. N Final call will not be made to

function. blank ORIGIN is not E, for a function

(ROUTINETYPE = F) or it is a stored procedure (ROUTINETYPE = P).

PARALLEL CHAR(1) PARALLEL option for external function:A Parallel tasks can invoke

function. D Parallel tasks cannot invoke

function. blank ORIGIN is not E, for a function

(ROUTINETYPE = F) or it is a stored procedure (ROUTINETYPE = P).

PARAMETER_STYLE CHAR(1) PARAMETER STYLE option of external function or stored procedure: D DB2SQL standard convention

of parameter passing to external functions or stored procedures.

G GENERAL standard convention of parameter passing to stored procedures.

N GENERAL CALL WITH NULLS convention of parameter passing to stored procedures.

J JAVA. All parameters are passed according to conventions for JAVA and SQLJ.

blank If ORIGIN is not E.

Page 129: DB2 Reference Guide 2up Letter

For DB2 UDB for z/OS and OS/390 System Tables Catalog Tables

© 2002 Computer Associates International 4-53

Column Name Data Type Description FENCED CHAR(1) Y Indicates routine runs

separately in DB2 address space.

SQL_DATA_ACCESS CHAR(1) SQL statements allowed in the external function or stored procedure. N NO SQL. C CONTAINS SQL; SQL type

cannot read or modify data. R READS SQL DATA; SQL can

only read data. M MODIFIES SQL DATA; All SQL

allowed, and SQL can read or modify data.

blank Not applicable DBINFO CHAR(1) DBINFO option for external function or

stored procedure: Y DBINFO parameter will be

passed to external function or stored procedure.

N DBINFO parameter will not be passed to external function or stored procedure.

STAYRESIDENT CHAR(1) STAYRESIDENT option for routine, determines if routine should be deleted from memory once ended: Y Load module remains in

memory once ended. N Load module is deleted from

memory once ended. blank ORIGIN is not E.

ASUTIME INTEGER Number of CPU service units allowed for each invocation of the routine. If routine consumes more than allowed, DB2 cancels routine. If value is zero, service units is unlimited.

WLM_ENVIRONMENT

CHAR(18) WLM environment name used to run routine. For (ROUTINETYPE = P), a value of blank indicates stored procedure will be run in DB2 Stored Procedure Address Space (SPAS).

WLM_ENV_FOR_ NESTED

CHAR(1) For nested routines indicates whether the calling routines address space is used to run the nested routine: Y Nested routine uses calling

routine address space, ‘WLM ENVIRONMENT (name.*)’ was specified.

N Nested routine uses address space other than calling routine, ‘WLM ENVIRONMENT name’ was specified).

blank WLM ENVIRONMENT is blank. PROGRAM_TYPE CHAR(1) Whether routine runs as a Language

Environment main routine or subroutine: M main routine S subroutine blank ORIGIN is not E

EXTERNAL_ SECURITY

CHAR(1) Authorization ID to be used if routine accesses resources protected by external security: D DB2 – authorization ID

associated with WLM-established SPAS.

U USER – authorization ID of SQL user invoking routine.

C DEFINER – authorization ID of the routine owner.

blank ORIGIN is not E. COMMIT_ON_ RETURN

CHAR(1) For ROUTINETYPE = P, if transaction is always committed immediately on successful return from this stored procedure: N Unit of work is continued. Y Unit of work is committed

immediately. blank ROUTINETYPE = F.

Page 130: DB2 Reference Guide 2up Letter

System Tables CA Reference Guide Catalog Tables

4-54 © 2002 Computer Associates International

Column Name Data Type Description RESULT_SETS SMALLINT For ROUTINETYPE = P, max number

of ad hoc result sets this stored procedure can return.

For ROUTINETYPE = F or if no ad hoc results exist, value is zero.

LOBCOLUMNS SMALLINT If ORIGIN = E, the number of LOB columns in parameter list for user-defined function. If no LOB columns in parameter list or ORIGIN is not E, value is zero.

CREATEDTS TIMESTAMP Time CREATE for this routine was executed.

ALTERDTS TIMESTAMP Time last ALTER for this routine was executed.

IBMREQD CHAR(1) Whether the row came from the basic MRM tape: Y/N/other. If other, release dependency indicator.

PARM1 SMALLINT Internal use only. PARM2 SMALLINT Internal use only. PARM3 SMALLINT Internal use only. PARM4 SMALLINT Internal use only. PARM5 SMALLINT Internal use only. PARM6 SMALLINT Internal use only. PARM7 SMALLINT Internal use only. PARM8 SMALLINT Internal use only. PARM9 SMALLINT Internal use only. PARM10 SMALLINT Internal use only. PARM11 SMALLINT Internal use only. PARM12 SMALLINT Internal use only. PARM13 SMALLINT Internal use only. PARM14 SMALLINT Internal use only. PARM15 SMALLINT Internal use only. PARM16 SMALLINT Internal use only. PARM17 SMALLINT Internal use only. PARM18 SMALLINT Internal use only. PARM19 SMALLINT Internal use only. PARM20 SMALLINT Internal use only. PARM21 SMALLINT Internal use only. PARM22 SMALLINT Internal use only. PARM23 SMALLINT Internal use only. PARM24 SMALLINT Internal use only. PARM25 SMALLINT Internal use only. PARM26 SMALLINT Internal use only. PARM27 SMALLINT Internal use only. PARM28 SMALLINT Internal use only. PARM29 SMALLINT Internal use only. PARM30 SMALLINT Internal use only. IOS_PER_INVOC FLOAT Estimated number of I/O’s required to

execute routine. –1 if estimate is unknown, optimizer uses 0.

INSTS_PER_INVOC FLOAT Estimated number of machine instructions required to execute routine. –1 if estimate is unknown, optimizer uses 4,000.

INITIAL_IOS FLOAT Estimated number of I/O’s performed the first or last time routine is invoked. –1 if estimate is unknown, optimizer uses 0.

INITIAL_INSTS FLOAT Estimated number of machine instructions performed the first or last time routine is invoked. –1 if estimate is unknown, optimizer uses 40,000.

CARDINALITY FLOAT Predicted cardinality of routine. –1 if predicted cardinality is unknown, optimizer uses 10,000.

RESULT_COLS SMALLINT Number of columns in the result table for table function. Otherwise, value is 1

EXTERNAL_NAME CHAR(254) Path/module/function DB2 should load to execute routine. If ORIGIN is not E, column is blank.

Page 131: DB2 Reference Guide 2up Letter

For DB2 UDB for z/OS and OS/390 System Tables Catalog Tables

© 2002 Computer Associates International 4-55

Column Name Data Type Description PARM_SIGNATURE VARCHAR

(150) Internal use only.

RUNOPTS VARCHAR (254)

Language Environment (LE) run-time options. Empty string indicates installation default LE run-time options used.

REMARKS VARCHAR (254)

User-defined character string provided via COMMENT ON statement.

JAVA_SIGNATURE VARCHAR (1024)

The signature of the jar file. blank When PARAMETER STYLE is

not JAVA CLASS VARCHAR

(128) The class name contained in the jar file. blank When PARAMETER STYLE is

not JAVA JARSCHEMA CHAR(8) The schema of the jar file.

blank When PARAMETER STYLE is not JAVA

JAR_ID CHAR(18) The name of the jar file. blank When PARAMETER STYLE is

not JAVA SPECIAL_REGS CHAR(1) The SPECIAL REGISTER option for a

routine. I INHERIT SPECIAL

REGISTERS D DEFAULT SPECIAL

REGISTERS

SYSROUTINES_OPTS (SYSGRTNS) DSNROX01 U (SCHEMA, ROUTINENAME, BUILDDATE,

BUILDTIME) Contains a row for each generated routine that records the build options for the routine. Column Name Data Type Description SCHEMA CHAR(8) Schema of the routine. ROUTINENAME CHAR(18) Name of the routine. BUILDDATE DATE Date the routine was built BUILDTIME TIME Time the routine was built BUILDSTATUS CHAR(1) Whether this version of the routine’s

options is the current version BUILDSCHEMA CHAR(8) Schema name for BUILDNAME. BUILDNAME CHAR(18) Procedure used to create the routine. BUILDOWNER CHAR(8) Authorization ID used to create the

routine. IBMREQD CHAR(1) Whether the row came from the basic

MRM tape: Y/N/other. If other, release dependency indicator.

PRECOMPILE_OPTS VARCHAR (255)

Precompiler options used to build the routine.

COMPILE_OPTS VARCHAR (255)

Compiler options used to build the routine.

PRELINK_OPTS VARCHAR (255)

Prelink-edit options used to build the routine.

LINK_OPTS VARCHAR (255)

Link-edit options used to build the routine.

BIND_OPTS VARCHAR (1024)

Bind options used to build the routine.

SOURCEDSN VARCHAR (255)

Name of the source data set.

SYSROUTINES_SRC (SYSGRTNS) DSNRSX01 N (ROUTINENAME) DSNRSX02 U (SCHEMA.ROUTINENAME.BUILDDATE.

SEQNO) Contains source for generated routines. Column Name Data Type Description SCHEMA CHAR(8) Schema of the routine. ROUTINENAME CHAR(18 Name of the routine.

Page 132: DB2 Reference Guide 2up Letter

System Tables CA Reference Guide Catalog Tables

4-56 © 2002 Computer Associates International

Column Name Data Type Description BUILDDATE DATE Date the routine was built BUILDTIME TIME Time the routine was built BUILDSTATUS CHAR(1) Whether this version of the routine's

source is the current version SEQNO INTEGER Number of the source statement piece

in CREATESTMT. IBMREQD CHAR(1) Whether the row came from the basic

MRM tape: Y/N/other. If other, release dependency indicator.

CREATESTMT VARCHAR (3800)

Routine source statement.

SYSSCHEMAAUTH (SYSOBJ) DSNSKX01 N (GRANTEE,SCHEMANAME) DSNSKX02 N (GRANTOR) Contains one or more rows for each user granted a privilege on a schema within the database. Column Name Data Type Description GRANTOR CHAR(8) Authorization ID of user who granted

the privilege or SYSADM. GRANTEE CHAR(8) Authorization ID of user or group that

holds the privilege. Value could also be PUBLIC.

SCHEMANAME CHAR(8) Schema name or ‘*’ for all schemas. AUTHHOWGOT CHAR(1) Authorization level of the user from

whom privileges were received. 1 Grantor had privilege on all

schemas at time of grant. L SYSCTRL S SYSADM

CREATEINAUTH CHAR(1) Whether grantee holds CREATIN privilege on schema: blank privilege not held. G privilege held with GRANT option. Y privilege held without GRANT

option. ALTERINAUTH CHAR(1) Whether grantee holds ALTERIN

privilege on schema: blank privilege not held. G privilege held with GRANT option. Y privilege held without GRANT

option. DROPINAUTH CHAR(1) Whether grantee holds DROPIN

privilege on schema: blank privilege not held. G privilege held with GRANT option. Y privilege held without GRANT

option. GRANTEDTS TIMESTAMP Time when grant was executed. IBMREQD CHAR(1) Whether the row came from the basic

MRM tape: Y/N/other. If other, release dependency indicator.

SYSSEQUENCES (SYSSEQ) DSNSQX01 U (SCHEMA.NAME) DSNSQX02 U (SEQUENCEID) Contains one row for each identity column. Column Name Data Type Description SCHEMA CHAR(8) The value of TBCREATOR from the

entry for the identity column. OWNER CHAR(8) The value of TBCREATOR from the

SYSCOLUMNS entry for the identity column.

NAME VARCHAR(18) Name that DB2 generated for the identity column.

SEQTYPE CHAR(1) Type of entry: I For an identity column

SEQUENCEID INTEGER Internal identifier of the identity column. CREATEDBY CHAR(8) The authorization ID under which the

identity column was created.

Page 133: DB2 Reference Guide 2up Letter

For DB2 UDB for z/OS and OS/390 System Tables Catalog Tables

© 2002 Computer Associates International 4-57

Column Name Data Type Description INCREMENT DECIMAL

(31,0) Increment value (positive or negative, within INTEGER scope).

START DECIMAL (31,0)

Start value.

MAXVALUE DECIMAL (31,0)

Maximum value allowed for the identity column.

MINVALUE DECIMAL (31,0)

Minimum value allowed for the identity column.

CYCLE CHAR(1) Whether values for the identity column are wrapped (values continue to be generated for the column after the maximum or minimum value is reached): N No Y Yes

CACHE INTEGER Number of identity column values to preallocate in memory for faster access. A value of 0 indicates that values are not to be preallocated.

ORDER CHAR(1) The value is always 'N' for an identity column.

DATATYPEID INTEGER 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.

SOURCETYPEID INTEGER 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.

CREATEDTS TIMESTAMP Timestamp when the identity column was created.

ALTEREDTS TIMESTAMP Timestamp when the identity column was created.

MAXASSIGNEDVAL DECIMAL (31,0)

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.

IBMREQD CHAR(1) Whether the row came from the basic MRM tape: Y/N/other. If other, release dependency indicator.

REMARKS VARCHAR (254)

The value is always blank for an Identity column.

SYSSEQUENCESDEP (SYSSEQ2) DSNSRX01 U (DCREATOR.DNAME.DCOLNAME) Records the dependencies of identity columns on tables. Column Name Data Type Description BSEQUENCEID INTEGER Internal identifier of the identity column

in SYSSEQUENCES. DCREATOR CHAR(8) Authorization ID of the owner of the

table that contains the identity column. IBMREQD CHAR(1) Whether the row came from the basic

MRM tape: Y/N/other. If other, release dependency indicator.

DNAME VARCHAR(18) Name of the table containing the identity column.

DCOLNAME VARCHAR(18) Name of the identity column.

SYSSTMT (SYSPLAN) One row for each SQL statement bound into a plan. Column Name Data Type Description NAME CHAR(8) Name of the DBRM. PLNAME CHAR(8) Application plan name. PLCREATOR CHAR(8) Authorization ID of owner of application

plan. SEQNO SMALLINT Sequence number of this row with

respect to a statement of the DBRM. The number starts with zero.

Page 134: DB2 Reference Guide 2up Letter

System Tables CA Reference Guide Catalog Tables

4-58 © 2002 Computer Associates International

Column Name Data Type Description STMTNO SMALLINT Statement no. of SQL statement in

source program. Statement nos. > 32767 are displayed as zero, see STMTNOI for statement number.

SECTNO SMALLINT Plan section no. containing the SQL statement.

IBMREQD CHAR(1) Whether the row came from the basic MRM tape: Y/N/other. If other, release dependency indicator.

TEXT VARCHAR (254)

Text of the SQL statement up to first 254 bytes.

ISOLATION CHAR(1) 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 RS X KEEP UPDATE LOCKS for RR blank The WITH clause was not

specified on this statement STATUS CHAR(1) The status of binding the statement.

A Distributed; uses DB2 private protocol. Statement is parsed and executed at the server using defaults for input variables.

B Distributed; uses DB2 private protocol. Statement will be parsed and executed using input variables.

C Compiled; statements bound successfully using defaults for input values.

E Explain; statements is an EXPLAIN done at bind time using defaults for input values.

F Parsed statement did not successfully bind. Validate (RUN) was used to rebind statement at execution using input values.

G Compiled; statement bound successfully. REOPT was specified to rebind statement at execution using input values.

H Parsed; statement is DDL or another SQL statement that did not bind successfully. Rebind will occur at execution using default input values.

I Indefinite; statement is dynamic bound at execution using default for input values.

J Indefinite; statement is dynamic bound at execution using input values.

K Control; CALL statement. L Bad; statement is in error, bind

continues, but statement cannot be executed.

blank Statement is non-executable or bound prior to Version 5.

ACCESSPATH CHAR(1) For static statement indicates if access path was determined using hints. H hints used blank hints not used, no access path

associated with statement, or dynamic statements.

STMTNOI INTEGER Statement number of corresponding statement in source program.

SECTNOI INTEGER Section number of statement.

Page 135: DB2 Reference Guide 2up Letter

For DB2 UDB for z/OS and OS/390 System Tables Catalog Tables

© 2002 Computer Associates International 4-59

Column Name Data Type Description EXPLAINABLE CHAR(1) 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 Version 7.

QUERYNO INTEGER The query number of the SQL statement in source program. SQL statements bound prior to

Version 7 have a default value of -1. Statements bound in Version 7 or later use 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.

SYSSTOGROUP (SYSGROUP) DSNSSH01 U (NAME) Contains one row for each DB2 storage group. Column Name Data Type Description NAME CHAR(8) Name of the storage group. CREATOR CHAR(8) Authorization ID of owner of storage

group. VCATNAME CHAR(8) Integrated Catalog Facility (ICF)

catalog name. VPASSWORD CHAR(8) Not used. SPACE INTEGER No. of kilobytes of DASD allocated to

storage group, as determined by last execution of STOSPACE utility.

SPCDATE CHAR(5) Date of last update to SPACE column: yyddd.

IBMREQD CHAR(1) Whether the row came from the basic MRM tape: Y/N/other. If other, release dependency indicator.

CREATEDBY CHAR(8) Primary authorization ID of user who created the storage group.

STATSTIME

TIMESTAMP Date and time of the last execution of

the STOSPACE utility for this storage group.

CREATEDTS TIMESTAMP Time that CREATE was executed for this storage group.

ALTEREDTS TIMESTAMP Time of the most recent ALTER STOGROUP executed for this storage group. If no ALTER STOGROUP has been executed ALTEREDTS and CREATEDTS will contain the same value.

SYSSTRINGS (SYSSTR) DSNSSX01 U (OUTCCSID, INCCSID, IBMREQD) Information needed to perform string translations from one coded character set to another. If IBMREQD=N, rows can be inserted, updated, and deleted. Column Name Data Type Description INCCSID INTEGER Coded character set ID to translate

from. OUTCCSID INTEGER Coded character set ID to translate to.

Page 136: DB2 Reference Guide 2up Letter

System Tables CA Reference Guide Catalog Tables

4-60 © 2002 Computer Associates International

Column Name Data Type Description TRANSTYPE CHAR(2) Indicates the type of conversion:

GG GRAPHIC to GRAPHIC MM EBCDIC MIXED to EBCDIC

MIXED MS EBCIDC MIXED to SBCS PM ASCII MIXED to EBCDIC MIXEDPS ASCII MIXED to SBCS SM SBCS to EBCDIC MIXED SS SBCS to SBCS MP EBCDIC MIXED to ASCII MIXEDPP ASCII MIXED to ASCII MIXED SP SBCS to ASCII MIXED

ERRORBYTE CHAR(1) Byte in translate table to indicate error. Null indicates the absence of an error byte.

SUBBYTE CHAR(1) Byte in conversion table used as substitution character. Null indicates absence of substitution character.

TRANSPROC CHAR(8) The name of the translate procedure or blanks.

IBMREQD CHAR(1) Whether the row came from the basic MRM tape: Y/N/other. If other, release dependency indicator.

TRANSTAB VARCHAR (256)

Either a conversion table or an empty string.

SYSSYNONYMS (SYSDBASE) DSNDYX01 U (CREATOR,NAME) Contains one row for each synonym of a table or view. Column Name Data Type Description NAME VARCHAR(18) Synonym for the table or view. CREATOR CHAR(8) Authorization ID of owner of synonym. TBNAME VARCHAR(18) Name of the table or view. TBCREATOR CHAR(8) Authorization ID of owner of table or

view. IBMREQD CHAR(1) Whether the row came from the basic

MRM tape: Y/N/other. If other, release dependency indicator.

CREATEDBY CHAR(8) Primary authorization ID of user who created the synonym.

CREATEDTS TIMESTAMP Time the CREATE statement was executed for this synonym.

SYSTABAUTH (SYSDBASE) DSNATX01 N (GRANTOR) DSNATX02 N (GRANTEE,TCREATOR,TTNAME,

GRANTEETYPE,UPDATECOLS,ALTERAUTH,DELETEAUTH, INDEXAUTH,INSERTAUTH, SELECTAUTH,UPDATEAUTH,

CAPTUREAUTH,REFERENCESAUTH,REFCOLS,TRIGGERAUTH) DSNATX03 N (GRANTEE,GRANTEETYPE,COLLID, CONTOKEN) Records the privileges held by users on tables and views. Column Name Data Type Description GRANTOR CHAR(8) Authorization ID of user who granted

the privileges. Could also be PUBLIC or PUBLIC *.

GRANTEE CHAR(8) Authorization ID of user who holds the privileges, or name of application plan or package that uses the privileges. PUBLIC for a GRANT to PUBLIC. PUBLIC * for a GRANT to PUBLIC AT ALL LOCATIONS.

GRANTEETYPE CHAR(1) blank GRANTEE is an authorization ID.

P GRANTEE is an application plan or package if COLLID is not blank.

DBNAME CHAR(8) If privileges were received from a user with DBADM, DBCTRL, or DBMAINT authority, this is the name of the database on which the GRANTOR has that authority. Otherwise blank.

Page 137: DB2 Reference Guide 2up Letter

For DB2 UDB for z/OS and OS/390 System Tables Catalog Tables

© 2002 Computer Associates International 4-61

Column Name Data Type Description SCREATOR CHAR(8) If the row in SYSTABAUTH was

created as a result of a CREATE VIEW statement, this is the authorization ID of the owner of a table or view referenced in that statement. Otherwise, this is same as TCREATOR.

STNAME VARCHAR(18) If the row in SYSTABAUTH was created as a result of a CREATE VIEW statement, this is the name of a table or view referenced in that statement. Otherwise, this is same as TTNAME.

TCREATOR CHAR(8) Authorization ID of owner of table or view.

TTNAME VARCHAR(18) Name of the table or view. AUTHHOWGOT CHAR(1) Authorization level of user from whom

privileges were received: blank not applicable C DBCTL D DBADM L SYSCTRL M DBMAINT S SYSADM

TIMESTAMP CHAR(12) Internal use only. DATEGRANTED CHAR(6) Date privileges were granted. TIMEGRANTED CHAR(8) Time privileges were granted:

hhmmssth. UPDATECOLS CHAR(1) blank If UPDATEAUTH applies

uniformly to all columns of table or view.

* If UPDATEAUTH applies to some columns but not to others. In this case, rows will exist in SYSIBM.SYSCOLAUTH with equal timestamps and PRIVILEGE equal to blank; these indicate the columns on which update privileges were granted.

ALTERAUTH CHAR(1) Whether GRANTEE can alter the table: (see legend **)

DELETEAUTH CHAR(1) Whether GRANTEE can delete rows from the table or view: (see legend **)

INDEXAUTH CHAR(1) Whether GRANTEE can create indexes on the table: (see legend **)

INSERTAUTH CHAR(1) Whether GRANTEE can insert rows into the table or view: (see legend **)

SELECTAUTH CHAR(1) Whether GRANTEE can select rows from the table or view: (see legend **)

UPDATEAUTH CHAR(1) Whether GRANTEE can update rows in the table or view: (see legend **)

IBMREQD CHAR(1) Whether the row came from the basic MRM tape: Y/N/other. If other, release dependency indicator.

GRANTEELOCATION CHAR(16) Unused. LOCATION CHAR(16) Unused. COLLID CHAR(18) Collection name if GRANTEE is a

package ID. Otherwise blank. CONTOKEN CHAR(8) Consistency token if GRANTEE is a

package ID. Otherwise blank. CAPTUREAUTH CHAR(1) Unused. REFERENCESAUTH CHAR(1) Whether GRANTEE can create or drop

referential constraints in which the table is a parent: (see legend **)

REFCOLS CHAR(1) blank If value of REFERENCEAUTH applies to all columns in the table.

* If value of REFERENCESAUTH applies to some, but not all columns. In this case, rows exist in SYSIBM.SYSCOLAUTH with equal timestamps and PRIVILEGE = R indicating the columns on which reference privileges have been granted.

Page 138: DB2 Reference Guide 2up Letter

System Tables CA Reference Guide Catalog Tables

4-62 © 2002 Computer Associates International

Column Name Data Type Description GRANTEDTS TIMESTAMP Time when the GRANT statement was

executed. TRIGGERAUTH CHAR(1) Whether GRANTEE can create triggers

in which the table is named as the triggering table: (see legend **)

Legend **:

blank privilege not held G privilege held with GRANT option Y privilege held without GRANT option

SYSTABCONST (SYSOBJ) DSNCNX01 U (TBCREATOR.TBNAME.CONSTNAME) DSNCNX02 N (IXOWNER.IXNAME) Contains one row for each unique constraint (primary key or unique key) that is created in DB2 for z/OS and OS/390 Version 7 or later. Column Name Data Type Description CONSTNAME VARCHAR

(128) Name of the constraint.

TBCREATOR CHAR(8) Authorization ID of the owner of the table on which constraint is defined.

TBNAME VARCHAR(18) Name of the table on which the constraint is defined.

CREATOR CHAR(8) Authorization ID under which the constraint was created.

TYPE CHAR(1) Type of constraint: P Primary key U Unique key

IXOWNER CHAR(8) Owner of the index enforcing the constraint or blank if index has not been created yet.

IXNAME VARCHAR(18) Name of the index enforcing the constraint or blank if index has not been created yet.

CREATEDTS TIMESTAMP Time when the statement to create the constraint was executed.

IBMREQD CHAR(1) Whether the row came from the basic MRM tape: Y/N/other. If other, release dependency indicator.

COLCOUNT SMALLINT Number of columns in the constraint.

SYSTABLEPART (SYSDBASE) DSNDPX01 U (DBNAME,TSNAME,PARTITION) DSNDPX02 N (STORNAME) Contains one row for each unpartitioned table space and one row for each partition of a partitioned table space. Column Name Data Type Description PARTITION SMALLINT Partition number. 0 if table space is not

partitioned. TSNAME CHAR(8) Name of the table space. DBNAME CHAR(8) Name of the database containing the

table space. IXNAME VARCHAR(18) Name of the partitioned index. Blank if

table space is not partitioned. IXCREATOR CHAR(8) Authorization ID of the owner of index.

Blank if table space not partitioned. PQTY INTEGER Primary space allocation in units of 4

kilobytes of storage blocks. 0 if a storage group is not used and RUNSTATS TABLESPACE with UPDATE(ALL) or UPDATE(SPACE) not executed. Based on PRIQTY value in the CREATE and ALTER TABLESPACE statement.

SQTY SMALLINT Secondary space allocation in units of 4 kilobytes. 0 if storage group not used and RUNSTATS TABLESPACE with UPDATE(ALL) or UPDATE(SPACE) not executed. Based on SECQTY value in CREATE and ALTER TABLESPACE statement.

Page 139: DB2 Reference Guide 2up Letter

For DB2 UDB for z/OS and OS/390 System Tables Catalog Tables

© 2002 Computer Associates International 4-63

Column Name Data Type Description STORTYPE CHAR(1) Type of storage allocation:

E explicit, storage group is not used I implicit, storage group is used

STORNAME CHAR(8) Name of storage group used for space allocation. Blank if storage group not used.

VCATNAME CHAR(8) Name of ICF catalog used for space allocation.

CARD INTEGER No. of rows in the table space or partition. The value is 2147483647 if the no. of rows is ≥ 2147483647. –1 if stats not gathered. If a LOB table space, contains the number of LOBs in the table space.

FARINDREF INTEGER No. of rows that have been relocated far from their original page. Value –1 if statistics not gathered; not applicable to a LOB table space.

NEARINDREF INTEGER No. of rows that have been relocated near their original page. Value –1 if statistics not gathered; not applicable to a LOB table space.

PERCACTIVE SMALLINT Percentage of space occupied by rows of data from active tables. –1 if stats not gathered. –2 if LOB table space.

PERCDROP SMALLINT Percentage of space occupied by rows of dropped tables. Zero if a segmented table space; not applicable for an auxiliary table.

IBMREQD CHAR(1) Whether the row came from the basic MRM tape: Y/N/other. If other, release dependency indicator.

LIMITKEY VARCHAR (512)

High value of the partition in an external format. 0 if table space is not partitioned.

FREEPAGE SMALLINT No. of pages loaded before a page is left as free space.

PCTFREE SMALLINT Percentage of each page left as free space.

CHECKFLAG CHAR(1) C Table space partition in check-pending mode and some rows may violate referential constraints, table check constraints, or both.

blank Table space is not partitioned or does not contain rows that violate referential constraints, table check constraints, or both.

CHECKRID CHAR(4) No longer used. See CHECKRID5B. SPACE INTEGER No. of kilobytes of DASD allocated to

the table space partition, as determined by last execution of STOSPACE or RUNSTATS. The value is 0 if the table space is not related to storage groups, or if STOSPACE or RUNSTATS has not been run. Value is –1 if DEFINE NO clause was used.

COMPRESS CHAR(1) For a table space partition, whether the COMPRESS attribute for the partition is YES. For a nonparitioned table space, whether the COMPRESS attribute for the table space is YES: blank no compression Y compression is defined

PAGESAVE SMALLINT %, multiplied by 100, of pages saved in the table space or partition as a result of data compression. Based on average row length. Zero if no savings from compression, or if stats not gathered.

STATSTIME TIMESTAMP The date and time when RUNSTATS last updated the statistics. The default value is 0001-01-01.00.00.00.000000.

Page 140: DB2 Reference Guide 2up Letter

System Tables CA Reference Guide Catalog Tables

4-64 © 2002 Computer Associates International

Column Name Data Type Description GBPCACHE CHAR(1) Group buffer pool cache option

specified for this table space or 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.

S Only changed system pages, such as space map pages that do not contain actual data values, are cached in the group buffer pool.

CHECKRID5B CHAR(5) Blank if table or partition is not in check-pending status or if table space is not partitioned. Else it is the RID of the first row of the table space partition that may violate referential constraints, table check constraints, or both. Value is X‘0000000000’ indicating that any row may violate referential constraints. Column contains bit data.

TRACKMOD CHAR(1) Track page modifications in the space map pages. blank Yes N No

EPOCH INTEGER Number incremented each time an operation changes location of rows in a table.

SECQTYI INTEGER Secondary space allocation in 4KB units. Value is 0 if storage groups are not used.

CARDF FLOAT Number of rows in tablespace or partition or if LOB table space number of LOBs. –1 if stats are not gathered.

IPREFIX CHAR(1) The first character of the instance qualifier for this index’s data set name. Can contain I or J; default is I.

ALTEREDTS TIMESTAMP Time when most recent ALTER INDEX was executed for the index. Value is “00001-01-01.00.00.00.000000’ if no ALTER INDEX has been executed.

SPACEF FLOAT(8) Kilobytes of DASD storage. The value is -1 if statistics have not been gathered.

DSNUM INTEGER Number of data sets. The value is -1 if statistics have not been gathered.

EXTENTS INTEGER Number of data set extents. The value is -1 if statistics have not been gathered.

SYSTABLEPART_HIST (SYSHIST) DSNHCX01 N (DBNAME.TSNAME.PARTITION.

STATSTIME) Contains the same rows that are added or changed in SYSTABLEPART. Rows in this table can be inserted, updated, and deleted. Column Name Data Type Description PARTITION SMALLINT Partition number. 0 if table space is not

partitioned. TSNAME CHAR(8) Name of the table space. DBNAME CHAR(8) Name of the database that contains the

table space. PQTY INTEGER Primary space allocation in units of

4KB storage blocks. The value of this column is 0 if a storage group is not used. PQTY is based on a value of PRIQTY in the appropriate CREATE or ALTER TABLESPACE statement.

SECQTYI INTEGER Secondary space allocation in units of 4KB storage. If a storage group is not used, the value is 0.

Page 141: DB2 Reference Guide 2up Letter

For DB2 UDB for z/OS and OS/390 System Tables Catalog Tables

© 2002 Computer Associates International 4-65

Column Name Data Type Description FARINDREF INTEGER 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 table space is a LOB table space.

NEARINDREF INTEGER 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 table space is a LOB table space.

PERCACTIVE SMALLINT 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 table space is a LOB table space.

PERCDROP SMALLINT 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 table spaces. Not applicable if the table is an auxiliary table.

SPACEF FLOAT(8) Number of kilobytes of DASD storage allocated to the table space partition. The value is –1 if statistics have not been gathered.

PAGESAVE SMALLINT Percentage of pages saved in the table space or partition as a result of defining the table space with COMPRESS YES or other compression routines. The calculation includes overhead bytes for each row, the bytes required for dictionary, and the bytes required for the current FREEPAGE and PCTFREE specification. This calculation is based on an average row length. 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 data compression causes an increase in the number of pages in the data set.

STATSTIME TIMESTAMP 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'.

CARDF FLOAT(8) Number of rows in the tablespace or partition, or if the table space is a LOB table space, the number of LOBS in the table space. The value is -1 if statistics have not been gathered.

EXTENTS INTEGER Number of data set extents. The value is -1 if statistics have not been gathered.

DSNUM INTEGER Data set number within the table space. For partitioned table spaces, this value corresponds to the partition number for a single partition copy, or 0 for a copy of an entire partitioned table space or index space. The value is -1 if statistics have not been gathered.

IBMREQD CHAR(1) Whether the row came from the basic MRM tape: Y/N/other. If other, release dependency indicator.

SYSTABLES (SYSDBASE) DSNDTX01 U (CREATOR,NAME) DSNDTX02 U (DBID,OBID,CREATOR,NAME) Contains one row for each table, view, or alias. Column Name Data Type Description NAME VARCHAR(18) Name of the table, view, or alias. CREATOR CHAR(8) Authorization ID of owner of the table,

view, or alias.

Page 142: DB2 Reference Guide 2up Letter

System Tables CA Reference Guide Catalog Tables

4-66 © 2002 Computer Associates International

Column Name Data Type Description TYPE CHAR(1) Type of object:

A alias G created global temporary tableT table V view X auxiliary table

DBNAME CHAR(8) For a table or view, the name of the database that contains the table space named in TSNAME. For a temporary table, an alias or view of a view, this value is DSNDB06.

TSNAME CHAR(8) For a table or view of 1 table, the name of the table space that contains the table. For a view of more than 1 table, the name of a table space 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.

DBID SMALLINT Internal ID of database. 0 for view an alias, or a created temporary table.

OBID SMALLINT Internal ID of table. 0 for view, alias, or a created temporary table.

COLCOUNT SMALLINT No. of cols in table or view. 0 for alias. EDPROC CHAR(8) Name of edit proc. Blank for view or

alias or a table without a edit procedure.

VALPROC CHAR(8) Name of the validation procedure. Blank for view or alias or a table without a validation procedure.

CLUSTERTYPE CHAR(1) Whether or not the table can be dropped: blank The table can be dropped. Y The table (and its table space)

cannot be dropped CLUSTERRID INTEGER Unused. CARD INTEGER No longer used. See CARDF. NPAGES INTEGER Total no. of pages on which rows of the

table appear. –1 if stats not gathered or for view, alias or created temporary table or auxiliary.

PCTPAGES SMALLINT Percentage of total pages of table space that either contain rows of the table or are formatted for rows, even if the page contains none. If table space is segmented, the % of total pages in the set of segments assigned to the table. –1 if stats not gathered or for view, alias, created temporary table, or auxiliary table.

IBMREQD CHAR(1) Whether the row came from the basic MRM tape: Y/N/other. If other, release dependency indicator.

REMARKS VARCHAR(254) Remarks provided in COMMENT ON statement, else empty string.

PARENTS SMALLINT No. of relationships in which the table is a dependent. 0 for view, alias, or created temporary table.

CHILDREN SMALLINT No. of relationships in which the table is a parent. 0 for view, alias, or created temporary table.

KEYCOLUMNS SMALLINT No. of columns in the table’s primary key. 0 for view, alias, or created temporary table.

Page 143: DB2 Reference Guide 2up Letter

For DB2 UDB for z/OS and OS/390 System Tables Catalog Tables

© 2002 Computer Associates International 4-67

Column Name Data Type Description RECLENGTH SMALLINT Max. length of any row in table. Length

is 8 + n + l, where: 8 accounts for header (6 bytes) and

ID map entry (2 bytes) n is 10 if table has an edit procedure,

else 0 l is sum of max. col. lengths Determine max. column length: Add 1 byte for null indicator for column that allows nulls. Add 2 bytes for length indicator for variable-length column. Use 4 bytes for length of a LOB column. Use 19 bytes for length of a ROWID column. RECLENGTH is 0 for auxiliary tables, views, and aliases.

STATUS CHAR(1) I Table definition is incomplete because it lacks parent index.

X Table has a parent index. blank Table has no parent key or is

a catalog table, or row is for a view or alias; the definition of the table is complete.

KEYOBID SMALLINT Internal DB2 ID of index that enforces uniqueness of table’s primary key. 0 if not applicable.

LABEL VARCHAR(30) Label provided in LABEL ON statement, else empty string.

CHECKFLAG CHAR(1) C Table space containing table is in check pending mode and some rows may violate referential constraints, table check constraints, or both

blank Table contains no rows that violate referential constraints, table check constraints, or both; or row is for view, alias, or temporary tablespace.

CHECKRID CHAR(4) No longer used. See CHECKRID5B. AUDITING CHAR(1) Value of audit option:

A AUDIT ALL C AUDIT CHANGE blank AUDIT NONE

CREATEDBY CHAR(8) Authorization ID of user who created the table, view, or alias.

LOCATION CHAR(16) Blank for table or view, and for alias defined on a local object. Location name of object for alias defined on a remote object.

TBCREATOR CHAR(8) For alias, the authorization ID of owner of referenced table or view. Otherwise blank.

TBNAME VARCHAR(18) For alias, name for referenced table or view. Otherwise blank.

CREATEDTS TIMESTAMP The timestamp when the table, view, or alias was created.

ALTEREDTS TIMESTAMP The timestamp when the table was last altered. The value equals CREATEDTS if no ALTER occurred or if row refers to a view or alias.

DATACAPTURE CHAR(1) DATACAPTURE option: blank No Y Yes For created temporary tables DATACAPTURE is always blank.

RBA1 CHAR(6) Log RBA when table was created. Value is hex zeroes if log RBA unknown or object is a view, alias, or created temporary table. In data sharing, value is the LRSN.

RBA2 CHAR(6) Log RBA when table was last altered. Value is hex zeroes if log RBA unknown or object is a view, alias, or created temporary table. Value equals RBA1 if no ALTER occurred. In data sharing, value is the LRSN.

Page 144: DB2 Reference Guide 2up Letter

System Tables CA Reference Guide Catalog Tables

4-68 © 2002 Computer Associates International

Column Name Data Type Description PCTROWCOMP SMALLINT % of rows compressed within the total

number of active rows in the table. –1 if the row describes a view, alias, created temporary table or auxiliary table, or if statistics not gathered.

STATSTIME TIMESTAMP The date and time when RUNSTATS last updated the statistics. The default value is 0001-01-01.00.00.00.000000. For a created temporary table, the value is always the default.

CHECKS SMALLINT The number of check constraints defined on a table. 0 if the row describes a view or alias, created temporary table, or if no constraints are defined on the table.

CARDF FLOAT Total no. of rows in table or LOBs in an auxiliary table. -1 if stats not gathered or for a view, alias, or created temporary tablespace.

CHECKRID5B CHAR(5) Blank if the table or partition is not in check pending status, if the table space is not partitioned, or if the table is a created temporary table. Else, 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.

ENCODING_SCHEME CHAR(1) Default encoding scheme for tables, views and local aliases. E EBCDIC A ASCII U Unicode blank remote aliases Value of ‘E’ for tables in non-work file databases; and blank for databases created prior to Version 5 or the default database, DSNDB04.

TABLESTATUS VARCHAR(10) Indicates the reason for an incomplete table definition: L Incomplete because an auxiliary

table or auxiliary index has not been defined for a LOB column.

P Incomplete because the table lacks a primary index.

R Incomplete because the table lacks a required index on a row ID.

U Incomplete because the table lacks a required index on a unique key.

blank Definition is complete. Value of ‘E’ for tables in non-work file databases; and blank for databases created prior to Version 5 or the default database, DSNDB04.

NPAGESF FLOAT(8) Number of pages used by the table. The value is -1 if statistics have not been gathered.

SPACEF FLOAT(8) Kilobytes of DASD storage. The value is -1 if statistics have not been gathered.

AVGROWLEN INTEGER Average length of rows for the tables in the table space. If the table space is compressed, the value is the compressed row length. If the table space is not compressed, the value is the uncompressed row length. The value is -1 if statistics have not been gathered.

RELCREATED CHAR(1) Release of DB2 that was used to create the object: blank Created prior to Version 7 K Created on Version 7

Page 145: DB2 Reference Guide 2up Letter

For DB2 UDB for z/OS and OS/390 System Tables Catalog Tables

© 2002 Computer Associates International 4-69

SYSTABLES_HIST (SYSHIST) DSNHDX01 N (CREATOR.NAME.STATSTIME) Contains the same rows that are added or changed in SYSTABLES. Rows in this table can be inserted, updated, and deleted. Column Name Data Type Description NAME VARCHAR(18) Name of the table, view, or alias. CREATOR CHAR(8) Authorization ID of the owner of the

table, view, or alias. DBNAME CHAR(8) For a table, or a view of tables, the

name of the database that contains the table space named in TSNAME. For a temporary table, an alias, or a view of a view, the value is DSNDB06.

TSNAME CHAR(8) 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 table space 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.

COLCOUNT SMALLINT Number of columns in the table or view. The value is 0 if the row describes an alias.

PCTPAGES SMALLINT Percentage of active table space 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.

PCTROWCOMP SMALLINT Percentage of rows compressed within the total number of 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.

STATSTIME TIMESTAMP 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.

CARDF FLOAT(8) 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.

NPAGESF FLOAT(8) Total number of pages on which rows of the partition appear. The value is -1 if statistics have not been gathered.

AVGROWLEN INTEGER Average row length of the table specified in the table space. The value is -1 if statistics have not been gathered.

SPACEF FLOAT(8) Kilobytes of DASD storage. The value is -1 if statistics have not been gathered.

IBMREQD CHAR(1) Whether the row came from the basic MRM tape: Y/N/other. If other, release dependency indicator.

Page 146: DB2 Reference Guide 2up Letter

System Tables CA Reference Guide Catalog Tables

4-70 © 2002 Computer Associates International

SYSTABLESPACE (SYSDBASE) DSNDSX01 U (DBNAME,NAME) Contains one row for each table space. Column Name Data Type Description NAME CHAR(8) Name of the table space. CREATOR CHAR(8) Authorization ID of owner of the table

space. DBNAME CHAR(8) Name of database containing the table

space. DBID SMALLINT Internal ID of the database. OBID SMALLINT Internal ID of table space file

descriptor. PSID SMALLINT Internal ID of table space page set

descriptor. BPOOL CHAR(8) Name of buffer pool used for the table

space. PARTITIONS SMALLINT No. of partitions in the table space. 0 if

table space not partitioned table space.LOCKRULE CHAR(1) Lock size of the table space:

A any L LOB P page R row S table space T table

PGSIZE SMALLINT Size of pages in table space in kilobytes.

ERASERULE CHAR(1) Whether data sets are erased when dropped: Y/N. No meaning if partitioned table space.

STATUS CHAR(1) Availability status of table space: A available C definition incomplete because no

partitioned index has been created P table space in check-pending modeS table space in check-pending mode

with scope less than entire table T definition incomplete because no

table has been created IMPLICIT CHAR(1) Whether table space was created

implicitly: Y/N. NTABLES SMALLINT No. of tables defined in the table

space. NACTIVE INTEGER No. of active pages in the table space,

or pages formatted for rows, even if the page contains none. 0 if stats not gathered.

DSETPASS CHAR(8) Not used. CLOSERULE CHAR(1) Whether data sets are candidates for

closing when the limit on open data sets is reached: Y/N.

SPACE INTEGER No. of kilobytes of DASD storage allocated to table space (from STOSPACE). 0 if table space not related to a storage group. If table space is partitioned, this is the no. of kilobytes of DASD allocated to all partitions that are storage-group defined.

IBMREQD CHAR(1) Whether the row came from the basic MRM tape: Y/N/other. If other, release dependency indicator.

ROOTNAME VARCHAR(18) Internal use only. ROOTCREATOR CHAR(8) Internal use only. SEGSIZE SMALLINT No. of pages in each segment of a

segmented table space. 0 if table space not segmented.

CREATEDBY CHAR(8) Authorization ID of user who created the table space.

STATSTIME TIMESTAMP The date and time when RUNSTATS last updated the statistics. The default value is 0001-01-01.00.00.00.000000.

Page 147: DB2 Reference Guide 2up Letter

For DB2 UDB for z/OS and OS/390 System Tables Catalog Tables

© 2002 Computer Associates International 4-71

Column Name Data Type Description LOCKMAX INTEGER The maximum number of page or row

locks per user to acquire for the table or the table space before escalating to the next locking level: 0 Lock escalation does not occur n Specified maximum number -1 LOCKMAX SYSTEM is specified,

lock escalation is determined by the value of the LOCKS PER TABLE(SPACE) installation parameter.

TYPE CHAR(1) Indicates the type of tablespace: blank Table space was created

without any of the following options: DSSIZE, LARGE, LOB, and MEMBER CLUSTER.

I Tablespace was defined with the MEMBER CLUSTER option and is not greater than 64GB.

K Tablespace was defined with the MEMBER CLUSTER option and can be greater than 64GB.

L Tablespace can be greater than 64GB.

O Tablespace was defined with the LOB option (tablespace is a LOB tablespace).

CREATEDTS TIMESTAMP Time that the CREATE statement was executed for this tablespace.

ALTEREDTS TIMESTAMP Time the most recent ALTER TABLESPACE statement executed for this tablespace

ENCODING_SCHEME CHAR(1) Default encoding scheme for the tablespace: E EBCDIC A ASCII U Unicode blank For tablespaces in a work file or

a TEMP database Value of ‘E’ for tables in a non-work file; blank for databases created prior to V5 or the default database, DSNDB04.

SBCS_CCSID INTEGER Default SBCS CCSID for the tablespace. Value of zero for databases created prior to V5 or a table space in a TEMP database.

DBCS_CCSID INTEGER Default DBCS CCSID for the tablespace. Value of 0 for a database created prior to V5 or a table space in a TEMP database.

MIXED_CCSID INTEGER Default MIXED CCSID for the tablespace. Value of 0 for a database created prior to V5 or a table space in a TEMP database.

MAXROWS SMALLINT Maximum number of rows DB2 will place on a data page; the default is 255. For a LOB tablespace, the value is 0 to indicate the column is not applicable.

LOCKPART CHAR(1) If LOCKPART is specified for the table space: Y LOCKPART is specified. N LOCKPART is not specified.

LOG CHAR(1) Log changes to tablespace: Y Yes N No, only applies to LOB

tablespaces. NACTIVEF FLOAT Number of active pages in table space

(formatted for rows). -1 if stats not gathered.

DSSIZE INTEGER Max size of data set in kilobytes.

Page 148: DB2 Reference Guide 2up Letter

System Tables CA Reference Guide Catalog Tables

4-72 © 2002 Computer Associates International

SYSTABSTATS (SYSSTATS) DSNTTX01 U (OWNER,NAME,PARTITION) One row for each partition of a partitioned table space. Column Name Data Type Description CARD INTEGER Total number of rows in the partition. NPAGES INTEGER Total number of pages on which rows

of the partition appear. PCTPAGES SMALLINT Percentage of total active pages in the

partition that contain rows of the table. NACTIVE INTEGER Number of active pages in the partition.PCTROWCOMP SMALLINT Percentage of rows compressed within

the total number of active rows in the partition.

STATSTIME TIMESTAMP The date and time when RUNSTATS last updated the statistics.

IBMREQD CHAR(1) Whether the row came from the basic MRM tape: Y/N/other. If other, release dependency indicator.

DBNAME CHAR(8) Database containing table space named in TSNAME.

TSNAME CHAR(8) Table space that contains the table. PARTITION SMALLINT Partition number of the table space that

contains the table. OWNER CHAR(8) Authorization ID of owner of table. NAME VARCHAR(18) Name of the table. CARDF FLOAT Total number of rows in the partition.

SYSTABSTATS_HIST (SYSHIST) DSNHBX01 N (OWNER.NAME.PARTITION.STATSTIME) Contains the same rows that are added or changed in SYSTABSTATS. Rows in this table can be inserted, updated, and deleted. Column Name Data Type Description NPAGES INTEGER Total number of pages on which rows

of the partition appear. STATSTIME TIMESTAMP If RUNSTATS updated the statistics,

the date and time RUNSTATS last updated the statistics.

DBNAME CHAR(8) Database that contains the table space named in TSNAME.

TSNAME CHAR(8) Table space that contains the table. PARTITION SMALLINT Partition number of the tablespace that

contains the table. OWNER CHAR(8) Authorization ID of the owner of the

table. NAME VARCHAR(18) Name of the table. CARDF FLOAT(8) Total number of rows in the partition.

The value is -1 if statistics have not been gathered.

IBMREQD CHAR(1) Whether the row came from the basic MRM tape: Y/N/other. If other, release dependency indicator.

SYSTRIGGERS (SYSOBJ) DSNOTX01 Y (SCHEMA,NAME,SEQNO) DSNOTX02 N (TBOWNER,TBNAME) DSNOTX03 N (SCHEMA.TRIGNAME) Contains one row for each trigger. Column Name Data Type Description NAME CHAR(8) Name of the trigger and trigger

package. SCHEMA CHAR(8) Schema of the trigger. This implicit or

explicit qualifier for the trigger name is also used for the collection ID of the trigger package.

SEQNO SMALLINT Sequence number of this row; the first portion of the trigger definition is in row 1, and successive rows have increasing SEQNO values.

DBID SMALLINT Internal identifier of the database for the trigger.

OBID SMALLINT Internal identifier of the trigger.

Page 149: DB2 Reference Guide 2up Letter

For DB2 UDB for z/OS and OS/390 System Tables Catalog Tables

© 2002 Computer Associates International 4-73

Column Name Data Type Description OWNER CHAR(8) Authorization ID of the owner of the

trigger. The value 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.

CREATEDBY CHAR(8) Authorization ID of the owner of the trigger. The value 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.

TBNAME VARCHAR(18) Name of the table to which this trigger applies.

TBOWNER CHAR(8) Qualifier of the name of the table to which this trigger applies.

TRIGTIME CHAR(1) 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

TRIGEVENT CHAR(1) Operation that activated the trigger: I Insert D Delete U Update

GRANULARITY CHAR(1) Trigger is executed once per: S Statement R Row

CREATEDTS TIMESTAMP 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.

IBMREQD CHAR(1) Whether the row came from the basic MRM tape: Y/N/other. If other, release dependency indicator.

TEXT VARCHAR (3460)

Full text of the CREATE TRIGGER statement.

REMARKS VARCHAR (254)

A character string provided by the user with the COMMENT ON statement.

TRIGNAME VARCHAR(30) Not used

SYSUSERAUTH (SYSUSER) DSNAUH01 N (GRANTEE, GRANTEDTS) DSNAUX02 N (GRANTOR) Records the system privileges held by users. Column Name Data Type Description GRANTOR CHAR(8) Authorization ID of the user who

granted the privileges. GRANTEE CHAR(8) Authorization ID of the user who holds

the privileges. Could also be PUBLIC for a grant to PUBLIC.

TIMESTAMP CHAR(12) Internal use only. DATEGRANTED CHAR(6) Date privileges were granted: yymmdd.TIMEGRANTED CHAR(8) Time privileges were granted:

hhmmssth. GRANTEETYPE CHAR(1) Not used. AUTHHOWGOT CHAR(1) Authorization level of user from whom

privileges were received: blank N/A L SYSCTRL C DBCTL M DBMAINT D DBADM S SYSADM

ALTERBPAUTH CHAR(1) Unused. BINDADDAUTH CHAR(1) Whether GRANTEE can use the BIND

command with ADD option: (see legend**)

Page 150: DB2 Reference Guide 2up Letter

System Tables CA Reference Guide Catalog Tables

4-74 © 2002 Computer Associates International

Column Name Data Type Description BSDSAUTH CHAR(1) Whether GRANTEE can issue the

RECOVER BSDS command: (see legend**)

CREATEDBAAUTH CHAR(1) Whether GRANTEE can create databases and automatically receive DBADM authority over new databases: (see legend**)

CREATEDBCAUTH CHAR(1) Whether GRANTEE can create databases and automatically receive DBCTRL authority over the new databases: (see legend**)

CREATESGAUTH CHAR(1) Whether GRANTEE can create new storage groups: (see legend**)

DISPLAYAUTH CHAR(1) Whether GRANTEE can use DISPLAY: (see legend**)

RECOVERAUTH CHAR(1) Whether GRANTEE can use RECOVER INDOUBT command: (see legend**)

STOPALLAUTH CHAR(1) Whether GRANTEE can use the DB2 STOP: (see legend**)

STOSPACEAUTH CHAR(1) Whether GRANTEE can run STOSPACE utility: (see legend**)

SYSADMAUTH CHAR(1) Whether GRANTEE has system administration authority: (see legend**)

SYSOPRAUTH CHAR(1) Whether GRANTEE has system operator authority: (see legend**)

TRACEAUTH CHAR(1) Whether GRANTEE can use START and STOP TRACE commands: (see legend**)

IBMREQD CHAR(1) Whether the row came from the basic MRM tape: Y/N/other. If other, release dependency indicator.

MON1AUTH CHAR(1) Whether GRANTEE can obtain IFC serviceability data: (see legend**)

MON2AUTH CHAR(1) Whether GRANTEE can obtain IFC data(see legend**)

CREATEALIASAUTH CHAR(1) Whether GRANTEE can use CREATE ALIAS statement: (see legend**)

SYSCTRLAUTH CHAR(1) If GRANTEE has SYSCTRL authority: (see legend**) GRANTEE has GRANT option for either Y or G.

BINDAGENTAUTH CHAR(1) If GRANTEE has BINDAGENT privilege: (see legend**)

ARCHIVEAUTH CHAR(1) Whether GRANTEE can use ARCHIVE LOG command: (see legend**)

CAPTURE1AUTH CHAR(1) Unused. CAPTURE2AUTH CHAR(1) Unused. GRANTEDTS TIMESTAMP Time the GRANT statement was

executed. CREATETMTABAUTH CHAR(1) Indicates if the GRANTEE has

GRANTMTABAUTH privilege: (see legend**)

Legend **:

blank privilege not held G privilege held with GRANT option Y privilege held without GRANT option

SYSVIEWDEP (SYSVIEWS) DSNGGX02 N (BCREATOR,BNAME,BTYPE) DSNGGX03 N (BSCHEMA,BNAME,BTYPE) Records dependencies of views on tables and other views. Column Name Data Type Description BNAME VARCHAR(18) Name of the table or view on which the

view is dependent. If object type is a function (BTYPE=F), name is specific function name.

BCREATOR CHAR(8) Authorization ID of owner of BNAME. For function value is the schema name of BNAME.

Page 151: DB2 Reference Guide 2up Letter

For DB2 UDB for z/OS and OS/390 System Tables Catalog Tables

© 2002 Computer Associates International 4-75

Column Name Data Type Description BTYPE CHAR(1) Type of object BNAME:

F function T table V view

DNAME VARCHAR(18) Name of the view. DCREATOR CHAR(8) Authorization ID of the owner of the

view. IBMREQD CHAR(1) Whether the row came from the basic

MRM tape: Y/N/other. If other, release dependency indicator.

BSCHEMA CHAR(8) Schema of BNAME. DTYPE CHAR(1) Not used (Default V).

SYSVIEWS (SYSVIEWS) DSNVVX01 U (CREATOR,NAME,SEQNO.TYPE) Contains one or more rows for each view. Column Name Data Type Description NAME VARCHAR(18) Name of the view. CREATOR CHAR(8) Authorization ID of owner of the view. SEQNO SMALLINT Row sequence no. First part of view is

on row 1, successive rows have increasing values of SEQNO.

CHECK CHAR(1) Whether CHECK option was specified in the CREATE VIEW statement:

N No C Yes with the cascade semantic Y yes with the local semantic

The value is N when the view does not contain a WHERE clause.

IBMREQD CHAR(1) Whether the row came from the basic MRM tape: Y/N/other. If other, release dependency indicator.

TEXT VARCHAR (254)

Text of the CREATE VIEW statement.

PATHSCHEMAS VARCHAR (254)

SQL path at time view was defined. Used to resolve unqualified data type and function names.

RELCREATED CHAR(1) Release of DB2 that was used to create the object: blank Created prior to Version 7 K Created on Version 7

TYPE CHAR(1) Not used (Default V).

SYSVLTREE (SYSVIEWS) Contains a row for each view whose parse tree could not be totally contained in the SYSVTREE table. The row contains the remainder of the parse tree. Column Name Data Type Description IBMREQD CHAR(1) Whether the row came from the basic

MRM tape: Y/N/other. If other, release dependency indicator.

VTREE VARCHAR (4000)

Remaining part of the parse tree of a view.

SYSVOLUMES (SYSGROUP) Contains one row for each volume of each storage group. Column Name Data Type Description SGNAME CHAR(8) Name of the storage group. SGCREATOR CHAR(8) Authorization ID of the owner of the

storage group. VOLID CHAR(6) Serial number of the volume or * if

SMS managed. IBMREQD CHAR(1) Whether the row came from the basic

MRM tape: Y/N/other. If other, release dependency indicator.

Page 152: DB2 Reference Guide 2up Letter

System Tables CA Reference Guide Catalog Tables

4-76 © 2002 Computer Associates International

SYSVTREE (SYSVIEWS) DSNVTH01 U (CREATOR.NAME,TYPE) Contains a row for each view. Each row contains the first 400 bytes of the parse tree of the view. If the parse tree is longer, the rest of the parse tree is saved in the SYSVLTREE table. Column Name Data Type Description NAME VARCHAR(18) Name of the view. CREATOR CHAR(8) Authorization ID of the owner of view. TOTLEN INTEGER Total length of the parse tree. IBMREQD CHAR(1) Whether the row came from the basic

MRM tape: Y/N/other. If other, release dependency indicator.

VTREE VARCHAR (4000)

Parse tree or portion of the parse tree of the view.

TYPE CHAR(1) Not used. (Default V.)

USERNAMES (SYSDDF) DSNFEX01 U (TYPE,AUTHID,LINKNAME) Used to carry out either an outbound ID translation or inbound ID translation and “come from” checking. Column Name Data Type Description TYPE CHAR(1) How the row is to be used:

O outbound translation I inbound translation and

“come from” checking AUTHID CHAR(8) Authorization ID to be translated.

If blank, any auth ID. LINKNAME CHAR(8) Identifies the VTAM for TCP/IP network

locations associated with this row. blank This name translation rule

applies to any TCP/IP or SNA partner.

nonblank A row exists in SYSIBM.LUNAMES whose LUNAME matches the value in LINKNAME. Or, a row exists in SYSIBM.IPNAMES whose LINKNAME matches the value in the USERNAMES LINKNAME column.

NEWAUTHID CHAR(8) Translated value of AUTHID. Blank specifies no translation.

PASSWORD CHAR(8) Password to accompany an outbound request, if passwords are not encrypted. If passwords are encrypted, or the row is for inbound requests, the column is not used.

IBMREQD CHAR(1) Whether the row came from the basic MRM tape: Y/N/other. If other, release dependency indicator.

Page 153: DB2 Reference Guide 2up Letter

For DB2 UDB for OS/390 System Tables Directory Tables

© 2002 Computer Associates International 4-77

Directory Tables Legend: SYSIBM.Tablename (DSNDB01.Tablespacename) SYSIBM.Indexname Unique/Nonunique Table description.

The DB2 Directory tables hold information that describes the structure of DB2 data, the manner in which it is stored, and how DB2 accesses it. These tables cannot be accessed with DML. The directory is maintained through SQL DDL statements, the BIND process, and utility executions. These tables exist in one of five page sets (table spaces): DBD01, SCT02, SPT01, SYSLGRNX, or SYSUTILX.

DBDR (DBD Parent Record) (DBD01) Stores DBDs (Database Descriptors). Each DBD corresponds to a single database and is structured of a network of object descriptors (OBDs). These OBDs are chained together, the chain pointer being the OBD’s unique object identifier (OBID). Loc Column Name Data Type Description DM prefix: 00 PGSFLAGS CHAR(1) Flag byte:

X‘00’ record X‘20’ overflow record

01 PGSLTH CHAR(2) Length of record, including 6-byte header.

03 PGSOBD CHAR(2) OBID (X‘0021’) 05 PGSID CHAR(1) ID map entry that points to this

record. DBDR record prefix: 06 * CHAR(4) RID of next record in hash or anchor

point if parent bit is 1. 0A * CHAR(4) RID of previous record in hash or

anchor point if parent is 1. 0E * CHAR(4) RID of first DBDS record, which has

more of DBD. 0 if none. 12 DBDLL CHAR(4) Length of the first DBD 16 DBID CHAR(2) Internal DBD identifier (DBID). 18 * CHAR(2) Length of the DBD data field. DBD data: 1A * CHAR(*) A single field that contains DBD

header and data.

DBDS (DBD Child Record) (DBD01) Stores DBDs (Database Descriptors). Loc Column Name Data Type Description DM prefix: 00 PGSFLAGS CHAR(1) Flag byte:

X‘00’ record X‘20’ overflow record

01 PGSLTH CHAR(2) Length of record, including 6-byte header.

03 PGSOBD CHAR(2) OBID(X‘0022’) 05 PGSBID CHAR(1) ID map entry that points to this

record. DBDS record prefix: 06 * CHAR(4) RID of next record in link or if last

DBDS in link, RID of parent record (parent bit is 1).

0A * CHAR(4) RID of previous record in link or if first DBDS in link, RID of parent record (parent bit is 1).

0E * CHAR(2) Length of the DBD data field. DBD data: 10 * CHAR(*) A single field that contains DBD data.

Page 154: DB2 Reference Guide 2up Letter

System Tables DB2 Reference Guide Directory Tables

4-78 © 2002 Computer Associates International

SCTR (SKCT Parent Record) (SCT02) DSNSCT02 U Contains SKCTs (Skeleton Cursor Tables), which store the access paths to DB2 data. If the SKCT is longer than DB2’s maximum record length, it is stored as a sequence of SKCT sections in one or more SCTRs. Each SCTR is identified by a unique section/sequence number. Loc Column Name Data Type Description DM record prefix: 00 PGSFLAGS CHAR(1) Flag byte:

X‘00’ record X‘20’ overflow record

01 PGSLTH CHAR(2) Length of record, including 6-byte header

03 PGSOBD CHAR(2) OBID(X‘0061’) 05 PGSBID CHAR(1) ID map entry that points to this

record SCTR record prefix: 06 SCTLL CHAR(4) Length of the SKCT 0A SCTNAME CHAR(8) Name of the SKCT (plan name) 12 SCTSEC CHAR(4) Section number 16 SCTSEQ CHAR(2) Sequence no. within section SKCT data: 18 * CHAR(*) A single field that contains SKCT

data

SPTR (SKPT Parent Record) (SPT01) DSNSPT01 U Contains SKPTs (Skeleton Package Tables), which store the access paths to DB2 data. If the SKPT is longer than DB2’s maximum record length, it is stored as a sequence of SKPT sections in one or more SPTRs. Each SPTR is identified by a unique section/sequence number. Loc Column Name Data Type Description DM record prefix: 00 PGSFLAGS CHAR(1) Flag byte:

X‘00’ record X‘20’ overflow record

01 PGSLTH CHAR(2) Length of record, including 6-byte header

03 PGSOBD CHAR(2) OBID(X‘0081’) 05 PGSBID CHAR(1) ID map entry that points to this

record SPTR record prefix: 06 SPTLL CHAR(4) Length of the SKPT 0A SPTPID CHAR(4) Package ID 0A * CHAR(18) Reserved 1C SPTCOLID CHAR(18) Package collection ID 2E SPTNAME CHAR(18) Name of the SCPT (package name) 40 SPTCONID CHAR(8) Package consistency token 48 * CHAR(2) Reserved 4A SPTSEC CHAR(4) Section number 4C SPTSEQ CHAR(2) Sequence no. within section SKPT data: 4E * CHAR(*) A single field that contains SKPT

data * SPTVER * Package version ID (max. CHAR(64))

SYSIBM.SYSLGRNX(SYSLGRNG) Stores recovery log ranges that record the time an index space defined with COPY YES or a table space was open for updates. Loc Column Name Data Type Description 00 PGSFLAGS CHAR(1) Flag byte:

X‘00’ record X‘20’ overflow record

01 PGSLTH CHAR(2) Length of record, including 6-byte header

03 PGSOBD CHAR(2) OBID(X‘00D1’) 05 PGSBID CHAR(1) ID map entry that points to this

record

Page 155: DB2 Reference Guide 2up Letter

For DB2 UDB for OS/390 System Tables Directory Tables

© 2002 Computer Associates International 4-79

Loc Column Name Data Type Description 06 LGRDBID CHAR(2) DBID of the modified object 08 LGRPSID CHAR(2) OBID of the modified object 0A LGRUCDT CHAR(6) Modification date: mmddyy. 10 LGRUCTM CHAR(8) Modification time: hhmmssth. 18 LGRSRBA CHAR(6) Starting RBA. 1E LGRSPBA CHAR(6) Stopping RBA. 24 LGRPART SMALLINT Table space partition number 26 LGRSLRSN CHAR(6) Starting LRSN of update log records

for data sharing. X‘000000000000’ otherwise.

2C LGRELRSN CHAR(6) Ending LRSN of update log records for data sharing. X‘000000000000’ otherwise.

32 LGRMEMB CHAR(2) Data sharing member ID of the modifying DB2 subsystem. X‘0001’ for non–data sharing.

SYSIBM.SYSUTIL (SYSUTIL) Stores information about DB2 utilities that have been started, but have not completed running. Loc Column Name Data Type Description 00 PGSFLAGS CHAR(1) Flag byte:

X‘00’ record X‘20’ overflow record

01 PGSLTH CHAR(2) Length of record, including 6-byte header

03 PGSOBD CHAR(2) OBID(X‘0051’) 05 PGSBID CHAR(1) ID map entry that points to this

record 06 USUUID CHAR(16) UTILID passed on job parm 16 USUJOBNM CHAR(8) Job name from the job card 1E USUAUID CHAR(8) Authorization ID of invoker 26 USURDATE CHAR(4) Date of utility run 2A USUREL CHAR(3) Release level checked at restart 2D USUIRQD CHAR(1) IBM required field 2E * CHAR(8) Reserved 36 USUUTNAM CHAR(8) Name of currently executing utility 3E USUPHASE CHAR(8) Phase of currently executing utility 46 CHAR(4) Reserved 4A USUSTATU CHAR(1) Status of current utility:

X‘C1’ active X‘E2’ stopped

4B USUTREQ CHAR(1) Termination requested: X‘E8’ -TERM issued X‘D5’ or X‘40’ -TERM not issued

4C USUFORCE CHAR(1) Element of USO forced: X‘E8’ reload was

successful X‘D5’ or X‘40’ reload not successful

4D USURLOK CHAR(1) Reload has completed: X‘E8’ reload was

successful X‘D5’ or X‘40’ reload not successful

4E USUCMPOK CHAR(1) Compatibility check passed: X‘E8’ compatible with

executing utilities X‘D5’ or X‘40’ not compatible

4F * CHAR(3) Reserved. 52 USUPOS CHAR(4) Relative USM position in SYSIN. 56 USUNDONE CHAR(8) Total number of pages/records done. 5E USUCKSUM CHAR(4) USM CHECKSUM. 62 USUDBOB CHAR(2) DBID for table space. 64 USUPSID CHAR(2) PSID for table/index space. 66 USUPSDD CHAR(2) Secondary PSID for recover index

data page set. 68 USUDSNU CHAR(2) Data set number. 6A * CHAR(2) Reserved. 6C USUDBNAM CHAR(8) Database name.

Page 156: DB2 Reference Guide 2up Letter

System Tables DB2 Reference Guide Directory Tables

4-80 © 2002 Computer Associates International

Loc Column Name Data Type Description 74 USUSPNAM CHAR(8) Table/index space name. 7C * CHAR(12) Reserved. 88 USUUDA CHAR(150) Utility-dependent data. 11E USUUSTRL CHAR(2) Length of restart area. 120 USUUSTRT CHAR(3712) Restart control blocks. FA0 USUMEMBR CHAR(8) Executing DB2 subsystem’s member

name for data sharing. Otherwise blank.

SYSIBM.SYSUTILX (SYSUTIL) A record is created in the SYSUTILX table when the amount of information in the parent record exceeds the record size of SYSUTIL. The rows in SYSUTILX are uniquely identified by the utility identifier and sequence number. Loc Column Name Data Type Description 00 PGSFLAGS CHAR(1) Flag byte:

X‘00’ record X‘20’ overflow record

01 PGSLTH CHAR(2) Length of record, including the 6-byte header.

03 PGSOBD CHAR(2) OBID (X‘0051’). 05 PGSBID CHAR(1) ID map entry that points to this record.06 UTILID CHAR(16) Utility ID that identifies the parent

record in SYSIBM.SYSTUIL. 16 SEQNO SMALLINT Sequence number of this row. 18 CHAR(12) Reserved. 24 CHECKPOINT VARCHAR

(4000) Overflow checkpoint/restart information.

Page 157: DB2 Reference Guide 2up Letter

For DB2 UDB for OS/390 System Tables Directory Tables

© 2002 Computer Associates International 4-81

Page 158: DB2 Reference Guide 2up Letter

For DB2 UDB for z/OS and OS/390 User Tables PLAN_TABLE

© 2002 Computer Associates International 5-1

5. User Tables

PLAN_TABLE At least one row for each table referenced in each SQL statement being explained. Column Name Data Type Description

QUERYNO INTEGER A number that identifies the statement being explained. For a row produced by an EXPLAIN statement, this is the number specified in the SET QUERYNO clause, which is an optional part of the SELECT, INSERT, UPDATE and DELETE statements. Otherwise, DB2 assigns a number. For an embedded EXPLAIN statement or a statement explained during a bind or rebind, this is the source listing line number.

QBLOCKNO SMALLINT A number that identifies separate blocks (or sections) of the statement being explained. QBLOCKNO starts at 1 and is incremented for each query encountered in the statement.

APPLNAME CHAR(8) Name of the application plan being explained; blank for dynamic EXPLAIN statements.

PROGNAME CHAR(8) Name of the DBRM or package being explained; blank for dynamic EXPLAIN statements.

PLANNO SMALLINT A number identifying the order in which the steps were executed within the QBLOCKNO.

METHOD SMALLINT What join method or sort is used for the step identified by PLANNO: 0 First (outer) table accessed,

continuation of previous table accessed, or not used.

1 Nested loop join. For each qualifying row in the outer (composite) table, all matching rows in the inner table are found and local predicates are applied.

2 Merge scan join. Use the outer (composite) table join value(s) to find all matches in the inner (new) table. Combine the matching rows and place in the result set. For the first outer table row, continue to read and process matching rows until the inner table join value(s) exceeds the outer table value(s). Read next outer table row for next row whose join value(s) matches or exceeds the join value(s) in the inner table. If the value(s) are new, search the inner table for matches. If the value(s) remain the same, reread the matching inner table rows. Repeat the process until there are no more rows in either table.

3 Additional 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. For each join column(s) in the outer

(composite) table, find qualifying index entries and RIDs in the inner table index. Append inner table RIDs to corresponding outer table data and place partial rows in an intermediate (new) table. Also place RIDs in a RID list. Sort intermediate (new) table and RID list in RID sequence. Use the sorted RID list to retrieve inner table rows and apply local predicates. Replace RID values in intermediate table with inner table row values.

Page 159: DB2 Reference Guide 2up Letter

User Tables CA Reference Guide PLAN_TABLE

5-2 © 2002 Computer Associates International

Column Name Data Type Description

CREATOR CHAR(8) Creator of new table (or materialized view) accessed in this step. Blank if METHOD is 3.

TNAME CHAR(18) Name of new table, created or declared temporary table, materialized view, or materialized table expression, accessed in this step. Blank if METHOD is 3. This column contains the temporary table name of the work file in the form DSNWFQB (QBLOCKNO) when an outer join is materialized or an intermediate result for a UNION ALL.

TABNO SMALLINT The sequence of the table in the FROM clause. Value is 0 if METHOD is 3. For IBM use.

ACCESSTYPE CHAR(2) Method used to access the new table: I Matching index scan when

MATCHCOLS > 0, or nonmatching index scan when MATCHCOLS = 0

I1 One-fetch index scan N Matching index scan for each of

the IN-list values R Table space scan M Multiple index scan, followed by

MX, MI, and MU rows MX For each of the indexes used in

the multiple index scan, the qualifying RIDs are collected

MI Intersection of the RID lists, due to ANDed predicates

MU Union of the RID lists, due to ORed predicates

blank Clustering index for INSERTs; or no index for UPDATEs and DELETEs WHERE CURRENT OF; or not applicable

MATCHCOLS SMALLINT The number of index key columns used in an index scan (ACCESSTYPE = I, I1, N or MX). Otherwise 0.

ACCESSCREA-TOR

CHAR(8) The creator of the index used in an index scan (ACCESSTYPE = I, I1, N or MX). Otherwise blank.

ACCESSNAME CHAR(18) The name of the index used in an index scan (ACCESSTYPE = I, I1, N or MX). Otherwise blank.

INDEXONLY CHAR(1) Indicates if only index entries are accessed for a step (PLANNO): Y/N.

SORTN_UNIQ CHAR(1) Whether a sort is performed on the new table to remove duplicate rows: Y/N.

SORTN_JOIN CHAR(1) Whether a sort is performed on the new (inner) table of join method 2 or 4: Y/N.

SORTN_ ORDERBY

CHAR(1) Whether an ORDER BY clause results in a sort on the new table: Y/N.

SORTN_ GROUPBY

CHAR(1) Whether a GROUP BY clause results in a sort on the new table: Y/N.

SORTC_UNIQ CHAR(1) Whether a sort is performed on the composite table to remove duplicate rows: Y/N.

SORTC_JOIN CHAR(1) Whether a sort is performed on the composite (outer) table of join method 1, 2 or 4: Y/N.

SORTC_ ORDERBY

CHAR(1) Whether an ORDER BY clause or quantified predicate results in a sort on the composite table: Y/N.

SORTC_ GROUPBY

CHAR(1) Whether a GROUP BY clause results in a sort on the composite table: Y/N.

Page 160: DB2 Reference Guide 2up Letter

For DB2 UDB for z/OS and OS/390 User Tables PLAN_TABLE

© 2002 Computer Associates International 5-3

Column Name Data Type Description

TSLOCKMODE CHAR(3) The lock mode to be acquired on the new table, its tablespace, or tablespace partitions, when isolation determined at BIND time: IS Intent Share IX Intent eXclusive S Share U Update X eXclusive SIX Share with Intent eXclusive N UR isolation When isolation determined at RUN time

(not at BIND time): NS If the isolation level at execution

time is UR, then no lock is acquired; if the isolation level is CS, RS, or RR, then an S table space lock is acquired

NIS If the isolation level at execution time is UR, then no lock is acquired; if the isolation level is CS, RS, or RR, then an IS table space lock is acquired

NSS If the isolation level at execution time is UR, then no lock is acquired; if the isolation level is CS or RS, then an IS table space lock is acquired; if the isolation level is RR, then an S table space lock is acquired

SS If the isolation level at execution time is UR, CS, or RS, then an IS table space lock is acquired; if the isolation level is RR, then an S table space lock is acquired

The data in this column is right justified. If the column contains a blank, then no lock is acquired.

TIMESTAMP CHAR(16) Time at which the EXPLAIN statement was processed: ccyymmddhhmmsshh.

REMARKS VARCHAR(254) A column, initialized to zero length, which can be updated with up to 254 bytes of comments.

PREFETCH CHAR(1) A character that indicates whether data pages were read in advance by PREFETCH: S pure sequential PREFETCH L PREFETCH through a RID list Blank unknown, or not applicable

COLUMN_ FN_EVAL

CHAR(1) A character that indicates when an SQL column function is evaluated: R at retrieval time from table or

index S at sort time for GROUP BY blank after retrieval and after any

sorts, or not applicable MIXOPSEQ SMALLINT The sequence of the steps in a multiple

index operation (MX, MI, and MU rows), 0 for M or not applicable.

VERSION VARCHAR(64) The version identifier for the package being explained, otherwise zero length.

COLLID CHAR(18) The collection ID for the package being explained, otherwise blank.

ACCESS_ DEGREE

SMALLINT The number of parallel operations performed on the new table. Null if access is not executed in parallel. The number determined at bind time may not reflect the actual number at execution time.

ACCESS_ PGROUP_ID

SMALLINT The identifier of the parallel group for accessing the new table. A parallel group is the collective term for consecutive operations executed in parallel that have the same number of parallel tasks. Null if access is not executed in parallel.

Page 161: DB2 Reference Guide 2up Letter

User Tables CA Reference Guide PLAN_TABLE

5-4 © 2002 Computer Associates International

Column Name Data Type Description

JOIN_DEGREE SMALLINT The number of parallel operations used in joining the composite table with the new table. Null if the join is not executed in parallel. The number determined at bind time may or may not reflect the actual number at execution time.

JOIN_ PGROUP_ID

SMALLINT The identifier of the parallel group for joining the composite table with the new table. Null if the join is not executed in parallel.

SORTC_ PGROUP_ID

SMALLINT Parallel group identifier for the parallel sort of the composite table, or null if not applicable.

SORTN_ PGROUP_ID

SMALLINT Parallel group identifier for the parallel sort of the new table, or null if not applicable

PARALLELISM_ MODE

CHAR(1) Kind of parallelism, if any, at bind time: I query I/O parallelism C query CP parallelism X query Sysplex parallelism null no parallelism

MERGE_ JOIN_COLS

SMALLINT Number of columns joined during a merge scan join (METHOD = 2). Null if METHOD ¬= 2.

CORRELA- TION_NAME

CHAR(18) Correlation name of the table or view specified in the statement, otherwise blank.

PAGE_RANGE CHAR(1) Indicates whether access path qualifies for page range screening: Y Table can qualify for page

range screening (DB2 generates plans that will scan only the needed partition)

blank No JOIN_TYPE CHAR(1) The type of a join:

F FULL OUTER JOIN L LEFT (or RIGHT) OUTER JOINS STAR JOIN blank INNER JOIN, or not applicable

GROUP_ MEMBER

CHAR(8) 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 the EXPLAIN was executed.

IBM_SERVICE_ DATA

VARCHAR(254) IBM internal information.

WHEN_ OPTIMIZE

CHAR(1) Indicates when access path was determined: B At bind time, using default filter

factors for host variables, parameter markers, or special registers. If bind option REOPT(VARS) is specified, reoptimization with input variables will take place at run time.

R At run time, bind option REOPT(VARS) was specified.

blank At bind time, using default filter factors for host variables, parameters markers, or special registers.

Page 162: DB2 Reference Guide 2up Letter

For DB2 UDB for z/OS and OS/390 User Tables PLAN_TABLE

© 2002 Computer Associates International 5-5

Column Name Data Type Description

QBLOCK_ TYPE

CHAR(6) Type of SQL operation performed for each query block. Possible values are: SELECT INSERT UPDATE DELETE SELUPD SELECT with FOR UPDATE

clause DELCUR DELETE WHERE CURRENT

OF CURSOR UPDCUR UPDATE WHERE CURRENT

OF CURSOR CORSUB Correlated subselect NCOSUB Non correlated subselect TABLEX Table expression UNION UNION UNIONA UNION ALL

BIND_TIME Timestamp The time the plan or package was bound for this statement or query block. Static SQL will contain a full timestamp. Dynamic SQL will contain TIMESTAMP column value appended with 4 zeros.

OPTHINT CHAR(8) A string identifying the row as an optimization hint. DB2 uses row as input during access path selection.

HINT_USED CHAR(8) Contains the identifier (value of OPTHINT) when DB2 uses an optimization hint.

PRIMARY_ ACCESSTYPE

CHAR(1) Direct row access indicator. D DB2 tries direct row access at

runtime. If unable, DB2 uses access described in ACCESSTYPE.

blank DB2 will not attempt direct row access.

PARENT_ QBLOCKNO

SMALLINT A number that indicates the QBLOCKNO of the parent query block.

TABLE_TYPE CHAR(1) The type of new table: F Table function Q Temporary intermediate result

(not materialized) T Table W Work file The value of the column is null if the query uses GROUP BY, ORDER BY, or DISTINCT, which require an implicit sort.

Page 163: DB2 Reference Guide 2up Letter

User Tables CA Reference Guide DSN_STATEMNT_TABLE

5-6 © 2002 Computer Associates International

DSN_STATEMNT_TABLE Contains a row with cost estimate, in service units and milliseconds for processing of an explainable statement. Column Name Data Type Description QUERYNO INTEGER See description in PLAN_TABLE p. 5-1. APPLNAME CHAR(8) See description in PLAN_TABLE p. 5-1. PROGNAME CHAR (8) See description in PLAN_TABLE p. 5-1. COLLID CHAR (18) See description in PLAN_TABLE p. 5-3. GROUP_ MEMBER

CHAR (8) See description in PLAN_TABLE p. 5-4.

EXPLAIN_TIME TIMESTAMP The time the statement was processed. Same as BIND_TIME in PLAN_TABLE.

STMT_TYPE CHAR (6) Type of statement being explained, i.e. SELECT, INSERT, UPDATE, DELETE, SELUPD, DELCUR, UPDCUR

COST_ CATEGORY

CHAR (1) Whether DB2 was forced to use default values to make cost estimates. A Default values were not used. B Some default values were used. See

REASON for explanation of why defaults were used.

PROCMS INTEGER Estimated processor cost, in milliseconds. Value is rounded to next integer. Max value is 2147483647 milliseconds, i.e. 24.8 days. If max value is exceeded, max value is reported.

PROCSU INTEGER Estimated processor cost, in service units. Value is rounded to next integer. Max value is 2147483647 service units. If max value is exceeded, max value is reported.

REASON VARCHAR (254)

Reason for putting an estimate in COST_CATEGORY B: HAVING CLAUSE – A subselect contains a HAVING clause in the SQL statement and the optimizer was unable to change into a WHERE clause. HOST VARIABLES – Statement uses host variables, parameter markers, or special registers. TABLE CARDINALITY – Cardinality statistics are missing for one or more of the tables used in the statement. UDF – user-defined functions used. TRIGGERS – triggers are defined on the target table of an INSERT, UPDATE, DELETE. REFERENTIAL CONSTRAINTS – RI constraints of CASCADE or SET NULL exist on the target table of a DELETE.

Page 164: DB2 Reference Guide 2up Letter

For DB2 UDB for z/OS and OS/390 User Tables DSN_FUNCTION_TABLE

© 2002 Computer Associates International 5-7

DSN_FUNCTION_TABLE Contains a row describing how DB2 resolved the function reference for each user-defined function that is referred to be an explainable statement. Column Name Data Type Description QUERYNO INTEGER See description in PLAN_TABLE p. 5-1. QBLOCKNO INTEGER See description in PLAN_TABLE p. 5-1. APPLNAME CHAR (8) See description in PLAN_TABLE p. 5-1. PROGNAME CHAR (8) See description in PLAN_TABLE p. 5-1. COLLID CHAR (18) See description in PLAN_TABLE p. 5-3. GROUP_ MEMBER

CHAR (8) See description in PLAN_TABLE p.5-4.

EXPLAIN_TIME TIMESTAMP The time the statement was processed. Same as BIND_TIME in PLAN_TABLE.

SCHEMA_ NAME

CHAR (8) Schema name of the function invoked in the explained statement.

FUNCTION_ NAME

CHAR (18) Name of the function invoked in the explained statement.

SPEC_FUNC_NAME

CHAR (18) Specific name of the function invoked in the explained statement.

FUNCTION_ TYPE

CHAR (2) Type of the function invoked in the explainable statement: SU Scalar function TU Table function

VIEW_ CREATOR

CHAR (8) Creator of view definition to which the specified function, e.g., FUNCTION_ NAME is referenced. Otherwise blank.

VIEW_NAME CHAR (18) Name of view definition to which specified function, i.e. FUNCTION_NAME is referenced. Otherwise blank.

PATH VARCHAR (254)

Value of the SQL path used to resolve the schema name of the function.

FUNCTION_ TEXT

VARCHAR (254)

Function name and parameters of the referenced function. For function references over 100 bytes, only the first 100 bytes are contained.

Page 165: DB2 Reference Guide 2up Letter

User Tables CA Reference Guide DSN_FUNCTION_TABLE

5-8 © 2002 Computer Associates International

Page 166: DB2 Reference Guide 2up Letter

For DB2 UDB for z/OS System Information and OS/390 SQLCA

© 2002 Computer Associates International 6-1

6. Miscellaneous System Information

SQLCA Column-name Data Type Description SQLCAID CHAR(8) An “eye catcher” for dumps, contains SQLCASQLCABC INTEGER Length of SQLCA: 136. SQLCODE INTEGER SQL return code:

0 Successful execution positive Successful execution but with an

exception condition negative Error condition

SQLERRML SMALLINT Length of SQLERRMC, ranging from 0 to 70. 0 means SQLERRMC value is not pertinent.

SQLERRMC VARCHAR(70) One or more tokens, separated by X‘FF’, that are substituted for variables in error condition descriptions.

SQLERRP CHAR(8) Provides a product signature and if error, diagnostic info like name of module that found error. 1st 3 chars always DSN for DB2 for OS/390 and z/OS.

SQLERRD(1) INTEGER 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). SQLERRD(1) can also contain an internal error code.

SQLERRD(2) INTEGER 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). SQLERRD(2) can also contain an internal error code.

SQLERRD(3) INTEGER No. of rows affected after INSERT, UPDATE, or DELETE (but not rows deleted as a result of CASCADE delete). Set to 0 if SQL statement fails. Set to –1 for mass delete from table in a segmented tablespace or for created global temporary table. For SQLCODES –911 and –913, SQLERRD(3) contains the reason code for the timeout or deadlock.

SQLERRD(4) INTEGER Contains timerons, a short floating-point value that indicates a rough relative estimate of resources required. Does not reflect an estimate of 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, it may vary with changes to stats in the catalog, and is also subject to change between releases of DB2 for OS/390 and z/OS.

SQLERRD(5) INTEGER Position or column of a syntax error for a PREPARE or EXECUTE IMMEDIATE statement.

SQLERRD(6) INTEGER Internal error code. SQLWARN0 CHAR(1) Blank if all indicators are blank; W if at least

one other indicator contains W or Z. SQLWARN1 CHAR(1) W if value of string column was truncated

when assigned to a host variable. Contains an N for non-scrollable cursors and an S for scrollable cursors after the OPEN CURSOR or ALLOCATE CURSOR statement.

SQLWARN2 CHAR(1) W if null values were eliminated from argument of column function; not always set to W for MIN function because its results are not dependent on elimination of null values.

SQLWARN3 CHAR(1) W if no. of cols. > no.of host variables. Contains a Z if fewer locators were provided in the ASSOCIATE LOCATORS statement than the stored procedure returned.

Page 167: DB2 Reference Guide 2up Letter

System Information CA Reference Guide SQLCA

6-2 © 2002 Computer Associates International

Column-name Data Type Description SQLWARN4 CHAR(1) W if a prepared UPDATE or DELETE

statement does not include a WHERE clause. For a scrollable cursor, contains an I for insensitive cursors and an S for sensitive static cursors after the OPEN CURSOR or ALLOCATE CURSOR statement; blank if cursor is not scrollable.

SQLWARN5 CHAR(1) W if SQL statement was not executed because it is an SQL/DS statement that is not valid in DB2 for OS/390 and z/OS. Contains a 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.

SQLWARN6 CHAR(1) W if adjustment was made to a DATE or TIMESTAMP value to correct an invalid date resulting from an arithmetic operation.

SQLWARN7 CHAR(1) W if 1 or more non-zero digits were eliminated from fractional part of a number used as the operand of a multiply or divide.

SQLWARN8 CHAR(1) W if a character that could not be converted was replaced with a substitute character.

SQLWARN9 CHAR(1) W if arithmetic exceptions were ignored during COUNT or COUNT_BIG processing Is Z if stored procedure returns multiple result sets.

SQLWARNA CHAR(1) W if a character conversion error occurred while filling the SQLCA. Blank if all fields valid.

SQLSTATE CHAR(5) Return code for the outcome of the most recent execution of an SQL statement. Range of values is ‘00000’ through ‘65535’.

sqln SQLN

SMALLINT Unchanged by DB2. The field must be set to a value greater than or equal to zero before the statement is executed. The field indicates the total number of occurrences of SQLVAR. At the very least, the number should be: • For DESCRIBE INPUT, the number of

parameter markers to be described. • For other DESCRIBEs or PREPARE

INTO: the number of columns of the result, or a multiple of the columns of the result when there are multiple sets of SQLVAR entries because column labels are returned in addition to column names.

Usage in FETCH, OPEN, EXECUTE, and CALL: Total number of occurrences of SQLVAR provided in the SQLDA. SQLN must be set to a value greater than or equal to zero.

Page 168: DB2 Reference Guide 2up Letter

For DB2 UDB for z/OS System Information and OS/390 SQLDA

© 2002 Computer Associates International 6-3

SQLDA Column-name Data Type Description SQLDAID CHAR(8) Usage in DESCRIBE and PREPARE:

An “eye catcher” for dumps, contains ’SQLDA’. The 7th byte of the field is a flag that can be used to determine if more than one SQLVAR entry is needed for each column. For DESCRIBE CURSOR, the field is set to ‘SQLRS’. If a stored procedure cursor is declared WITH HOLD, high order bit of the 8th byte will contain a 1. For DESCRIBE PROCEDURE, it is set to ‘SQLPR’. Usage in FETCH, OPEN, EXECUTE, and, CALL: A plus sign (+) in the 6th byte indicates that SQLNAME contains an overriding CCSID. A ‘2’ in the 7th byte indicates that two SQLVAR entries were allocated for each column or parameter. A ‘3’ in the 7th byte indicates that three SQLVAR entries were allocated for each column or parameter. Although three entries are never needed on input to DB2, an SQLDA with three entries might be used when the SQLDA was initialized by a DESCRIBE or PREPARE INTO with a USING BOTH clause. Otherwise, SQLDAID is not used.

SQLDABC INTEGER Usage in DESCRIBE and PREPARE: Length of SQLDA, equal to SQLN * 44 + 16 Usage in FETCH, EXECUTE, and CALL: Length of the SQLDA, greater than or equal to SQLN*44+16.

SQLN SMALLINT Total no. of occurrences of SQLVAR. SQLD SMALLINT Usage in DESCRIBE and PREPARE:

No. of columns described by occurrences of SQLVAR. Double that number if USING BOTH is in the DESCRIBE or PREPARE statement. Contains a 0 if the statement string is not a query. For DESCRIBE PROCEDURE contains number of result sets returned. Usage in FETCH, OPEN, and EXECUTE, CALL: No. of host variables described by occurrences of SQLVAR.

SQLTYPE SMALLINT Usage in DESCRIBE and PREPARE: Data type of column and whether or not it allows null values. For a distinct type, the data type on which the distinct type was based is placed in this field. The base SQLVAR provides no indication that this part of the description of a distinct type. Usage in FETCH, OPEN, and EXECUTE, CALL: Data type of host variable and whether an indicator variable is provided. Host variables for datetime values must be character string variables. For FETCH a datetime type code means fixed-length character string.

Page 169: DB2 Reference Guide 2up Letter

System Information CA Reference Guide SQLDA

6-4 © 2002 Computer Associates International

Column-name Data Type Description SQLLEN SMALLINT Usage in DESCRIBE and PREPARE:

Defines external length of value. For date/time columns, the length of the string representation of the value. Usage in FETCH, OPEN, and EXECUTE, CALL: Defines external length of the host variable. For LOBs, the value is 0 regardless of the length attributes of the LOB. Field SQLLONGLEN in the extended SQLVAR contains the length attribute.

SQLDATA pointer Usage in DESCRIBE and PREPARE: Contains X‘0000ZZZZ’ for string columns, where ZZZZ is associated CCSID. For bit data, ZZZZ is X‘FFFF’. For DESCRIBE PROCEDURE contains result set locator value. Usage in FETCH, OPEN, CALL, and EXECUTE: Address of host variable.

SQLIND pointer Usage in DESCRIBE and PREPARE: Reserved. Set to -1 for DESCRIBE PROCEDURE. Usage in FETCH, OPEN, CALL, and EXECUTE: Address of an associated indicator variable if SQLTYPE is odd.

SQLNAME VARCHAR(30) Usage in DESCRIBE and PREPARE: Name or label of column, or a string of length 0 if the name or label does not exist. If the prepared statement includes a UNION or UNION ALL clause, SQLNAME contains the name or label, if any, of the corresponding column of the first operand of the UNION. For DESCRIBE INPUT, SQLNAME is not used. For DESCRIBE PROCEDURE contains the names of cursor(s) used to return result sets in the order the cursors were opened. Usage in FETCH, OPEN, CALL, and EXECUTE: Contains overriding CCSID in the third and fourth byte. This applies if the 6th byte of SQLDAID = “+”; SQLTYPE indicates host variable is a string variable; the length of SQLNAME is 8; and the first two bytes are X‘0000’.

SQLLONGL INTEGER Usage in DESCRIBE and PREPARE: length attributes of BLOB, CLOB, OR DBCLOB. Usage in FETCH, OPEN, EXECUTE and CALL: length attribute of BLOB, CLOB or DBCLOB host variable.

* INTEGER Reserved

Page 170: DB2 Reference Guide 2up Letter

For DB2 UDB for z/OS System Information and OS/390 SQLDA

© 2002 Computer Associates International 6-5

Column-name Data Type Description SQLDATAL pointer Usage in DESCRIBE and PREPARE:

Not Used. Usage in FETCH, OPEN, EXECUTE, and CALL: Used only for LOB (BLOB, CLOB, and DBCLOB) host variables. If the value of the field is null, the actual length of the LOB is stored in the 4 bytes immediately before the start of the data, and SQLDATA points to the first byte of the field length. The actual length indicates the number of bytes for a BLOB or a CLOB, and the number of characters for a DBCLOB. If the value of the field is not null, the field contains a pointer to a 4-byte long buffer that contains the actual length in bytes (even for DBCLOBS) of the data in the buffer pointed to from the SQLDATA field in the matching base SQLVAR. Regardless of whether this field is used, field SQLLONGLEN must be set.

SQLTNAME VARCHAR(30) Usage in DESCRIBE and PREPARE: For appropriate extended SQLVAR is set accordingly: For Distinct data type value is fully qualified distinct data type name. Otherwise value is SYSIBM followed by name of the type from catalog. For a label value it contains the contents of the label. Usage in FETCH, OPEN, EXECUTE, and CALL: Not used.

Page 171: DB2 Reference Guide 2up Letter

System Information CA Reference Guide SQL Limits

6-6 © 2002 Computer Associates International

SQL Limits Item Limit

Column, table, view, collection-ID, synonym, correlation name, index, alias, statement name, cursor, or table check constraint, stored procedure, user-defined function

18 bytes

Auth-id, plan, database, tablespace, stogroup, pkg, referential constraint, schema, trigger

8 bytes

Host identifier 64 bytes Server name or location identifier 16 bytes

Item Limit

INTEGER value Largest: 2147483647 Smallest: -2147483648 SMALLINT value Largest: 32767 Smallest: -32768 DECIMAL precision 31 DECIMAL value Largest: Smallest:

1031 – 1 1 – 1031

FLOAT value Largest: 7.2E+75 (approximate) Smallest: -7.2E+75 Smallest positive: 5.4E-79 Largest negative: -5.4E-79 REAL value Largest: Smallest: Smallest positive: Largest negative:

7.2 x 1075

–7.2 x 1075 5.4 x 10-79

–5.4 x 10-79 CHAR column size 255 bytes GRAPHIC column size 127 characters VARCHAR or For 4K pages: VARGRAPHIC For 8K pages: column size For 16K pages: For 32K pages:

4046 bytes 8128 bytes

16320 bytes 32704 bytes

Character constant length 255 bytes

Item Limit

CLOB length 2147483647(2GB-1byte) DBCLOB length 1073741824 DBCS characters BLOB length 2147483647 (2GB-1byte) Hexadecimal constant length 254 digits Graphic constant length 124 bytes String concatenation length (character)

2147483647 (2GB-1byte)

String concatenation length (graphic) 1073741824 DBCS characters String concatenation length (binary) 2147483647 (2GB-byte) DATE value Largest: 9999-12-31 (shown in ISO format) Smallest: 0001-01-01 TIME value Largest: 24.00.00 (shown in ISO format) Smallest: 00.00.00 TIMESTAMP Largest: 9999-12-31-24. value 00.00.000000 Smallest: 0001-01-01-00. 00.00.000000

Page 172: DB2 Reference Guide 2up Letter

For DB2 UDB for z/OS System Information and OS/390 DB2 Limits

© 2002 Computer Associates International 6-7

DB2 Limits Item Limit

Columns in a table or view 750 or fewer (depends on complexity of CREATE VIEW stmt)

Columns in a dependent table 749 Table names in a view, SELECT, INSERT, UPDATE, DELETE

255

Row length 4K pages: (including 4K pages with EDITPROC: overhead) 8K pages: 8K pages with EDITPROC: 16K pages: 16K pages: with EDITPROC:

4056 bytes 4046 bytes 8138 bytes 8128 bytes

16330 bytes 16320 bytes

32K pages: 32K pages with EDITPROC:

32714 bytes 32704 bytes

Volume IDs in a storage group 133 Partitions in a partitioned table space or partitioned index: Not (LARGE or DSSIZE >2GB) LARGE or DSSIZE >2GB

64 254

Size of partitions: Not (LARGE or DSSIZE>2GB) 1 16 partitions 17 32 partitions 33 64 partitions (LARGE) 1 254 partitions (DSSIZE>2GB) 1 254 partitions

4 gigabytes 2 gigabytes 1 gigabytes

4 gigabytes

64 gigabytes

Table or table space size 16 terabytes Size of a DBRM 131072 bytes Index key length for non-partitioned 255 minus the # of key table space columns that allow nullsMaximum number of bytes used in the partitioning of a partitioned index1

255

Columns in an index key 64 Tables in a FROM clause 15 Number of subqueries in a statement 14 Host and indicator variable length Non-LOBpointed to in a SQLDA: LOB

32767 bytes 2147483647 (2GB-1byte)

Host variable length used Non-LOBfor INSERT or UPDATE: LOB

32704 bytes 2147483647 (2GB-1byte)

SQL statement length 32765 bytes Elements in a SELECT list 750 Predicates in a WHERE or HAVING clause 750 Total columns in a GROUP BY or ORDER BY clause

750

Total column length in a GROUP BY or ORDER BY clause

4000 bytes

Maximum length of a table check constraint 3800 bytes Number of bytes passed in a single parameter Non-LOB of an SQL CALL statement: LOB

32765 bytes 2147483647 (2GB-1byte)

Number of stored procedures, triggers, and user-defined functions that an SQL statement can implicitly or explicitly reference

16 nesting levels

Length of an SQL path 254 Concurrent DB2 or application agents Limited by EDM &

buffer pool size, and amount of storage used by each DB2 or applic. agent

Largest log space 248 bytes Largest active log data set 4GB –1 Largest archive log data set 4GB –1 Maximum number of active log copies 2 Maximum number of archive log copies 2 Maximum number of active log data sets (each copy)

31

1 If the key of a partition index is greater than 255 bytes,

only the first 255 bytes are used to actually partition the data.

Page 173: DB2 Reference Guide 2up Letter

System Information CA Reference Guide DB2 Limits

6-8 © 2002 Computer Associates International

Item Limit Maximum number of archive log volumes (each copy)

1000

Databases accessible to an application or end user

System storage /EDM pool size

EDM pool size Install parameter dependent; the installation parameter maximum depends on available space

Total databases 65279 Number of rows per page: All tablespaces DSNDB01 and DSNDB06

255 127

Maximum simple or segmented data set size 2 gigabytes Maximum LOB data set size 64 gigabytes

Page 174: DB2 Reference Guide 2up Letter

For DB2 UDB for z/OS System Information and OS/390 RLST Table

© 2002 Computer Associates International 6-9

RLST Table Legend: authid.Table-name (DSNRLST.Tablespace-name) authid.Index-name Unique/Nonunique (Index fields) Table description

DSNRLSTxx (DSNRLSxx) DSNARLxx U (RLFFUNC.AUTHID.PLANNAME.RLFCOLLN. RLFPKG.LUNAME) Allows the user to specify the maximum amount of processor time for dynamic DML SQL statements from a local or remote DBMS, governs the execution of packages and plans, and allows the user to restrict all BINDs and REBINDs. The name of the RLST table consists of an authid that is specified during the installation of DB2, and a prefix where xx is any 2-character alphanumeric value. Column-name Data Type Description AUTHID CHAR(8) Primary authid for which the control info is to

apply. Blank: limit applies to all authids in location specified in LUNAME. If LUNAME blank or column is omitted, location is the local location. This column is required.

PLANNAME CHAR(8) The resource specification limits apply to this plan. If you are specifying a function that applies to plans (RLFFUNC=blank or ‘6’), a blank means that the limit specifications in this row apply to all plans for the location that is specified in the LUNAME. Qualify by plan name only if the dynamic statement is issued from a DBRM bound in a plan, not a package; otherwise, DB2 does not find this row. If the RLFFUNC column contains a function for packages ‘1,’ ‘2,’ or ‘7,’ this column must be blank; if it is not blank, the row is ignored.

ASUTIME INTEGER The dynamic SQL service unit time or the number of CPU service units permitted to any single dynamic DML statement used for reactive governing. A Null value indicates no limit. 0 or a negative value indicates dynamic DML statements are not allowed. Required column.

LUNAME CHAR(8) LUNAME of the location where the request originated. Column used to specify limits for requests from remote locations. Blank for local location. PUBLIC for all DBMS locations in the network; these locations do not have to be DB2 subsystems. PUBLIC only value for TCP/IP conventions.

RLFFUNC CHAR(1) Governing function this row will serve: 1 Row will be used to govern whether bind

operations are allowed 2 Row used to reactively govern dynamic DML

statements by package or collection name 3 Row disables query I/O parallelism 4 Row disables query CP parallelism 5 Row disables Sysplex query parallelism 6 Row predictively governs dynamic DML

statements by plan name 7 Row predictively governs dynamic DML

statements by package or collection name Blank: this row will be used to reactively govern dynamic DML statements by plan name. All other values are ignored. Optional column.

RLFBIND CHAR(1) Whether bind operations are allowed. N indicates the bind operation is not allowed; any other value indicates bind operation is allowed. Used only if RLFFUNC = 1. This column is required if column RLFFUNC exists.

RLFCOLLN CHAR(18) Collection name for control info. Blank means the limit applies to all collections from location specified in LUNAME. If LUNAME blank or the column is omitted, the location is the local location. If RLFFUNC = blank, 1 or 6 then RLFCOLLN must be blank.

Page 175: DB2 Reference Guide 2up Letter

System Information CA Reference Guide RLST Table

6-10 © 2002 Computer Associates International

Column-name Data Type Description RLFPKG CHAR(8) Name of the package for control info. Blank

means limit applies to all packages from location specified in LUNAME. If LUNAME is blank or column is omitted, location is the local location. If RLFFUNC = blank, 1, or 6, RLFPKG must be blank.

RLFASUERR INTEGER Used for predictive governing (RLFFUNC=6 or 7) and only statements in cost category A. Indicates the error threshold number of system resource manager processor service units allowed for a single dynamic DML statement. If predicted processor cost is greater than threshold an SQLCODE of – 495 is returned. If set to NULL indicates no threshold. Zero or a negative value indicates all dynamic DML receive an SQLCODE of – 495.

RLFASUWARN INTEGER Used for predictive governing (RLFFUNC=6 or 7) and only statements in cost category A. Indicates warning threshold number of system resource manager processor service units allowed for a single dynamic DML statement. If predictive processor cost is greater than warning threshold, an SQLCODE +495 is returned. If set to NULL indicates no threshold. Zero indicates all dynamic DML receive a SQLCODE +495.

RLF_ CATEGORY_B

CHAR(1) Used for predictive governing (RLFUNC=6 or 7). Determines action to take when cost estimate for a statement falls in cost category B, indicating cost is probably too low. Acceptable values: blank Prepare and execute statement by

default. Y Prepare and execute statement. N Do not prepare or execute statement

and return – 495 SQLCODE. W Prepare statement and return +495

SQLCODE. Application logic can control execution.

Page 176: DB2 Reference Guide 2up Letter

For DB2 UDB for z/OS System Information and OS/390 Security Authorizations

© 2002 Computer Associates International 6-11

Security Authorizations

Administrative Authorities Hierarchy

SYSADM Privilege on all plans: EXECUTEPrivileges on all packages: ALL Privilege on Distinct Types: Usage Privilege on all routines: EXECUTE

PACKADM DBADM Collection privileges: Table and view privileges: CREATE IN ALTER INDEX SELECT Privileges on all pkgs: DELETE INSERT BIND COPY EXECUTE UPDATE REFERENCES TRIGGER

SYSCTRL System privileges: BINDADD CREATEDBA MONITOR2 BINDAGENT CREATEDBC STOSPACE BSDS CREATESG CREATETMTAB CREATEALIAS MONITOR1 Privileges on all tables: ALTER INDEX REFERENCES TRIGGER Privileges on catalog tables: SELECT UPDATE DELETE INSERT Privileges on all pkgs, plans, collections: BIND COPY CREATE IN Privileges on all schemas: CREATEIN DROPIN ALTERIN Use privileges on: BUFFERPOOL STOGROUP TABLESPACE

SYSOPR DBCTRL

INSTALLATION DROP REORG SYSOPR LOAD REPAIR ARCHIVE STARTDB

(cannot change access modes)

RECOVERDB

SYSOPR

DISPLAY STOPALL RECOVER TRACE Privileges on routines:

START STOP DISPLAY Notes: DBADM, DBCTRL, and DBMAINT DBMAINT are database-dependent. CREATETAB

STARTDB PACKADM is collection-independent. CREATETS STATS Each level includes those DISPLAYDB STOPDB authorizations listed in the IMAGCOPY box plus all privileges of lower authorities in the same branch; except for INSTALLATION SYSOPR which includes some privileges of SYSADM and SYSCTRL.

Page 177: DB2 Reference Guide 2up Letter

System Information CA Reference Guide Security Authorizations

6-12 © 2002 Computer Associates International

Table Privileges

TABLE PRIVILEGES Privilege: Allows these SQL statements on a Table or

View: ALTER ALTER TABLE DELETE DELETE to delete rows1 INDEX CREATE INDEX INSERT INSERT REFEREN-CES

ALTER or CREATE TABLE, to add or remove a referential constraint referring to the named table or a list of columns in the table

SELECT SELECT TRIGGER CREATE TRIGGER on a table UPDATE UPDATE any column or specific list of

columns1 GRANT ALL Grant all table privileges listed above

Plan Privileges

PLAN PRIVILEGES Privilege: Allows these subcommands on a Plan: BIND Use the BIND, REBIND, and FREE PLAN

subcommands EXECUTE RUN, to Execute a named application plan

Package Privileges

PACKAGE PRIVILEGES Privilege: Allows these functions on a Package: BIND Use the BIND/REBIND and FREE PACKAGE

subcommands and DROP PACKAGE stmt COPY Create a copy of a package EXECUTE Include a named package/collection in

PKLIST GRANT ALL Grant all package privileges listed above

Collection Privileges

COLLECTION PRIVILEGES Privilege: Allows these functions on a Collection: CREATE IN Create a package inside a collection

Database Privileges

DATABASE PRIVILEGES Privilege: Allows these functions on a Database: CREATETAB Create tables in the database CREATETS Create tablespaces in the database DISPLAYDB Issue the DISPLAY DATABASE command DROP Drop or alter the database IMAGCOPY Run the COPY, MERGECOPY, MODIFY,

and QUIESCE utilities for tablespaces in the database

LOAD Use LOAD utility for tables in the database RECOVERDB Use RECOVER, REBUILD INDEX, and

REPORT for objects in database REORG Use REORG utility for objects in database REPAIR Use REPAIR and DIAGNOSE utilities for

objects STARTDB Issue the START DATABASE command,

except for database that contains the registration tables

STATS Use RUNSTATS and CHECK utilities for objects

STOPDB Issue the STOP DATABASE command

1 If SQLRULES (STD) or CURRENT RULES is set to ‘STD’ must possess SELECT privilege for searched updates and deletes.

Page 178: DB2 Reference Guide 2up Letter

For DB2 UDB for z/OS System Information and OS/390 Security Authorizations

© 2002 Computer Associates International 6-13

Use Privileges

USE PRIVILEGES Privilege: Allows use of these Objects: USE OF BUFFERPOOL One or more buffer pools USE OF STOGROUP One or more storage groups USE OF TABLESPACE One or more tablespaces

System Privileges

SYSTEM PRIVILEGES Privilege: Allows these functions: ARCHIVE Issue the ARCHIVE LOG command BINDADD Use BIND subcommand with ADD option BINDAGENT BIND/REBIND/FREE, or DROP pkg, or

COPY a package, on behalf of the grantor BSDS Issue the RECOVER BSDS command CREATEALIAS Create alias for table or view CREATEDBA Create database and have DBADM

authority CREATEDBC Create database and have DBCTRL

authority CREATESG Create a storage group CREATETMTAB Create a GLOBAL temporary table DISPLAY DISPLAY ARCHIVE, DISPLAY

BUFFERPOOL, DISPLAY THREAD, DISPLAY DATABASE, DISPLAY LOCATION, DISPLAY TRACE, DISPLAY LOG commands

MONITOR1 Receive trace data, except sensitive data MONITOR2 Receive all trace data RECOVER RECOVER INDOUBT to recover threads. STOPALL STOP DB2 STOSPACE Use the STOSPACE utility TRACE START TRACE, STOP TRACE, and

MODIFY TRACE commands

Schema Privileges

SCHEMA PRIVILEGES Privilege: Allows use of these operations in designated

schemas: CREATE IN CREATE distinct types, user-defined

functions, triggers and stored procedures ALTERIN ALTER user-defined functions or stored

procedures, or COMMENT ON distinct types, user-defined functions, triggers, and stored procedures

DROPIN DROP distinct types, user-defined functions, triggers, and stored procedures

Distinct Type and JAVA Class Privileges

DISTINCT TYPE PRIVILEGES Privilege: Allow use of these objects USAGE ON DISTINCT TYPE A distinct type USAGE ON JAR (JAVA class) for a routine

A JAVA class

Routine Privileges

ROUTINE PRIVILEGES Privilege: Allow use of these Objects: EXECUTE ON FUNCTION A user-defined function EXECUTE ON FUNCTION A stored procedure

Page 179: DB2 Reference Guide 2up Letter

System Information CA Reference Guide Page Formats

6-14 © 2002 Computer Associates International

Page Formats

Tablespace Format Header Page Space Map Page User Data Page1 User Data Page2 . . . . . . User Data PageN

Nonsegmented Space Map Page HEADER - 26 Bytes

2 Bits per Page: Space '00' = Avail space >= max row size Available '01' = Avail space < max row >= avg row size Portion '10' = Avail space < avg row >= min row size '11' = Avail space < min row size Page 1 Bit per Page: Modified '0' = Page has not been modified Sync Byte Portion '1' = Page has been modified 'N' or 'E'

Note: One Space Map Page for every not MEMBER CLUSTER: 10,760 4K Pages 21,680 8K Pages 43,528 16K Pages 87,216 32K Pages (0-16 partitions) 65,536 32K Pages (17-32 partitions) 32,768 32K Pages (33-64 partitions) MEMBER CLUSTER: 199 4K, 8K, 16K, 32K, Pages

Segmented Space Map Page

HEADER - 28 Bytes

Segment Entry* Segment Entry*

4 Bits per Page: Space '0000'=Avail page (not formatted by DM) Avail- '0001'=Page is empty (caused by mass delete) able '0010'=Page is empty (caused by normal delete) Portion '0011'=Freespace > max record size '0100' thru '1010'=i.Freespace available in the data page < (MAX - (i-4) x INC) and >= (MAX - (i-3) x INC), where MAX is max size of rec and INC = the integral part of (max rec size - min rec size)/8 '1011'=Freespace available in the data page < (MAX - 7 x INC) and >= to min. size of the record '1111'=Page is full Page 1 Bit per Page: Modified '0' = Page has not been modified Sync Byte Portion '1' = Page has been modified 'N' or 'E'

* Segment Entry:

Next Segment Pointer OBID Flag 4 bits entries 4 2 1 Note: Number of segment entries is determined by page size and segment size and stored in SEGNUM in the SPACE MAP HEADER. SEGNUM = (pagesize – LENGTH (SEGHDR) – LENGTH (SEGTAIL)-1* 8/(8*LENGTH (SEGBLK) + SEGSIZE * 5) Where LENGTH (SEGHDR) = 28 bytes LENGTH (SEGTAIL) = 1byte LENGTH (SEGBLK) = 7bytes page size = 4K, 8K, 16K,or 32K SEGSIZE = number of pages per segment One space map page for every x pages, where x = SEGSIZE * SEGNUM

LOB High Level Space Map Page

HEADER-63 bytes Bits 0-3 values

Space Map of Low Level Space Map Pages (8bits/page)

0 - Not formatted 1 - Formatted but empty 7 - Less than half entire allocated 8 - More than half entries allocated D - Page has no free chunks

F - Page is full Sync Byte ‘N’ or ‘E’

Note: One High Level Space Map covers the following number of Low Level Space Map Pages based on page size:

4K page – 2016 16K page – 504 8K page – 1088 32K page – 252

Page 180: DB2 Reference Guide 2up Letter

For DB2 UDB for z/OS System Information and OS/390 Page Formats

© 2002 Computer Associates International 6-15

LOB Low Level Space Map Page HEADER-70 bytes

Chunk Map Entries

2 bits ’00’ = Chunk is empty ’01’ = Chunk partially allocated to 1 or more LOBs ’10’ = Chunk fully allocated to a single LOB ’11’ = Chunk fully allocated to multiple LOBs

Page Allocation Entries

4 bytes (16-2bit entries) ’00’ = Page is not allocated ’01’ = Page is deallocated ‘10’ = Page is allocated ’11’ = Page is allocated

Page Modified Indicators

1 bit per page ‘0’ = Page has not been modified ’1’ = Page has been modified

Usage Map Entries

320 bytes (16-20 byte entries) bytes 1-17 Contain ROWID in base table to which LOB page is allocated bytes 18-19 Version number for the LOB

Sync Byte ‘N’ or ‘E’

LOB Map Page HEADER-70 bytes

LOB Map Entry*

LOB Map Entry*

HEADER-10 bytes

LOB Data

Sync Byte ‘N’ or ‘E’

* LOB Map Entry (10 bytes)

FLAGS * START LENGTH

1 1 4 4

LOB Data Page HEADER-22 bytes

LOB Data

Sync Byte ‘N’ or ‘E’

Index Page Set Space Map Page HEADER-28 bytes

Space Map Entries

1 bit per page ’0’ = free page ’0’ = page in use

Sync Byte ‘N’ or ‘E’

User Data Page Format HEADER 4K or 32K ID ID TRAILER

Page 181: DB2 Reference Guide 2up Letter

System Information CA Reference Guide Page Formats

6-16 © 2002 Computer Associates International

HEADER: 20 bytes Position Sync byte.................................................... 1 Log RBA ..................................................... 2-7 Log Sub System ID..................................... 8 Page Number ............................................. 9-11 Page Flags ................................................. 12 Total Free Space ........................................ 13-14 Continuous Free Space .............................. 15-16 1st Page Hole > 4 bytes ............................. 17-18 Max ID Used............................................... 19 Number of Anchor Points............................ 20 TRAILER: 2 bytes ID: 2 bytes ID Pointer Offset Sync byte

User Data Row Formats PREFIX 1 or more COLUMN FORMATS

PREFIX: 6 bytes Position Real or Overflow Pointer 1 Row Length 2-3 Table ID (OBID) 4-5 ID # pointing to this row 6 ---OR--- If PREFIX is an OVERFLOW Pointer: For 4-Byte RID: For 5-Byte RID: PREFIX: 6 bytes Position

PREFIX: 6 bytes Position

Overflow Pointer 1 Overflow Pointer 1 RID to new row location 2-5 RID to new row location 2-6ID # pointing to this row 6

Column Formats NULL INDICATOR

FIXED LENGTH BYTE STRING

LENGTH NULL INDICATOR

VARCHAR or VARGRAPHIC

LENGTH ROWID

LENGTH LOB INDICATOR NULL INDICATOR if column allows NULL: 1 byte. X’FF col is null. X’00’ is NOT null LENGTH: 2 bytes, precedes each VARCHAR, VARGRAPHIC, ROWID, or

LOB INDICATOR columns. (Includes 1 byte if column allows nulls.) ROWID data: Up to 17 bytes LOB INDICATOR data: Up to 4 bytes

Page 182: DB2 Reference Guide 2up Letter

For DB2 UDB for z/OS System Information and OS/390 Page Formats

© 2002 Computer Associates International 6-17

Index Page Format

Type 2 Index Data Page Page Set Page Header (PGHEAD)

12 bytes Physical Page Header (IPPHEAD)

2 bytes Physical Page Header, Nonleaf

(IPNLFAPP) Non Leaf Page Key Prefixes

(IPPPRFX) (IPPVARP)*

*appended if IPPVARLN = YES

Leaf Page Page Set Page Header (PGHEAD)

12 bytes Physical Page Header (IPPHEAD)

2 bytes Physical Page Header, Leaf

(IPLFAPP) Leaf Page (IPNPRFX)1 Key Prefix (IPVPRFX)2 and RID (IPRIDVAL)3 entries (IPRID)4 (IPRCHEAD)5 (IPRCENT)6 (IPFCENT)7

Collected Key Map

(IPKMAP)

Sync byte’N’ or ‘E’

1 Present if IPNUNIQ=YES 2 Present if IPVARL=YES 3 RID prefix contains flags, such

as psuedo-delete 4 RID value in 4 or 5 bytes is

appended to IPRIDVAL 5 RID chain header present if

IPNRIDS is < or = to 0 6 Indicates last RID in a RID chain 7 Free space chain indicator

Page 183: DB2 Reference Guide 2up Letter

System Information CA Reference Guide DSNZPARM

6-18 © 2002 Computer Associates International

DSNZPARM Parameter Information

Acceptable Values Macro Parameter

Macro Name

Panel Description

ABEXP DSN6SPRM DSNTIPO YES, NO EXPLAIN processing ABIND DSN6SPRM DSNTIPO YES, NO, COEXIST Invalid plan or pkg

automatically rebound 0-65533AGCCSID DSNHDECP DSNTIPF ASCII CCSID (graphic)

ALCUNIT DSN6ARVP DSNTIPA BLK, TRK, CYL Allocation Units ALL/dbname DSN6SPRM DSNTIPS ALL, space names Start Names

0-65533AMCCSID DSNHDECP DSNTIPF ASCII CCSID (mixed) ASCII, EBCDIC, UNICODE, or ccsid (between 1–65533)

APPENSCH DSNHDECP DSNTIPF

Application Encoding ARCPFX1 DSN6ARVP DSNTIPH

DSNCAT.ARCHLOG1 or DSNCAT.DSN1.ARCLG1 valid dataset name prefix; 1 − 34 chars.

Archive Log 1 Prefix

ARCPFX2 DSN6ARVP DSNTIPH DSNCAT.ARCHLOG2 or DSNCAT.DSN1.ARCLG2 valid dataset name prefix; 1 − 34 chars.

Archive Log 2 Prefix

ARCRETN DSN6ARVP DSNTIPA 0 thru 9999 Retention Period ARCWRTC DSN6ARVP DSNTIPA Specify from 1 to 14 route

codes with values 1 to 16; Defaults 1,3,4

WTOR Route Code ARCWTOR DSN6ARVP DSNTIPA NO, YES Write to Operator ARC2FRST DSN6LOGP DSNTIPO NO, YES Read COPY2 archives first

for subsystem restart 0-65533ASCCSID DSNHDECP DSNTIPF ASCII CCSID (single-byte)

ASSIST DSN6GRP DSNTIPK NO, YES This DB2 can assist a

parallelism coordinator AUDITST DSN6SYSP DSNTIPN NO, YES (Class 1),

list of audit classes (1 − 9), or *

Audit Trace AUTH DSN6SPRM DSNTIPP YES, NO Use Protection AUTHCACH DSN6SPRM DSNTIPP 0 to 4096 in multiples of 256;

1024rotection PLAN authorization cache

0-255; Default is 5 BACKODUR DSN6SYSP DSNTIPL Multiplier indicates how much log to process when LIMIT BACKOUT=YES or AUTO BINDADD, BIND BINDNV DSN6SPRM DSNTIPP Authority to bind new package

Page 184: DB2 Reference Guide 2up Letter

For DB2 UDB for z/OS System Information and OS/390 DSNZPARM

© 2002 Computer Associates International 6-19

Acceptable ValuesMacro Parameter

Macro Name

Panel Description

8192 to 28672BLKSIZE DSN6ARVP DSNTIPA Block size of the archive log dataset

BMPTOUT DSN6SPRM DSNTIPI 1-254; Default is 4 Number of resource

timeout values IMS BMP connection waits for lock release

CACHEDYN DSN6SPRM DSNTIP4 NO, YES Save dynamic prepared

SQL CACHEPAC DSN6SPRN DSNTIPP 0-2M; Default is 32K Storage allocation for

caching package authorizations

CACHERAC DSN6SPRM DSNTIPP 0-2M; Default is 32K Storage allocation for

caching routine authorizations

CATALOG DSN6ARVP DSNTIPA NO, YES Catalog Data CATALOG DSN6SPRM DSNTIPA2 DSNCAT or an ICF User

Catalog name of 1 − 8 characters

Catalog Alias CDSSRDEF DSN6SPRN DSNTIP4 1, ANY Default value for CURRENT

DEGREE special register 200–16 000 000 (LOG RECORDS), OR 1–60 (MINUTES); default is 50 000.

CHKFREQ DSN6SYSP DSNTIPL

Checkpoint frequency CHGDC DSN6SPRM DSNTIPO 1, 2, 3 DPROP support CMTSTAT DSN6FAC DSNTIPR ACTIVE, INACTIVE DDF threads COMPACT DSN6ARVP DSNTIPA NO, YES Compact Data CONDBAT DSN6SYSP DSNTIPE 0 -150000, 64 Max remote connected CONTSTOR DSN6SPRM DSNTIPE NO, YES Contract thread’s working

storage area COORDNTR DSN6GRP DSNTIPK NO, YES Coordinate parallel

processing CTHREAD DSN6SYSP DSNTIPE Acceptable values are 1 to

2000; Default is 70 Max Users

ISO, USA, EUR, JIS, LOCALDATE DSNHDECP DSNTIP4 Date format 0, 10–254DATELEN DSNHDECP DSNTIP4 Local date length NO, YESDBACRVW DSN6PRM DSNTIPP DBADM create auth

DBPROTCL DSN6SYSP DSNTIP5 DRDA, PRIVATE Default protocol DDF DSN6FAC DSNTIPR NO, AUTO, COMMAND DB2 startup option DEALLCT DSN6LOGP DSNTIPA 0 – 1439 (min.), 0 – 59 (sec.);

or ‘NOLIMIT’ ; Default is 0 Dealloc period

DEC15, DEC31, 15, 31DECARTH DSNHDECP DSNTIPF Decimal arithmetic

Page 185: DB2 Reference Guide 2up Letter

System Information CA Reference Guide DSNZPARM

6-20 © 2002 Computer Associates International

Acceptable ValuesMacro Parameter

Macro Name

Panel Description

DECDIV3 DSN6SPRM DSNTIPF NO, YES Min divide scale

.(period) or ,(comma)DECIMAL DSNHDECP DSNTIPF Decimal point is ASM, C, CPP, COBOL, COB2, IBMCOB, FORTRAN, PL1

DEFLANG DSNHDECP DSNTIPF

Language default IBMUSER or the auth. ID if RACF not available

DEFLTID DSN6SPRM DSNTIPP

Unknown AUTHID DEFAULT, “ (quotation mark), ‘ (apostrophe)

DELIM DSNHDECP DSNTIPF

String delimiter DESCSTAT DSN6SPRM DSNTIPF NO, YES

Build a DESCRIBE SQLDA when binding static SQL

DLDFREQ DSN6SYSP DSNTIPL 0-32767; Default is 5

Checkpoints between level ID updates

DLITOUT DSN6SPRM DSNTIPI 1-254; Default is 6 Number of resource timeout

values DL/1 batch connection waits for lock release

DSHARE DSN6GRP DSNTIPA1 NO, YES, or blank for update Data Sharing DSMAX DSN6SPRM DSNTIPC 1- 32767 Max available open datasets DSSTIME DSN6SYSP DSNTIPN 1-1440; Default is 5 Time interval in minutes for

restarting dataset stats for online perf. Monitors

DSQLDELI DSNHDECP DSNTIPF ‘ (apostrophe) or “ (quotation mark)

Dist SQL string delimiter DYNRULES DSNHDECP DSNTIPF YES or NO Use for DYNAMICRULES EDMBFIT DSN6SPRM DSNTIP4 YES or NO Large EDM better fit EDMDSMAX DSN6SPRM DSNTIPC 0-2097152; default is 1048576 EDMPOOL data space max EDMDSPAC DSN6SPRM DSNTIPC 1-2097152 Size in kilobytes of the data

space for the environment description manager pool

EDMPOOL DSN6SPRM DSNTIPC 1k − 2097152K Environmental

Descriptor Manager EDPROP DSN6SPRM DSNTIPO 1, 2, 3 DPROP support ENSCHEME DSNHDECP DSNTIPF EBCDIC, ASCII, UNICODE Default encoding scheme EVALUNC DSN6SPRM DSNTIP4 NO, YES Evaluate uncommitted EXTRAREQ DSN6SYSP DSNTIP5 0-100; Default is 100 Upper limit of extra DRDA

query blocks from remote server

EXTRASRV DSN6SYSP DSNTIP5 0-100; Default is 100 Upper limit of DRDA query

blocks to a DRDA client.

Page 186: DB2 Reference Guide 2up Letter

For DB2 UDB for z/OS System Information and OS/390 DSNZPARM

© 2002 Computer Associates International 6-21

Acceptable ValuesMacro Parameter

Macro Name

Panel Description

EXTSEC DSN6SYSP DSNTIPR NO, YES Controls security options GCCSID DSNHDECP DSNTIPF 0–65533 EBCDIC CCSID (graphic) GRPNAME DSN6GRP DSNTIPK 1-8 characters; DSNCAT DB2 group name HOPAUTH DSN6SPRM DSNTIP5 BOTH, RUNNER Package owner from

non-DB2 server IDBACK DSN6SYSP DSNTIPE Acceptable values are 1 to

2000; Default is 20 Max batch connect IDFORE DSN6SYSP DSNTIPE

Acceptable values are 1 to 2000; Default is 40

IDTHTOIN DSN6FAC DSNTIPR 0 to 9,999 idle thread timeout IDXBPOOL DSN6SYSP DSNTIP1 Any 4K BP name;

Default is BP0 Default BP for user indexes

IMMEDWRI DSN6GRP DSNTIP4 YES, NO, PH1 Immediate write IRLMAUT DSN6SPRM DSNTIPI YES, NO Auto start of IRLM

Update with job DSNTIJUZ IRLMPRC DSN6SPRM DSNTIPI IRLMPROC or the name of the

IRLM proc that MVS invokes if RLM Auto Start = YES

Proc name IRLMRWT DSN6SPRM DSNTIPI Acceptable values are 1 to

3600; Default is 60109 Resource timeout IRLMSID DSN6SPRM DSNTIPI IRLM or name of IRLM

subsystem Subsystem name IRLMSWT DSN6SPRM DSNTIPI Acceptable values are

1 to 3600; Default is 300

Time to Autostart LBACKOUT DSN6SYSP DSNTIPL AUTO, YES, NO Backward log processing

postponed LC_CTYPE DSNHDECP DSNTIPF A valid locale of 0-50

characters; default is blank LOCALE LC_TYPE LEMAX DSN6SPRM DSNTIP7 0-50; Default is 20 Max number of LE tokens

active at one time 1-2097152; Default is 2048LOBVALA DSN6SYSP DSNTIP7Upper limit of storage for LOB values per user 1-51200; Default is 2048LOBVALS DSN6SYSP DSNTIP7Upper limit of storage for LOB values per system

LOGAPSTG DSN6SYSP DSNTIPL 0-100M; Default is 0M Maximum ssnmDBM1

storage for fast log apply. MAXARCH DSN6LOGP DSNTIPA Acceptable values are 10 to

1000; Default is 1000 Recording max in the BSDSMAXDBAT DSN6SYSP DSNTIPE 0 to 1999; Default is 64 Max remote MAXKEEPD DSN6SPRM DSNTIPE 0-65535; Default is 5000

Page 187: DB2 Reference Guide 2up Letter

System Information CA Reference Guide DSNZPARM

6-22 © 2002 Computer Associates International

Acceptable ValuesMacro Parameter

Macro Name

Panel Description

Total number of prepared SQL statements to save past commit.

MAXRBLK DSN6SPRM DSNTIPC 0, 16K-1000000K; Default is 4MB

RID pool size MAXRTU DSN6LOGP DSNTIPA 1-99; Default is 2 Read tape units MAXTYPE1 DSN6FAC DSNTIPR 0-MAX REMOTE

CONNECTED Number of Type 1 inactive

threads allowed MCCSID DSNHDECP DSNTIPF 0–65533 EBCDIC CCSID (mixed) MEMBNAME DSN6GRP DSNTIPK 1 to 8 characters; DSN1 DB2 member name

YES, NOMINSTOR DSN6SPRM DSNTIPEManage thread storage YES, NOMIXED DSNHDECP

DSNTIPF Mixed data

MON DSN6SYSP DSNTIPN NO, YES (Class1), list of classes (1 − 8), or *

Monitor trace MONSIZE DSN6SYSP DSNTIPN 8K to 1M Monitor size NUMLKTS DSN6SPRM DSNTIPJ Acceptable values are 0 to

50000; Default is 1000 Lock per table or tablespaceNUMLKUS DSN6SPRM DSNTIPJ Acceptable values are 0 to

100000; Default is 10000 Locks per user OPTHINTS DSN6SPRM DSNTIP4 NO, YES Allows info to be passed to

optimizer that may influence access path selection.

OUTBUFF DSN6LOGP DSNTIPL Acceptable values are 40K to 400000K; Default is 4000K

Output buffer PARAMDEG DSN6SPRM DSNTIP4 0–254 Maximum degree of

parallelism PARTKEYU DSN6SPRM DSNTIP4 YES, NO, or SAME UPDATE partitioning key

columns PCLOSEN DSN6SYSP DSNTIPL 1-32767 Default is 5 Number of consecutive DB2

checkpoints since a dataset or partition was last updated

PCLOSET DSN6SYSP DSNTIPL 1-32767 Default is 10 Default is

40 Amt of elapsed time in minutes since a dataset or partition was last updated

POOLINAC DSN6FAC DSNTIP5 0-9999; Default is 120 Time (in seconds) a data

base access thread (DBAT) remains idle in pool before terminated.

PRIQTY DSN6ARVP DSNTIPA

blank clist calculates using blksize and log size 1 − 9999999 units

Primary allocation

PROTECT DSN6ARVP DSNTIPP NO, YES Archive log RACF

Page 188: DB2 Reference Guide 2up Letter

For DB2 UDB for z/OS System Information and OS/390 DSNZPARM

© 2002 Computer Associates International 6-23

Acceptable ValuesMacro Parameter

Macro Name

Panel Description

PTASKROL DSN6SYSP -- YES, NO Roll up query parallel task

accounting trace records into originating tasks accounting records.

QUIESCE DSN6ARVP DSNTIPA Acceptable values are 0 − 999 seconds; Default is 5

Max quiesce time RECALL DSN6SPRM DSNTIPO YES, NO Recall database RECALLD DSN6SPRM DSNTIPO Acceptable values are 0 to

32767; Default is 120 Recall delay RELCURHL DSN6SPRM DSNTIP4 YES, NO At commit release data page

or row lock for cursor WITH HOLD.

RESTART/ DSN6SPRM DSNTIPS RESTART, DEFER DEFER Restart or defer processing

objects RESYNC DSN6FAC DSNTIPR 1, 2 – 99 Resync interval RETLWAIT DSN6SPRM DSNTIPI 0-254; Default is 0 Data sharing only. How

long trans. waits for an incompatible retained lock.

RETVLCFK DSN6SPRM DSNTIP4 NO, YES VARCHAR retrieved from

index RGFCOLID DSN6SPRM DSNTIPZ Acceptable values are 1 to 8

chars. Default DSNRGCOL Owner of registration tablesRGFDBNAM DSN6SPRM DSNTIPZ Acceptable values are 1 to 8

chars. Default DSNRGFDB Name of dbase that

contains registration tables RGFDEDPL DSN6SPRM DSNTIPZ NO, YES

DB2 subsystem controlled by a closed application thru registration

RGFDEFLT DSN6SPRM DSNTIPZ ACCEPT,REJECT,APPL Action for unregistered DDLRGFESCP DSN6SPRM DSNTIPZ Any non-alphanumeric char ART/ORT escape character RGFFULLQ DSN6SPRM DSNTIPZ YES, NO Registered objects require

fully qualified names RGFINSTL DSN6SPRM DSNTIPZ NO, YES Install data definition

control support RGFNMORT DSN6SPRM DSNTIPZ DSN_REGISTER_OBJT

Acceptable values 1 − 17 char Name of the Object

Registration Table RGFNMPRT DSN6SPRM DSNTIPZ DSN_REGISTER_APPL

Acceptable values 1 − 17 char Name of the Appl.

Registration Table RLF DSN6SYSP DSNTIPO NO, YES RLF auto start RLFAUTH DSN6SYSP DSNTIPP SYSIBM or the auth ID used if

RLF is automatically started Resource AUTHID RLFERR DSN6SYSP DSNTIPO NOLIMIT, NORUN, values 1 − 5000000 RLST Access error

Page 189: DB2 Reference Guide 2up Letter

System Information CA Reference Guide DSNZPARM

6-24 © 2002 Computer Associates International

Acceptable ValuesMacro Parameter

Macro Name

Panel Description

RLFERRD DSN6FAC DSNTIPR NOLIMIT, NORUN, values 1 – 5000000 RLST Access error RLFTBL DSN6SYSP DSNTIPO

01 or any 2 alpha numeric chars. Not nat'l characters

RLST Name suffix ROUTCDE DSN6SYSP DSNTIPI

1 or 1 to 14 route codes with values from 1 to 16

WTO Route codes RRULOCK DSN6SPRM DSNTIPI NO, YES use page level U (UPDATE)

locks when using Repeatable Read isolation

SCCID DSNHDECP DSNTIPF 0-65533 EBCDIC CCSID (single-byte)SECQTY DSN6ARVP DSNTIPA blank − clist

calculates using blksize and log size 1 − 9999999 units

Secondary space allocation SEQCACH DSN6SPRM DSNTIPE BYPASS,SEQ Use 3990 - 3 seq cache SEQPRES DSN6SPRM DSNTIPE NO, YES For utilities scanning non

partition indexes followed by update to keep data in 3990 cache longer when reading data.

SITETYP DSN6SPRM DSNTIPO LOCALSITE or RECOVERYSITE

Location of current system SMFACCT DSN6SYSP DSNTIPN

1 or NO, YES (Class 1), list of classes (1 − 5, 7, 8), or *

SMF Accounting SMFSTAT DSN6SYSP DSNTIPN

YES (Classes 1, 3, 4), NO, list of classes (1 − 5) or *

SMF Statistics SRTPOOL DSN6SPRM DSNTIPC 240K-64000K;Default is 1MB Sort pool size SQLDELI DSNHDECP DSNTIPF DEFAULT, “ (quotation mark),

‘ (apostrophe) SQL string delimiter SSID DSNHDECP DSNTIPM 1-4 characters. First must be

A-Z, #, $, or @. Others must be A-Z, 1-9, #, $, or @.

Subsystem name STATHIST DSN6SPRM DSNTIPO SPACE, NONE, ALL,

ACCESSPATH Statistics history STATIME DSN6SYSP DSNTIPN Acceptable values are 1 to

1440 min; Default is 30 Statistics time STATROLL DSN6SPRM DSNTIPO YES, NO Statistics rollup STDSQL DSNHDECP DSNTIP4 YES, NO Standard SQL language STORMXAB DSN6SYSP DSNTIPX 0-225 Default is 0 Maximum abend count STORPROC DSN6SYSP DSNTIPX 1-8 characters;

Default is ssnSPAS MVS procedure name STORTIME DSN6SYSP DSNTIPX 5 - 1800; Default is 180 Timeout value SUPERRS DSN6SPRM DSNTIPM YES, NO Suppress soft errors

Page 190: DB2 Reference Guide 2up Letter

For DB2 UDB for z/OS System Information and OS/390 DSNZPARM

© 2002 Computer Associates International 6-25

Acceptable ValuesMacro Parameter

Macro Name

Panel Description

SYNCVAL DSN6SYSP DSNTIPN NO, 0-59 Statistics sync SYSADM DSN6SPRM DSNTIPP

SYSADM or the 1st of 2 AUTHIDs with installation SYSADM authority

System admin 1 SYSADM2 DSN6SPRM DSNTIPP SYSADM or the 2nd of 2

AUTHIDs with installation SYSADM authority Blank = SYSADM1ID

System admin 2 SYSOPR1 DSN6SPRM DSNTIPP

SYSOPR or the 1st of 2 AUTHIDs with installation SYSOPR authority

System operator 1 SYSOPR2 DSN6SPRM DSNTIPP SYSOPR or the 2nd of 2

AUTHIDs with installation SYSOPR authority Blank = SYSOPR1 ID

System operator 1 TBSBPOOL DSN6SYSP DSNTIP1 Any 4K Buffer pool name

Default is BP0 Default Buffer pool

for user data TCPALVER DSN6FAC DSNTIP5 NO, YES User ID only TCP/IP

connections are accepted TCPKPALV DSN6FAC DSNTIP5 ENABLE, DISABLE, or 1-

65534; Default is ENABLE Overrides inappropriate

TCP/IP KeepAlive value TIME DSN6SYSP DSNTIP4 ISO, USA, EUR, JIS, LOCAL Time format TIMELEN DSNHDECP DSNTIP4 0, 8-254 Local time length TRACSTR DSN6SYSP DSNTIPN NO, YES (Classes 1 − 3), list

of global classes (1 − 9), or * Trace auto start TRACTBL DSN6SYSP DSNTIPN Acceptable values are 4K to

396K; Default is 64K Trace size TRKRSITE DSN6SPRM DSNTIPO NO, YES Indicates remote tracker site

in case of disaster. TSTAMP DSN6ARVP DSNTIPH NO, YES, EXT Timestamp archives TWOACTV DSN6LOGP DSNTIPH 2 or 1 Number of copies TWOARCH DSN6LOGP DSNTIPH 2 or 1 Number of copies TWOBSDS DSN6LOGP none YES, NO Number of BSDS UGCCSID DSNHDECP DSNTIPF 1208 UNICODE CCSID (1200 for

graphic) UMCCSID DSNHDECP DSNTIPF 1208 UNICODE CCSID (1208 for

mixed) UNIT DSN6ARVP DSNTIPA TAPE or any device type or

unit name Device type

Page 191: DB2 Reference Guide 2up Letter

System Information CA Reference Guide DSNZPARM

6-26 © 2002 Computer Associates International

Acceptable ValuesMacro Parameter

Macro Name

Panel Description

UNIT2 DSN6ARVP DSNTIPA Device type or unit name Device type 2 URCHKTH DSN6SYSP DSNTIPL 0-255; Default is 0 Number of checkpoint

cycles before warning of uncommitted unit of recovery.

URLGWTH DSN6SYSP DSNTIPL 0-1000K UR log write check USCCSID DSNHDECP DSNTIPF 1208 UNICODE CCSID

(367 for single-byte) UTIMOUT DSN6SPRM DSNTIPI 1 – 254; Default is 6 Utility timeout WLMENV DSN6SYSP DSNTIPX Any valid name, 1-18 char Default

WLM_ENVIRONMENT for user-defined function and stored procedure during CREATE

XLKUPDLT DSN6SPRM DSNTIPI NO, YES Locking method for searched

UPDATE or DELETE

Page 192: DB2 Reference Guide 2up Letter

For DB2 UDB for z/OS System Information and OS/390 Lock Modes

© 2002 Computer Associates International 6-27

Lock Modes

Read-Only Select

ISOLA

Access Lock Mode

Locksize TION Method 1 TS10 Table2 Data

Page/Row 3

TS CS/RR/ RS

Any S NA NA

TABLE2

CS/RR/ RS

Any

IS

S

NA Index, any use IS4,11 IS4 S5

PAGE/ ROW/ ANY

CS/ RS

Table space scan IS4,11 IS4 S5

Index/data probe IS4 IS4 S

Index scan6 IS4/S IS4/SNA

S/NA

PAGE/ ROW/ ANY

RR

Table space

scan6

IS2/S S/

NA

NA

INSERT ... VALUES(...) or INSERT ... subselect7

ISOLA

Access Lock Mode

Locksize TION Method 1 TS10 Table2 Data Page/

Row 3

TS CS/RR/ RS

Any

X

NA

NA

TABLE2 CS/RR/ RS

Any

IX

X

NA PAGE/ ROW/ ANY

CS/RR/RS

Any IX IX X

UPDATE or DELETE, without cursor

ISOLA

Access Lock Mode

Locksize TION Method 1 TS10 Table2 Data

Page/Row 3

TS CS/RR/ RS

Any

X

NA

NA

TABLE2 CS/RR/ RS

Any

IX

X

NA

PAGE/

CS

Index Selection

IX

IX Del:X

Upd:U →X

ROW/ ANY

Index/data Selection IX IX U→ X

Table space scan IX IX U→ X

PAGE/

RS

Index selection IX IX Del: S→ X / X

Upd: S/U9→ X ROW/ ANY

Index/data selection IX IX S/U9→ X

Table space scan IX IX S/U9→ X

PAGE/

RR

Index selection

IX

IX Del: S→ X/X

Upd: S/U9→ X/XROW/ ANY

Index/data selection IX IX S/U9→X

Table space scan IX2/X X/NA NA

Page 193: DB2 Reference Guide 2up Letter

System Information CA Reference Guide Lock Modes

6-28 © 2002 Computer Associates International

Select with FOR UPDATE OF

ISOLA

Access

Lock Mode Locksize TION Method 1 TS10 Table2 Data Page/Row 3

TS CS/ RR/ RS

Any U NA NA

TABLE2 CS/ RR/ RS

Any IS/IX U NA

PAGE/ Index, any use

IX IX U

ROW/ ANY

CS Table space scan

IX IX U

PAGE/

Index, any use

IX IX S/U/X9

ROW/ ANY

RS Table space scan

IX IX S/U/X9

Index/data probe

IX

IX

S/U/X9

PAGE/ ROW/

Index scan 6 IX/X IX/X/NA

S/U/X9 /NA

ANY

RR Table space scan6

IX2/X X/NA S/U/X9 /NA

UPDATE or DELETE with cursor

ISOLA

Access

Lock Mode Locksize TION Method 1 TS10 Table2 Data Page/Row 3

TS Any Any X NA NA

TABLE2 Any Any IX X NA

Index, updated IX IX X PAGE/ ROW/ ANY

CS/RS/RR

Index not updated IX IX X

1) Access methods are: Probe-based The index alone is searched to find an entry,

rather than a range of entries. Scan-based The index or table space is scanned for

successive entries or rows. (ROWIDS provide data probes to look for a single data row directly) Lock type depends on back up access method which may be: Index-only Index alone qualifies rows and return data. Data-only Data alone qualifies rows and return data, i.e.

tablespace scan or use of ROWID for a probe. Index-to-data Index and data used to evaluate. Index selection Index used to evaluate predicate data used to

return data. Index/data selection Index and data used to evaluate predicate data

used to return data. 2) Used for segmented table spaces only. 3) These locks are taken on pages if LOCKSIZE is PAGE or on rows if

LOCKSIXZE is ROW. When the maximum number of locks per table space (LOCKMAX) is reached, locks escalate to a table lock for tables in a segmented table space, or to a table space lock for tables in a non-segmented table space. Using LOCKMAX 0 in CREATE or ALTER TABLESPACE disables lock escalation.

4) If the table or table space is started for read-only access, DB2 attempts to acquire an S lock. If an incompatible lock already exists, DB2 acquires the IS lock.

5) SELECT statements that do not use a cursor, or that use read-only or ambiguous cursors and are bound with CURRENTDATA(NO), might not require any lock if DB2 can determine that the data to be read is committed. This is called lock avoidance.

6) Even if LOCKMAX is 0, the bind process can promote the lock size to TABLE or TABLESPACE. If that occurs, SQLCODE +806 is issued.

7) The locks listed are acquired on the object into which the insert is made. A subselect acquires additional locks on the objects it reads, as if for read-only SELECT.

8) The U lock is taken if index columns are updated. 9) Whether the lock is S or U is determined by an installation option. If

the WITH clause specifies the isolation as RR or RS; the KEEP UPDATE LOCKS option obtains and holds an X lock instead of a U or S lock.

10) Includes partition locks, if selective partition locking is used. Does not include LOB tablespace locks.

11) If the table space is defined as LOCKPART YES, locks can be avoided on partitions.

Page 194: DB2 Reference Guide 2up Letter

For DB2 UDB for z/OS System Information and OS/390 Lock Modes

© 2002 Computer Associates International 6-29

IFCIDs - Performance Trace Records

Class 1: Background Events

IFCID Event 0001 System services statistics 0002 Database services statistics 0031 EDM pool full 0042 Begin checkpoint 0043 End checkpoint 0076 Begin EOM (End of Memory Request) 0077 End EOM 0078 Begin EOT (End of Task Request) 0079 End EOT 0102 On for short on storage 0103 Off for short on storage 0105 Buffer manager mapping of DBIDs and OBIDs 0106 System parameters in effect at trace invocation 0107 Data set OPEN/CLOSE information 0153 User defined exception condition trace

Class 2: Subsystem-Related Events

IFCID Event 0003 Accounting 0068 Begin ABORT 0069 End ABORT 0070 Begin COMMIT phase 2 0071 End COMMIT phase 2 0072 Begin CREATE THREAD 0073 End CREATE THREAD 0074 Begin TERMINATE THREAD 0075 End TERMINATE THREAD 0080 Begin establish exit 0081 End establish exit 0082 Begin identify request 0083 End identify request 0084 Begin prepare to COMMIT (IMS/CICS) 0085 End prepare to COMMIT (IMS/CICS) 0086 Begin signon (IMS/CICS) 0087 End signon (IMS/CICS/DDF) 0088 Begin sync 0089 End sync 0106 Systems parameters in effect at trace invocation 0174 Begin archive log mode(QUIESE) command processing 0175 End archive log mode(QUIESE) command processing

Class 3: SQL-Related Events

IFCID Event 0022 Mini plans generated 0053 End Describe, COMMIT, RLBK, or ERROR 0055 Issuance of SET CURRENT SQLID 0058 End SQL statement 0059 Begin FETCH SQL 0060 Begin SELECT SQL 0061 Begin INSERT, UPDATE, OR DELETE 0062 Begin DDL 0063 Identify SQL statement to be parsed 0064 Begin SQL PREPARE 0065 Begin OPEN CURSOR 0066 Begin CLOSE CURSOR 0092 Access method services command start 0095 Sort started 0096 Sort ended 0097 Access method services command end 0106 System parameters in effect at trace invocation 0112 Plan attributes for successful allied thread allocation 0177 Successful package allocation 0233 Start or end of a call to a stored procedure at a DB2 server 0237 Written when SET CURRENT DEGREE statements are executed 0261 Information about group bufferpool checkpoints 0262 Information about castout threshold processing for group buffer

Page 195: DB2 Reference Guide 2up Letter

System Information CA Reference Guide Lock Modes

6-30 © 2002 Computer Associates International

pools 0313 Records console message about long-running Urs 0324 Records function resolution information 0329 Records asynchronous wait times for IXLCACHE and IXLFCOMP

requests 0330 Records active log shortage condition

Class 4: Buffer Manager I/O and EDM Pool Requests

IFCID Event 0006 Begin read I/O 0007 End read I/O 0008 Begin synchronous write I/O 0009 End synchronous or asynchronous write I/O 0010 Begin asynchronous write I/O 0029 Start EDM I/O request 0030 End EDM I/O request 0105 Buffer manager mapping of DBIDs and OBIDs 0106 System parameters in effect at trace invocation 0107 Buffer manager OPEN/CLOSE activity 0127 Begin waiting for asynchronous I/O 0128 End waiting for asynchronous I/O 0226 Records the beginning of an agent suspend to wait for a page

latch that is currently held under another agent 0227 Records the end of an agent suspend to wait for a page latch

Class 5: Log Manager

IFCID Event 0032 Begin log manager wait 0033 End log manager wait 0034 Begin read I/O 0035 End read I/O 0036 Begin non I/O wait 0037 End non I/O wait 0038 Begin write I/O 0039 End write I/O 0040 Begin archive write 0041 End archive write 0104 Log manager data set mapping 0106 System parameters in effect at trace invocation 0114 Begin read I/O archive 0115 End read I/O archive DASD 0116 End read I/O archive tape 0117 Begin log wait archive 0118 End log wait archive 0119 Begin BSDS write I/O 0120 End BSDS write I/O 0228 Beginning of time spent in the tape unit deallocation process 0229 End of the tape unit deallocation service task whose start is

recorded in IFCID 0228

Class 6: Summary Lock Information

IFCID Event 0020 Page lock and table space lock summary 0044 Lock suspend 0045 Lock resume 0105 Buffer manager mapping of DBIDs and OBIDs 0106 Systems parameter in effect at trace invocation 0107 Buffer manager OPEN/CLOSE activity 0172 Capture all resources and their lock states when deadlock occurs 0196 Lock request resulted in timeout of its DB2 task because one or more

other tasks were holding incompatible locks on requested resource 0213 The beginning of a wait for a drain lock 0214 The end of a wait for a drain lock 0218 Information used to determine whether lock avoidance techniques

can be used 0225 Records summary information about storage usage in the DBM1

address space

Page 196: DB2 Reference Guide 2up Letter

For DB2 UDB for z/OS System Information and OS/390 Lock Modes

© 2002 Computer Associates International 6-31

Class 7: Detailed Lock Information

IFCID Event 0021 Every lock acquired, changed, or released on return from IRLM 0105 Buffer manager mapping of DBIDs and OBIDs 0106 Systems parameter in effect at trace invocation 0107 Buffer manager OPEN/CLOSE activity 0223 Detailed information about each successful use of lock avoidance 0312 Provide an audit trail for DCE security processing 0319 Provides and audit trail for security processing

Class 8: Data Manager Detail

IFCID Event 0013 Begin hash scan 0014 End hash scan 0015 Input to matching/nonmatching index scan 0016 Input to the first insert 0017 Begin sequential scan 0018 End sequential scan, tablespace scans 0105 Buffer manager mapping of DBIDs and OBIDs 0106 Systems parameter in effect at trace invocation 0107 Buffer manager OPEN/CLOSE activity 0125 RID list processing usage 0199 Records data set information provided

in –DISPLAY BUFFERPOOL LSTATS command 0219 Records information about LISTDEF data sets 0220 Records information about BSAM data sets for utilities 0221 Degree of parallel I/O processing for a parallel group 0222 The elapsed time of a parallel group 0231 Parallel cp operations are used and a parallel group completes 0305 Information related to defining, removing, and enforcing a table

check constraint 0311 Information about operations on temporary tables 0325 Records the start and end of trigger activation

Class 9: Sort Detail

IFCID Event 0026 Work file obtained 0027 No. of ordered records in sort run 0028 Detailed sort information 0095 Begin SORT 0096 End SORT 0106 Systems parameter in effect at trace invocation

Class 10: Bind, Commands, and Utilities

IFCID Event 0023 Utility start 0024 Utility phase change 0025 Utility end 0090 DB2 command text 0091 DB2 command completion 0105 Buffer manager mapping of DBIDs and OBIDs 0106 Systems parameter in effect at trace invocation 0107 Buffer manager OPEN/CLOSE activity 0108 Begin BIND/REBIND 0109 End BIND/REBIND 0110 Begin FREE 0111 End FREE 0201 Status of a buffer pool before and after an alter bufferpool 0217 Records detailed information about storage usage in the DBM1

address space 0219 Records information about LISTDEF data sets 0220 Records information about BSAM data sets for utilities 0256 Attributes of group buffer pool before and after alter group

bufferpool command. Written only in a data sharing environment.

Class 11: Dispatching

IFCID Event

Page 197: DB2 Reference Guide 2up Letter

System Information CA Reference Guide Lock Modes

6-32 © 2002 Computer Associates International

0046 Begin execution unit switch. Serviceability only info. 0047 Begin new SRB. Serviceability only info. 0048 End new SRB. Serviceability only info. 0049 Begin new TCB. Serviceability only info. 0050 End new TCB. Serviceability only info. 0051 Shared latch resume. Serviceability only info. 0052 Shared latch wait. Serviceability only info. 0056 Exclusive latch wait. Serviceability only info. 0057 Exclusive latch resume. Serviceability only info. 0093 Suspend called. Serviceability only info. 0094 Event resumed. Serviceability only info. 0106 Systems parameter in effect at trace invocation. 0113 Plan attributes for successful system agent allocation.

Class 12: Storage Manager

IFCID Event 0098 Begin GETMAIN/FREEMAIN (nonpool) 0099 End GETMAIN/FREEMAIN (nonpool) 0100 Begin GETMAIN/FREEMAIN (pool related) 0101 Begin GETMAIN/FREEMAIN (pool related) 0106 Systems parameter in effect at trace invocation

Class 13: Edit and Validation Exits

IFCID Event 0011 Validation exit. 0012 Edit exit. Encode. 0019 Edit exit. Decode. 0105 Buffer manager mapping of DBIDs and OBIDs. 0106 Systems parameter in effect at trace invocation. 0107 Buffer manager OPEN/CLOSE activity.

Class 14: In and Out of DB2

IFCID Event 0067 Accounting beginning 0106 Systems parameter in effect at trace invocation 0121 Entering DB2 from an application 0122 Return to application from DB2

Class 15: Installation-Defined Performance Record

IFCID Event 0154 Reserved for user-defined routine condition performance trace

Class 16: Distributed Processing

IFCID Event 0157 Type of request being processed. 0158 Type of request received at the serving location. 0159 Information about create conversation and wait requests at the

requesting location. 0160 Requesting agent data measured at interface between DB2 and

vtam. 0161 Serving agent data measured at the interface between DB2 and

vtam. 0162 Information about actions taken by the requesting location in

support of distributed processing. 0163 Info about the creation and termination of database access

threads. 0167 Information about conversation requests that are queued. 0183 Type of request being processed at the requester.

Class 17: Claim and Drain Detail

IFCID Event 0211 Info on making or releasing a claim, or changing a claim duration 0212 Information about draining and releasing a drain 0213 Beginning of a wait for a drain lock 0214 End of a wait for a drain lock

Page 198: DB2 Reference Guide 2up Letter

For DB2 UDB for z/OS System Information and OS/390 Lock Modes

© 2002 Computer Associates International 6-33

0215 Beginning of a wait for the number of claims to go to zero 0216 End of a wait for a claim count to go to zero

Class 18: Reserved

Class 19: Reserved

Class 20: Data Sharing Summary

IFCID Event 0249 Database descriptor (DBD) cached in a subsystem's edm pool is

invalidated in a data sharing environment by another DB2 subsystem changing it. NOTE: More than one copy of a dbd can exist in the edm pool.

0250 DB2 tries to connect to or disconnect from a coupling facility cache structure (DB2 group buffer pool).

0251 Page set physical lock (p-lock) operations for a nonpartitioned (linear) table space or index space, or a partition of a partitioned table space or index space.

0256 Attributes of a group buffer pool before and after an alter group bufferpool command. Written only in a data sharing environment.

0257 Details of an IRLM notify request used by DB2 data sharing group members to communicate with one another.

0261 Information about group buffer pool checkpoints. 0262 Information on castout threshold processing for group bufferpool. 0267 Start of a rebuild operation for any DB2 data sharing coupling

facility (cf) structures: lock structure, list structure (shared communications area (sca)), cache structure (group buffer pools); Start of a dynamic expansion/con-traction operation for: list structure, cache structure.

0268 End of a rebuild or dynamic expansion or contraction operation for any DB2 data sharing cf structures, started by IFCID 0267.

Class 21: Data Sharing Detail

IFCID Event 0255 Occurrence of a buffer refresh caused by cross-Invalidation (xi) of

a data page in the group buffer pool. 0259 Information on page p-lock operations (p-lock requests or p-lock

negotiation requests) for data sharing. 0263 Information about page set and partition castout detail

Class 22-29: Reserved

Class 30-32: Available for Local Use

Page 199: DB2 Reference Guide 2up Letter

System Information CA Reference Guide Lock Modes

6-34 © 2002 Computer Associates International

Page 200: DB2 Reference Guide 2up Letter

For DB2 UDB for z/OS QMF Information and OS/390 QMF Commands

© 2002 Computer Associates International 8-1

8. QMF Information

QMF Commands Add

BACkward {Csr | Half | Max | Page | integer} In TSO and CMS (with ISPF only):

BATch Bottom CAncel

(Cannot be entered from command line, use PF Key) CHAnge CHEck In CICS:

CIcs transid {(From=value | Termid=termid}

Clear In CMS:

CMs {CP | EXEC} [cms-command | exec-name] In CMS, TSO, and CICS:

To a database server: CONNect To servername

In CMS, TSO, and CICS (VSE only): Change the database USER: CONNect authorizationid (Password=password)

To a database server and set the USER: CONNect authorizationid To servername (Password=password)

CONVert {{QUERY | query-name}} {{(&variable=value, | (Target=[Query | Vars], | (Substitute=[YES | No} {(CONfirm=[YES | No | Profile}}

DELete DEScribe

DIsplay [QUERY | PROFILE | PROC | REPORT | Form {.Main | .Breakn | .CALc | .COLumns | .CONditions | .Detail | .Final | .Options | .Page}]

DIsplay CHART {(Icuform=[DSQCFORM | BAR | HISTOGRAM | chartname | ICUCHART | LINE | PIE | POLAR | SCATTER | SURFACE | TABLE | TOWER]}

DIsplay {QUERY | FORM | PROC | TABLE} name In TSO and CMS with ISPF:

DPre Draw an SQL Query:

DRaw tablename {{(Type=Select | Insert | Update | (Identifier=correlationname)}}

Draw a QBE Query: DRaw tablename

For an SQL Query or Procedure: EDit {QUERY | PROC} {(Editor=[PDF | name]}

Page 201: DB2 Reference Guide 2up Letter

QMF Information CA Reference Guide QMF Commands

8-2 © 2002 Computer Associates International

Using the Table Editor: EDit {TABLE} tablename {{(Mode=[Add | Change] | (CONfirm=[Yes | No] | (Save=[Immediate | End]}}

END

ENLarge

ERase {QUERY | FORM | PROC | TABLE} name {(CONfirm=[Yes | No]}

EXIt In CICS:

EXPort {QUERY | PROC} To queuename (Queuetype=[TS | TD] {{SUspend=[Yes | No] | CONfirm=[Yes | No]}}

EXPort {FORM} To queuename (Queuetype=[TS | TD] {{SUspend=[Yes | No] | CONfirm=[Yes | No] | Language=[English | Session]}}

EXPort {REPORT} To queuename (Queuetype =[TS | TD] {{SUspend=[Yes | No] | CONfirm=[Yes | No] | Dataformat=[Qmf | Html]}}

EXPort CHART Member=membername {ICUFORM=[chartname | BAR | HISTOGRAM | ICUCHART | LINE | DSQCFORM | PIE | POLAR | SCATTER | SURFACE | TABLE | TOWER]}

EXPort DATA To queuename (Queuetype=[TS | TD] {{SUspend=[Yes | No] | CONfirm=[Yes | No] | Dataformat=[Qmf | Ixf] | Outputmode=Binary | Character]}}

In CICS from the database: EXPort {QUERY | PROC} objectname To queuename

(Queuetype=[TS | TD] {{SUspend=[Yes | No] | CONfirm=[Yes | No]}}

EXPort FORM objectname To queuename (Queuetype=[TS | TD] {{SUspend=[Yes | No] | CONfirm=[Yes | No] | Language=[English | Session]}}

EXPort TABLE objectname To queuename (Queuetype=[TS | TD] {{SUspend=[Yes | No] | CONfirm=[Yes | No] | Dataformat=[Qmf | Ixf] | Outputmode=Binary | Character]}}

In TSO: EXPort {QUERY | PROC} To dataset {{(CONfirm=[Yes | No] | Member=membername}}

EXPort {FORM} To datasetname {{(CONfirm=[Yes | No] | Member=membername | Language=[English | Session]}}

EXPort CHART (Member=membername {Icuform=[DSQCFORM | BAR | HISTOGRAM | ICUCHART | LINE | PIE | POLAR | SCATTER | chartname | SURFACE | TABLE | TOWER]}

EXPort DATA To datasetname {{(CONfirm=[Yes | No] | Member=membername | Dataformat=[Qmf | Ixf] | Outputmode=[Binary | Character]}}

EXPort {REPORT} To datasetname {{(CONfirm=[Yes | No] | Member=membername | Dataformat=[Qmf | Html]}}

Page 202: DB2 Reference Guide 2up Letter

For DB2 UDB for z/OS QMF Information and OS/390 QMF Commands

© 2002 Computer Associates International 8-3

In TSO from the database: EXPort [QUERY | PROC] To datasetname {{(CONfirm=[Yes | No] | Member=membername)}}

EXPort FORM formname To datasetname {{(CONfirm=[Yes | No] | Member=membername | Language=[English | Session]}}

EXPort TABLE tablename To datasetname {{(CONfirm=[Yes | No] | Member=membername | Dataformat=[Qmf | Ixf] | Outputmode=[Binary | Character]}}

In CMS: EXPort {QUERY | PROC} To filename {filetype {filemode}} {(CONfirm=[Yes | No]}

EXPort {FORM} To filename {filetype {filemode}} {{(CONfirm=[Yes | No] | Language=[English | Session]}}

EXPort CHART To filename {(Icuform=[DSQCFORM | BAR | HISTOGRAM | ICUCHART | LINE | PIE | POLAR | SCATTER | chartname | SURFACE | TABLE | TOWER]} |

EXPort DATA To filename {filetype {filemode}} {{(CONfirm=[Yes | No] | Member=membername | Dataformat=[Qmf | Ixf] | Outputmode=[Binary | Character]}}

EXPort REPORT To filename {filetype {filemode}} {(CONfirm=[Yes | No] | Dataformat=[Qmf | Html]}

In CMS from the database: EXPort [QUERY | PROC] objectname To filename {filetype {filemode}} {(CONfirm=[Yes | No]}

EXPort FORM objectname To filename {filetype {filemode}} ({{CONfirm=[Yes | No] | Language=[English | Session]}}

EXPort TABLE tablename To filename {filetype {filemode}} ({{CONfirm=[Yes | No] | Member=membername | Dataformat= [Qmf | Ixf] | Outputmode=[Binary | Character]}}

In TSO and CMS with ISPF: EXTract {name (Password=password}

Forward {Csr | Half | Max | Page | n}

Get GLOBAL (rexxvarname=varname,)

Help {msgcode} In TSO:

IMPort [FORM | PROC | QUERY | DATA] From dataset (Member=membername)

IMPort [PROC | QUERY | ] name From dataset {{(COMment=value | CONfirm=[Yes | No] | Member=membername | SHare=[Yes | No]}}

IMPort FORM name From dataset {{(COMment=value | CONfirm=[Yes | No] | Language=[English | Session] | Member=membername | SHare=[Yes | No]}}

IMPort TABLE name From dataset {{(COMment=value | CONfirm=[Yes | No] | Member=membername | Action=[Replace | Append]}}

Page 203: DB2 Reference Guide 2up Letter

QMF Information CA Reference Guide QMF Commands

8-4 © 2002 Computer Associates International

In CICS: IMport [QUERY | FORM | PROC | DATA] From queuename (Queuetype=[TS | TD] {SUspend=[Yes | No]}

IMport [QUERY | PROC] objectname From queuename (Queuetype=[TS | TD] {{SUspend=[Yes | No] | CONfirm=[Yes | No] | SHare=[Yes | No] | COMment=value}}

IMport FORM objectname From queuename (Queuetype=[TS | TD] {{SUspend=[Yes | No] | CONfirm=[Yes | No] | SHare=[Yes | No] | COMment=value | Language=[English | Session]}}

IMport TABLE tablename From queuename (Queuetype=[TS | TD] {{SUspend=Yes | No] | CONfirm=[Yes | No] | COMment=value | Action=[Replace | Append]}}

In CMS: IMport [FORM | PROC | QUERY | DATA] From filename {filetype {filemode}}

IMport [FORM | PROC | QUERY] From filename {filetype {filemode}} {{(COMment=value | CONfirm=[Yes | No] | SHare=[Yes | No]}}

IMport TABLE name From filename {filetype {filemode}} {{(COMment=value | CONfirm=[Yes | No] | Action=[Replace | Append]}}

IMport FORM objectname From filename {filetype {filemode}} {{(CONfirm =[Yes | No] | SHare=[Yes | No] | COMment =value | Language=[English | Session]}}

INsert INTeract {qmf-command} In TSO and CMS with ISPF only:

ISpf {parameter}

LAyout [FORM | formname | FORM formname]

LEft {Csr | Half | Max | Page | n}

LIst [QUeries | Forms | Procs | QMf | Tables | All] {{(Owner=[userid | ALL | patternstring] | Name=[name | ALL] | (Location=[name]}}

In TSO and CMS with ISPF only: Message ispfmsg# {(Help=panelname | Stopproc=[Yes | No] | Text='msg-ext'}

Next {Column | Definition}

PREvious {Column | Definition} In TSO and CMS:

Print {QUERY | FORM | PROC | PROFILE} {{(Width=n | Length=[n | Cont] | PRinter=[printer | blankstring] Datetime=[Yes | No] | PAgeno=[Yes | No]}}

Print {REPORT} {{(Width=n | Length=[n | Cont] | Form=[FORM | formname] | PRinter=[printer | value] | Datetime=[Yes | No] | PAgeno=[Yes | No]}}

Page 204: DB2 Reference Guide 2up Letter

For DB2 UDB for z/OS QMF Information and OS/390 QMF Commands

© 2002 Computer Associates International 8-5

Print CHART {{(PRinter=printer | Units=[Percent | Inches | Centimeters] | Voffset=n | Hoffset=n | CWidth=n | CLength=n | ICUform=[DSQCFORM | BAR | HISTOGRAM | ICUCHART | LINE | PIE | POLAR | SCATTER | chartname | SURFACE | TABLE | TOWER]}}

From the database: PRInt {QUERY | FORM | PROC | TABLE} name {(Width=n | Length=[n | Cont] | PRinter=[printer | value] | Datetime=[Yes | No] | PAgeno=[Yes | No]}

In CICS (from temporary storage): PRInt {QUERY | FORM | PROC | REPORT | PROFILE} {{(QUEUEName=name | QUEUEType=[TS | TD] | SUspend=[YES | NO] | Form=[FORM | name] | Width=n | Length=[n | Cont] | PRinter=[printer | text] | Datetime=[Yes | No] | PAgeno=[Yes | No]}} Form is only valid for REPORT.

In CICS from the database: PRInt {QUERY | FORM | PROC | TABLE} name {{(QUEUEName=name | QUEUEType=[TS | TD] | SUspend=[YES | NO] | Width=n | Length=[n | Cont] | PRinter=[printer | value] | Datetime=[Yes | No] | PAgeno=[Yes | No]}}

Qmf qmfcommand

REDuce REFresh

RESet QUERY {{(Language=[Prompted | Sql | Qbe] | Model=Rel}}

RESet {PROC | PROFILE | DATA | FORM {.Breakn | .CALc | .COLumns | .CONditions | .Detail {option} | .Final | .Options | .Page}}

RESet GLOBAL [(variable, | ALL]

RETrieve

RIGHT {Csr | Half | Max | Page | n}

RUn {QUERY} {{(&variable=value, | Form=[FORM | formname] | Rowlimit=n | CONfirm=[Yes | No]}}

RUn {PROC} {{(&variable=value, | Arg=value2}} From database:

RUn {QUERY} name {{(&variable=value, | Form=[FORM | formname] | rowlimit=n | CONfirm=[Yes | No]]}

RUn {PROC} name {{(&variable=value, | Arg=value2}}

SAve PROFILE

SAve {QUERY | PROC} As name {{(COMment=comment | CONfirm=[Yes | No] | SHare=[Yes | No]}}

SAve {FORM} As name {{(COMment=comment | CONfirm=[Yes | No] | SHare=[Yes | No] | Language=[English | Session]}}

Page 205: DB2 Reference Guide 2up Letter

QMF Information CA Reference Guide QMF Commands

8-6 © 2002 Computer Associates International

SAve DATA As tablename {{(COMment=comment | CONfirm=[Yes | No] | Action=[Replace | Append]}}

SEArch

SET GLOBAL (variable=[value, | &variable,]

SET {PROFILE} ([CAse=[Upper | String | Mixed] | COnfirm=[Yes | No] | LAnguage=[Prompted | Sql | QBE] | LEngth=[n | Cont]] | Decimal=[Period | Comma | French] | Printer=[printer | blankstring] | Space=[spacename | blankstring] | Trace=[All | None] | Model=Rel | Width=n]

SHow SQL

SHow {Home | Query | PROC | PROFile | Report | CHARt | Globals | FOrm {.Main | .Breakn | .CALc | .COLumns | .Detail {(Variation=n} | Conditions | .Final | .Options | .Page} | ? | CHANge | COmmand | FIeld | SEarch

SOrt With Prompted Query:

SPecify {Columns | Duplicates | Rows | Sort | Tables} With FORM, COLUMNS:

SPecify {Alignment | Definition} Starting QMF session from REXX:

START (parametername=value, In TSO and CMS with ISPF:

STATe SWitch Comments

TOp In TSO only:

TSo {EXEC | EX} command string

? Retrieve previous command

?? Retrieve second previous command

Page 206: DB2 Reference Guide 2up Letter

For DB2 UDB for z/OS QMF Information and OS/390 QMF Edit Codes

© 2002 Computer Associates International 8-7

QMF Edit Codes C character data CW cut in column widths and wrapped CT cut at blank To column width and wrapped CDx cut at delimiters and wrapped Note: Above codes also valid with Date, Time, and Timestamp data For Hexadecimal representation of Character Data: X formats data as hexadecimal characters XW formats data as hexadecimal characters and

follows the same rule as the CW code For Binary representation of Character Data: B formats data in binary form BW formats data in binary form and follows the same

rule as the CW code For Graphic Data: G graphic data GW cut in column widths and wrapped For Numeric Data: D{Z}{C}nn minus, comma, dollar E{Z}nn scientific notation I{Z}nn leading zero, minus J{Z}nn leading zero K{Z}nn minus, comma L{Z}nn minus P{Z}nn minus, comma, percent Z in second position replaces zero value with spaces. C displays the user-definable currency symbol from DSQDC_CURRENCY. For Date Data: Four-digit year: TDYx Year first YYYYxMMxDD TDMx Month first MMxDDxYYYY TDDx Day first DDxMMxYYYY TD default format Abbreviated two-digit year: TDYAx Year first YYxMMxDD TDMAx Month first MMxDDxYY TDDAx Day first DDxMMxYY Site-specific: TDL locally defined

Page 207: DB2 Reference Guide 2up Letter

QMF Information CA Reference Guide QMF Edit Codes

8-8 © 2002 Computer Associates International

For Time Data: Code: Format: Notes: TTSx HHxMMxSS 24 hour clock, with secs TTCx HHxMMxSS 12 hour clock, with secs TTAx HHxMM No seconds TTAN HHMM No secs or delimiter TTUx HHxMM AM USA format HHxMM PM TT Default format TTL locally defined See your info center For Timestamp Data: TSI yyyy-mm-hh.mm.ss.nnnnnn User-Defined Edit Codes for Character and Numeric Data: Uxxxx data in internal database representation Vxxxx character string passed to edit program; numeric

data will be converted to character string Decimal Notation Example:

EDIT CODE

Z E R O

MINUS

COMMA

DOLLAR

PERCENT

DISPLAY OF

-1234567.885 D2 * * * -$1,234,567.89

DC2 * * * -DM1,234,567.89I2 * * -00001234567.89J2 * 000001234567.89K2 * * -1,234,567.89L2 * -1234567.89P2 * * * -1,234,567.89%

Page 208: DB2 Reference Guide 2up Letter

For DB2 UDB for z/OS QMF Information and OS/390 QMF Usage Codes

© 2002 Computer Associates International 8-9

QMF Usage Codes ACROSS BREAKn BREAKnX GROUP OMIT Aggregation Usage Codes:

AVERAGE * CSUM * COUNT PCT * FIRST CPCT * LAST TPCT * MAXIMUM TCPCT * MINIMUM STDEV * SUM * CALCid * = Invalid with Character, DATE, TIME, and TIMESTAMP values QMF Form Variables

&CALCid &COUNT &DATE &PAGE &ROW &TIME &n (column number) &an (aggregate function and column number) user-defined Global variables

Page 209: DB2 Reference Guide 2up Letter

QMF Information CA Reference Guide QMF QBE Keywords

8-10 © 2002 Computer Associates International

QMF QBE Keywords ALL. G. OR AND I. P. AO. , AO(n). IN (x,y,z) SUM. AVG. LIKE U. BETWEEN x and y MAX. UNQ. COUNT. MIN. USER D. NOT DO. . DO(n). NULL

For linking, grouping, or joining of tables use:

_column-new-name.

Page 210: DB2 Reference Guide 2up Letter

For DB2 UDB for z/OS and OS/390 Index

2002 Computer Associates International I-1

A to Class

ACROSS ................................................... 8-9 Administrative Authorities Hierarchy ..... 6-11 ALL......................................................... 8-10 ALLOCATE............................................... 1-5 ALTER1-5, 1-6, 1-7, 1-8, 1-18, 1-20, 1-38, 3-1 AND........................................................ 8-10 AO. , AO(n)............................................. 8-10 ARCHIVE........................................... 3-1, 3-3 ASSOCIATE ............................................. 1-8 Authorities Required .............................. 2-13 AVERAGE................................................. 8-9 AVG. ....................................................... 8-10 BAckward ................................................. 8-1 BEGIN ...................................................... 1-8 BETWEEN x and y.................................. 8-10 Bind Analyzer ...............................................v BIND........................................... 3-5, 3-6, 3-7 BREAK 1-6 ............................................... 8-9 CA 24x7........................................................v CAF Return Codes .................................. 7-29 CA-Insight ....................................................v CALL ............................................... 1-8, 1-38 CANCEL ............................................ 3-1, 8-1 Catalog Tables .......................................... 4-1 CATMAINT...................................... 2-1, 2-13 CHECK................................... 2-1, 2-12, 2-13 CICS......................................................... 8-1 CICS/OS/VS Attachment Facility .............. 3-9 Class 1........................................... 6-18, 6-24 Class 1: Background Events.................... 6-29 Class 2: Subsystem-Related Events......... 6-29 Class 3: SQL-Related Events................... 6-29 Class 4: Buffer Manager I/O and EDM Pool Requests....... 6-30 Class 5: Log Manager.............................. 6-30 Class 6: Summary Lock Information....... 6-30 Class 7: Detailed Lock Information ........ 6-31 Class 8: Data Manager Detail.................. 6-31 Class 9: Sort Detail................................. 6-31 Class 10: Bind, Commands, and Utilities 6-31 Class 11: Dispatching ............................. 6-31 Class 12: Storage Manager...................... 6-32 Class 13: Edit and Validation Exits......... 6-32 Class 14: In and Out of DB2 ................... 6-32 Class 15: Installation-Defined Performance Record .......... 6-32 Class 16: Distributed Processing ............ 6-32 Class 17: Claim and Drain Detail............ 6-32 Class 18: Reserved.................................. 6-33 Class 19: Reserved.................................. 6-33 Class 20: Data Sharing Summary............ 6-33 Class 21: Data Sharing Detail ................. 6-33 Class 22-29: Reserved............................. 6-33 Class 30-32: Available for Local Use ....... 6-33 CLOSE ............................ 1-6, 1-8, 1-12, 1-15

Page 211: DB2 Reference Guide 2up Letter

CA Reference Guide Index

I-2 2002 Computer Associates International

CMs to Det

CMs...........................................................8-1 Collection Privileges ......................6-12, 6-13 Column Formats .....................................6-16 Column Functions...................................1-26 COMMENT................................................1-8 COMMIT...................................................1-9 CONNECT.................................................1-9 CONVert ...................................................8-1 COPY ...............................................2-2, 2-13 COPYTOCOPY..........................................2-2 COUNT ............................................8-9, 8-10 CPCT ........................................................8-9 CREATE TRIGGER ................................1-16 CREATE .1-7, 1-9, 1-12, 1-13, 1-14, 1-15, 1-16, 1-17, 1-19 CSUM........................................................8-9 D. ............................................................8-10 DASD .......................................................... vi Data Compressor.......................................... v Data Conversion......................................1-40 Data Type Byte Counts............................1-40 Data Types ..............................................1-40 Database Administration..........................v, vi Database Analyzer........................................ v Database Backup and Recovery................v, vi Database Management.................................. v Database Performance Management............. v Database Privileges .................................6-12 Date Durations........................................1-37 DB2 application performance....................... v DB2 application ........................................... v DB2 Commands ........................................3-1 DB2 data ..................................................... vi DB2 databases ............................................. v DB2 environment .....................................v, vi DB2 Limits................................................6-7 DB2 object management ............................. vi DB2 packages.............................................. vi DB2 plan analysis......................................... v DB2 schemas............................................... vi DB2 security administration ....................... vi DB2 subsystem............................................. v DB2 tables .................................................. vi DB2 tablespaces........................................... v DB2, tables in ............................................. vi DBDR......................................................4-74 DBDS......................................................4-74 DCLGEN ...................................................3-6 Decimal Notation Example........................8-8 DECLARE ...............................1-8, 1-16, 1-17 DELETE ..... 1-8, 1-15, 1-16, 1-18, 1-20, 1-38 DESCRIBE CURSOR ..............................1-16 DESCRIBE INPUT ..................................1-16 DESCRIBE PROCEDURE .......................1-17 DESCRIBE.....................................1-16, 1-17

Page 212: DB2 Reference Guide 2up Letter

For DB2 UDB for z/OS and OS/390 Index

2002 Computer Associates International I-3

Detector........................................................v

DIA to GRA

DIAGNOSE............................... 2-3, 2-8, 2-13 Directory Tables ..................................... 4-74 DISPLAY ........................... 3-1, 3-2, 3-9, 3-12 Distinct Type Privileges.......................... 6-13 DO. . DO(n). ........................................... 8-10 DROP ...................1-7, 1-14, 1-17, 1-19, 1-38 DSN Commands........................................ 3-5 DSN ................................................. 3-5, 3-10 DSN_FUNCTION_TABLE ......................... 5-7 DSN_STATEMENT_TABLE...................... 5-5 DSN1CHKR ................................... 2-12, 2-13 DSN1COMP................................... 2-12, 2-13 DSN1COPY.................................... 2-12, 2-13 DSN1LOGP ................................... 2-12, 2-13 DSN1PRNT.................................... 2-12, 2-13 DSN1SDMP ................................... 2-12, 2-13 DSNC........................................................ 3-9 DSNH ..................................................... 3-10 DSNJLOGF............................................. 2-11 DSNJU003 (Change Log Inventory)........ 2-11 DSNJU003..................................... 2-11, 2-13 DSNJU004 (Print Log Map).................... 2-11 DSNJU004..................................... 2-11, 2-13 DSNU........................................................ 2-1 DSNZPARM Parameter Information ....... 6-18 DSNZPARMS................................................v Durations................................................ 1-37 EDIT......................................................... 8-2 Embedded SELECT1-3, 1-4, 1-5, 1-6, 1-7, 1-9 END........................1-17, 1-37, 1-38, 3-6, 8-2 ENLarge.................................................... 8-2 ERase ....................................................... 8-2 EXEC SQL....................................... 2-3, 2-13 EXECUTE...........1-17, 1-18, 1-19, 1-20, 1-38 EXIt.......................................................... 8-2 EXPLAIN ................................................ 1-17 EXPort...................................................... 8-2 Expressions .............................................. 1-1 Fast Check...................................................vi Fast Index....................................................vi Fast Load.....................................................vi Fast Recover ................................................vi Fast Unload .................................................vi FETCH ................................................... 1-17 FIRST....................................................... 8-9 For Character Data................................... 8-7 For Date Data ........................................... 8-7 For Graphic Data...................................... 8-7 For Time Data .......................................... 8-8 For Timestamp Data................................. 8-8 For User-Defined Data .............................. 8-8 Forward.................................................... 8-3 FREE............................................... 1-17, 3-6 Fullselect .................................................. 1-3

Page 213: DB2 Reference Guide 2up Letter

CA Reference Guide Index

I-4 2002 Computer Associates International

Get GLOBAL.............................................8-3 GRANT..................................1-17, 1-18, 1-38

GRO to OR

GROUP .....................................................8-9 Help ..........................................................8-3 HOLD......................................................1-18 hot spots ..................................................... vi IFCIDs ....................................................6-29 IMPort ......................................................8-3 IMS/VS Commands..................................3-12 INCLUDE ................................................1-18 Index Expert ................................................ v Index Page Format..................................6-17 Index Page Set Space Map Page ..............6-15 INSERT.................................1-18, 1-20, 1-38 INTeract....................................................8-4 IPNAMES ..................................................4-1 LABEL ....................................................1-18 Labeled Durations...................................1-37 LAST.........................................................8-9 LIKE .......................................................8-10 LIst ...........................................................8-4 LISTDEF .........................................2-3, 2-13 LOAD...............................................2-4, 2-13 LOB Data Page........................................6-15 LOB High Level Space Map Page.............6-14 LOB Low Level Space Map Page .............6-15 LOB Map Page ........................................6-15 LOCATIONS .............................................4-2 Lock Modes.............................................6-27 LOCK TABLE .........................................1-19 Log Analyzer ............................................... vi LOG ..........................................................3-3 LogCompress .............................................. vi LULIST.....................................................4-2 LUMODES ................................................4-3 LUNAMES .................................................4-3 MAX. .......................................................8-10 MAXIMUM ................................................8-9 Merge/Modify............................................... vi MERGECOPY...................................2-5, 2-13 Message.....................................................8-4 MIN. ........................................................8-10 MINIMUM .................................................8-9 Miscellaneous System Information............6-1 MODESELECT .........................................4-4 MODIFY TRACE .......................................3-2 MODIFY....................2-5, 2-13, 3-2, 3-9, 3-11 MVS Commands ......................................3-11 Naming Definitions .................................1-22 Next ..........................................................8-4 Nonsegmented Space Map Page...............6-14 NOT ........................................................8-12 NULL ......................................................8-10 OMIT ........................................................8-9 On-line DB2 ..............................................2-1

Page 214: DB2 Reference Guide 2up Letter

For DB2 UDB for z/OS and OS/390 Index

2002 Computer Associates International I-5

OPEN...................................................... 1-19 OPTIONS ................................................. 2-5 OR .......................................................... 8-10

Oth to SAv

Other System Commands.......................... 3-1 P. ............................................................ 8-12 Package Analyzer.........................................vi Package Privileges .................................. 6-12 Page Formats.......................................... 6-14 Partition Expert...........................................vi PCT .......................................................... 8-9 Performance Trace Records.................... 6-29 Plan Analyzer................................................v Plan Privileges ........................................ 6-12 PLAN_TABLE ........................................... 5-1 Predicates................................................. 1-1 PREPARE ............................................... 1-19 PREvious .................................................. 8-4 PRInt........................................................ 8-4 QMF Commands ....................................... 8-1 QMF Edit Codes ....................................... 8-7 QMF QBE Keywords ............................... 8-10 QMF Usage Codes..................................... 8-9 Queries ..................................................... 1-2 Quick Copy..................................................vi QUIESCE......................................... 2-5, 2-13 Rapid/Online Reorg ......................................v RC/Compare ................................................vi RC/Extract...................................................vi RC/Merger ...................................................vi RC/Migrator.................................................vi RC/Query .....................................................vi RC/Secure....................................................vi RC/Update ...................................................vi REBIND.................................................... 3-7 REBUILD......................................... 2-6, 2-13 RECOVER ................................ 2-6, 2-13, 3-2 Recovery Analyzer .......................................vi referential structures ...................................vi RELEASE ............................................... 1-19 RENAME................................................. 1-19 REORG............................ 2-6, 2-7, 2-12, 2-13 REPAIR ........................................... 2-8, 2-13 REPORT.......................................... 2-9, 2-13 RESET............................................. 3-2, 3-12 RESet ....................................................... 8-5 Resource Type Codes.............................. 7-30 Return Codes................................... 7-1, 7-29 REVOKE........................................ 1-19, 1-20 RI Editor .....................................................vi RI Manager ..................................................vi RI relationships ...........................................vi RIGHT...................................................... 8-5 RLST Table .............................................. 6-9 ROLLBACK ............................................ 1-20 Routine Privileges................................... 6-13

Page 215: DB2 Reference Guide 2up Letter

CA Reference Guide Index

I-6 2002 Computer Associates International

RUN .....................................3-5, 3-6, 3-7, 3-8 RUn...........................................................8-5 RUNSTATS ......................................2-9, 2-13 SAve..........................................................8-5

Sca to SYS

Scalar Functions .....................................1-26 Schema Privileges ...................................6-13 SCTR ......................................................4-75 Search Conditions.....................................1-2 Security Authorizations ..........................6-11 Segmented Space Map Page ....................6-14 SELECT Statement...................................1-3 SET... 1-8, 1-15, 1-17, 1-20, 1-21, 1-39, 3-3, 3-12 SEt............................................................8-6 SHow ........................................................8-6 SIGNAL...................................................1-21 SMF Audit Trace Option ............................. vi SOrt ..........................................................8-6 SPECIFY...................................................8-6 SPTR ......................................................4-75 SQL Ease ..................................................... v SQL Functions ........................................1-26 SQL Limits ...............................................6-6 SQL Reserved Words...............................1-38 SQL Return Codes ....................................7-1 SQL usage.................................................... v SQL...........................................................1-1 SQLCA...............................................6-1, 6-2 SQLDA........................................6-3, 6-4, 6-7 SQLSTATE Class Codes..........................7-28 SQLSTATE/SQLCODE Cross Reference .7-21, 7-28 Stand-alone Utilities ...............................2-11 Standard Reserved Words .......................1-38 START.............................3-3, 3-11, 3-12, 8-6 STDEV......................................................8-9 STOP ........................3-3, 3-4, 3-9, 3-11, 3-12 STOSPACE ......................................2-9, 2-13 Subselect...................................................1-2 Subsystem Analyzer ..................................... v SUM .................................................8-9, 8-10 SWitch ......................................................8-6 Syntax Elements .......................................1-1 SYSAUXRELS ...........................................4-5 SYSCHECKDEP ........................................4-5 SYSCHECKS.............................................4-5 SYSCHECKS2...........................................4-5 SYSCOLAUTH ...................................4-1, 4-6 SYSCOLDIST............................................4-6 SYSCOLDIST_HIST .................................4-7 SYSCOLDISTSTATS ................................4-8 SYSCOLSTATS.........................................4-8 SYSCOLUMNS ..........................................4-9 SYSCOLUMNS_HIST ..............................4-12 SYSCONSTDEP ......................................4-14

Page 216: DB2 Reference Guide 2up Letter

For DB2 UDB for z/OS and OS/390 Index

2002 Computer Associates International I-7

SYSCOPY ............................................... 4-14 SYSDATABASE ...................................... 4-16 SYSDATATYPES .................................... 4-17 SYSDBAUTH ................................. 4-17, 4-18 SYSDBRM............................................... 4-19 SYSDUMMY1.......................................... 4-19 SYSFIELDS ................................... 4-19, 4-20

SYS to SYS

SYSFOREIGNKEYS................................ 4-20 SYSIBM.SYSLGRNX............................... 4-75 SYSIBM.SYSUTIL................................... 4-76 SYSIBM.SYSUTILX ................................ 4-77 SYSINDEXES ......................................... 4-21 SYSINDEXES_HIST ............................... 4-22 SYSINDEXPART..................................... 4-23 SYSINDEXPART_HIST........................... 4-25 SYSINDEXSTATS................................... 4-26 SYSINDEXSTATS_HIST......................... 4-26 SYSJARCLASS_SOURCE ....................... 4-27 SYSJARCONTENTS ............................... 4-27 SYSJARDATA......................................... 4-27 SYSJAROBJECTS .................................. 4-27 SYSJAVAOPTS ....................................... 4-28 SYSKEYS................................................ 4-28 SYSLGRNG............................................. 4-75 SYSLINKS .............................................. 4-28 SYSLOBSTATS ...................................... 4-29 SYSLOBSTATS_HIST ............................ 4-29 SYSLOCATIONS ...................................... 4-2 SYSLULIST .............................................. 4-2 SYSLULIST .............................................. 4-2 SYSLUMODES.......................................... 4-3 SYSLUNAMES ................................... 4-2, 4-3 SYSMODESELECT................................... 4-4 SYSPACKAGE ............................... 4-29, 4-32 SYSPACKAUTH...................................... 4-35 SYSPACKDEP ........................................ 4-35 SYSPACKLIST........................................ 4-36 SYSPACKSTMT...................................... 4-36 SYSPARM................................................. 3-3 SYSPARMS............................................. 4-38 SYSPKSYSTEM ............................. 4-38, 4-39 SYSPLAN 4-19, 4-40, 4-42, 4-43, 4-47, 4-48, 4-53, 4-54 SYSPLANAUTH ...................................... 4-42 SYSPLANDEP......................................... 4-43 SYSPLSYSTEM ............................. 4-41, 4-43 SYSPROCEDURES................................. 4-44 SYSRELS................................................ 4-45 SYSRESAUTH ........................................ 4-46 SYSROUTINEAUTH ............................... 4-47 SYSROUTINES....................................... 4-48 SYSROUTINES_OPTS............................ 4-52 SYSSCHEMAAUTH................................. 4-53 SYSSEQUENCES.................................... 4-53 SYSSEQUENCESDEP............................. 4-54

Page 217: DB2 Reference Guide 2up Letter

CA Reference Guide Index

I-8 2002 Computer Associates International

SYSSTMT ....................4-47, 4-48, 4-53, 4-54 SYSSTOGROUP......................................4-56 SYSSTRINGS..........................................4-56 SYSSYNONYMS ......................................4-57 SYSTABAUTH................................4-57, 4-58 SYSTABCONST ......................................4-59 SYSTABLEPART............................4-59, 4-61 SYSTABLES............................................4-62

SYS to W

SYSTABLES_HIST..................................4-66 SYSTABLESPACE...................................4-67 SYSTABSTATS .......................................4-69 System Privileges ....................................6-13 System Tables ...........................................4-1 SYSTRIGGERS .......................................4-69 SYSUSERAUTH ......................................4-70 SYSUSERNAMES....................................4-73 SYSUTIL........................................4-76, 4-77 SYSUTILX......................................4-74, 4-77 SYSVIEWDEP .........................................4-71 SYSVIEWS ...................4-63, 4-71, 4-72, 4-73 SYSVLTREE ..................................4-72, 4-73 SYSVOLUMES ........................................4-72 SYSVTREE.....................................4-72, 4-73 Table Privileges.......................................6-12 Tablespace Format..................................6-14 TCPCT......................................................8-9 TEMPLATE......................................2-9, 2-13 TERM .......................................................3-4 Thread Terminator ...................................... v Time Durations.......................................1-37 Timestamp Durations..............................1-37 TPCT ........................................................8-9 TSO Commands ......................................3-10 TSo ...........................................................8-6 UNDO SQL.................................................. vi Unicenter Database Administration Suite ... vi Unicenter Database Backup and Recovery Suite ........................................................... vi Unicenter Database Management ................. v Unicenter Database Performance Management Database Performance Suite ........................ v UNLOAD ........................................2-10, 2-13 UPDATE ...............1-3, 1-18, 1-20, 1-21, 1-39 Use Privileges..........................................6-13 User Data Page Format ..................6-14, 6-15 User Data Row Formats ..........................6-16 User Tables ...............................................5-1 USERNAMES ..........................................4-73 Utilities .....................................................2-1 VALUES ..................................................1-21 WHENEVER............................................1-21