0% found this document useful (0 votes)
392 views217 pages

DB2 Reference Guide 2up Letter

COMPUTER ASSOCIATES Reference Guide for DB2 v7 is an easy-to-use booklet that gives you Instant Access to information, such as SQLand DB2-related system commands, utility syntax, catalog tables, SQL return codes, system limits, and much more. These Education Materials and related computer software program is for the end user's informational purposes only. These Education Materials may not be copied, transferred, reproduced, disclosed or distributed, in whole or in part, without the prior written consent of CA

Uploaded by

Srinivas Reddy
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
392 views217 pages

DB2 Reference Guide 2up Letter

COMPUTER ASSOCIATES Reference Guide for DB2 v7 is an easy-to-use booklet that gives you Instant Access to information, such as SQLand DB2-related system commands, utility syntax, catalog tables, SQL return codes, system limits, and much more. These Education Materials and related computer software program is for the end user's informational purposes only. These Education Materials may not be copied, transferred, reproduced, disclosed or distributed, in whole or in part, without the prior written consent of CA

Uploaded by

Srinivas Reddy
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 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

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 Lower case characters () / {} {{ }} [] [[ ]] Must be entered as shown. 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 , after parameter , before parameter : after parameter ; Underline Italics For readability only. Parameter(s) may be repeated and comma is required between the repeated parameters. Comma required for that parameter. Parameter(s) may be repeated and colon is required between the repeated parameters. Semicolon must be entered where shown. Default parameter or abbreviation for a command. 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 users 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 USERS 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.

For DB2 UDB for z/OS and OS/390

Table of Contents

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
2002 Computer Associates International iii

Table of Contents

CA Reference Guide

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

iv

2002 Computer Associates International

For DB2 UDB for z/OS and OS/390

Unicenter DB2 Management Solutions

Unicenter Database Management for DB2 for z/OS and OS/390 Solutions
CAs 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

CAs 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.

2002 Computer Associates International

Unicenter DB2 Management Solutions

CA Reference Guide

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. vi 2002 Computer Associates International

For DB2 UDB for z/OS and OS/390

Unicenter DB2 Management Solutions

Unicenter Fast Check: To check referential structures. In a single pass of the data: check index, check disk, and DSNCOPY checkall 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.

2002 Computer Associates International

vii

Unicenter DB2 Management Solutions

CA Reference Guide

Evaluate the Benefit of Unicenter Database Management Solutions for DB2 for z/OS and OS/390Today! Now that you are aware of CAs 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-800850-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.

viii

2002 Computer Associates International

For DB2 UDB for z/OS and OS/390

Unicenter DB2 Management Solutions

2002 Computer Associates International

ix

For DB2 UDB for z/OS and OS/390

SQL Syntax Elements

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
2002 Computer Associates International 1-1

SQL Syntax Elements


EXISTS-predicate: {NOT} EXISTS (fullselect)

CA Reference Guide

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)
1-2 2002 Computer Associates International

For DB2 UDB for z/OS and OS/390


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

SQL Queries

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

2002 Computer Associates International

1-3

SQL Queries
query-no-clause: QUERYNO integer

CA Reference Guide

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}

1-4

2002 Computer Associates International

For DB2 UDB for z/OS and OS/390

SQL Commands

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, )}
2002 Computer Associates International 1-5

SQL Commands
SQL Scalar:

CA Reference Guide

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

1-6

2002 Computer Associates International

For DB2 UDB for z/OS and OS/390 SQL Procedure:

SQL Commands

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)

2002 Computer Associates International

1-7

SQL Commands

CA Reference Guide

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
1-8 2002 Computer Associates International

For DB2 UDB for z/OS and OS/390 COMMIT {WORK} Type 1 and Type 2 CONNECT:

SQL Commands

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-datatypes 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

2002 Computer Associates International

1-9

SQL Commands

CA Reference Guide

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

1-10

2002 Computer Associates International

For DB2 UDB for z/OS and OS/390

SQL Commands

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

2002 Computer Associates International

1-11

SQL Commands

CA Reference Guide

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]

1-12

2002 Computer Associates International

For DB2 UDB for z/OS and OS/390 External Procedure:

SQL Commands

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]

2002 Computer Associates International

1-13

SQL Commands

CA Reference Guide

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]

1-14

2002 Computer Associates International

For DB2 UDB for z/OS and OS/390

SQL Commands

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]

2002 Computer Associates International

1-15

SQL Commands
CREATE TRIGGER trigger-name

CA Reference Guide

[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

1-16

2002 Computer Associates International

For DB2 UDB for z/OS and OS/390 DESCRIBE PROCEDURE


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

SQL Commands

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.
2002 Computer Associates International 1-17

SQL Commands
GRANT EXECUTE ON [FUNCTION

CA Reference Guide

[ 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 |
1-18 2002 Computer Associates International

For DB2 UDB for z/OS and OS/390

SQL Commands

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 ]}

2002 Computer Associates International

1-19

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

CA Reference Guide

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]
1-20 2002 Computer Associates International

For DB2 UDB for z/OS and OS/390 SET [CURRENT {FUNCTION} PATH |

SQL Commands

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 ]

2002 Computer Associates International

1-21

SQL Naming Definitions Naming Definitions

CA Reference Guide

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 viewname 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.

1-22

2002 Computer Associates International

For DB2 UDB for z/OS and OS/390

SQL Naming Definitions

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 userdefined 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.
2002 Computer Associates International 1-23

SQL Naming Definitions

CA Reference Guide

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, userdefined 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.

1-24

2002 Computer Associates International

For DB2 UDB for z/OS and OS/390

SQL Naming Definitions

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.

2002 Computer Associates International

1-25

SQL SQL Functions SQL Functions


Column Functions

CA Reference Guide

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.)

1-26

2002 Computer Associates International

For DB2 UDB for z/OS and OS/390 ATAN2 (expression1, expression2)

SQL SQL Functions

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.)

2002 Computer Associates International

1-27

SQL SQL Functions


CLOB (EXPRESSION{,integer})

CA Reference Guide

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 ZIPs 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.)

1-28

2002 Computer Associates International

For DB2 UDB for z/OS and OS/390 DAYS(expression)

SQL SQL Functions

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) jordan rene. (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) SMITH (Returning a fixed length graphic string representation of LASTNAME data type VARCHAR(15), value SMITH.)

2002 Computer Associates International

1-29

SQL SQL Functions


HEX(expression)

CA Reference Guide

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!)

1-30

2002 Computer Associates International

For DB2 UDB for z/OS and OS/390

SQL SQL Functions

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)) (in INTEGER format) 999998

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)

2002 Computer Associates International

1-31

SQL SQL Functions

CA Reference Guide

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) value000300.)

REPEAT (expression, integer)


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

1-32

2002 Computer Associates International

For DB2 UDB for z/OS and OS/390

SQL SQL Functions

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 2002-12-09TIMESTAMP) 00.00.00.000000 (returns a timestamp, rounded to the unit specified by the format-string. If formatstring 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 (X4000000038000104000 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.)

2002 Computer Associates International

1-33

SQL SQL Functions


SINH(expression)

CA Reference Guide

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 (in TIME format) 01.48.12

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)

1-34

2002 Computer Associates International

For DB2 UDB for z/OS and OS/390

SQL SQL Functions

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 ZIPs 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.)
2002 Computer Associates International 1-35

SQL SQL Functions

CA Reference Guide

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)

1-36

2002 Computer Associates International

For DB2 UDB for z/OS and OS/390

SQL Durations

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)

2002 Computer Associates International

1-37

SQL SQL Reserved Words 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_TIMESTAMP CURSOR DATA DATABASE DAY DAYS DBINFO DB2SQL DECLARE DEFAULT
1-38

CA Reference Guide

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 MICROSECONDS 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

2002 Computer Associates International

For DB2 UDB for z/OS and OS/390


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

SQL SQL Reserved Words


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

2002 Computer Associates International

1-39

SQL Data Types Data Types


Data Type Byte Counts
Data Type INTEGER or INT SMALLINT FLOAT(n) or REAL DECIMAL(x,y) CHAR(n) CLOB VARCHAR(n) LONG VARCHAR

CA Reference Guide

DBCLOB BLOB DATE TIME TIMESTAMP GRAPHIC(n) VARGRAPHIC(n) LONG VARGRAPHIC ROWID DISTINCT TYPE

Byte Count (add 1 if nulls are allowed) 4 2 4 (if n from 1 to 21) 8 (if n from 22 to 53) INTEGER (x/z)+1, where x is the precision N (max 255) 6 n+2 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 6 6 4 3 10 2n 2n + 2 (see LONG VARCHAR above) 19 The length of the source data type upon which the distinct type was based.

Data Conversion
OUTPUT
S M A L L I N T I N T E G E R D E C I M A L F L O A T C H A R V A R C H A R C L O B G R A P H I C V A R G R A P H I C D B C L O B B L O B D A T E T I M E T I M E S T A M P R O W I D

INPUT
SMALLINT INTEGER DECIMAL FLOAT CHAR CHAR MIXED VARCHAR VARCHAR MIXED GRAPHIC VARGRAPHIC DATE EXTNL TIME EXTNL TIMESTAM P EXTERNAL ROWID

D X X X

X D X X

X X D X

X X X D D D X X Y Y X X D D Y Y X X X X Y Y Y Y Y Y D X Y Y Y Y X D Y Y Y Y X X D D X X D X X X X X

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.

1-40

2002 Computer Associates International

For DB2 UDB for z/OS and OS/390

Utilities On-line DB2

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 }}

2002 Computer Associates International

2-1

Utilities On-line DB2


COPY

CA Reference Guide

[[ [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 ] ) ]

2-2

2002 Computer Associates International

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

Utilities On-line DB2

[ {{ TYPE (integer,) | ALLDUMPS {( Xabend code, )} | NODUMPS {( Xabend 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 [ Xtrace-id | integer ] { INSTANCE integer }] ] | ABEND [ MESSAGE message-id {INSTANCE integer} | TRACEID [Xtrace-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 } ]]

2002 Computer Associates International

2-3

Utilities On-line DB2


LOAD {DATA}

CA Reference Guide

[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 }) = [Xbyte-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})] = [Xbyte-string | character-string | Ggraphic-string | Ngraphic-string]

2-4

2002 Computer Associates International

For DB2 UDB for z/OS and OS/390

Utilities On-line DB2

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 ]}

2002 Computer Associates International

2-5

Utilities On-line DB2


REBUILD INDEX

CA Reference Guide

[(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 xbyte-string | TOLOGPOINT xbyte-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] }}

2-6

2002 Computer Associates International

For DB2 UDB for z/OS and OS/390

Utilities On-line DB2

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 }}
2002 Computer Associates International 2-7

Utilities On-line DB2

CA Reference Guide

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 | xbyte-string] | RID xbyte-string | KEY literal INDEX index-name] | INDEX index-name {PART integer} PAGE [integer | xbyte-string] [[ verify-statement | replace-statement | delete-statement | dump-statement ]] ] | TABLESPACE {dbname.} tsname ROWID xbyte-string VERSION xbyte-string [ delete-statement | dump-statement ]] verify-statement: VERIFY {OFFSET [0 | integer | Xbyte-string]} DATA [Xbyte-string | character-string] replace-statement: REPLACE [ RESET | OFFSET [0 | integer | Xbyte-string] DATA [Xbyte-string | character-string] ] delete-statement: DELETE dump-statement: DUMP{ {{ OFFSET [0 | integer | Xbyte-string] | LENGTH[Xbyte-string | integer] | PAGES[Xbyte-string | integer | *] }} | MAP {pages} | DATA {pages} } dbd-statement: DBD [ DROP DATABASE dbname DBID Xdbid | [TEST | DIAGNOSE | REBUILD] DATABASE dbname {OUTDDN ddname} ]

2-8

2002 Computer Associates International

For DB2 UDB for z/OS and OS/390

Utilities On-line DB2

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-spacename | 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 }}

2002 Computer Associates International

2-9

Utilities On-line DB2

CA Reference Guide

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 ] }

2-10

2002 Computer Associates International

For DB2 UDB for z/OS and OS/390

Utilities On-line DB2

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 ]} }}

2002 Computer Associates International

2-11

Utilities

Stand-Alone Utilies

CA Reference Guide

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

2-12

2002 Computer Associates International

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

Utilities Stand-Alone Utilities

{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 ] )}

2002 Computer Associates International

2-13

Utilities Authorities Required Authorities Required


Utility
CATMAINT CHECK COPY or COPYTOCOPY DIAGNOSE DSNJU003 DSNJU004 DSN1CHKR DSN1COMP DSN1COPY DSN1LOGP DSN1PRNT DSN1SDMP EXEC SQL LISTDEF LOAD MERGECOPY MODIFY RECOVERY MODIFY STATISTICS OPTIONS QUIESCE REBUILD RECOVER REORG REPAIR REPORT RUNSTATS STOSPACE TEMPLATE UNLOAD

CA Reference Guide

Authorization Required
Installation SYSADM SYSADM, SYSCTRL, DBADM, DBCTRL, DBMAINT, or STATS SYSADM, SYSCTRL, DBADM, DBCTRL, DBMAINT, or IMAGCOPY SYSADM, SYSCTRL, DBADM, DBCTRL, or REPAIR Data set access Data set access Data set access Data set access Data set access Data set access Data set access SYSADM,SYSOPR, TRACE, MONITOR1, or MONITOR2 None for stmt, but EXECUTE IMMEDIATE authority needed SELECT on SYSINDEXES, SYSTABLES, SYSTABLESPACE and to run utility SYSADM, SYSCTRL, DBADM, DBCTRL, or LOAD, or Table Ownership SYSADM, SYSCTRL, DBADM, DBCTRL, DBMAINT, or IMAGCOPY SYSADM, SYSCTRL, DBADM, DBCTRL, DBMAINT, or IMAGCOPY SYSADM, SYSCTRL, DBADM, DBCTRL. DBMAINT No privileges needed SYSADM, SYSCTRL, DBADM, DBCTRL, DBMAINT, or IMAGCOPY SYSADM, SYSCTRL, DBCTRL, DBADM, RECOVERDB SYSADM, SYSCTRL, DBADM, DBCTRL, or RECOVERDB SYSADM, SYSCTRL, DBADM, DBCTRL, or REORG SYSADM, SYSCTRL, DBADM, DBCTRL, or REPAIR SYSADM, SYSCTRL, DBADM, DBCTRL, or RECOVERDB SYSADM, SYSCTRL, DBADM, DBCTRL, DBMAINT, or STATS SYSADM, SYSCTRL, or STOSPACE No privileges needed SELECT on table or DBADM for DB or SYSADM, SYSCTRL

2-14

2000 Computer Associates International

Computer Associates

Table of Contents

2002 Computer Associates International

2-15

For DB2 UDB for z/OS and OS/390

Commands DB2 Commands

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}

2002 Computer Associates International

3-1

Commands DB2 Commands

CA Reference Guide

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

3-2

2002 Computer Associates International

For DB2 UDB for z/OS and OS/390 -SET ARCHIVE

Commands DB2 Commands

{ 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 ] )}

2002 Computer Associates International

3-3

Commands DB2 Commands


[CANCEL(n) | WAIT(n) ] ]}

CA Reference Guide

-STOP DDF {MODE[(QUIESCE) | (FORCE) | (SUSPEND) -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* | * ])

3-4

2002 Computer Associates International

For DB2 UDB for z/OS and OS/390

Commands DSN Commands

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

2002 Computer Associates International

3-5

Commands DSN Commands


BIND {PLAN(plan-name )}

CA Reference Guide

{{ 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 ]}

3-6

2002 Computer Associates International

For DB2 UDB for z/OS and OS/390 REBIND PACKAGE

Commands DSN Commands

[ ({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 ]) }}

2002 Computer Associates International

3-7

Commands DSN Commands

CA Reference Guide

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

3-8

2002 Computer Associates International

For DB2 UDB for z/OS and OS/390

Commands CICS Attachment Facility

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}

2002 Computer Associates International

3-9

Commands TSO Commands TSO Commands

CA Reference Guide

DSN { SYSTEM ([ DSN | subsystem-name |


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

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

3-10

2002 Computer Associates International

For DB2 UDB for z/OS and OS/390

Commands MVS IRLM Commands

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 ]

2002 Computer Associates International

3-11

Commands IMS Commands IMS Commands


/CHANGE

CA Reference Guide

[ 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 ]}

3-12

2002 Computer Associates International

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

Catalog Tables

4. System Tables
Catalog Tables
Legend:
SYSIBM.Tablename
SYSIBM.Indexname Table description. (DSNDB06.Tablespacename) Unique/Nonunique (Index columns)

Underlined Columns are updateable. Bold Columns modifiable with RUNSTATS. Default is 1 unless noted otherwise.

(SYSDDF) (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
LINKNAME

IPNAMES DSNFPX01 U

Data Type
CHAR(8)

Description The value must match the value specified in the LINKNAME column of the associated row in SYSIBM.LOCATIONS. 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 users 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. 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. Whether the row came from the basic Machine Readable Material (MRM) tape: Y/N/other. If other, release dependency indicator. 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.

SECURITY_OUT

CHAR(1)

USERNAMES

CHAR(1)

IBMREQD

CHAR(1)

IPADDR

VARCHAR (254)

2002 Computer Associates International

4-1

System Tables Catalog Tables


LOCATIONS

CA Reference Guide

(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
LOCATION LINKNAME

Data Type
CHAR(16) CHAR(8)

Description Unique location name for the accessible server. 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). Whether the row came from the basic MRM tape: Y/N/other. If other, release dependency indicator. 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.

IBMREQD

CHAR(1)

PORT

CHAR(32)

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 X07F6C4C2 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
LINKNAME

Data Type
CHAR(8)

Description 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. The VTAM logical unit name (LUNAME) of the remote database system. This LUNAME must not exist in the LUNAME column of SYSIBM.LUNAMES. Whether the row came from the basic MRM tape: Y/N/other. If other, release dependency indicator.

LUNAME

CHAR(8)

IBMREQD

CHAR(1)

4-2

2002 Computer Associates International

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

Catalog Tables

2002 Computer Associates International

4-3

System Tables Catalog Tables


LUMODES

CA Reference Guide

(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
LUNAME MODENAME CONVLIMIT

Data Type
CHAR(8) CHAR(8) SMALLINT

Description LUNAME of server involved in CNOS processing. Name of a logon mode description in the VTAM logon mode table. 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. Whether the row came from the basic MRM tape: Y/N/other. If other, release dependency indicator.

IBMREQD

CHAR(1)

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
LUNAME

Data Type
CHAR(8)

Description 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. Mode used to establish intersystem conversations. Blank indicates default mode IBMDB2LM. 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. 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 users authorization ID and no password. R RACF PassTicket; an Outbound connection request contains a userid and a RACF PassTicket. The servers 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.

SYSMODENAME

CHAR(8)

SECURITY_IN

CHAR(1)

SECURITY_OUT

CHAR(1)

4-4

2002 Computer Associates International

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

Catalog Tables

Column Name
ENCRYPTPSWDS

Data Type
CHAR(1)

Description 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. Whether to use SYSIBM.MODESELECT table: N Uses default mode IBMDB2LM or IBMRDB Y Searches SYSIBM.MODESELECT for appropriate mode name. 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. 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. Whether the row came from the basic MRM tape: Y/N/other. If other, release dependency indicator.

MODESELECT

CHAR(1)

USERNAMES

CHAR(1)

GENERIC

CHAR(1)

IBMREQD

CHAR(1)

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
AUTHID

Data Type
CHAR(8)

PLANNAME

CHAR(8)

LUNAME MODENAME

CHAR(8) CHAR(8)

Description Authorization ID of the request for data from another subsystem. Default is blank, indicating that the specified MODENAME applies to all auth IDs. Plan name associated with SQL request. Default is blank, indicating the specified MODENAME applies to all plan names. LU name associated with the SQL request. 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. Whether the row came from the basic MRM tape: Y/N/other. If other, release dependency indicator.

IBMREQD

CHAR(1)

2002 Computer Associates International

4-5

System Tables Catalog Tables


SYSAUXRELS

CA Reference Guide

(SYSOBJ) DSNOXX01 N (TBOWNER,TBNAME) DSNOXX02 N (AUXTBOWNER, AUXTBNAME) Contains a row for every auxiliary table created for a LOB column.
Column Name
TBOWNER TBNAME COLNAME PARTITION AUXTBOWNER AUXTBNAME AUXRELOBID IBMREQD

Data Type
CHAR(8)

Description Authorization ID of base table owner.

VARCHAR(18) Base table name. VARCHAR(18) LOB column name in base table. SMALLINT CHAR(8)

If base table is partitioned contains partition number, otherwise 0. Authorization ID of auxiliary table owner. Internal identifier for relationship between auxiliary and base table. Whether the row came from the basic MRM tape: Y/N/other. If other, release dependency indicator.

VARCHAR(18) Auxiliary table name. INTEGER CHAR(1)

SYSCHECKDEP

(SYSSTR) DSNSDX01 U (TBOWNER,TBNAME,CHECKNAME,COLNAME) Contains one row for each reference to a column in a table check constraint.
CHAR(8)

Column Name
TBOWNER TBNAME CHECKNAME COLNAME IBMREQD

(128) VARCHAR(18) Name of column referenced by the

Description Authorization ID of the owner for which the check constraint is defined. VARCHAR(18) Name of the table for which the check constraint is defined. VARCHAR Check constraint name. check constraint.

Data Type

CHAR(1)

Whether the row came from the basic MRM tape: Y/N/other. If other, release dependency indicator.

SYSCHECKS
Column Name
TBOWNER

(SYSSTR) DSNSCX01 U (TBOWNER,TBNAME,CHECKNAME) Contains one row for each table check constraint.
Data Type
CHAR(8)

CREATOR DBID OBID TIMESTAMP RBA

CHAR(8) SMALLINT SMALLINT TIMESTAMP CHAR(6)

Description Authorization ID of the owner of the table on which the table check constraint is defined. Authorization ID of the creator of the table check constraint. Internal identifier of the database for the check constraint. Internal identifier of the table check constraint. Time when the table check constraint was created. The log RBA when the check constraint was created. Column contains BIT data.

IBMREQD

CHAR(1)

TBNAME CHECKNAME CHECKCONDITION

(128) VARCHAR (3800)

Whether the row came from the basic MRM tape: Y/N/other. If other, release dependency indicator. VARCHAR(18) Name of the table for which the check constraint is defined. VARCHAR The table check constraint name. The text of the table check constraint.

SYSCHECKS2 (SYSSTR) DSNCHX01 U (TBOWNER,TBNAME,CHECKNAME) Contains one row for each table check constraint.
Column Name
TBOWNER

Data Type
CHAR(8)

Description Authorization ID of the owner of the table on which the table check constraint is defined.

4-6

2002 Computer Associates International

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

Catalog Tables

Column Name
TBNAME CHECKNAME PATHSCHEMAS

Data Type

Description constraint is defined. Table check constraint name 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. Whether the row came from the basic MRM tape: Y/N/other. If other, release dependency indicator.

VARCHAR(18) Name of the table on which the check VARCHAR (128) VARCHAR (254)

IBMREQD

CHAR(1)

SYSCOLAUTH
Column Name
GRANTOR

(SYSDBASE) Records UPDATE or REFERENCES privileges held by users on individual columns of a table or view.
Data Type
CHAR(8)

Description Authorization ID of the user who granted the privileges. Could also be PUBLIC or PUBLIC *. Authorization ID of the user who holds the privilege, or the name of application plan or package that uses the privilege. Type of grantee: blank GRANTEE is an auth ID P GRANTEE is an application plan or package Authorization ID of the owner of table or view on which the update privilege is held. Internal use only. Date the privilege was granted, yymmdd. Time the privilege was granted, hhmmssth. UPDATE privilege applies.

GRANTEE

CHAR(8)

GRANTEETYPE

CHAR(1)

CREATOR

CHAR(8)

TNAME TIMESTAMP DATEGRANTED TIMEGRANTED COLNAME IBMREQD

VARCHAR(18) Name of the table or view. CHAR(12) CHAR(6) CHAR(8)

VARCHAR(18) Name of the column to which the CHAR(1)

Whether the row came from the basic MRM tape: Y/N/other. If other, release dependency indicator. Unused. If the GRANTEE is a package its collection name. Blank otherwise. If the GRANTEE is a package, the consistency token of the DBRM from which the package was derived. Blank otherwise. Indicates privilege this row describes. R REFERENCES privilege blank UPDATE privilege Time when the GRANT was executed.

LOCATION COLLID CONTOKEN

CHAR(16) CHAR(18) CHAR(8)

PRIVILEGE

CHAR(1)

GRANTEDTS

TIMESTAMP

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
FREQUENCY STATSTIME IBMREQD

Data Type
SMALLINT TIMESTAMP CHAR(1)

Description No longer used. See FREQUENCYF. The date and time when RUNSTATS last updated the statistics. Whether the row came from the basic MRM tape: Y/N/other. If other, release dependency indicator. Authorization ID of the owner of the table containing the column. column.

TBOWNER TBNAME

CHAR(8)

VARCHAR(18) Name of the table containing the

2002 Computer Associates International

4-7

System Tables Catalog Tables


Column Name
NAME

CA Reference Guide

Data Type

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

VARCHAR(18) Name of the column. If

COLVALUE

VARCHAR (254)

Contains the data of a frequently occurring value. Statistics are not collected on a ROWID column. Column contains bit data. Type of statistics gathered: C Cardinality F Frequent value Number of distinct values for column group. Only valid for TYPE C statistics. 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. Number of columns associated with statistics. 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.

TYPE

CHAR(1)

CARDF COLGROUPCOLNO

FLOAT VARCHAR (254)

NUMCOLUMNS FREQUENCYF

SMALLINT FLOAT

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
STATSTIME

Data Type
TIMESTAMP

Description If RUNSTATS updated the statistics, the date and time when the last invocation of RUNSTATS updated the statistics. Authorization ID of the owner of the table that contains the column. column.

TBOWNER TBNAME NAME

CHAR(8)

VARCHAR(18) Name of the table that contains the 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 noncharacter data type, the data might not be printable. The type of statistics gathered: C F Cardinality Frequent value

TYPE

CHAR(1)

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. 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. Identifies the number of columns associated with the statistics.

COLGROUPCOLNO

VARCHAR (254)

NUMCOLUMNS

SMALLINT

4-8

2002 Computer Associates International

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

Catalog Tables

Column Name
FREQUENCYF

Data Type
FLOAT(8)

Description Gives the percentage of rows in the table with the value specified in COLVALUE when the number is multiplied by 100. For example, a value of 1 indicates 100%. A value of .153 indicates 15.3%. Statistics are not collected for an index on a ROWID column. The value is -1 if statistics have not been gathered. Whether the row came from the basic MRM tape: Y/N/other. If other, release dependency indicator.

IBMREQD

CHAR(1)

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
FREQUENCY STATSTIME IBMREQD

Data Type
SMALLINT TIMESTAMP CHAR(1)

Description No longer used. See FREQUENCYF. The date and time when RUNSTATS last updated the statistics. Whether the row came from the basic MRM tape: Y/N/other. If other, release dependency indicator. Partition number for the table space containing the table in which the column is defined. Authorization ID of the owner of the table containing the column. column.

PARTITION

SMALLINT

TBOWNER TBNAME NAME

CHAR(8)

VARCHAR(18) Name of the table containing the 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 of statistics gathered: C Cardinality F Frequent value Number of distinct values for column group. Only valid for TYPE C statistics. 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.

TYPE

CHAR(1)

CARDF COLGROUPCOLNO

FLOAT VARCHAR (254)

NUMCOLUMNS FREQUENCYF

SMALLINT FLOAT

Number of columns associated with statistics. 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
HIGHKEY

Data Type
CHAR(8)

Description Highest value of the column within the partition. Blank if stats not gathered or for indicator columns. Column contains bit data. Second highest value of the column within the partition. Blank if stats not gathered or for indicator columns. Column contains bit data.

HIGH2KEY

CHAR(8)

2002 Computer Associates International

4-9

System Tables Catalog Tables


Column Name
LOWKEY

CA Reference Guide

Data Type
CHAR(8)

Description Lowest value of the column within the partition. Blank if stats not gathered or for indicator columns. Column contains bit data. Second lowest value of the column within the partition. Blank if stats not gathered or for indicator columns. Column contains bit data. Number of distinct column values in the partition. 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. Whether the row came from the basic MRM tape: Y/N/other. If other, release dependency indicator. Partition number for the table space containing the table in which the column is defined. Authorization ID of the owner of the table containing the column. column.

LOW2KEY

CHAR(8)

COLCARD STATSTIME

INTEGER TIMESTAMP

IBMREQD

CHAR(1)

PARTITION

SMALLINT

TBOWNER TBNAME NAME COLCARDDATA

CHAR(8)

VARCHAR(18) Name of the table containing the VARCHAR(18) Name of the column. 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
NAME TBNAME TBCREATOR COLNO COLTYPE

Data Type

Description

VARCHAR(18) Name of the column. VARCHAR(18) Name of the table or view that contains

the column.
CHAR(8) SMALLINT CHAR(8)

Authorization ID of the owner of the table or view that contains the column. Numerical place of the column in the table or view that contains the column. Type of column: INTEGER full-word binary SMALLINT half-word binary FLOAT floating-point numeric CHAR fixed-length character VARCHAR variable-length character LONGVAR variable-length character DECIMAL 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

4-10

2002 Computer Associates International

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

Catalog Tables

Column Name
LENGTH

Data Type
SMALLINT

Description 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 of decimal data, or 0 if not decimal. 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. No longer used. See COLCARDF. Second highest value of the column. Blank if stats have not been gathered or for indicator columns. If key has noncharacter data type, data may not be printable, as column contains bit data. Second lowest value of the column. Blank if stats have not been gathered or for indicator columns. If key has noncharacter data type, data may not be printable, as column contains bit data. 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 Whether the row came from the basic MRM tape: Y/N/other. If other, release dependency indicator. A character string provided by the user with the COMMENT ON statement.

SCALE NULLS

SMALLINT CHAR(1)

COLCARD HIGH2KEY

INTEGER CHAR(8)

LOW2KEY

CHAR(8)

UPDATES

CHAR(1)

IBMREQD

CHAR(1)

REMARKS

VARCHAR (254)

2002 Computer Associates International

4-11

System Tables Catalog Tables


Column Name
DEFAULT

CA Reference Guide

Data Type
CHAR(1)

KEYSEQ

SMALLINT

Description 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 Columns relative position within table's primary key, or 0 if it is not part of primary key. Applies to character columns only. B S Column contains bit data. Indicates SBCS data if encoding scheme is Unicode or MIXDATA field=YES on DSNTIPF.

FOREIGNKEY

CHAR(1)

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. a LABEL ON statement, otherwise an empty string.

LABEL

VARCHAR(30) Column label provided by the user with

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. 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. 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. Indicates status of column definition: blank complete I incomplete; LOB tablespace, auxiliary table, or index on auxiliary table not yet created. 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 Internal identifier of data type.

DEFAULTVALUE

VARCHAR (512)

COLCARDF

FLOAT

COLSTATUS

CHAR(1)

LENGTH2

INTEGER

DATATYPEID

INTEGER

4-12

2002 Computer Associates International

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

Catalog Tables

Column Name
SOURCETYPEID TYPESCHEMA TYPENAME

Data Type
INTEGER CHAR(8)

Description Internal identifier of source type. 0 for built-in data types. If COLTYPE is distinct, schema of distinct type. Otherwise, SYSIBM. type. Otherwise, same as COLTYPE column.

VARCHAR(18) If COLTYPE is distinct, name of distinct

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
NAME TBNAME TBCREATOR COLNO COLTYPE

Data Type

Description

VARCHAR(18) Name of the column. VARCHAR(18) Name of the table or view that contains

the column.
CHAR(8) SMALLINT CHAR(8)

Authorization ID of the owner of the table or view that contains the column. Numeric place of the column in the table or view. The type of the column specified in the definition of the column: INTEGER SMALLINT FLOAT CHAR VARCHAR LONGVAR DECIMAL GRAPHIC VARG Large integer Small integer Floating-point Fixed-length character string Varying-length character string Varying-length character string Decimal Fixed-length graphic string Varying-length graphic string

LONGVARG Varying-length graphic string DATE TIME TIMESTMP BLOB CLOB DBCLOB ROWID DISTINCT Date Time Timestamp Binary large object Character large object Double-byte character large object Row ID data type 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.

2002 Computer Associates International

4-13

System Tables Catalog Tables


Column Name
LENGTH

CA Reference Guide

Data Type
SMALLINT

Description 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 SMALLINT FLOAT CHAR VARCHAR LONGVAR DECIMAL GRAPHIC VARG 4 2 4 or 8 Length of string Maximum length of string Maximum length of string Precision of number Number of DBCS characters Maximum number of DBCS characters

LONGVARG Maximum number of DBCS characters DATE TIME TIMESTMP BLOB 4 3 10 4 The length of the field that is stored in the base table. The maximum length of the LOB column is found in LENGTH2. 4 The length of the field that is stored in the base table. The maximum length of the CLOB column is found in LENGTH2. 4 The length of the field that is stored in the base table. The maximum length of the DBCLOB column is found in LENGTH2. 17 Length of source data type

CLOB

DBCLOB

ROWID DISTINCT
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 Y No 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 noncharacter data type, the data might not be printable. Second lowest value of the column. Blank if statistics have not been gathered, or the column is an indicator column or a column of an auxiliary table. If the column has a noncharacter data type, the data might not be printable.

LOW2KEY

CHAR(8)

4-14

2002 Computer Associates International

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

Catalog Tables

Column Name
STATSTIME

Data Type
TIMESTAMP

Description If RUNSTATS updated the statistics, the date and time when the last invocation of RUNSTATS updated the statistics. The default value is '000101-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. Estimated number of distinct values in the column. For an indicator column, this is the number of LOBs that are not null and have a length greater than zero. The value is -1 if statistics have not been gathered. The value is -2 for the first column of an index of an auxiliary table. Whether the row came from the basic MRM tape: Y/N/other. If other, release dependency indicator.

COLCARDF

FLOAT(8)

IBMREQD

CHAR(1)

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
BNAME BSCHEMA BTYPE

Data Type

Description exists.

VARCHAR(18) Object name on which dependency CHAR(8) CHAR(1)

Schema for object on which dependency exists. Object type on which dependency exists. F Function instance. applies.

DTBNAME DTBCREATOR DCONSTNAME

VARCHAR(18) Table name on which dependency CHAR(8) VARCHAR (128) CHAR(1)

Authorization ID for owner of table to which dependency applies. For DTYPE = C Check constraint unqualified name D Column name Object type: C Check constraint D User-defined default constant Whether the row came from the basic MRM tape: Y/N/other. If other, release dependency indicator.

DTYPE

IBMREQD

CHAR(1)

SYSCOPY

(SYSCOPY) DSNUCH01 N (DBNAME,TSNAME,START_RBA,TIMESTAMP) DSNUCX01 N (DSNAME) Contains information needed for recovery.
Column Name
DBNAME TSNAME DSNUM

Data Type
CHAR(8) CHAR(8) INTEGER

Description Name of the database. Name of the target table space or index space. 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.

2002 Computer Associates International

4-15

System Tables Catalog Tables


Column Name
ICTYPE

CA Reference Guide

Data Type
CHAR(1)

Description 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) Date of entry: yymmdd. 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 Tape file sequence number of the copy. Device type the copy is on. Whether the row came from the basic MRM tape: Y/N/other. If other, release dependency indicator. 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. Time at which row was inserted in the form: hhmmss SHRLEVEL parm on COPY (for ICTYPE F or I only): C change R reference blank does not describe image copy Volume serial numbers of the data set; 6-byte numbers separated by commas. Blank if data set is catalogued. Date and time when row was inserted (from ICDATE and ICTIME). 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 Indicates device used for image copy: D DASD T Tape blank Medium is not tape or DASD.

ICDATE START_RBA

CHAR(6) CHAR(6)

FILESEQNO DEVTYPE IBMREQD

INTEGER CHAR(8) CHAR(1)

DSNAME

CHAR(44)

ICTIME SHRLEVEL

CHAR(6) CHAR(1)

DSVOLSER

VARCHAR (1784) TIMESTAMP CHAR(2)

TIMESTAMP ICBACKUP

ICUNIT

CHAR(1)

4-16

2002 Computer Associates International

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

Catalog Tables

Column Name
STYPE

Data Type
CHAR(1)

Description If ICTYPE=T, this field indicates which COPY utility was terminated by the TERM UTILITY command or the START DATABASE with ACCESS(FORCE): F I full image copy 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-timerecovery 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. Object type for recovery information: I Index space T Table space 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. Highest partition number in a range for SYSCOPY records created via REORG or LOAD REPLACE to reset REORG pending. Number of pages written to the copy data set. The number of pages in the tablespace or index at the time of INLINE COPY. Total number of changed pages. Job name of the utility. Authorization ID of the utility.

GROUP_MEMBER

CHAR(8)

OTYPE

CHAR(1)

LOWDSNUM

INTEGER

HIGHDSNUM

INTEGER

COPYPAGESF NPAGESF CPAGESF JOBNAME AUTHID

FLOAT(8) FLOAT(8) FLOAT(8) CHAR(8) CHAR(8)

SYSDATABASE

(SYSDBAUT) DSNDDH01 U (NAME) DSNDDX02 N (GROUP_MEMBER) Contains one row for each database, except for database DSNDB01.
Column Name
NAME CREATOR STGROUP BPOOL DBID

Data Type
CHAR(8) CHAR(8) CHAR(8) CHAR(8) SMALLINT

Description Database name. Authorization ID of owner of database. Name of default storage group of database. Blank for system database. Name of default buffer pool of the table space. Blank for system table space. Internal identifier for database. If more than 32511 databases have been created the DBID is negative Whether the row came from the basic MRM tape: Y/N/other. If other, release dependency indicator.

IBMREQD

CHAR(1)

2002 Computer Associates International

4-17

System Tables Catalog Tables


Column Name
CREATEDBY ROSHARE TIMESTAMP TYPE

CA Reference Guide

Data Type
CHAR(8) CHAR(1) TIMESTAMP CHAR(8)

Description Authorization ID of user who created it. Not used. The value is: 0001-01-01-00.00.00.000000. 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. 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). Time the CREATE statement for this database was executed. Time of the most recent ALTER DATABASE executed against this database. Default encoding scheme for the database. E EBCDIC A ASCII U Unicode blank For DSNDB04, work files, and a TEMP database. Default SBCS CCSID for the database. Databases created prior to V5 or a TEMP database will contain zero. Default DBCS CCSID for the database. Databases created prior to V5 or a TEMP database will contain zero. Default MIXED CCSID for the database. Databases created prior to V5 or a TEMP database will contain zero. Name of default buffer pool for indexes, default is BP0.

GROUP_MEMBER

CHAR(8)

CREATEDTS ALTEREDTS

TIMESTAMP TIMESTAMP

ENCODING_SCHEME CHAR(1)

SBCS_CCSID

INTEGER

DBCS_CCSID

INTEGER

MIXED_CCSID

INTEGER

INDEXBP

CHAR(8)

SYSDATATYPES

(SYSOBJ) DSNODX01 U (SCHEMA,NAME) DSNODX02 U (DATATYPEID) Contains one row for each distinct type defined to the system.
Column Name
SCHEMA OWNER NAME CREATEDBY SOURCESCHEMA SOURCETYPE METATYPE DATATYPEID SOURCETYPEID LENGTH

Data Type
CHAR(8) CHAR(8) CHAR(18) CHAR(8) CHAR(8) CHAR(18) CHAR(1) INTEGER INTEGER INTEGER

SCALE

SMALLINT

SUBTYPE

CHAR(1)

CREATEDTS

TIMESTAMP

Description Schema of distinct type. Owner of distinct type. Name of distinct type. Authorization ID that created distinct type. Source data type schema. Source type name. Class of data type: T = Distinct type. Internal identifier of distinct type. Internal identifier of source type. Max length or precision of distinct type that is sourced from IBM-defined DECIMAL data type. Scale for a distinct type that is sourced from IBM-defined DECIMAL data type. Otherwise 0. 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 Time distinct type was created.

4-18

2002 Computer Associates International

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

Catalog Tables

Column Name

Data Type

ENCODING_SCHEME CHAR(1)

Description Encoding scheme of distinct type: A ASCII E EBCDIC U Unicode Whether the row came from the basic MRM tape: Y/N/other. If other, release dependency indicator. User-provided character string via COMMENT ON statement.

IBMREQD

CHAR(1)

REMARKS

VARCHAR (254)

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
GRANTOR

Data Type
CHAR(8)

GRANTEE

CHAR(8)

Description Authorization ID of user who granted the privileges. Could also be PUBLIC or PUBLIC *. Authorization ID of user who holds the privileges. Could also be PUBLIC or PUBLIC *. Database name. Internal use only. Date the privileges were granted: yymmdd. Time the privileges were granted: hhmmssth. Unused. Authorization level of the user from whom the privileges were received: blank N/A C DBCTL D DBADM L SYSCTRL M DBMAINT S SYSADM Whether GRANTEE can create tables within the database: (see legend **) Whether GRANTEE can create table spaces in the database: (see legend **) Whether GRANTEE has DBADM authority over database: (see legend **) Whether GRANTEE has DBCTRL authority over database: (see legend **) Whether GRANTEE has DBMAINT authority over database: (see legend **) Whether GRANTEE can issue DISPLAY command for database: (see legend **) Whether GRANTEE can issue the ALTER DATABASE and DROP DATABASE statements Whether GRANTEE can use the COPY, MERGECOPY, MODIFY, and QUIESCE on the database: (see legend **) Whether GRANTEE can LOAD tables in the database: (see legend **) Whether GRANTEE can REORG table spaces and indexes in the database: (see legend **) Whether the GRANTEE can use the RECOVER and REPORT utilities on tablespaces in the database Whether GRANTEE can DIAGNOSE and REPAIR table spaces and indexes in the database: (see legend **) Whether the GRANTEE can use the START command against the database Whether GRANTEE can run CHECK and RUNSTATS on the database: (see legend **)

NAME TIMESTAMP DATEGRANTED TIMEGRANTED GRANTEETYPE AUTHHOWGOT

CHAR(8) CHAR(12) CHAR(6) CHAR(8) CHAR(1) CHAR(1)

CREATETABAUTH CREATETSAUTH DBADMAUTH

CHAR(1) CHAR(1) CHAR(1)

DBCTRLAUTH

CHAR(1)

DBMAINTAUTH

CHAR(1)

DISPLAYDBAUTH

CHAR(1)

DROPAUTH

CHAR(1)

IMAGCOPYAUTH

CHAR(1)

LOADAUTH REORGAUTH

CHAR(1) CHAR(1)

RECOVERDBAUTH

CHAR(1)

REPAIRAUTH

CHAR(1)

STARTDBAUTH STATSAUTH

CHAR(1) CHAR(1)

2002 Computer Associates International

4-19

System Tables Catalog Tables


Column Name
STOPAUTH IBMREQD

CA Reference Guide

Data Type
CHAR(1) CHAR(1)

Description Whether GRANTEE can STOP the database: (see legend **) Whether the row came from the basic MRM tape: Y/N/other. If other, release dependency indicator. Time GRANT statement was executed.

GRANTEDTS

TIMESTAMP

Legend **: blank privilege not held G privilege held with GRANT option Y privilege held without GRANT option

SYSDBRM
Column Name
NAME TIMESTAMP PDSNAME PLNAME PLCREATOR PRECOMPTIME

(SYSPLAN) Contains one row for each DBRM of each application plan.
Data Type
CHAR(8) CHAR(8) CHAR(44) CHAR(8) CHAR(8) CHAR(8)

Description Name of the DBRM. Consistency Token. Name of Partitioned Data Set (PDS) of which DBRM is a member. Application plan of which this DBRM is a part. Authorization ID of owner of application plan. Time of precompilation: hhmmssth unless LEVEL precompile option is used. Date of precompilation: yymmdd unless LEVEL precompile option is used. SQL string delimiter for SQL statements in the DBRM: N apostrophe Y quotation mark Decimal point representation for SQL statements in the DBRM: N period Y comma The host language used: B Assembler C OS/VS COBOL D C F FORTRAN P PL/1 2 VS COBOL II 3 IBM COBOL 4 C++

PRECOMPDATE

CHAR(6)

QUOTE

CHAR(1)

COMMA

CHAR(1)

HOSTLANG

CHAR(1)

IBMREQD

CHARSET

MIXED DEC31

VERSION PRECOMPTS

Whether the row came from the basic MRM tape: Y/N/other. If other, release dependency indicator. CHAR(1) Indicates if the system CCSID for SBCS was 290 (Katakana) at precompile: A No K Yes CHAR(1) Indicates if MIXED option was in effect at precompile: Y/N. CHAR(1) Indicates if DEC31 option was in effect at precompile: blank No Y Yes VARCHAR(64) Version identifier for the DBRM. TIMESTAMP Time that DBRM was precompiled.

CHAR(1)

SYSDUMMY1
Column Name
IBMREQD

(SYSSTR) Contains one row, used for SQL statements for which a table reference is required, but the contents of the table are unimportant.
Data Type
CHAR(1)

Description Whether the row came from the basic MRM tape: Y/N/other. If other, release dependency indicator.

4-20

2002 Computer Associates International

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

Catalog Tables

SYSFIELDS
Column Name
TBCREATOR TBNAME COLNO NAME FLDTYPE

(SYSDBASE) Contains one row for every column that has a field procedure.
Description Authorization ID of owner of table that contains the column. VARCHAR(18) Name of table that contains the column. SMALLINT Numerical place of this column in table. VARCHAR(18) Name of the column. 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 string VARG variable-length graphic string 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. SMALLINT Scale if FLDTYPE is DECIMAL, else 0. CHAR(8) For a row describing a field procedure, the name of the procedure.
CHAR(8) SMALLINT

Data Type

LENGTH

SCALE FLDPROC WORKAREA

For a row describing a field procedure, size (in bytes), of work area required for encoding and decoding of the field procedure. Whether the row came from the basic MRM tape: Y/N/other. If other, release dependency indicator. For a row describing a field procedure, length of the field procedure parameter value block. For a row describing a field procedure, the parameter list following FIELDPROC in the statement that created the column, with insignificant blanks removed. For a row describing a field procedure, the parameter value block of the field procedure.

IBMREQD

CHAR(1)

EXITPARML

SMALLINT

PARMLIST

VARCHAR (254)

EXITPARM

VARCHAR (1530)

SYSFOREIGNKEYS
Contains one row for every column of every foreign key.
Column Name
CREATOR TBNAME RELNAME COLNAME COLNO COLSEQ IBMREQD

(SYSDBASE)
Description Authorization ID of the owner of the table that contains the column. column.

Data Type
CHAR(8)

VARCHAR(18) Name of the table containing the CHAR(8)

Name of the constraint for which the column is part of the foreign key. Numerical place of column in its table. Numerical place of the column in the foreign key. Whether the row came from the basic MRM tape: Y/N/other. If other, release dependency indicator.

VARCHAR(18) Name of the column. SMALLINT SMALLINT CHAR(1)

2002 Computer Associates International

4-21

System Tables Catalog Tables


SYSINDEXES

CA Reference Guide

(SYSDBASE) DSNDXX01 U (CREATOR,NAME) DSNDXX02 N (DBNAME,INDEXSPACE) DSNDXX03 U (TBCREATOR,TBNAME,CREATOR,NAME) Contains one row for every index.
Column Name
NAME CREATOR TBNAME TBCREATOR UNIQUERULE

Data Type
CHAR(8)

Description Authorization ID of owner of the index. defined.

VARCHAR(18) Name of the index. VARCHAR(18) Name of table on which the index is CHAR(8) CHAR(1)

Authorization ID of owner of table. 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. Number of columns in the key. Whether CLUSTER was specified when index was created: Y/N. 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 Internal ID of the database. Internal ID of the index fan set descriptor. Internal ID of the index page set descriptor. Name of the database that contains the index. Name of the index space. No longer used. See FIRSTKEYCARDF. No longer used. See FULLKEYCARDF. No. of active leaf pages in the index. The value is 1 if statistics have not been gathered. No. of levels in the index tree. The value is 1 if statistics have not been gathered. Name of the buffer pool used for the index. Size of leaf pages in index, in bytes. Whether data sets are erased when dropped: Y/N. The value is meaningless if the index is partitioned Not used. Whether data sets are candidates for closure when the limit on the number of open data sets is reached: Y/N. 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.

COLCOUNT CLUSTERING CLUSTERED

SMALLINT CHAR(1) CHAR(1)

DBID OBID ISOBID DBNAME INDEXSPACE FIRSTKEYCARD FULLKEYCARD NLEAF

SMALLINT SMALLINT SMALLINT CHAR(8) CHAR(8) INTEGER INTEGER INTEGER

NLEVELS

SMALLINT

BPOOL PGSIZE ERASERULE

CHAR(8) SMALLINT CHAR(1)

DSETPASS CLOSERULE

CHAR(8) CHAR(1)

SPACE

INTEGER

4-22

2002 Computer Associates International

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

Catalog Tables

Column Name
IBMREQD

Data Type
CHAR(1)

Description Whether the row came from the basic MRM tape: Y/N/other. If other, release dependency indicator. %, 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. Primary authorization ID of the user who created the index. Internal use only. Not used. The date and time when RUNSTATS last updated the statistics. The default value is 0001-01-01.00.00.00.000000. The index type: 2 Type-2 index blank Type-1 index

CLUSTERRATIO

SMALLINT

CREATEDBY IOFACTOR PREFETCHFACTOR STATSTIME

CHAR(8) SMALLINT SMALLINT TIMESTAMP

INDEXTYPE

CHAR(1)

FIRSTKEYCARDF

FLOAT

Number of distinct values of the first key column. If RUNSTATS not run value is -1. Number of distinct values in the full key. If statistics not run value is -1 Time when the CREATE statement was executed for the index. Time the most recent ALTER INDEX was issued for this index. 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. 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. 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 X000000000000. Otherwise, if COPY NO from an alter, COPYLRSN value is unchanged. 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. Kilobytes of DASD storage. The value is -1 if statistics have not been gathered. A character field string provided by the user with the COMMENT ON statement.

FULLKEYCARDF CREATEDTS ALTEREDTS PIECESIZE

FLOAT TIMESTAMP TIMESTAMP INTEGER

COPY

CHAR(1)

COPYLRSN

CHAR(6)

CLUSTERRATIOF

FLOAT

SPACEF

FLOAT(8)

REMARKS

VARCHAR (254)

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
NAME CREATOR TBNAME

Data Type
CHAR(8)

Description Authorization ID of the owner of the index. defined.

VARCHAR(18) Name of the index.

VARCHAR(18) Name of the table on which the index is

2002 Computer Associates International

4-23

System Tables Catalog Tables


TBCREATOR CLUSTERING

CA Reference Guide

VARCHAR(18) Authorization ID of the owner of the

table.
CHAR(1)

Whether CLUSTER was specified when the index was created: N Y No Yes

NLEAF

INTEGER

Number of active leaf pages in the index. The value is -1 if statistics have not been gathered. Number of levels in the index tree. If the index is partitioned, it is the maximum of the number of levels in the index tree for all the partitions. The value is -1 if statistics have not been gathered. If RUNSTATS updated the statistics, the date and time when the last invocation of RUNSTATS updated the statistics. The default value is '000101-01.00.00.00.000000'. Number of distinct values of the first key column. This number is an estimate if updated while collecting statistics on a single partition. The value is -1 if statistics have not been gathered. Number of distinct values of the key. The value is -1 if statistics have not been gathered. Percentage of rows that are in clustering order. For a partitioning index, it is the weighted average of all index partitions in terms of the number of rows in the partition. The value is value is 0 if statistics have not been gathered. The value is -2 if the index is for an auxiliary table. Number of kilobytes of DASD storage allocated to the index space partition. The value is -1 if statistics have not been gathered. Whether the row came from the basic MRM tape: Y/N/other. If other, release dependency indicator.

NLEVELS

SMALLINT

STATSTIME

TIMESTAMP

FIRSTKEYCARDF

FLOAT(8)

FULLKEYCARDF

FLOAT(8)

CLUSTERRATIOF

FLOAT(8)

SPACEF

FLOAT(8)

IBMREQD

CHAR(1)

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.
Description Partition number. 0 if index not partitioned for both PQTY and SQTY. VARCHAR(18) Name of the index. CHAR(8) Authorization ID of owner of the index. 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. 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. CHAR(1) Type of storage allocation: E explicit, STORNAME is an Integrated Catalog Facility (ICF) catalog I implicit, STORNAME names a storage group CHAR(8) Name of storage group or ICF catalog used for space allocation.
SMALLINT

Column Name
PARTITION IXNAME IXCREATOR PQTY

Data Type

SQTY

STORTYPE

STORNAME

4-24

2002 Computer Associates International

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

Catalog Tables

Column Name
VCATNAME CARD FAROFFPOS LEAFDIST

Data Type
CHAR(8) INTEGER INTEGER INTEGER

NEAROFFPOS IBMREQD

INTEGER CHAR(1)

Description Name of ICF catalog used for space allocation. Not used. See CARDF. Not used. See FAROFFPOSF. 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 Not used. Whether the row came from the basic MRM tape: Y/N/other. If other, release dependency indicator. The high value of the limit key of the partition in an internal format. 0 if index is not partitioned. Column contains bit data. No. of pages loaded before a page is left as free space. Percentage of each leaf or nonleaf page left as free space. 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. If RUNSTATS updated the statistics, the date and time when the last invocation of RUNSTATS updated the statistics. The default value is 0001-0101.00.00.00.000000. Unused. 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. 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. 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. No. of keys in the index that refer to data rows or LOBs. Secondary space allocation in units of 4K. 0 if storage group not used. First character of the instance qualifier for this indexs data set name. I or J are valid values; default is I. Time of most recent ALTER INDEX execution. Otherwise 0001-01-01.00.00.00.000000. Kilobytes of DASD storage. The value is -1 if statistics have not been gathered. Number of data sets. The value is -1 if statistics have not been gathered. Number of data set extents. The value is -1 if statistics have not been gathered.

LIMITKEY1

VARCHAR (512)

FREEPAGE PCTFREE SPACE

SMALLINT SMALLINT INTEGER

STATSTIME

TIMESTAMP

INDEXTYPE GBPCACHE

CHAR(1) CHAR(1)

FAROFFPOSF

FLOAT

NEAROFFPOSF

FLOAT

CARDF SECQTYI IPREFIX

FLOAT INTEGER CHAR(1)

ALTEREDTS

TIMESTAMP

SPACEF

FLOAT(8)

DSNUM EXTENTS

INTEGER INTEGER

2002 Computer Associates International

4-25

System Tables Catalog Tables


Column Name
PSEUDO_DEL_ ENTRIES

CA Reference Guide

Data Type
INTEGER

Description 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. Number of leaf pages physically near previous leaf page for successive active leaf pages. The value is -1 if statistics have not been gathered. 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.

LEAFNEAR

INTEGER

LEAFFAR

INTEGER

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.
Description Partition number. Zero if index is not partitioned. VARCHAR(18) Name of the index. CHAR(8) Authorization ID of the owner of the index. INTEGER Primary space allocation in units of 4KB storage blocks. INTEGER Secondary space allocation in units of 4KB storage. 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. FLOAT(8) Number of kilobytes of DASD storage allocated to the index space partition. The value is -1 if statistics have not been gathered. TIMESTAMP If RUNSTATS updated the statistics, the date and time when the last invocation of RUNSTATS updated the statistics. The default value is '000101-01.00.00.00.000000'. 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. 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. 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. INTEGER Number of data set extents. The value is -1 if statistics have not been gathered. INTEGER Number of psuedo deleted entries. The value is -1 if statistics have not been gathered. 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.
SMALLINT CHAR(1)

Column Name
PARTITION IXNAME IXCREATOR PQTY SECQTYI LEAFDIST

Data Type

SPACEF

STATSTIME

FAROFFPOSF

NEAROFFPOSF

CARDF

EXTENTS

PSEUDO_DEL_ ENTRIES DSNUM

IBMREQD

Whether the row came from the basic MRM tape: Y/N/other. If other, release dependency indicator.

4-26

2002 Computer Associates International

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

Catalog Tables

LEAFNEAR

INTEGER

LEAFFAR

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. 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.

2002 Computer Associates International

4-27

System Tables Catalog Tables


SYSINDEXSTATS

CA Reference Guide

(SYSSTATS) DSNTXX01 U (OWNER,NAME,PARTITION) One row for each partition of a partitioned index. Rows can be inserted, updated and deleted.
Column Name
FIRSTKEYCARD FULLKEYCARD NLEAF NLEVELS IOFACTOR PREFETCHFACTOR CLUSTERRATIO

Data Type
INTEGER INTEGER INTEGER SMALLINT SMALLINT SMALLINT SMALLINT

Description For the index partition, no. of distinct values of the first key column. For the index partition, no. of distinct values of the key. No. of active leaf pages in index partition. No. of levels in the partition index tree. Unused. Unused. %, multiplied by 100, of rows that are in clustering order for the index partition. Value is 0 if statistics have not been gathered. The date and time when RUNSTATS last updated the statistics. Whether the row came from the basic MRM tape: Y/N/other. If other, release dependency indicator. Partition number of the index. Authorization ID of owner of the index. Number of rows in the partition. No. of distinct values of the first key column for the index partition. No. of distinct values of the key for the index partition. Number of rows in the partition. Percentage of rows that are in clustering sequence, when multiplied by 100, for this index partition. 0 if stats are not gathered.

STATSTIME IBMREQD

TIMESTAMP CHAR(1)

PARTITION OWNER NAME KEYCOUNT FIRSTKEYCARDF FULLKEYCARDF KEYCOUNTF CLUSTERRATIOF

SMALLINT CHAR(8)

VARCHAR(18) Name of the index. INTEGER FLOAT FLOAT FLOAT FLOAT

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
NLEAF

Data Type
INTEGER

Description Number of active leaf pages in the index partition. The value is -1 if statistics have not been gathered. Number of levels in the partition index tree. The value is -1 if statistics have not been gathered. If RUNSTATS updated the statistics, the date and time when the last invocation of RUNSTATS updated the statistics. The default value is '000101-01.00.00.00.000000'. Partition number of the index. Authorization ID of the owner of the index. For the index partition, number of distinct values of the first key column. The value is -1 if statistics have not been gathered. For the index partition, number of distinct values of the key. The value is 1 if statistics have not been gathered. Total number of rows in the partition. The value is -1 if statistics have not been gathered.

NLEVELS

SMALLINT

STATSTIME

TIMESTAMP

PARTITION OWNER NAME FIRSTKEYCARDF

SMALLINT CHAR(8)

VARCHAR(18) Name of the index. FLOAT(8)

FULLKEYCARDF

FLOAT(8)

KEYCOUNTF

FLOAT(8)

4-28

2002 Computer Associates International

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

Catalog Tables

Column Name
CLUSTERRATIOF

Data Type
FLOAT(8)

Description 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. Whether the row came from the basic MRM tape: Y/N/other. If other, release dependency indicator.

IBMREQD

CHAR(1)

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
AUXID AUXVER AUXVALUE

Data Type
SMALLINT CLOB(10M)

Description

VARCHAR(17) Auxiliary id.

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
JARSCHEMA JAR_ID CLASS CLASS_SOURCE_ ROWID CLASS_SOURCE IBMREQD

Data Type
CHAR(8) CHAR(18) VARCHAR (128) ROWID CLOB(10M) CHAR(1)

Description The schema of the JAR file. The name of the JAR file. The class name contained in the JAR file. ID used to support CLOB data type. The contents of the class in the JAR file. 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
AUXID AUXVER AUXVALUE

Data Type
SMALLINT BLOB(100M)

Description

VARCHAR(17) JAR DATA id.

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
JARSCHEMA JAR_ID OWNER JAR_DATA_ROWID JAR_DATA PATH CREATEDTS ALTEREDTS IBMREQD

Data Type
CHAR(8) CHAR(18) CHAR(8) ROWID BLOB(100M) VARCHAR (1024) TIMESTAMP TIMESTAMP CHAR(1)

Description The schema of the JAR file. The name of the JAR file. Authorization ID of the owner of the JAR object. ID used to support BLOB data type. The contents of the JAR file. The URL path of the source JAR file. Time when the JAR object was created. Time when the JAR object was altered. Whether the row came from the basic MRM tape: Y/N/other. If other, release dependency indicator.

2002 Computer Associates International

4-29

System Tables Catalog Tables

CA Reference Guide

4-30

2002 Computer Associates International

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

Catalog Tables

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
JARSCHEMA JAR_ID BUILDSCHEMA BUILDNAME BUILDOWNER DBRMLIB HPJCOMPILE_OPTS BIND_OPTS POBJECT_LIB IBMREQD

Data Type
CHAR(8) CHAR(18) CHAR(8) CHAR(18) CHAR(8) VARCHAR (128) VARCHAR (256) VARCHAR (1024) VARCHAR (128) CHAR(1)

Description The schema of the JAR file. The name of the JAR file. Schema name for BUILDNAME. Procedure used to create the routine. Authorization ID used to create the routine. PDS name where DBRM is located. HPJ compile options used to install the routine. Bind options used to install the routine. PDSE name where program object is located. 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
CONSTNAME TBCREATOR

Data Type
VARCHAR (128) CHAR(8)

Description Name of the constraint. Authorization ID of the owner of the table on which the constraint is defined. constraint is defined.

TBNAME COLNAME COLSEQ COLNO

VARCHAR(18) Name of the table on which the VARCHAR(18) Name of the column. SMALLINT SMALLINT

Numeric position of the column in the key (the first position in the key is 1). Numeric position of the column in the table on which the constraint is defined. Whether the row came from the basic MRM tape: Y/N/other. If other, release dependency indicator.

IBMREQD

CHAR(1)

SYSKEYS

(SYSDBASE) DSNDKX01 U (IXCREATOR,IXNAME,COLNAME) Contains one row for each column of an index key.
Column Name
IXNAME IXCREATOR COLNAME COLNO COLSEQ ORDERING

Data Type
CHAR(8)

Description Authorization ID of owner of the index. Numeric position of column in the table. Numeric position of column in the key. Order of the column in the key: A D Ascending Descending

VARCHAR(18) Name of the index. VARCHAR(18) Name of the column of the key. SMALLINT SMALLINT CHAR(1)

IBMREQD

CHAR(1)

Whether the row came from the basic MRM tape: Y/N/other. If other, release dependency indicator.

SYSLINKS
Column Name
CREATOR TBNAME

(SYSDBASE) Contains one row for every physical link in the DB2 catalog.
Data Type
CHAR(8)

Description Authorization ID of owner of the child table of the link.

VARCHAR(18) Name of child table in the link.

2002 Computer Associates International

4-31

System Tables Catalog Tables


Column Name
LINKNAME PARENTNAME PARENTCREATOR CHILDSEQ DBNAME DBID OBID COLCOUNT INSERTRULE

CA Reference Guide

Data Type
CHAR(8)

Description Name of the link. Authorization ID of owner of parent table in the link. Cluster order of child table within its parent. Name of database containing the link. Internal DB2 identifier of the database. Internal DB2 identifier of the link. Number of columns in the ordering key for the link. 0 if no ordering key. Type of insert rule for the link: F FIRST L LAST O ONE U UNIQUE Whether the row came from the basic MRM tape: Y/N/other. If other, release dependency indicator.

VARCHAR(18) Name of parent table in the link. CHAR(8) SMALLINT CHAR(8) SMALLINT SMALLINT SMALLINT CHAR(1)

IBMREQD

CHAR(1)

SYSLOBSTATS
DSNLNX01 U Contains one row for each LOB table space.
Column Name
STATSTIME AVGSIZE FREESPACE ORGRATIO

(SYSSTATS) (DBNAME, NAME)

Data Type
TIMESTAMP INTEGER INTEGER

Description Timestamp of statistical RUNSTATS update. Average LOB size, in bytes, in LOB tablespace. Number of kilobytes of free space in LOB tablespace. tablespace. Value 1 indicating perfect organization. The greater the value exceeds 1, the greater the disorganization.

DECIMAL(5,2) Ratio of organization in the LOB

DBNAME NAME IBMREQD

CHAR(8) CHAR(8) CHAR(1)

Name of the database containing this LOB tablespace. Name of this LOB tablespace. 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
STATSTIME FREESPACE ORGRATIO

Data Type
TIMESTAMP INTEGER

Description Timestamp of RUNSTATS statistics update. Number of pages of free space in the LOB table space. 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.

DECIMAL(5,2) Ratio of organization in the LOB table

DBNAME NAME IBMREQD

CHAR(8) CHAR(8) CHAR(1)

Name of the database that contains the LOB table space named in NAME. Name of the LOB table space. 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

4-32

2002 Computer Associates International

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

Catalog Tables

Column Name
LOCATION COLLID NAME CONTOKEN

Data Type
CHAR(16) CHAR(18) CHAR(8) CHAR(8)

OWNER

CHAR(8)

CREATOR

CHAR(8)

Description Always contains blanks. Name of the package collection or schema name for trigger package. Name of the package. 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. 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). 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 when package was created. Timestamp when package was last bound. Implicit name for unqualified tables, views, aliases, and indexes. Size of the base section of the package, in bytes. Average size of those sections of the package containing SQL statements, in bytes. Number of enabled or disabled entries for this package in SYSIBM.SYSPKSYSTEM. 0, if all connections are enabled. 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 Whether package can be allocated: Y/N. 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 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 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.

TIMESTAMP BINDTIME QUALIFIER PKSIZE AVGSIZE

TIMESTAMP TIMESTAMP CHAR(8) INTEGER INTEGER

SYSENTRIES

SMALLINT

VALID

CHAR(1)

OPERATIVE VALIDATE

CHAR(1) CHAR(1)

ISOLATION

CHAR(1)

RELEASE

CHAR(1)

2002 Computer Associates International

4-33

System Tables Catalog Tables


Column Name
EXPLAIN

CA Reference Guide

Data Type
CHAR(1)

Description Whether information on package statements was added to owners PLAN_TABLE: Y/N. SQL string delimiter for SQL statements in the package: N apostrophe Y quotation mark Decimal point representation for SQL in the package: N period Y comma Host language for the package's DBRM: B Assembler language C OS/VS COBOL D C F FORTRAN P PL/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. Indicates whether the system CCSID for SBCS was 290 (Katakana) at precompile: K Yes A No If mixed data was in effect at precompile: Y/N. If DEC31 option was in effect when the package program was in precompile: Y/N. 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 option on most recent subcommand that bound or rebound the package: C CONTINUE N NOPACKAGE 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. 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. Whether the row came from the basic MRM tape: Y/N/other. If other, release dependency indicator.

QUOTE

CHAR(1)

COMMA

CHAR(1)

HOSTLANG

CHAR(1)

CHARSET

CHAR(1)

MIXED DEC31

CHAR(1) CHAR(1)

DEFERPREP

CHAR(1)

SQLERROR

CHAR(1)

REMOTE

CHAR(1)

PCTIMESTAMP

TIMESTAMP

IBMREQD

CHAR(1)

VERSION

VARCHAR(64) Version identifier for the package. For

trigger package value is blank (TYPE=T).

4-34

2002 Computer Associates International

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

Catalog Tables

Column Name
PDSNAME

Data Type

Description of the PDS library in which the packages 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 requesters location name (if DB2) or requesters LUNAME enclosed in brackets.

VARCHAR(44) For package bound locally, the name

DEGREE

CHAR(3)

The DEGREE option used when package last bound: ANY DEGREE(ANY) 1 DEGREE(1) blank if package was migrated 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.

GROUP_MEMBER

CHAR(8)

2002 Computer Associates International

4-35

System Tables Catalog Tables


Column Name
DYNAMICRULES

CA Reference Guide

Data Type
CHAR(1)

Description 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. 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.

REOPTVAR

CHAR(1)

4-36

2002 Computer Associates International

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

Catalog Tables

Column Name
DEFERPREPARE

Data Type
CHAR(1)

Description 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. 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. 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 of package. Indicates how package was created: blank BIND PACKAGE T CREATE TRIGGER Whether remote access using threepart names is implemented with DRDA or DB2 private protocol access: D DRDA P DB2 private protocol Timestamp when function was resolved. Set by BIND and REBIND, not by AUTOBIND. 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. 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 0 The specified or derived CCSID. The default CCSID as specified on panel DSNTIPF at installation time. Used when the package was bound prior to Version 7.

KEEPDYNAMIC

CHAR(1)

PATHSCHEMAS

VARCHAR (254)

TYPE

CHAR(1)

DBPROTOCOL

CHAR(1)

FUNCTIONTS

TIMESTAMP

OPTHINT

CHAR(8)

ENCODING_CCSID

INTEGER

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. Bind option IMMEDWRITE(YES) indicates that immediate writes are done for updated group buffer pool dependent pages. 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 K Bound prior to Version 7 Bound on Version 7

2002 Computer Associates International

4-37

System Tables Catalog Tables


SYSPACKAUTH
DSNKAX01 DSNKAX02 N N

CA Reference Guide

(SYSPKAGE) (GRANTOR,LOCATION,COLLID,NAME) (GRANTEE,LOCATION,COLLID,NAME, BINDAUTH,COPYAUTH,EXECUTEAUTH) DSNKAX03 N (LOCATION,COLLID,NAME) Records the privileges held by DB2 users over packages.
Column Name
GRANTOR

Data Type
CHAR(8)

Description Authorization ID of user who granted the privileges. Could also be PUBLIC or PUBLIC *. Authorization ID of user who holds privileges or name of an application plan that uses privileges. Always contains blanks. Name of package collection. Name of package on which privileges are held. An (*) if privileges held on all packages in a collection. Unused. Timestamp when privilege was granted. Type of grantee. blank An authorization ID. P An application plan.

GRANTEE

CHAR(8)

LOCATION COLLID NAME

CHAR(16) CHAR(18) CHAR(8)

CONTOKEN TIMESTAMP GRANTEETYPE

CHAR(8) TIMESTAMP CHAR(1)

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 Whether grantee can use the BIND or REBIND: (see legend **) Whether grantee can COPY package: (see legend **) If grantee can run programs that use the package: (see legend **) Whether the row came from the basic MRM tape: Y/N/other. If other, release dependency indicator.

BINDAUTH COPYAUTH EXECUTEAUTH IBMREQD

CHAR(1) CHAR(1) CHAR(1) CHAR(1)

Legend **: blank privilege not held G privilege held with GRANT option Y privilege held without GRANT option

SYSPACKDEP
DSNKDX01 N

(SYSPKAGE) (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
BNAME BQUALIFIER

Data Type

Description dependent on.

VARCHAR(18) Name of an object the package is CHAR(8)

If BNAME identifies a tablespace, the name of its database. Otherwise, the authorization ID of the owner of BNAME

4-38

2002 Computer Associates International

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

Catalog Tables

Column Name
BTYPE

Data Type
CHAR(1)

Description 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 Always contains blanks. Name of the collection. Name of the package (DBRM). 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. Whether the row came from the basic MRM tape: Y/N/other. If other, release dependency indicator. Package owner Package type: T Trigger package blank Not trigger package

DLOCATION DCOLLID DNAME DCONTOKEN

CHAR(16) CHAR(18) CHAR(8) CHAR(8)

IBMREQD

CHAR(1)

DOWNER DTYPE

CHAR(8) CHAR(1)

SYSPACKLIST
DSNKLX01 DSNKLX02 N U

(SYSPKAGE) (LOCATION,COLLID,NAME) (PLANNAME,SEQNO,LOCATION,COLLID, NAME) Contains one or more rows for every DB2 package bound into a plan
Column Name
PLANNAME SEQNO LOCATION

Data Type
CHAR(8) SMALLINT CHAR(16)

Description Name of the plan. Sequence no. of this entry in the package list. Location of the package. Blank if local. Asterisk (*) if location is to be determined at run time. Collection name for the package. An * indicates collection name determined at runtime. Name of the package. (*) means the entire collection. Timestamp when row was created. Whether the row came from the basic MRM tape: Y/N/other. If other, release dependency indicator.

COLLID

CHAR(18)

NAME TIMESTAMP IBMREQD

CHAR(8) TIMESTAMP CHAR(1)

SYSPACKSTMT
DSNKSX01 U

(SYSPKAGE) (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
LOCATION COLLID NAME CONTOKEN

Data Type
CHAR(16) CHAR(18) CHAR(8) CHAR(8)

Description Always contains blanks. Name of the collection. Name of the package (DBRM). 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. Sequence number of the row in respect to a statement in the package. The numbering starts with 0.

SEQNO

SMALLINT

2002 Computer Associates International

4-39

System Tables Catalog Tables


Column Name
STMTNO

CA Reference Guide

Data Type
SMALLINT

SECTNO BINDERROR

SMALLINT CHAR(1)

Description 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. Section number of the statement. Whether an SQL error was detected at bind: Y yes N no

IBMREQD

VERSION STMT ISOLATION

Whether the row came from the basic MRM tape: Y/N/other. If other, release dependency indicator. VARCHAR(64) Version identifier for the package. VARCHAR All or a portion of the text for the SQL (254) that the row represents.
CHAR(1)

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 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.

STATUS

CHAR(1)

4-40

2002 Computer Associates International

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

Catalog Tables

Column Name
ACCESSPATH

Data Type
CHAR(1)

STMTNOI SECTNOI EXPLAINABLE

INTEGER INTEGER CHAR(1)

Description 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. Statement number of corresponding statement in package source program. Section number of statement. Contains one of the following values: Y Indicates that the SQL statement can be used with the EXPLAIN function and may have rows describing its access path in the userid.PLAN_TABLE. Indicates that the SQL statement does not have any rows describing its access path in the userid.PLAN_TABLE. Indicates that the SQL statement was bound prior to Version 7.

Blank

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
DSNOPX01

(SYSOBJ) (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. U
Column Name
SCHEMA OWNER NAME SPECIFICNAME ROUTINETYPE

Data Type
CHAR(8) CHAR(8) CHAR(18) CHAR(18) CHAR(1)

Description Routine schema. Routine owner. Routine name. Routine specific name. Type of routine: F User-defined function or cast function P Stored procedure Is routine a cast function: Y/N Parameter name Internal identifier of routine. 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

CAST_FUNCTION PARMNAME ROUTINEID ROWTYPE

CHAR(1) CHAR(18) INTEGER CHAR(1)

2002 Computer Associates International

4-41

System Tables Catalog Tables


Column Name
ORDINAL

CA Reference Guide

Data Type
SMALLINT

Description 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. Schema of data type of parameter. Name of data type of parameter. Internal identifier of data type of parameter. Internal identifier of source type. Value is 0 for built-in data type. Indicates locator value, not actual value, is passed as input when routine is called: Y Locator value N Actual value Data type of column for table parameter: Y Table parameter N Not table parameter Column number of table for table parameters. Otherwise 0. Length of parameter, for DECIMAL value is precision. Scale of data type of parameter. 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 of data type for character, graphic, date, time, and timestamp data types. For string parameters when ROWTYPE = S and ORDINAL = 0. 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 of parameter: A ASCII E EBCDIC U Unicode blank Source type is not character, graphic, or datetime type Whether the row came from the basic MRM tape: Y/N/other. If other, release dependency indicator.

TYPESCHEMA TYPENAME DATATYPEID SOURCETYPEID LOCATOR

CHAR(8) CHAR(18) INTEGER INTEGER CHAR(1)

TABLE

CHAR(1)

TABLE_COLNO LENGTH SCALE SUBTYPE

SMALLINT INTEGER SMALLINT CHAR(1)

CCSID

INTEGER

CAST_FUNCTION_ID INTEGER

ENCODING_SCHEME CHAR(1)

IBMREQD

CHAR(1)

SYSPKSYSTEM
DSNKYX01 N

(SYSPKAGE) (LOCATION,COLLID,NAME,CONTOKEN, SYSTEM,ENABLE) The systems that have been enabled or disabled for every package.
Column Name
LOCATION COLLID NAME CONTOKEN

Data Type
CHAR(16) CHAR(18) CHAR(8) CHAR(8)

Description Blank. Name of collection. Name of package. 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. 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

SYSTEM

CHAR(8)

4-42

2002 Computer Associates International

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

Catalog Tables

Column Name
ENABLE

Data Type
CHAR(1)

Description Indicates if the connections represented by the row are enabled or disabled: Y/N. 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, requesters location (if DB2), or requesters LUNAME. Otherwise, name of a single connection. Whether the row came from the basic MRM tape: Y/N/other. If other, release dependency indicator.

CNAME

CHAR(20)

IBMREQD

CHAR(1)

SYSPLAN
DSNPPH01 U Contains one row for each application plan.
Column Name
NAME CREATOR BINDDATE VALIDATE

(SYSPLAN) (NAME)

Data Type
CHAR(8) CHAR(8) CHAR(6) CHAR(1)

Description Name of the application plan. Authorization ID of owner of application plan. Date on which most recent BIND was performed: yymmdd. 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 level: R Repeatable read (RR) T Read stability (RS) S Cursor stability (CS) U Uncommitted read (UR) 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. Whether plan can be allocated: N No, explicit BIND or REBIND required Y Yes Time of the BIND: hhmmssth. Size of the base section of the plan in bytes. Whether the row came from the basic MRM tape: Y/N/other. If other, release dependency indicator. Average size of plan sections containing SQL statements processed at bind time. When resources are acquired: A at allocation U at first use When resources are released: C at commit D at deallocation Unused. All values are N. Unused. All values are N. Unused. All values are N. Whether plan was bound with EXPLAIN YES: Y/N.

ISOLATION

CHAR(1)

VALID

CHAR(1)

OPERATIVE

CHAR(1)

BINDTIME PLSIZE IBMREQD

CHAR(8) INTEGER CHAR(1)

AVGSIZE

INTEGER

ACQUIRE

CHAR(1)

RELEASE

CHAR(1)

EXREFERENCE EXSTRUCTURE EXCOST EXPLAN

CHAR(1) CHAR(1) CHAR(1) CHAR(1)

2002 Computer Associates International

4-43

System Tables Catalog Tables


Column Name
EXPREDICATE

CA Reference Guide

Data Type
CHAR(1)

Description 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. Primary authorization ID of binder of the plan. Implicit qualifier for all unqualified table, view, index, and alias names in static SQL statements. Cache size in bytes. 0 indicates none used. Number of package list entries for this plan. Negative value indicates plan was bound after fall-back to a prior release. Plan bound with DEFER(PREPARE): Y/N. Current server specification when plan was last bound. Blank if none was specified. 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. The DEGREE option used when package last bound: ANY DEGREE(ANY) 1 DEGREE(1) blank a migrated package The SQLRULES option used when plan last bound: D or blank SQLRULES(DB2) S SQLRULES(STD) blank a migrated plan The DISCONNECT option used when plan last bound: E or blank DISCONNECT(EXPLICLT) A DISCONNECT (AUTOMATIC) C DISCONNECT (CONDITIONAL) blank a migrated plan The DB2 data sharing member name of the DB2 subsystem that performed the most recent bind. This is blank if the DB2 subsystem was not part of a DB2 data sharing environment. The DYNAMICRULES option used when the plan was last bound: B Bind. Dynamic SQL statements are executed with DYNAMIC RULES bind behavior. Run. Dynamic SQL statements in the plan are executed with DYNAMICRULES run behavior.

BOUNDBY QUALIFIER

CHAR(8) CHAR(8)

CACHESIZE PLENTRIES

SMALLINT SMALLINT

DEFERPREP CURRENTSERVER

CHAR(1) CHAR(16)

SYSENTRIES

SMALLINT

DEGREE

CHAR(3)

SQLRULES

CHAR(1)

DISCONNECT

CHAR(1)

GROUP_MEMBER

CHAR(8)

DYNAMICRULES

CHAR(1)

blank

BOUNDTS REOPTVAR

TIMESTAMP CHAR(1)

Timestamp the plan was bound. 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.

4-44

2002 Computer Associates International

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

Catalog Tables

Column Name
KEEPDYNAMIC

Data Type
CHAR(1)

Description 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. 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. Whether remote access for SQL with three-part names is implemented with DRDA or DB2 private: D DRDA P DB2 private protocol Timestamp when function was resolved. Set by BIND and REBIND, not by AUTOBIND. 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. 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.

PATHSCHEMAS

VARCHAR (254)

DBPROTOCOL

CHAR(1)

FUNCTIONTS

TIMESTAMP

OPTHINT

CHAR(8)

ENCODING_CCSID

INTEGER

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. Bind option IMMEDWRITE(YES) indicates that immediate writes are done for updated group buffer pool pages. Bind option IMMEDWRITE(PH1) indicates that updated group buffer pool dependent pages are written at or before phase one commit. A migrated package.

Blank
RELBOUND CHAR(1)

The release when the package was bound or rebound. Blank K Bound prior to Version 7. 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
GRANTOR GRANTEE

Data Type
CHAR(8) CHAR(8)

Description Authorization ID of user who granted the privileges. Authorization ID of user who holds the privileges. Could be PUBLIC, for a grant to PUBLIC.

2002 Computer Associates International

4-45

System Tables Catalog Tables


Column Name
NAME TIMESTAMP DATEGRANTED TIMEGRANTED GRANTEETYPE AUTHHOWGOT

CA Reference Guide

Data Type
CHAR(8) CHAR(12) CHAR(6) CHAR(8) CHAR(1) CHAR(1)

Description Name of the application plan on which the privileges are held. Internal use only. Date privileges were granted: yymmdd. Time privileges were granted: hhmmssth. Not used. Authorization level of user from whom privileges were received: blank not applicable C DBCTL D DBADM L SYSCTRL M DBMAINT S SYSADM 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 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 Whether the row came from the basic MRM tape: Y/N/other. If other, release dependency indicator. Time GRANT statement was executed.

BINDAUTH

CHAR(1)

EXECUTEAUTH

CHAR(1)

IBMREQD

CHAR(1)

GRANTEDTS

TIMESTAMP

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
BNAME BCREATOR

Data Type
CHAR(8)

Description If BNAME is a table space, its database. Otherwise, authorization ID of owner of BNAME. 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 Name of the plan. Whether the row came from the basic MRM tape: Y/N/other. If other, release dependency indicator.

VARCHAR(18) Name of object the plan depends on.

BTYPE

CHAR(1)

DNAME IBMREQD

CHAR(8) CHAR(1)

SYSPLSYSTEM
Column Name
NAME SYSTEM

(SYSPKAGE) DSNKPX01 N (NAME,SYSTEM,ENABLE) Contains zero or more rows for every plan.
Data Type
CHAR(8) CHAR(8)

Description Plan name. 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 Whether connections are enabled: Y/N.

ENABLE

CHAR(1)

4-46

2002 Computer Associates International

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

Catalog Tables

Column Name
CNAME

Data Type
CHAR(8)

Description 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. Whether the row came from the basic MRM tape: Y/N/other. If other, release dependency indicator.

IBMREQD

CHAR(1)

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.
Data Type
CHAR(18) CHAR(8)

Column Name
PROCEDURE AUTHID

Description Name of the stored procedure specified on the SQL CALL statement. 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. 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 DB2s 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. 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. 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 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. The programming language used to create the stored procedure. Possible values are ASSEMBLE, PLI, COBOL, C, REXX, or COMPJAVA. 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.

LUNAME

CHAR(8)

LOADMOD

CHAR(8)

LINKAGE

CHAR(1)

COLLID

CHAR(18)

LANGUAGE

CHAR(8)

ASUTIME

INTEGER

2002 Computer Associates International

4-47

System Tables Catalog Tables


Column Name
STAYRESIDENT

CA Reference Guide

Data Type
CHAR(1)

Description 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 Whether the row came from the basic MRM tape: Y/N/other. If other, release dependency indicator. 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). Defines the parameter list expected by the stored procedure. Max. number of query results sets that can be returned by this stored procedure. Zero indicates no query result sets. Name of the WLM environment running the stored procedure. Blank indicates the stored procedure is run in the DB2managed SPAS. Indicates a main routine or subroutine: M Stored procedure runs as main routine S Stored procedure runs as subroutine 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. 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.

IBMREQD

CHAR(1)

RUNOPTS

VARCHAR (254)

PARMLIST RESULT_SETS

VARCHAR (3000) SMALLINT

WLM_ENV

CHAR(18)

PGM_TYPE

CHAR(1)

EXTERNAL_SECURITY

CHAR(1)

COMMIT_ON_RETURN

CHAR(1)

SYSRELS

(SYSDBASE) DSNDLX01 N (REFTBCREATOR,REFTBNAME) Contains one row for each defined relationship within the database.
Column Name
CREATOR TBNAME RELNAME REFTBNAME REFTBCREATOR COLCOUNT DELETERULE

Data Type
CHAR(8)

Description Authorization ID of owner of dependent table of relationship. relationship.

VARCHAR(18) Name of dependent table of CHAR(8)

Name of the constraint. Authorization ID of owner of parent table. Number of columns in foreign key. Type of delete rule for referential constraint: C CASCADE R RESTRICT N SET NULL A NO ACTION Whether the row came from the basic MRM tape: Y/N/other. If other, release dependency indicator.

VARCHAR(18) Name of parent table in relationship. CHAR(8) SMALLINT CHAR(1)

IBMREQD

CHAR(1)

4-48

2002 Computer Associates International

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

Catalog Tables

Column Name
RELOBID1

Data Type
SMALLINT

Description Internal ID of constraint with respect to the database that contains the parent table. Internal ID of constraint with respect to the database that contains the dependent table. Date and time constraint was defined. Owner of unique non-primary index used for the parent key. Contains all 9s if enforcing index is dropped. Blank if enforcing index is primary index. used for the parent key. Contains all 9s if enforcing index is dropped. Blank if enforcing index is primary index.

RELOBID2

SMALLINT

TIMESTAMP IXOWNER

TIMESTAMP CHAR(8)

IXNAME

VARCHAR(18) Name of unique non-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
GRANTOR GRANTEE

Data Type
CHAR(8) CHAR(8)

QUALIFIER

CHAR(8)

NAME

CHAR(18)

GRANTEETYPE AUTHHOWGOT

CHAR(1) CHAR(1)

OBTYPE

CHAR(1)

Description Authorization ID of user who granted the privilege. Authorization ID of user who holds the privilege. Could also be public for a grant to PUBLIC. 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 of storage group, table space, buffer pool, collection, or distinct type. Could be ALL when USE OF ALL BUFFERPOOLS is granted. Internal use only. 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 * Object type: B buffer pool C collection D distinct type S storage group R table space J JAR (JAVA ARchive file) Internal use only. Date privilege was granted in the form yymmdd. Time privilege was granted: hhmmssth. 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.

TIMESTAMP DATEGRANTED TIMEGRANTED USEAUTH

CHAR(12) CHAR(6) CHAR(8) CHAR(1)

IBMREQD

CHAR(1)

Whether the row came from the basic MRM tape: Y/N/other. If other, release dependency indicator. Time GRANT statement was executed.

GRANTEDTS

TIMESTAMP

2002 Computer Associates International

4-49

System Tables Catalog Tables


SYSROUTINEAUTH
DSNOAX01

CA Reference Guide

(SYSOBJ) 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
GRANTOR GRANTEE

Data Type
CHAR(8) CHAR(8)

Description Authorization ID of user who granted the privilege. 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. Routine schema. Specific name of routine. Value of * if privilege is held on all routines in the schema. Time when grant was executed. Routine type: F user-defined function or cast function P stored procedure Grantee type: blank authorization ID P application plan or package. If COLLID is not blank grantee is a package. R internal use only. 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 If grantee can execute routine: Y privilege held without grant option. G privilege held with grant option. Collection name, if grantee is a package. Otherwise blank. Consistency token of the DBRM, if grantee is a package. Otherwise blank. Whether the row came from the basic MRM tape: Y/N/other. If other, release dependency indicator.

SCHEMA SPECIFICNAME

CHAR(8) CHAR(18)

GRANTEDTS ROUNTINETYPE

TIMESTAMP CHAR(1)

GRANTEETYPE

CHAR(1)

AUTHHOWGOT

CHAR(1)

EXECUTEAUTH

CHAR(1)

COLLID CONTOKEN IBMREQD

CHAR(18) CHAR(8) CHAR(1)

4-50

2002 Computer Associates International

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

Catalog Tables

(SYSOBJ) (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. DSNOFX01 U
Column Name
SCHEMA OWNER NAME ROUTINETYPE

SYSROUTINES

Data Type
CHAR(8) CHAR(8) CHAR(18) CHAR(1)

Description Routine schema. Routine owner. Routine name. Routine type: F user-defined function or cast function P stored procedure Authorization ID that created the routine. Specific name of routine. Internal identifier of routine. Internal identifier of result data type of function. If table function, value is 2. 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: C column function S scalar function T table function blank stored procedure, ROUTINETYPE = P Number of parameters for routine. Routine implementation language; values are ASSEMBLE, PLI, COBOL, C COMPJAVA, JAVA, REXX, SQL. Otherwise blank, if ORIGIN is not E. 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. For source built-in function value is SYSIBM. For ORIGIN = U and ROUTINETYPE = F value is source user-defined function schema. Otherwise, blank. For ORIGIN = U and ROUTINETYPE = F value is specific name of source user-defined function or source built-in function. Otherwise, blank.

CREATEDBY SPECIFICNAME ROUTINEID RETURN_TYPE ORIGIN

CHAR(8) CHAR(18) INTEGER INTEGER CHAR(1)

FUNCTION_TYPE

CHAR(1)

PARM_COUNT LANGUAGE

SMALLINT CHAR(8)

COLLID

CHAR(18)

SOURCESCHEMA

CHAR(8)

SOURCESPECIFIC

CHAR(18)

2002 Computer Associates International

4-51

System Tables Catalog Tables


Column Name
DETERMINISTIC

CA Reference Guide

Data Type
CHAR(1)

Description 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 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). 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. Indicates if routine is a cast function: Y Cast function. N Not a cast function. 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) 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 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 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 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.

EXTERNAL_ACTION

CHAR(1)

NULL_CALL

CHAR(1)

CAST_FUNCTION

CHAR(1)

SCRATCHPAD

CHAR(1)

SCRATCHPAD_ LENGTH

INTEGER

FINAL_CALL

CHAR(1)

PARALLEL

CHAR(1)

PARAMETER_STYLE CHAR(1)

4-52

2002 Computer Associates International

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

Catalog Tables

Column Name
FENCED

Data Type
CHAR(1)

Description Y Indicates routine runs separately in DB2 address space. 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 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 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. 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 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). 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. Whether routine runs as a Language Environment main routine or subroutine: M main routine S subroutine blank ORIGIN is not E Authorization ID to be used if routine accesses resources protected by external security: D DB2 authorization ID associated with WLMestablished SPAS. U USER authorization ID of SQL user invoking routine. C DEFINER authorization ID of the routine owner. blank ORIGIN is not E. 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.

SQL_DATA_ACCESS CHAR(1)

DBINFO

CHAR(1)

STAYRESIDENT

CHAR(1)

ASUTIME

INTEGER

WLM_ENVIRONMEN T

CHAR(18)

WLM_ENV_FOR_ NESTED

CHAR(1)

PROGRAM_TYPE

CHAR(1)

EXTERNAL_ SECURITY

CHAR(1)

COMMIT_ON_ RETURN

CHAR(1)

2002 Computer Associates International

4-53

System Tables Catalog Tables


Column Name
RESULT_SETS

CA Reference Guide

Data Type
SMALLINT

LOBCOLUMNS

SMALLINT

CREATEDTS ALTERDTS IBMREQD

TIMESTAMP TIMESTAMP CHAR(1)

Description 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. If ORIGIN = E, the number of LOB columns in parameter list for userdefined function. If no LOB columns in parameter list or ORIGIN is not E, value is zero. Time CREATE for this routine was executed. Time last ALTER for this routine was executed. Whether the row came from the basic MRM tape: Y/N/other. If other, release dependency indicator. Internal use only. Internal use only. Internal use only. Internal use only. Internal use only. Internal use only. Internal use only. Internal use only. Internal use only. Internal use only. Internal use only. Internal use only. Internal use only. Internal use only. Internal use only. Internal use only. Internal use only. Internal use only. Internal use only. Internal use only. Internal use only. Internal use only. Internal use only. Internal use only. Internal use only. Internal use only. Internal use only. Internal use only. Internal use only. Internal use only. Estimated number of I/Os required to execute routine. 1 if estimate is unknown, optimizer uses 0. Estimated number of machine instructions required to execute routine. 1 if estimate is unknown, optimizer uses 4,000. Estimated number of I/Os performed the first or last time routine is invoked. 1 if estimate is unknown, optimizer uses 0. Estimated number of machine instructions performed the first or last time routine is invoked. 1 if estimate is unknown, optimizer uses 40,000. Predicted cardinality of routine. 1 if predicted cardinality is unknown, optimizer uses 10,000. Number of columns in the result table for table function. Otherwise, value is 1 Path/module/function DB2 should load to execute routine. If ORIGIN is not E, column is blank.

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 IOS_PER_INVOC

SMALLINT SMALLINT SMALLINT SMALLINT SMALLINT SMALLINT SMALLINT SMALLINT SMALLINT SMALLINT SMALLINT SMALLINT SMALLINT SMALLINT SMALLINT SMALLINT SMALLINT SMALLINT SMALLINT SMALLINT SMALLINT SMALLINT SMALLINT SMALLINT SMALLINT SMALLINT SMALLINT SMALLINT SMALLINT SMALLINT FLOAT

INSTS_PER_INVOC

FLOAT

INITIAL_IOS

FLOAT

INITIAL_INSTS

FLOAT

CARDINALITY

FLOAT

RESULT_COLS EXTERNAL_NAME

SMALLINT CHAR(254)

4-54

2002 Computer Associates International

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

Catalog Tables

Column Name
PARM_SIGNATURE RUNOPTS

Data Type
VARCHAR (150) VARCHAR (254)

Description Internal use only. Language Environment (LE) run-time options. Empty string indicates installation default LE run-time options used. User-defined character string provided via COMMENT ON statement. The signature of the jar file. blank When PARAMETER STYLE is not JAVA The class name contained in the jar file. blank When PARAMETER STYLE is not JAVA

REMARKS JAVA_SIGNATURE

VARCHAR (254) VARCHAR (1024)

CLASS

VARCHAR (128)

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 D INHERIT SPECIAL REGISTERS DEFAULT SPECIAL REGISTERS

(SYSGRTNS) (SCHEMA, ROUTINENAME, BUILDDATE, BUILDTIME) Contains a row for each generated routine that records the build options for the routine. DSNROX01 U
Column Name
SCHEMA ROUTINENAME BUILDDATE BUILDTIME BUILDSTATUS BUILDSCHEMA BUILDNAME BUILDOWNER IBMREQD

SYSROUTINES_OPTS

Data Type
CHAR(8) CHAR(18) DATE TIME CHAR(1) CHAR(8) CHAR(18) CHAR(8) CHAR(1)

Description Schema of the routine. Name of the routine. Date the routine was built Time the routine was built Whether this version of the routines options is the current version Schema name for BUILDNAME. Procedure used to create the routine. Authorization ID used to create the routine. Whether the row came from the basic MRM tape: Y/N/other. If other, release dependency indicator. Precompiler options used to build the routine. Compiler options used to build the routine. Prelink-edit options used to build the routine. Link-edit options used to build the routine. Bind options used to build the routine. Name of the source data set.

PRECOMPILE_OPTS VARCHAR (255) COMPILE_OPTS PRELINK_OPTS LINK_OPTS BIND_OPTS SOURCEDSN VARCHAR (255) VARCHAR (255) VARCHAR (255) VARCHAR (1024) VARCHAR (255)

(SYSGRTNS) (ROUTINENAME) (SCHEMA.ROUTINENAME.BUILDDATE. SEQNO) Contains source for generated routines. DSNRSX01 DSNRSX02 N U
Column Name
SCHEMA ROUTINENAME

SYSROUTINES_SRC

Data Type
CHAR(8) CHAR(18

Description Schema of the routine. Name of the routine.

2002 Computer Associates International

4-55

System Tables Catalog Tables


Column Name
BUILDDATE BUILDTIME BUILDSTATUS SEQNO IBMREQD

CA Reference Guide

Data Type
DATE TIME CHAR(1) INTEGER CHAR(1)

Description Date the routine was built Time the routine was built Whether this version of the routine's source is the current version Number of the source statement piece in CREATESTMT. Whether the row came from the basic MRM tape: Y/N/other. If other, release dependency indicator. Routine source statement.

CREATESTMT

VARCHAR (3800)

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.
Data Type
CHAR(8) CHAR(8)

Column Name
GRANTOR GRANTEE

Description Authorization ID of user who granted the privilege or SYSADM. Authorization ID of user or group that holds the privilege. Value could also be PUBLIC. Schema name or * for all schemas. 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 Whether grantee holds CREATIN privilege on schema: blank privilege not held. G privilege held with GRANT option. Y privilege held without GRANT option. Whether grantee holds ALTERIN privilege on schema: blank privilege not held. G privilege held with GRANT option. Y privilege held without GRANT option. Whether grantee holds DROPIN privilege on schema: blank privilege not held. G privilege held with GRANT option. Y privilege held without GRANT option. Time when grant was executed. Whether the row came from the basic MRM tape: Y/N/other. If other, release dependency indicator.

SCHEMANAME AUTHHOWGOT

CHAR(8) CHAR(1)

CREATEINAUTH

CHAR(1)

ALTERINAUTH

CHAR(1)

DROPINAUTH

CHAR(1)

GRANTEDTS IBMREQD

TIMESTAMP CHAR(1)

SYSSEQUENCES
DSNSQX01 U DSNSQX02 U Contains one row for each identity column.
Column Name
SCHEMA OWNER

(SYSSEQ) (SCHEMA.NAME) (SEQUENCEID)

Data Type
CHAR(8) CHAR(8)

Description The value of TBCREATOR from the entry for the identity column. The value of TBCREATOR from the SYSCOLUMNS entry for the identity column. identity column.

NAME SEQTYPE

VARCHAR(18) Name that DB2 generated for the CHAR(1)

Type of entry: I For an identity column Internal identifier of the identity column. The authorization ID under which the identity column was created.

SEQUENCEID CREATEDBY

INTEGER CHAR(8)

4-56

2002 Computer Associates International

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

Catalog Tables

Column Name
INCREMENT START MAXVALUE MINVALUE CYCLE

Data Type
DECIMAL (31,0) DECIMAL (31,0) DECIMAL (31,0) DECIMAL (31,0) CHAR(1)

Description Increment value (positive or negative, within INTEGER scope). Start value. Maximum value allowed for the identity column. Minimum value allowed for the identity column. 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 Y No 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. The value is always 'N' for an identity column. For a built-in data type, the internal ID of the built-in type. For a distinct type, the internal ID of the distinct type. For a built-in data type, 0. For a distinct type, the internal ID of the built-in data type upon which the distinct type is sourced. Timestamp when the identity column was created. Timestamp when the identity column was created. 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. Whether the row came from the basic MRM tape: Y/N/other. If other, release dependency indicator. The value is always blank for an Identity column.

ORDER DATATYPEID

CHAR(1) INTEGER

SOURCETYPEID

INTEGER

CREATEDTS ALTEREDTS MAXASSIGNEDVAL

TIMESTAMP TIMESTAMP DECIMAL (31,0)

IBMREQD

CHAR(1)

REMARKS

VARCHAR (254)

SYSSEQUENCESDEP
Column Name
BSEQUENCEID DCREATOR IBMREQD

(SYSSEQ2) DSNSRX01 U (DCREATOR.DNAME.DCOLNAME) Records the dependencies of identity columns on tables.


Data Type
INTEGER CHAR(8) CHAR(1)

Description Internal identifier of the identity column in SYSSEQUENCES. Authorization ID of the owner of the table that contains the identity column. Whether the row came from the basic MRM tape: Y/N/other. If other, release dependency indicator.

DNAME DCOLNAME

VARCHAR(18) Name of the table containing the

identity column.
VARCHAR(18) Name of the identity column.

SYSSTMT
One row for each SQL statement bound into a plan.
Column Name
NAME PLNAME PLCREATOR SEQNO

(SYSPLAN)
Data Type
CHAR(8) CHAR(8) CHAR(8) SMALLINT

Description Name of the DBRM. Application plan name. Authorization ID of owner of application plan. Sequence number of this row with respect to a statement of the DBRM. The number starts with zero.

2002 Computer Associates International

4-57

System Tables Catalog Tables


Column Name
STMTNO

CA Reference Guide

Data Type
SMALLINT

Description Statement no. of SQL statement in source program. Statement nos. > 32767 are displayed as zero, see STMTNOI for statement number. Plan section no. containing the SQL statement. Whether the row came from the basic MRM tape: Y/N/other. If other, release dependency indicator. Text of the SQL statement up to first 254 bytes. 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 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. 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. Statement number of corresponding statement in source program. Section number of statement.

SECTNO IBMREQD

SMALLINT CHAR(1)

TEXT ISOLATION

VARCHAR (254) CHAR(1)

STATUS

CHAR(1)

ACCESSPATH

CHAR(1)

STMTNOI SECTNOI

INTEGER INTEGER

4-58

2002 Computer Associates International

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

Catalog Tables

Column Name
EXPLAINABLE

Data Type
CHAR(1)

QUERYNO

INTEGER

Description 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. 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
DSNSSH01 U Contains one row for each DB2 storage group.
Column Name
NAME CREATOR VCATNAME VPASSWORD SPACE

(SYSGROUP) (NAME)

Data Type
CHAR(8) CHAR(8) CHAR(8) CHAR(8) INTEGER

Description Name of the storage group. Authorization ID of owner of storage group. Integrated Catalog Facility (ICF) catalog name. Not used. No. of kilobytes of DASD allocated to storage group, as determined by last execution of STOSPACE utility. Date of last update to SPACE column: yyddd. Whether the row came from the basic MRM tape: Y/N/other. If other, release dependency indicator. Primary authorization ID of user who created the storage group. Date and time of the last execution of the STOSPACE utility for this storage group. Time that CREATE was executed for this storage group. 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.

SPCDATE IBMREQD

CHAR(5) CHAR(1)

CREATEDBY STATSTIME

CHAR(8) TIMESTAMP

CREATEDTS ALTEREDTS

TIMESTAMP TIMESTAMP

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
INCCSID OUTCCSID

Data Type
INTEGER INTEGER

Description Coded character set ID to translate from. Coded character set ID to translate to.

2002 Computer Associates International

4-59

System Tables Catalog Tables


Column Name
TRANSTYPE

CA Reference Guide

Data Type
CHAR(2)

Description 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 MIXED PS ASCII MIXED to SBCS SM SBCS to EBCDIC MIXED SS SBCS to SBCS MP EBCDIC MIXED to ASCII MIXED PP ASCII MIXED to ASCII MIXED SP SBCS to ASCII MIXED Byte in translate table to indicate error. Null indicates the absence of an error byte. Byte in conversion table used as substitution character. Null indicates absence of substitution character. The name of the translate procedure or blanks. Whether the row came from the basic MRM tape: Y/N/other. If other, release dependency indicator. Either a conversion table or an empty string.

ERRORBYTE

CHAR(1)

SUBBYTE

CHAR(1)

TRANSPROC IBMREQD

CHAR(8) CHAR(1)

TRANSTAB

VARCHAR (256)

SYSSYNONYMS
Column Name
NAME CREATOR TBNAME TBCREATOR IBMREQD

(SYSDBASE) DSNDYX01 U (CREATOR,NAME) Contains one row for each synonym of a table or view.
Data Type
CHAR(8) CHAR(8) CHAR(1)

Description Authorization ID of owner of synonym. Authorization ID of owner of table or view. Whether the row came from the basic MRM tape: Y/N/other. If other, release dependency indicator. Primary authorization ID of user who created the synonym. Time the CREATE statement was executed for this synonym.

VARCHAR(18) Synonym for the table or view. VARCHAR(18) Name of the table or view.

CREATEDBY CREATEDTS

CHAR(8) TIMESTAMP

(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
GRANTOR

SYSTABAUTH

Data Type
CHAR(8)

Description Authorization ID of user who granted the privileges. Could also be PUBLIC or PUBLIC *. 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. blank GRANTEE is an authorization ID. P GRANTEE is an application plan or package if COLLID is not blank. 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.

GRANTEE

CHAR(8)

GRANTEETYPE

CHAR(1)

DBNAME

CHAR(8)

4-60

2002 Computer Associates International

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

Catalog Tables

Column Name
SCREATOR

Data Type
CHAR(8)

Description

STNAME

TCREATOR TTNAME AUTHHOWGOT

TIMESTAMP DATEGRANTED TIMEGRANTED UPDATECOLS

ALTERAUTH DELETEAUTH INDEXAUTH INSERTAUTH SELECTAUTH UPDATEAUTH IBMREQD

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. 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. Authorization ID of owner of table or CHAR(8) view. VARCHAR(18) Name of the table or view. Authorization level of user from whom CHAR(1) privileges were received: blank not applicable C DBCTL D DBADM L SYSCTRL M DBMAINT S SYSADM Internal use only. CHAR(12) Date privileges were granted. CHAR(6) Time privileges were granted: CHAR(8) hhmmssth. blank If UPDATEAUTH applies CHAR(1) 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. Whether GRANTEE can alter the table: CHAR(1) (see legend **) Whether GRANTEE can delete rows CHAR(1) from the table or view: (see legend **) Whether GRANTEE can create CHAR(1) indexes on the table: (see legend **) Whether GRANTEE can insert rows CHAR(1) into the table or view: (see legend **) Whether GRANTEE can select rows CHAR(1) from the table or view: (see legend **) Whether GRANTEE can update rows CHAR(1) in the table or view: (see legend **)
CHAR(1)

GRANTEELOCATION CHAR(16) LOCATION COLLID CONTOKEN CAPTUREAUTH REFERENCESAUTH CHAR(16) CHAR(18) CHAR(8) CHAR(1) CHAR(1)

Whether the row came from the basic MRM tape: Y/N/other. If other, release dependency indicator. Unused. Unused. Collection name if GRANTEE is a package ID. Otherwise blank. Consistency token if GRANTEE is a package ID. Otherwise blank. Unused. Whether GRANTEE can create or drop referential constraints in which the table is a parent: (see legend **) 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.

REFCOLS

CHAR(1)

2002 Computer Associates International

4-61

System Tables Catalog Tables


Column Name
GRANTEDTS TRIGGERAUTH

CA Reference Guide

Data Type
TIMESTAMP CHAR(1)

Description Time when the GRANT statement was executed. 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
CONSTNAME TBCREATOR TBNAME CREATOR TYPE

Data Type
VARCHAR (128) CHAR(8)

Description Name of the constraint. Authorization ID of the owner of the table on which constraint is defined. constraint is defined.

VARCHAR(18) Name of the table on which the CHAR(8) CHAR(1)

Authorization ID under which the constraint was created. Type of constraint: P U Primary key Unique key

IXOWNER

CHAR(8)

Owner of the index enforcing the constraint or blank if index has not been created yet. constraint or blank if index has not been created yet.

IXNAME

VARCHAR(18) Name of the index enforcing the

CREATEDTS IBMREQD

TIMESTAMP CHAR(1)

Time when the statement to create the constraint was executed. Whether the row came from the basic MRM tape: Y/N/other. If other, release dependency indicator. Number of columns in the constraint.

COLCOUNT

SMALLINT

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
PARTITION TSNAME DBNAME IXNAME IXCREATOR PQTY

Data Type
SMALLINT CHAR(8) CHAR(8)

Description Partition number. 0 if table space is not partitioned. Name of the table space. Name of the database containing the table space. table space is not partitioned.

VARCHAR(18) Name of the partitioned index. Blank if CHAR(8) INTEGER

Authorization ID of the owner of index. Blank if table space not partitioned. 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. 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.

SQTY

SMALLINT

4-62

2002 Computer Associates International

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

Catalog Tables

Column Name
STORTYPE

Data Type
CHAR(1)

Description Type of storage allocation: E explicit, storage group is not used I implicit, storage group is used Name of storage group used for space allocation. Blank if storage group not used. Name of ICF catalog used for space allocation. 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. 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. No. of rows that have been relocated near their original page. Value 1 if statistics not gathered; not applicable to a LOB table space. Percentage of space occupied by rows of data from active tables. 1 if stats not gathered. 2 if LOB table space. Percentage of space occupied by rows of dropped tables. Zero if a segmented table space; not applicable for an auxiliary table. Whether the row came from the basic MRM tape: Y/N/other. If other, release dependency indicator. High value of the partition in an external format. 0 if table space is not partitioned. No. of pages loaded before a page is left as free space. Percentage of each page left as free space. C Table space partition in checkpending mode and some rows may violate referential constraints, table check constraints, or both. Table space is not partitioned or does not contain rows that violate referential constraints, table check constraints, or both.

STORNAME

CHAR(8)

VCATNAME CARD

CHAR(8) INTEGER

FARINDREF

INTEGER

NEARINDREF

INTEGER

PERCACTIVE

SMALLINT

PERCDROP

SMALLINT

IBMREQD

CHAR(1)

LIMITKEY

VARCHAR (512) SMALLINT SMALLINT CHAR(1)

FREEPAGE PCTFREE CHECKFLAG

blank

CHECKRID SPACE

CHAR(4) INTEGER

No longer used. See CHECKRID5B. 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. 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 %, 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. The date and time when RUNSTATS last updated the statistics. The default value is 0001-01-01.00.00.00.000000.

COMPRESS

CHAR(1)

PAGESAVE

SMALLINT

STATSTIME

TIMESTAMP

2002 Computer Associates International

4-63

System Tables Catalog Tables


Column Name
GBPCACHE

CA Reference Guide

Data Type
CHAR(1)

Description 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. 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 X0000000000 indicating that any row may violate referential constraints. Column contains bit data. Track page modifications in the space map pages. blank Yes N No Number incremented each time an operation changes location of rows in a table. Secondary space allocation in 4KB units. Value is 0 if storage groups are not used. Number of rows in tablespace or partition or if LOB table space number of LOBs. 1 if stats are not gathered. The first character of the instance qualifier for this indexs data set name. Can contain I or J; default is I. 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. Kilobytes of DASD storage. The value is -1 if statistics have not been gathered. Number of data sets. The value is -1 if statistics have not been gathered. Number of data set extents. The value is -1 if statistics have not been gathered.

CHECKRID5B

CHAR(5)

TRACKMOD

CHAR(1)

EPOCH

INTEGER

SECQTYI

INTEGER

CARDF

FLOAT

IPREFIX

CHAR(1)

ALTEREDTS

TIMESTAMP

SPACEF

FLOAT(8)

DSNUM EXTENTS

INTEGER INTEGER

SYSTABLEPART_HIST
DSNHCX01 N

(SYSHIST) (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
PARTITION TSNAME DBNAME PQTY

Data Type
SMALLINT CHAR(8) CHAR(8) INTEGER

Description Partition number. 0 if table space is not partitioned. Name of the table space. Name of the database that contains the table space. 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. Secondary space allocation in units of 4KB storage. If a storage group is not used, the value is 0.

SECQTYI

INTEGER

4-64

2002 Computer Associates International

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

Catalog Tables

Column Name
FARINDREF

Data Type
INTEGER

Description 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. 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. 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. 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. Number of kilobytes of DASD storage allocated to the table space partition. The value is 1 if statistics have not been gathered. 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. If RUNSTATS updated the statistics, the date and time when the last invocation of RUNSTATS updated the statistics. The default value is '000101-01.00.00.00.000000'. 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. Number of data set extents. The value is -1 if statistics have not been gathered. 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. Whether the row came from the basic MRM tape: Y/N/other. If other, release dependency indicator.

NEARINDREF

INTEGER

PERCACTIVE

SMALLINT

PERCDROP

SMALLINT

SPACEF

FLOAT(8)

PAGESAVE

SMALLINT

STATSTIME

TIMESTAMP

CARDF

FLOAT(8)

EXTENTS

INTEGER

DSNUM

INTEGER

IBMREQD

CHAR(1)

SYSTABLES

(SYSDBASE) DSNDTX01 U (CREATOR,NAME) DSNDTX02 U (DBID,OBID,CREATOR,NAME) Contains one row for each table, view, or alias.
Column Name
NAME CREATOR

Data Type
VARCHAR(18) CHAR(8)

Description Name of the table, view, or alias. Authorization ID of owner of the table, view, or alias.

2002 Computer Associates International

4-65

System Tables Catalog Tables


Column Name
TYPE

CA Reference Guide

Data Type
CHAR(1)

Description Type of object: A alias G created global temporary table T table V view X auxiliary table 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. 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. Internal ID of database. 0 for view an alias, or a created temporary table. Internal ID of table. 0 for view, alias, or a created temporary table. No. of cols in table or view. 0 for alias. Name of edit proc. Blank for view or alias or a table without a edit procedure. Name of the validation procedure. Blank for view or alias or a table without a validation procedure. Whether or not the table can be dropped: blank The table can be dropped. Y The table (and its table space) cannot be dropped Unused. No longer used. See CARDF. 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. 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. Whether the row came from the basic MRM tape: Y/N/other. If other, release dependency indicator. Remarks provided in COMMENT ON statement, else empty string. No. of relationships in which the table is a dependent. 0 for view, alias, or created temporary table. No. of relationships in which the table is a parent. 0 for view, alias, or created temporary table. No. of columns in the tables primary key. 0 for view, alias, or created temporary table.

DBNAME

CHAR(8)

TSNAME

CHAR(8)

DBID OBID COLCOUNT EDPROC

SMALLINT SMALLINT SMALLINT CHAR(8)

VALPROC

CHAR(8)

CLUSTERTYPE

CHAR(1)

CLUSTERRID CARD NPAGES

INTEGER INTEGER INTEGER

PCTPAGES

SMALLINT

IBMREQD

CHAR(1)

REMARKS PARENTS

VARCHAR(254) SMALLINT

CHILDREN

SMALLINT

KEYCOLUMNS

SMALLINT

4-66

2002 Computer Associates International

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

Catalog Tables

Column Name
RECLENGTH

Data Type
SMALLINT

Description Max. length of any row in table. Length is 8 + n + l, where: 8 n l accounts for header (6 bytes) and ID map entry (2 bytes) is 10 if table has an edit procedure, else 0 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)

KEYOBID

SMALLINT

LABEL CHECKFLAG

VARCHAR(30) CHAR(1)

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. Internal DB2 ID of index that enforces uniqueness of tables primary key. 0 if not applicable. Label provided in LABEL ON statement, else empty string. 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. No longer used. See CHECKRID5B. Value of audit option: A AUDIT ALL C AUDIT CHANGE blank AUDIT NONE Authorization ID of user who created the table, view, or alias. Blank for table or view, and for alias defined on a local object. Location name of object for alias defined on a remote object. For alias, the authorization ID of owner of referenced table or view. Otherwise blank. For alias, name for referenced table or view. Otherwise blank. The timestamp when the table, view, or alias was created. 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 option: blank No Y Yes For created temporary tables DATACAPTURE is always blank. 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. 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.

CHECKRID AUDITING

CHAR(4) CHAR(1)

CREATEDBY LOCATION

CHAR(8) CHAR(16)

TBCREATOR

CHAR(8)

TBNAME CREATEDTS ALTEREDTS

VARCHAR(18) TIMESTAMP TIMESTAMP

DATACAPTURE

CHAR(1)

RBA1

CHAR(6)

RBA2

CHAR(6)

2002 Computer Associates International

4-67

System Tables Catalog Tables


Column Name
PCTROWCOMP

CA Reference Guide

Data Type
SMALLINT

Description % 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. 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.

STATSTIME

TIMESTAMP

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. 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. 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 x0000000000, indicating that any row can violate referential constraints. Default encoding scheme for tables, views and local aliases. E A U blank EBCDIC ASCII Unicode remote aliases

CARDF

FLOAT

CHECKRID5B

CHAR(5)

ENCODING_SCHEME CHAR(1)

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. Kilobytes of DASD storage. The value is -1 if statistics have not been gathered. 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. Release of DB2 that was used to create the object: blank K Created prior to Version 7 Created on Version 7

SPACEF

FLOAT(8)

AVGROWLEN

INTEGER

RELCREATED

CHAR(1)

4-68

2002 Computer Associates International

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

Catalog Tables

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
NAME CREATOR DBNAME

Data Type
VARCHAR(18) CHAR(8) CHAR(8)

Description Name of the table, view, or alias. Authorization ID of the owner of the table, view, or alias. 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. 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. Number of columns in the table or view. The value is 0 if the row describes an alias. 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. 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. If RUNSTATS updated the statistics, the date and time when the last invocation of RUNSTATS updated the statistics. The default value is '000101-01.00.00.00.000000'. For a created temporary table, the value of STATSTIME is always the default value. Total number of rows in the table or total number of LOBs in an auxiliary table. The value is -1 if statistics have not been gathered or the row describes a view, alias, or created temporary table. Total number of pages on which rows of the partition appear. The value is -1 if statistics have not been gathered. Average row length of the table specified in the table space. The value is -1 if statistics have not been gathered. Kilobytes of DASD storage. The value is -1 if statistics have not been gathered. Whether the row came from the basic MRM tape: Y/N/other. If other, release dependency indicator.

TSNAME

CHAR(8)

COLCOUNT

SMALLINT

PCTPAGES

SMALLINT

PCTROWCOMP

SMALLINT

STATSTIME

TIMESTAMP

CARDF

FLOAT(8)

NPAGESF

FLOAT(8)

AVGROWLEN

INTEGER

SPACEF

FLOAT(8)

IBMREQD

CHAR(1)

2002 Computer Associates International

4-69

System Tables Catalog Tables


SYSTABLESPACE
DSNDSX01 U Contains one row for each table space.
Column Name
NAME CREATOR DBNAME DBID OBID PSID BPOOL PARTITIONS LOCKRULE

CA Reference Guide

(SYSDBASE) (DBNAME,NAME)

Data Type
CHAR(8) CHAR(8) CHAR(8) SMALLINT SMALLINT SMALLINT CHAR(8) SMALLINT CHAR(1)

Description Name of the table space. Authorization ID of owner of the table space. Name of database containing the table space. Internal ID of the database. Internal ID of table space file descriptor. Internal ID of table space page set descriptor. Name of buffer pool used for the table space. No. of partitions in the table space. 0 if table space not partitioned table space. Lock size of the table space: A any L LOB P page R row S table space T table Size of pages in table space in kilobytes. Whether data sets are erased when dropped: Y/N. No meaning if partitioned table space. Availability status of table space: A available C definition incomplete because no partitioned index has been created P table space in check-pending mode S table space in check-pending mode with scope less than entire table T definition incomplete because no table has been created Whether table space was created implicitly: Y/N. No. of tables defined in the table space. No. of active pages in the table space, or pages formatted for rows, even if the page contains none. 0 if stats not gathered. Not used. Whether data sets are candidates for closing when the limit on open data sets is reached: Y/N. 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. Whether the row came from the basic MRM tape: Y/N/other. If other, release dependency indicator.

PGSIZE ERASERULE

SMALLINT CHAR(1)

STATUS

CHAR(1)

IMPLICIT NTABLES NACTIVE

CHAR(1) SMALLINT INTEGER

DSETPASS CLOSERULE

CHAR(8) CHAR(1)

SPACE

INTEGER

IBMREQD

CHAR(1)

ROOTNAME ROOTCREATOR SEGSIZE

VARCHAR(18) Internal use only. CHAR(8) SMALLINT

Internal use only. No. of pages in each segment of a segmented table space. 0 if table space not segmented. Authorization ID of user who created the table space. The date and time when RUNSTATS last updated the statistics. The default value is 0001-01-01.00.00.00.000000.

CREATEDBY STATSTIME

CHAR(8) TIMESTAMP

4-70

2002 Computer Associates International

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

Catalog Tables

Column Name
LOCKMAX

Data Type
INTEGER

Description 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. 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. Tablespace was defined with the MEMBER CLUSTER option and can be greater than 64GB. Tablespace can be greater than 64GB. Tablespace was defined with the LOB option (tablespace is a LOB tablespace).

TYPE

CHAR(1)

L O

CREATEDTS ALTEREDTS

TIMESTAMP TIMESTAMP

Time that the CREATE statement was executed for this tablespace. Time the most recent ALTER TABLESPACE statement executed for this tablespace 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. Default SBCS CCSID for the tablespace. Value of zero for databases created prior to V5 or a table space in a TEMP database. Default DBCS CCSID for the tablespace. Value of 0 for a database created prior to V5 or a table space in a TEMP database. Default MIXED CCSID for the tablespace. Value of 0 for a database created prior to V5 or a table space in a TEMP database. 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. If LOCKPART is specified for the table space: Y N LOCKPART is specified. LOCKPART is not specified. Yes No, only applies to LOB tablespaces.

ENCODING_SCHEME CHAR(1)

SBCS_CCSID

INTEGER

DBCS_CCSID

INTEGER

MIXED_CCSID

INTEGER

MAXROWS

SMALLINT

LOCKPART

CHAR(1)

LOG

CHAR(1)

Log changes to tablespace: Y N

NACTIVEF

FLOAT

Number of active pages in table space (formatted for rows). -1 if stats not gathered. Max size of data set in kilobytes.

DSSIZE

INTEGER

2002 Computer Associates International

4-71

System Tables Catalog Tables


SYSTABSTATS
Column Name
CARD NPAGES PCTPAGES NACTIVE PCTROWCOMP

CA Reference Guide

(SYSSTATS) DSNTTX01 U (OWNER,NAME,PARTITION) One row for each partition of a partitioned table space.
Data Type
INTEGER INTEGER SMALLINT INTEGER SMALLINT

STATSTIME IBMREQD

TIMESTAMP CHAR(1)

Description Total number of rows in the partition. Total number of pages on which rows of the partition appear. Percentage of total active pages in the partition that contain rows of the table. Number of active pages in the partition. Percentage of rows compressed within the total number of active rows in the partition. The date and time when RUNSTATS last updated the statistics.

DBNAME TSNAME PARTITION OWNER NAME CARDF

Whether the row came from the basic MRM tape: Y/N/other. If other, release dependency indicator. CHAR(8) Database containing table space named in TSNAME. CHAR(8) Table space that contains the table. SMALLINT Partition number of the table space that contains the table. CHAR(8) Authorization ID of owner of table. VARCHAR(18) Name of the table.
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
NPAGES STATSTIME INTEGER

DBNAME TSNAME PARTITION OWNER NAME CARDF

Description Total number of pages on which rows of the partition appear. TIMESTAMP If RUNSTATS updated the statistics, the date and time RUNSTATS last updated the statistics. CHAR(8) Database that contains the table space named in TSNAME. CHAR(8) Table space that contains the table. SMALLINT Partition number of the tablespace that contains the table. CHAR(8) Authorization ID of the owner of the table. VARCHAR(18) Name of the table. FLOAT(8) Total number of rows in the partition. The value is -1 if statistics have not been gathered.
CHAR(1)

Data Type

IBMREQD

Whether the row came from the basic MRM tape: Y/N/other. If other, release dependency indicator.

SYSTRIGGERS
DSNOTX01 DSNOTX02 Y N

(SYSOBJ) (SCHEMA,NAME,SEQNO) (TBOWNER,TBNAME) (SCHEMA.TRIGNAME)

DSNOTX03 N Contains one row for each trigger.


Column Name
NAME SCHEMA

Data Type
CHAR(8) CHAR(8)

Description Name of the trigger and trigger package. Schema of the trigger. This implicit or explicit qualifier for the trigger name is also used for the collection ID of the trigger package. Sequence number of this row; the first portion of the trigger definition is in row 1, and successive rows have increasing SEQNO values. Internal identifier of the database for the trigger. Internal identifier of the trigger.

SEQNO

SMALLINT

DBID OBID

SMALLINT SMALLINT

4-72

2002 Computer Associates International

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

Catalog Tables

Column Name
OWNER

CREATEDBY

TBNAME TBOWNER TRIGTIME

TRIGEVENT

GRANULARITY

CREATEDTS

Description 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. Authorization ID of the owner of the CHAR(8) 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. VARCHAR(18) Name of the table to which this trigger applies. CHAR(8) Qualifier of the name of the table to which this trigger applies. 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 CHAR(1) Operation that activated the trigger: I Insert D Delete U Update CHAR(1) Trigger is executed once per: S Statement R Row 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.
CHAR(8)

Data Type

IBMREQD

TEXT REMARKS TRIGNAME

Whether the row came from the basic MRM tape: Y/N/other. If other, release dependency indicator. VARCHAR Full text of the CREATE TRIGGER (3460) statement. VARCHAR A character string provided by the user (254) with the COMMENT ON statement. VARCHAR(30) Not used

CHAR(1)

SYSUSERAUTH

(SYSUSER) DSNAUH01 N (GRANTEE, GRANTEDTS) DSNAUX02 N (GRANTOR) Records the system privileges held by users.
Column Name
GRANTOR GRANTEE

Data Type
CHAR(8) CHAR(8)

Description Authorization ID of the user who granted the privileges. Authorization ID of the user who holds the privileges. Could also be PUBLIC for a grant to PUBLIC. Internal use only. Date privileges were granted: yymmdd. Time privileges were granted: hhmmssth. Not used. Authorization level of user from whom privileges were received: blank N/A L SYSCTRL C DBCTL M DBMAINT D DBADM S SYSADM Unused. Whether GRANTEE can use the BIND command with ADD option: (see legend**)

TIMESTAMP DATEGRANTED TIMEGRANTED GRANTEETYPE AUTHHOWGOT

CHAR(12) CHAR(6) CHAR(8) CHAR(1) CHAR(1)

ALTERBPAUTH BINDADDAUTH

CHAR(1) CHAR(1)

2002 Computer Associates International

4-73

System Tables Catalog Tables


Column Name
BSDSAUTH

CA Reference Guide

Data Type
CHAR(1)

CREATEDBAAUTH

CHAR(1)

CREATEDBCAUTH

CHAR(1)

CREATESGAUTH DISPLAYAUTH RECOVERAUTH

CHAR(1) CHAR(1) CHAR(1)

STOPALLAUTH STOSPACEAUTH SYSADMAUTH SYSOPRAUTH TRACEAUTH

CHAR(1) CHAR(1) CHAR(1) CHAR(1) CHAR(1)

Description Whether GRANTEE can issue the RECOVER BSDS command: (see legend**) Whether GRANTEE can create databases and automatically receive DBADM authority over new databases: (see legend**) Whether GRANTEE can create databases and automatically receive DBCTRL authority over the new databases: (see legend**) Whether GRANTEE can create new storage groups: (see legend**) Whether GRANTEE can use DISPLAY: (see legend**) Whether GRANTEE can use RECOVER INDOUBT command: (see legend**) Whether GRANTEE can use the DB2 STOP: (see legend**) Whether GRANTEE can run STOSPACE utility: (see legend**) Whether GRANTEE has system administration authority: (see legend**) Whether GRANTEE has system operator authority: (see legend**) Whether GRANTEE can use START and STOP TRACE commands: (see legend**) Whether the row came from the basic MRM tape: Y/N/other. If other, release dependency indicator. Whether GRANTEE can obtain IFC serviceability data: (see legend**) Whether GRANTEE can obtain IFC data (see legend**) Whether GRANTEE can use CREATE ALIAS statement: (see legend**) If GRANTEE has SYSCTRL authority: (see legend**) GRANTEE has GRANT option for either Y or G. If GRANTEE has BINDAGENT privilege: (see legend**) Whether GRANTEE can use ARCHIVE LOG command: (see legend**) Unused. Unused. Time the GRANT statement was executed. Indicates if the GRANTEE has GRANTMTABAUTH privilege: (see legend**)

IBMREQD

CHAR(1)

MON1AUTH MON2AUTH CREATEALIASAUTH SYSCTRLAUTH

CHAR(1) CHAR(1) CHAR(1) CHAR(1)

BINDAGENTAUTH ARCHIVEAUTH CAPTURE1AUTH CAPTURE2AUTH GRANTEDTS

CHAR(1) CHAR(1) CHAR(1) CHAR(1) TIMESTAMP

CREATETMTABAUTH CHAR(1)

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
BNAME

Data Type

Description view is dependent. If object type is a function (BTYPE=F), name is specific function name.

VARCHAR(18) Name of the table or view on which the

BCREATOR

CHAR(8)

Authorization ID of owner of BNAME. For function value is the schema name of BNAME.

4-74

2002 Computer Associates International

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

Catalog Tables

Column Name
BTYPE

Data Type
CHAR(1)

Description Type of object BNAME: F function T table V view Authorization ID of the owner of the view. Whether the row came from the basic MRM tape: Y/N/other. If other, release dependency indicator. Schema of BNAME. Not used (Default V).

DNAME DCREATOR IBMREQD

VARCHAR(18) Name of the view. CHAR(8) CHAR(1)

BSCHEMA DTYPE

CHAR(8) CHAR(1)

SYSVIEWS
Column Name
NAME CREATOR SEQNO

(SYSVIEWS) DSNVVX01 U (CREATOR,NAME,SEQNO.TYPE) Contains one or more rows for each view.
Data Type
CHAR(8) SMALLINT

Description Authorization ID of owner of the view. Row sequence no. First part of view is on row 1, successive rows have increasing values of SEQNO. 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. Whether the row came from the basic MRM tape: Y/N/other. If other, release dependency indicator. Text of the CREATE VIEW statement. SQL path at time view was defined. Used to resolve unqualified data type and function names. Release of DB2 that was used to create the object: blank K Created prior to Version 7 Created on Version 7

VARCHAR(18) Name of the view.

CHECK

CHAR(1)

IBMREQD

CHAR(1)

TEXT PATHSCHEMAS

VARCHAR (254) VARCHAR (254) CHAR(1)

RELCREATED

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
IBMREQD

Data Type
CHAR(1)

Description Whether the row came from the basic MRM tape: Y/N/other. If other, release dependency indicator. Remaining part of the parse tree of a view.

VTREE

VARCHAR (4000)

SYSVOLUMES
Column Name
SGNAME SGCREATOR VOLID IBMREQD

(SYSGROUP) Contains one row for each volume of each storage group.
Data Type
CHAR(8) CHAR(8) CHAR(6) CHAR(1)

Description Name of the storage group. Authorization ID of the owner of the storage group. Serial number of the volume or * if SMS managed. Whether the row came from the basic MRM tape: Y/N/other. If other, release dependency indicator.

2002 Computer Associates International

4-75

System Tables Catalog Tables


SYSVTREE

CA Reference Guide

(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
NAME CREATOR TOTLEN IBMREQD

Data Type
CHAR(8) INTEGER CHAR(1)

Description Authorization ID of the owner of view. Total length of the parse tree. Whether the row came from the basic MRM tape: Y/N/other. If other, release dependency indicator. Parse tree or portion of the parse tree of the view. Not used. (Default V.)

VARCHAR(18) Name of the view.

VTREE TYPE

VARCHAR (4000) CHAR(1)

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
TYPE

Data Type
CHAR(1)

Description How the row is to be used: O outbound translation I inbound translation and come from checking Authorization ID to be translated. If blank, any auth ID. 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. Translated value of AUTHID. Blank specifies no translation. 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. Whether the row came from the basic MRM tape: Y/N/other. If other, release dependency indicator.

AUTHID LINKNAME

CHAR(8) CHAR(8)

NEWAUTHID PASSWORD

CHAR(8) CHAR(8)

IBMREQD

CHAR(1)

4-76

2002 Computer Associates International

For DB2 UDB for OS/390

System Tables Directory Tables

Directory Tables
Legend:
SYSIBM.Tablename
SYSIBM.Indexname 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. (DSNDB01.Tablespacename) Unique/Nonunique

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 OBDs unique object identifier (OBID).
Loc Column Name DM prefix: 00 PGSFLAGS CHAR(1) Flag byte: X00 record X20 overflow record Length of record, including 6-byte header. OBID (X0021) ID map entry that points to this record. RID of next record in hash or anchor point if parent bit is 1. RID of previous record in hash or anchor point if parent is 1. RID of first DBDS record, which has more of DBD. 0 if none. Length of the first DBD Internal DBD identifier (DBID). Length of the DBD data field. A single field that contains DBD header and data. Data Type Description

01 03 05

PGSLTH PGSOBD PGSID

CHAR(2) CHAR(2) CHAR(1)

DBDR record prefix: 06 0A 0E 12 16 18 1A * * * DBDLL DBID * * CHAR(4) CHAR(4) CHAR(4) CHAR(4) CHAR(2) CHAR(2) CHAR(*)

DBD data:

DBDS (DBD Child Record)


Stores DBDs (Database Descriptors).
Loc Column Name DM prefix: 00 PGSFLAGS CHAR(1) Flag byte: X00 record X20 overflow record Data Type Description

(DBD01)

01 03 05

PGSLTH PGSOBD PGSBID

CHAR(2) CHAR(2) CHAR(1)

Length of record, including 6-byte header. OBID(X0022) ID map entry that points to this record. RID of next record in link or if last DBDS in link, RID of parent record (parent bit is 1). RID of previous record in link or if first DBDS in link, RID of parent record (parent bit is 1). Length of the DBD data field. A single field that contains DBD data.

DBDS record prefix: 06 * CHAR(4)

0A

CHAR(4)

0E 10

* *

CHAR(2) CHAR(*)

DBD data:

2002 Computer Associates International

4-77

System Tables Directory Tables


SCTR (SKCT Parent Record)

DB2 Reference Guide

(SCT02) DSNSCT02 U Contains SKCTs (Skeleton Cursor Tables), which store the access paths to DB2 data. If the SKCT is longer than DB2s 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 DM record prefix: 00 PGSFLAGS CHAR(1) Flag byte: X00 record X20 overflow record Length of record, including 6-byte header OBID(X0061) ID map entry that points to this record Length of the SKCT Name of the SKCT (plan name) Section number Sequence no. within section A single field that contains SKCT data Data Type Description

01 03 05

PGSLTH PGSOBD PGSBID

CHAR(2) CHAR(2) CHAR(1)

SCTR record prefix: 06 0A 12 16 18 SCTLL SCTNAME SCTSEC SCTSEQ * CHAR(4) CHAR(8) CHAR(4) CHAR(2) CHAR(*)

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 DB2s 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 DM record prefix: 00 PGSFLAGS CHAR(1) Flag byte: X00 record X20 overflow record Length of record, including 6-byte header OBID(X0081) ID map entry that points to this record Length of the SKPT Package ID Reserved Package collection ID Name of the SCPT (package name) Package consistency token Reserved Section number Sequence no. within section A single field that contains SKPT data Package version ID (max. CHAR(64)) Data Type Description

01 03 05

PGSLTH PGSOBD PGSBID

CHAR(2) CHAR(2) CHAR(1)

SPTR record prefix: 06 0A 0A 1C 2E 40 48 4A 4C 4E * SPTLL SPTPID * SPTCOLID SPTNAME SPTCONID * SPTSEC SPTSEQ * SPTVER CHAR(4) CHAR(4) CHAR(18) CHAR(18) CHAR(18) CHAR(8) CHAR(2) CHAR(4) CHAR(2) CHAR(*) *

SKPT data:

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 00 PGSFLAGS Data Type CHAR(1) Description Flag byte: X00 record X20 overflow record Length of record, including 6-byte header OBID(X00D1) ID map entry that points to this record

01 03 05

PGSLTH PGSOBD PGSBID

CHAR(2) CHAR(2) CHAR(1)

4-78

2002 Computer Associates International

For DB2 UDB for OS/390

System Tables Directory Tables


Description DBID of the modified object OBID of the modified object Modification date: mmddyy. Modification time: hhmmssth. Starting RBA. Stopping RBA. Table space partition number Starting LRSN of update log records for data sharing. X000000000000 otherwise. Ending LRSN of update log records for data sharing. X000000000000 otherwise. Data sharing member ID of the modifying DB2 subsystem. X0001 for nondata sharing.

Loc 06 08 0A 10 18 1E 24 26

Column Name LGRDBID LGRPSID LGRUCDT LGRUCTM LGRSRBA LGRSPBA LGRPART LGRSLRSN

Data Type CHAR(2) CHAR(2) CHAR(6) CHAR(8) CHAR(6) CHAR(6) SMALLINT CHAR(6)

2C

LGRELRSN

CHAR(6)

32

LGRMEMB

CHAR(2)

SYSIBM.SYSUTIL
Loc Column Name 00 PGSFLAGS

(SYSUTIL) Stores information about DB2 utilities that have been started, but have not completed running.
Data Type CHAR(1) Description Flag byte: X00 record X20 overflow record Length of record, including 6-byte header OBID(X0051) ID map entry that points to this record UTILID passed on job parm Job name from the job card Authorization ID of invoker Date of utility run Release level checked at restart IBM required field Reserved Name of currently executing utility Phase of currently executing utility Reserved Status of current utility: XC1 active XE2 stopped Termination requested: XE8 -TERM issued XD5 or X40 -TERM not issued Element of USO forced: XE8 reload was successful XD5 or X40 reload not successful Reload has completed: XE8 reload was successful XD5 or X40 reload not successful Compatibility check passed: XE8 compatible with executing utilities XD5 or X40 not compatible Reserved. Relative USM position in SYSIN. Total number of pages/records done. USM CHECKSUM. DBID for table space. PSID for table/index space. Secondary PSID for recover index data page set. Data set number. Reserved. Database name.

01 03 05 06 16 1E 26 2A 2D 2E 36 3E 46 4A

PGSLTH PGSOBD PGSBID USUUID USUJOBNM USUAUID USURDATE USUREL USUIRQD * USUUTNAM USUPHASE USUSTATU

CHAR(2) CHAR(2) CHAR(1) CHAR(16) CHAR(8) CHAR(8) CHAR(4) CHAR(3) CHAR(1) CHAR(8) CHAR(8) CHAR(8) CHAR(4) CHAR(1)

4B

USUTREQ

CHAR(1)

4C

USUFORCE

CHAR(1)

4D

USURLOK

CHAR(1)

4E

USUCMPOK

CHAR(1)

4F 52 56 5E 62 64 66 68 6A 6C

* USUPOS USUNDONE USUCKSUM USUDBOB USUPSID USUPSDD USUDSNU * USUDBNAM

CHAR(3) CHAR(4) CHAR(8) CHAR(4) CHAR(2) CHAR(2) CHAR(2) CHAR(2) CHAR(2) CHAR(8)

2002 Computer Associates International

4-79

System Tables Directory Tables


Loc Column Name 74 7C 88 USUSPNAM * USUUDA Data Type CHAR(8) CHAR(12) CHAR(150) CHAR(2) CHAR(8)

DB2 Reference Guide

Description Table/index space name. Reserved. Utility-dependent data. Length of restart area. Executing DB2 subsystems member name for data sharing. Otherwise blank.

11E USUUSTRL 120 USUUSTRT FA0 USUMEMBR

CHAR(3712) Restart control blocks.

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 00 PGSFLAGS Data Type CHAR(1) Description Flag byte: X00 record X20 overflow record Length of record, including the 6-byte header. OBID (X0051). ID map entry that points to this record. Utility ID that identifies the parent record in SYSIBM.SYSTUIL. Sequence number of this row. Reserved. Overflow checkpoint/restart information.

01 03 05 06 16 18 24

PGSLTH PGSOBD PGSBID UTILID SEQNO CHECKPOINT

CHAR(2) CHAR(2) CHAR(1) CHAR(16) SMALLINT CHAR(12) VARCHAR (4000)

4-80

2002 Computer Associates International

For DB2 UDB for OS/390

System Tables Directory Tables

2002 Computer Associates International

4-81

For DB2 UDB for z/OS and OS/390

User Tables PLAN_TABLE

5. User Tables
PLAN_TABLE
At least one row for each table referenced in each SQL statement being explained.
Column Name QUERYNO Data Type INTEGER Description 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. 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. Name of the application plan being explained; blank for dynamic EXPLAIN statements. Name of the DBRM or package being explained; blank for dynamic EXPLAIN statements. A number identifying the order in which the steps were executed within the QBLOCKNO. 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.

QBLOCKNO

SMALLINT

APPLNAME PROGNAME PLANNO METHOD

CHAR(8) CHAR(8) SMALLINT SMALLINT

2002 Computer Associates International

5-1

User Tables PLAN_TABLE


Column Name CREATOR TNAME Data Type CHAR(8) CHAR(18) Description

CA Reference Guide

TABNO ACCESSTYPE

SMALLINT CHAR(2)

MATCHCOLS

SMALLINT

ACCESSCREA- CHAR(8) TOR ACCESSNAME CHAR(18) INDEXONLY SORTN_UNIQ SORTN_JOIN SORTN_ ORDERBY SORTN_ GROUPBY SORTC_UNIQ SORTC_JOIN SORTC_ ORDERBY SORTC_ GROUPBY CHAR(1) CHAR(1) CHAR(1) CHAR(1) CHAR(1) CHAR(1) CHAR(1) CHAR(1) CHAR(1)

Creator of new table (or materialized view) accessed in this step. Blank if METHOD is 3. 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. The sequence of the table in the FROM clause. Value is 0 if METHOD is 3. For IBM use. 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 The number of index key columns used in an index scan (ACCESSTYPE = I, I1, N or MX). Otherwise 0. The creator of the index used in an index scan (ACCESSTYPE = I, I1, N or MX). Otherwise blank. The name of the index used in an index scan (ACCESSTYPE = I, I1, N or MX). Otherwise blank. Indicates if only index entries are accessed for a step (PLANNO): Y/N. Whether a sort is performed on the new table to remove duplicate rows: Y/N. Whether a sort is performed on the new (inner) table of join method 2 or 4: Y/N. Whether an ORDER BY clause results in a sort on the new table: Y/N. Whether a GROUP BY clause results in a sort on the new table: Y/N. Whether a sort is performed on the composite table to remove duplicate rows: Y/N. Whether a sort is performed on the composite (outer) table of join method 1, 2 or 4: Y/N. Whether an ORDER BY clause or quantified predicate results in a sort on the composite table: Y/N. Whether a GROUP BY clause results in a sort on the composite table: Y/N.

5-2

2002 Computer Associates International

For DB2 UDB for z/OS and OS/390

User Tables PLAN_TABLE

Column Name

Data Type TSLOCKMODE CHAR(3)

Description

TIMESTAMP REMARKS PREFETCH

COLUMN_ FN_EVAL

MIXOPSEQ VERSION COLLID ACCESS_ DEGREE

ACCESS_ PGROUP_ID

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. Time at which the EXPLAIN statement CHAR(16) was processed: ccyymmddhhmmsshh. VARCHAR(254) A column, initialized to zero length, which can be updated with up to 254 bytes of comments. A character that indicates whether data CHAR(1) pages were read in advance by PREFETCH: S pure sequential PREFETCH L PREFETCH through a RID list Blank unknown, or not applicable A character that indicates when an SQL CHAR(1) 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 The sequence of the steps in a multiple SMALLINT index operation (MX, MI, and MU rows), 0 for M or not applicable. VARCHAR(64) The version identifier for the package being explained, otherwise zero length. The collection ID for the package being CHAR(18) explained, otherwise blank. The number of parallel operations SMALLINT 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. The identifier of the parallel group for SMALLINT 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.

2002 Computer Associates International

5-3

User Tables PLAN_TABLE


Column Name Data Type JOIN_DEGREE SMALLINT Description

CA Reference Guide

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. The identifier of the parallel group for JOIN_ SMALLINT joining the composite table with the new PGROUP_ID table. Null if the join is not executed in parallel. Parallel group identifier for the parallel SORTC_ SMALLINT sort of the composite table, or null if not PGROUP_ID applicable. Parallel group identifier for the parallel SORTN_ SMALLINT sort of the new table, or null if not PGROUP_ID applicable Kind of parallelism, if any, at bind time: PARALLELISM_ CHAR(1) MODE I query I/O parallelism C query CP parallelism X query Sysplex parallelism null no parallelism Number of columns joined during a MERGE_ SMALLINT merge scan join (METHOD = 2). Null if JOIN_COLS METHOD = 2. Correlation name of the table or view CORRELACHAR(18) specified in the statement, otherwise TION_NAME blank. Indicates whether access path qualifies PAGE_RANGE CHAR(1) for page range screening: Y Table can qualify for page range screening (DB2 generates plans that will scan only the needed partition) blank No The type of a join: JOIN_TYPE CHAR(1) F FULL OUTER JOIN L LEFT (or RIGHT) OUTER JOIN S STAR JOIN blank INNER JOIN, or not applicable The member name of the DB2 that GROUP_ CHAR(8) executed EXPLAIN. The column is blank MEMBER if the DB2 subsystem was not in a data sharing environment when the EXPLAIN was executed. IBM_SERVICE_ VARCHAR(254) IBM internal information. DATA Indicates when access path was WHEN_ CHAR(1) determined: OPTIMIZE 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.

5-4

2002 Computer Associates International

For DB2 UDB for z/OS and OS/390

User Tables PLAN_TABLE

Column Name QBLOCK_ TYPE

Data Type CHAR(6)

Description 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 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. A string identifying the row as an optimization hint. DB2 uses row as input during access path selection. Contains the identifier (value of OPTHINT) when DB2 uses an optimization hint. 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. A number that indicates the QBLOCKNO of the parent query block. 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.

BIND_TIME

Timestamp

OPTHINT HINT_USED PRIMARY_ ACCESSTYPE

CHAR(8) CHAR(8) CHAR(1)

PARENT_ QBLOCKNO TABLE_TYPE

SMALLINT CHAR(1)

2002 Computer Associates International

5-5

User Tables CA Reference Guide DSN_STATEMNT_TABLE DSN_STATEMNT_TABLE


Contains a row with cost estimate, in service units and milliseconds for processing of an explainable statement.
Column Name QUERYNO APPLNAME PROGNAME COLLID GROUP_ MEMBER Data Type INTEGER CHAR(8) CHAR (8) CHAR (18) CHAR (8) Description See description in PLAN_TABLE p. 5-1. See description in PLAN_TABLE p. 5-1. See description in PLAN_TABLE p. 5-1. See description in PLAN_TABLE p. 5-3. See description in PLAN_TABLE p. 5-4. The time the statement was processed. Same as BIND_TIME in PLAN_TABLE. Type of statement being explained, i.e. SELECT, INSERT, UPDATE, DELETE, SELUPD, DELCUR, UPDCUR Whether DB2 was forced to use default values to make cost estimates. A B Default values were not used. Some default values were used. See REASON for explanation of why defaults were used.

EXPLAIN_TIME TIMESTAMP STMT_TYPE CHAR (6)

COST_ CATEGORY

CHAR (1)

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. 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 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.

PROCSU

INTEGER

REASON

VARCHAR (254)

5-6

2002 Computer Associates International

For DB2 UDB for z/OS and OS/390

User Tables DSN_FUNCTION_TABLE

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 QUERYNO QBLOCKNO APPLNAME PROGNAME COLLID GROUP_ MEMBER Data Type INTEGER INTEGER CHAR (8) CHAR (8) CHAR (18) CHAR (8) Description See description in PLAN_TABLE p. 5-1. See description in PLAN_TABLE p. 5-1. See description in PLAN_TABLE p. 5-1. See description in PLAN_TABLE p. 5-1. See description in PLAN_TABLE p. 5-3. See description in PLAN_TABLE p.5-4. The time the statement was processed. Same as BIND_TIME in PLAN_TABLE. Schema name of the function invoked in the explained statement. Name of the function invoked in the explained statement. Specific name of the function invoked in the explained statement. Type of the function invoked in the explainable statement: SU TU VIEW_ CREATOR VIEW_NAME CHAR (8) Scalar function Table function

EXPLAIN_TIME TIMESTAMP SCHEMA_ NAME FUNCTION_ NAME SPEC_FUNC_ NAME FUNCTION_ TYPE CHAR (8) CHAR (18) CHAR (18) CHAR (2)

Creator of view definition to which the specified function, e.g., FUNCTION_ NAME is referenced. Otherwise blank. Name of view definition to which specified function, i.e. FUNCTION_NAME is referenced. Otherwise blank. Value of the SQL path used to resolve the schema name of the function. Function name and parameters of the referenced function. For function references over 100 bytes, only the first 100 bytes are contained.

CHAR (18)

PATH FUNCTION_ TEXT

VARCHAR (254) VARCHAR (254)

2002 Computer Associates International

5-7

User Tables CA Reference Guide DSN_FUNCTION_TABLE

5-8

2002 Computer Associates International

For DB2 UDB for z/OS and OS/390

System Information SQLCA

6. Miscellaneous System Information


SQLCA
Column-name Data Type SQLCAID SQLCABC SQLCODE CHAR(8) INTEGER INTEGER Description An eye catcher for dumps, contains SQLCA Length of SQLCA: 136. SQL return code: 0 Successful execution positive Successful execution but with an exception condition negative Error condition Length of SQLERRMC, ranging from 0 to 70. 0 means SQLERRMC value is not pertinent.

SQLERRML

SMALLINT

SQLERRMC

VARCHAR(70) One or more tokens, separated by XFF, that are substituted for variables in error condition descriptions. 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. 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. 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. 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. 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. Position or column of a syntax error for a PREPARE or EXECUTE IMMEDIATE statement. Internal error code. Blank if all indicators are blank; W if at least one other indicator contains W or Z. 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. 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. 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.

SQLERRP

SQLERRD(1)

INTEGER

SQLERRD(2)

INTEGER

SQLERRD(3)

INTEGER

SQLERRD(4)

INTEGER

SQLERRD(5)

INTEGER

SQLERRD(6) SQLWARN0 SQLWARN1

INTEGER CHAR(1) CHAR(1)

SQLWARN2

CHAR(1)

SQLWARN3

CHAR(1)

2002 Computer Associates International

6-1

System Information SQLCA


Column-name Data Type SQLWARN4 CHAR(1) Description

CA Reference Guide

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. 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. W if adjustment was made to a DATE or TIMESTAMP value to correct an invalid date resulting from an arithmetic operation. 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. W if a character that could not be converted was replaced with a substitute character. W if arithmetic exceptions were ignored during COUNT or COUNT_BIG processing Is Z if stored procedure returns multiple result sets. W if a character conversion error occurred while filling the SQLCA. Blank if all fields valid. Return code for the outcome of the most recent execution of an SQL statement. Range of values is 00000 through 65535. 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.

SQLWARN5

CHAR(1)

SQLWARN6

CHAR(1)

SQLWARN7

CHAR(1)

SQLWARN8 SQLWARN9

CHAR(1) CHAR(1)

SQLWARNA

CHAR(1)

SQLSTATE

CHAR(5)

sqln SQLN

SMALLINT

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.

6-2

2002 Computer Associates International

For DB2 UDB for z/OS and OS/390

System Information SQLDA

SQLDA
Column-name SQLDAID Data Type CHAR(8) Description 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 SQLD SMALLINT SMALLINT Total no. of occurrences of SQLVAR. 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.

2002 Computer Associates International

6-3

System Information SQLDA


Column-name SQLLEN Data Type SMALLINT Description

CA Reference Guide

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 X0000ZZZZ for string columns, where ZZZZ is associated CCSID. For bit data, ZZZZ is XFFFF. 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 X0000.

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. Reserved

INTEGER

6-4

2002 Computer Associates International

For DB2 UDB for z/OS and OS/390


Column-name SQLDATAL Data Type pointer

System Information SQLDA


Description 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.

2002 Computer Associates International

6-5

System Information SQL Limits SQL Limits

CA Reference Guide

Item Column, table, view, collection-ID, synonym, correlation name, index, alias, statement name, cursor, or table check constraint, stored procedure, user-defined function Auth-id, plan, database, tablespace, stogroup, pkg, referential constraint, schema, trigger Host identifier Server name or location identifier Item INTEGER value SMALLINT value DECIMAL precision DECIMAL value FLOAT value (approximate) Largest: Smallest: Largest: Smallest: Smallest positive: Largest negative: Largest: Smallest: Smallest positive: Largest negative: CHAR column size GRAPHIC column size VARCHAR or VARGRAPHIC column size Character constant length Item CLOB length DBCLOB length BLOB length Hexadecimal constant length Graphic constant length String concatenation length (character) String concatenation length (graphic) String concatenation length (binary) DATE value Largest: (shown in ISO format) Smallest: TIME value Largest: (shown in ISO format) Smallest: TIMESTAMP Largest: value Smallest: Largest: Smallest: Largest: Smallest:

Limit 18 bytes 8 bytes 64 bytes 16 bytes

Limit 2147483647 -2147483648 32767 -32768 31 1031 1 1 1031 7.2E+75 -7.2E+75 5.4E-79 -5.4E-79 7.2 x 1075 7.2 x 1075 5.4 x 10-79 5.4 x 10-79 255 bytes 127 characters 4046 bytes 8128 bytes 16320 bytes 32704 bytes 255 bytes

REAL value

For 4K pages: For 8K pages: For 16K pages: For 32K pages:

Limit 2147483647(2GB-1byte) 1073741824 DBCS characters 2147483647 (2GB-1byte) 254 digits 124 bytes 2147483647 (2GB-1byte) 1073741824 DBCS characters 2147483647 (2GB-byte) 9999-12-31 0001-01-01 24.00.00 00.00.00 9999-12-31-24. 00.00.000000 0001-01-01-00. 00.00.000000

6-6

2002 Computer Associates International

For DB2 UDB for z/OS and OS/390

System Information DB2 Limits

DB2 Limits
Item Columns in a table or view Columns in a dependent table Table names in a view, SELECT, INSERT, UPDATE, DELETE Row length 4K pages: 4K pages with EDITPROC: (including overhead) 8K pages: 8K pages with EDITPROC: 16K pages: 16K pages: with EDITPROC: 32K pages: 32K pages with EDITPROC: Volume IDs in a storage group Partitions in a partitioned table space or partitioned index: Not (LARGE or DSSIZE >2GB) LARGE or DSSIZE >2GB 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 Table or table space size Size of a DBRM Index key length for non-partitioned table space Maximum number of bytes used in the partitioning of a partitioned index1 Columns in an index key Tables in a FROM clause Number of subqueries in a statement Host and indicator variable length Non-LOB pointed to in a SQLDA: LOB Host variable length used for INSERT or UPDATE: Non-LOB LOB Limit 750 or fewer (depends on complexity of CREATE VIEW stmt) 749 255 4056 bytes 4046 bytes 8138 bytes 8128 bytes 16330 bytes 16320 bytes 32714 bytes 32704 bytes 133 64 254 4 gigabytes 2 gigabytes 1 gigabytes 4 gigabytes 64 gigabytes 16 terabytes 131072 bytes 255 minus the # of key columns that allow nulls 255 64 15 14 32767 bytes 2147483647 (2GB-1byte) 32704 bytes 2147483647 (2GB-1byte) 32765 bytes 750 750 750 4000 bytes 3800 bytes 32765 bytes 2147483647 (2GB-1byte) 16 nesting levels 254 Limited by EDM & buffer pool size, and amount of storage used by each DB2 or applic. agent 248 bytes 4GB 1 4GB 1 2 2 31

SQL statement length Elements in a SELECT list Predicates in a WHERE or HAVING clause Total columns in a GROUP BY or ORDER BY clause Total column length in a GROUP BY or ORDER BY clause Maximum length of a table check constraint Number of bytes passed in a single parameter Non-LOB of an SQL CALL statement: LOB Number of stored procedures, triggers, and user-defined functions that an SQL statement can implicitly or explicitly reference Length of an SQL path Concurrent DB2 or application agents

Largest log space Largest active log data set Largest archive log data set Maximum number of active log copies Maximum number of archive log copies Maximum number of active log data sets (each copy)

If the key of a partition index is greater than 255 bytes, only the first 255 bytes are used to actually partition the data.

2002 Computer Associates International

6-7

System Information DB2 Limits

CA Reference Guide

Item Limit Maximum number of archive log volumes (each 1000 copy) Databases accessible to an application or end System storage /EDM user 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 255 127 DSNDB01 and DSNDB06 Maximum simple or segmented data set size 2 gigabytes Maximum LOB data set size 64 gigabytes

6-8

2002 Computer Associates International

For DB2 UDB for z/OS and OS/390

System Information RLST Table

RLST Table
Legend:
authid.Table-name
(DSNRLST.Tablespace-name) authid.Index-name Unique/Nonunique (Index fields) Table description

DSNRLSTxx
DSNARLxx U

(DSNRLSxx)
(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 AUTHID Data Type Description 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. 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.

PLANNAME

CHAR(8)

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. 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. 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. 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.

LUNAME

RLFFUNC

CHAR(1)

RLFBIND

CHAR(1)

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.

2002 Computer Associates International

6-9

System Information RLST Table


Column-name RLFPKG Data Type Description CHAR(8)

CA Reference Guide

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_ CHAR(1) CATEGORY_B 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.

6-10

2002 Computer Associates International

For DB2 UDB for z/OS System Information and OS/390 Security Authorizations

Security Authorizations
Administrative Authorities Hierarchy
SYSADM Privilege on all plans: EXECUTE Privileges on all packages: ALL Privilege on Distinct Types: Usage Privilege on all routines: EXECUTE

PACKADM Collection privileges: CREATE IN Privileges on all pkgs: BIND COPY EXECUTE

DBADM Table and view privileges: ALTER INDEX SELECT DELETE INSERT UPDATE REFERENCES TRIGGER

SYSCTRL System privileges: BINDADD CREATEDBA BINDAGENT CREATEDBC BSDS CREATESG CREATEALIAS MONITOR1

MONITOR2 STOSPACE CREATETMTAB

Privileges on all tables: ALTER INDEX REFERENCES Privileges on catalog tables: SELECT UPDATE DELETE

TRIGGER INSERT

Privileges on all pkgs, plans, collections: BIND COPY CREATE IN Privileges on all schemas: CREATEIN DROPIN Use privileges on: BUFFERPOOL STOGROUP SYSOPR INSTALLATION SYSOPR ARCHIVE STARTDB (cannot change access modes) SYSOPR DISPLAY STOPALL RECOVER TRACE Privileges on routines: START STOP DISPLAY Notes: DBADM, DBCTRL, and DBMAINT are database-dependent. PACKADM is collection-independent. Each level includes those authorizations listed in the box plus all privileges of lower authorities in the same branch; except for INSTALLATION SYSOPR which includes some privileges of SYSADM and SYSCTRL. DBCTRL DROP REORG LOAD REPAIR RECOVERDB ALTERIN TABLESPACE

DBMAINT CREATETAB STARTDB CREATETS STATS DISPLAYDB STOPDB IMAGCOPY

2002 Computer Associates International

6-11

System Information CA Reference Guide Security Authorizations


Table Privileges
Privilege: ALTER DELETE INDEX INSERT REFERENCES SELECT TRIGGER UPDATE GRANT ALL TABLE PRIVILEGES Allows these SQL statements on a Table or View: ALTER TABLE 1 DELETE to delete rows CREATE INDEX INSERT 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 CREATE TRIGGER on a table UPDATE any column or specific list of 1 columns Grant all table privileges listed above

Plan Privileges
Privilege: BIND EXECUTE PLAN PRIVILEGES Allows these subcommands on a Plan: Use the BIND, REBIND, and FREE PLAN subcommands RUN, to Execute a named application plan

Package Privileges
Privilege: BIND COPY EXECUTE GRANT ALL PACKAGE PRIVILEGES Allows these functions on a Package: Use the BIND/REBIND and FREE PACKAGE subcommands and DROP PACKAGE stmt Create a copy of a package Include a named package/collection in PKLIST Grant all package privileges listed above

Collection Privileges
Privilege: CREATE IN COLLECTION PRIVILEGES Allows these functions on a Collection: Create a package inside a collection

Database Privileges
Privilege: CREATETAB CREATETS DISPLAYDB DROP IMAGCOPY LOAD RECOVERDB REORG REPAIR STARTDB STATS STOPDB DATABASE PRIVILEGES Allows these functions on a Database: Create tables in the database Create tablespaces in the database Issue the DISPLAY DATABASE command Drop or alter the database Run the COPY, MERGECOPY, MODIFY, and QUIESCE utilities for tablespaces in the database Use LOAD utility for tables in the database Use RECOVER, REBUILD INDEX, and REPORT for objects in database Use REORG utility for objects in database Use REPAIR and DIAGNOSE utilities for objects Issue the START DATABASE command, except for database that contains the registration tables Use RUNSTATS and CHECK utilities for objects 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.

6-12

2002 Computer Associates International

For DB2 UDB for z/OS System Information and OS/390 Security Authorizations 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
Privilege: ARCHIVE BINDADD BINDAGENT BSDS CREATEALIAS CREATEDBA CREATEDBC CREATESG CREATETMTAB DISPLAY SYSTEM PRIVILEGES Allows these functions: Issue the ARCHIVE LOG command Use BIND subcommand with ADD option BIND/REBIND/FREE, or DROP pkg, or COPY a package, on behalf of the grantor Issue the RECOVER BSDS command Create alias for table or view Create database and have DBADM authority Create database and have DBCTRL authority Create a storage group Create a GLOBAL temporary table DISPLAY ARCHIVE, DISPLAY BUFFERPOOL, DISPLAY THREAD, DISPLAY DATABASE, DISPLAY LOCATION, DISPLAY TRACE, DISPLAY LOG commands Receive trace data, except sensitive data Receive all trace data RECOVER INDOUBT to recover threads. STOP DB2 Use the STOSPACE utility START TRACE, STOP TRACE, and MODIFY TRACE commands

MONITOR1 MONITOR2 RECOVER STOPALL STOSPACE TRACE

Schema Privileges
Privilege: CREATE IN ALTERIN SCHEMA PRIVILEGES Allows use of these operations in designated schemas: CREATE distinct types, user-defined functions, triggers and stored procedures ALTER user-defined functions or stored procedures, or COMMENT ON distinct types, user-defined functions, triggers, and stored procedures DROP distinct types, user-defined functions, triggers, and stored procedures

DROPIN

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) A JAVA class for a routine

Routine Privileges
ROUTINE Privilege: EXECUTE ON FUNCTION EXECUTE ON FUNCTION PRIVILEGES Allow use of these Objects: A user-defined function A stored procedure

2002 Computer Associates International

6-13

System Information Page Formats Page Formats


Tablespace Format
Header Page User Data Page2 Space Map Page ... ...

CA Reference Guide

User Data Page1 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 Space Available Portion Segment Entry* Segment Entry*

4 Bits per Page: '0000'=Avail page (not formatted by DM) '0001'=Page is empty (caused by mass delete) '0010'=Page is empty (caused by normal delete) '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 1 Bit per Page: '0' = Page has not been modified '1' = Page has been modified Sync Byte 'N' or 'E'

Page Modified Portion

* 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 Space Map of Low Level Space Map Pages (8bits/page) Bits 0-3 values 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

6-14

2002 Computer Associates International

For DB2 UDB for z/OS and OS/390

System Information Page Formats

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 4 bytes (16-2bit entries) 00 = Page is not allocated 01 = Page is deallocated 10 = Page is allocated 11 = Page is allocated 1 bit per page 0 = Page has not been modified 1 = Page has been modified 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

Page Allocation Entries

Page Modified Indicators Usage Map Entries

LOB Map Page


HEADER-70 bytes LOB Map Entry* HEADER-10 bytes LOB Data Sync Byte N or E * LOB Map Entry (10 bytes) FLAGS 1 * 1 START 4 LENGTH 4 LOB Map Entry*

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

2002 Computer Associates International

6-15

System Information Page Formats

CA Reference Guide

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 Pointer Sync byte ID: 2 bytes Offset

User Data Row Formats


PREFIX
PREFIX: 6 bytes Position Real or Overflow Pointer Row Length Table ID (OBID) ID # pointing to this row

1 or more COLUMN FORMATS

1 2-3 4-5 6

---OR--- If PREFIX is an OVERFLOW Pointer:


For 4-Byte RID: PREFIX: 6 bytes Position Overflow Pointer RID to new row location ID # pointing to this row For 5-Byte RID: PREFIX: 6 bytes 1 2-5 6 Overflow Pointer RID to new row location Position 1 2-6

Column Formats
NULL INDICATOR LENGTH LENGTH LENGTH FIXED LENGTH BYTE STRING NULL INDICATOR VARCHAR or VARGRAPHIC ROWID LOB INDICATOR

NULL INDICATOR if column allows NULL: 1 byte. XFF col is null. X00 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

6-16

2002 Computer Associates International

For DB2 UDB for z/OS and OS/390 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 (IPPPRFX) Page Key (IPPVARP)* Prefixes

System Information Page Formats

*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

2002 Computer Associates International

6-17

System Information DSNZPARM

CA Reference Guide

DSNZPARM Parameter Information

Macro Parameter ABEXP ABIND

Macro Name DSN6SPRM DSN6SPRM

Panel DSNTIPO DSNTIPO

Acceptable Values Description YES, NO EXPLAIN processing YES, NO, COEXIST Invalid plan or pkg automatically rebound 0-65533 ASCII CCSID (graphic) BLK, TRK, CYL Allocation Units ALL, space names Start Names 0-65533 ASCII CCSID (mixed) ASCII, EBCDIC, UNICODE, or ccsid (between 165533) Application Encoding DSNCAT.ARCHLOG1 or DSNCAT.DSN1.ARCLG1 valid dataset name prefix; 1 34 chars. Archive Log 1 Prefix DSNCAT.ARCHLOG2 or DSNCAT.DSN1.ARCLG2 valid dataset name prefix; 1 34 chars. Archive Log 2 Prefix 0 thru 9999 Retention Period Specify from 1 to 14 route codes with values 1 to 16; Defaults 1,3,4 WTOR Route Code NO, YES Write to Operator NO, YES Read COPY2 archives first for subsystem restart 0-65533 ASCII CCSID (single-byte) NO, YES This DB2 can assist a parallelism coordinator NO, YES (Class 1), list of audit classes (1 9), or * Audit Trace YES, NO Use Protection 0 to 4096 in multiples of 256; 1024rotection PLAN authorization cache 0-255; Default is 5 Multiplier indicates how much log to process when LIMIT BACKOUT=YES or AUTO

AGCCSID ALCUNIT ALL/dbname AMCCSID APPENSCH

DSNHDECP DSN6ARVP DSN6SPRM DSNHDECP DSNHDECP

DSNTIPF DSNTIPA DSNTIPS DSNTIPF DSNTIPF

ARCPFX1

DSN6ARVP

DSNTIPH

ARCPFX2

DSN6ARVP

DSNTIPH

ARCRETN ARCWRTC

DSN6ARVP DSN6ARVP

DSNTIPA DSNTIPA

ARCWTOR ARC2FRST

DSN6ARVP DSN6LOGP

DSNTIPA DSNTIPO

ASCCSID ASSIST

DSNHDECP DSN6GRP

DSNTIPF DSNTIPK

AUDITST

DSN6SYSP

DSNTIPN

AUTH AUTHCACH

DSN6SPRM DSN6SPRM

DSNTIPP DSNTIPP

BACKODUR

DSN6SYSP

DSNTIPL

BINDNV

DSN6SPRM

DSNTIPP

BINDADD, BIND Authority to bind new package

6-18

2002 Computer Associates International

For DB2 UDB for z/OS and OS/390


Macro Parameter BLKSIZE Macro Name DSN6ARVP Panel

System Information DSNZPARM


Acceptable Values Description 8192 to 28672 Block size of the archive log dataset

DSNTIPA

BMPTOUT

DSN6SPRM

DSNTIPI

1-254; Default is 4 Number of resource timeout values IMS BMP connection waits for lock release NO, YES Save dynamic prepared SQL 0-2M; Default is 32K Storage allocation for caching package authorizations 0-2M; Default is 32K Storage allocation for caching routine authorizations NO, YES Catalog Data

CACHEDYN

DSN6SPRM

DSNTIP4

CACHEPAC

DSN6SPRN

DSNTIPP

CACHERAC

DSN6SPRM

DSNTIPP

CATALOG CATALOG

DSN6ARVP DSN6SPRM

DSNTIPA

DSNTIPA2 DSNCAT or an ICF User Catalog name of 1 8 characters Catalog Alias DSNTIP4 1, ANY Default value for CURRENT DEGREE special register 20016 000 000 (LOG RECORDS), OR 160 (MINUTES); default is 50 000. Checkpoint frequency 1, 2, 3 DPROP support ACTIVE, INACTIVE DDF threads NO, YES Compact Data 0 -150000, 64 Max remote connected NO, YES Contract threads working storage area NO, YES Coordinate parallel processing Acceptable values are 1 to 2000; Default is 70 Max Users ISO, USA, EUR, JIS, LOCAL Date format 0, 10254 Local date length NO, YES DBADM create auth DRDA, PRIVATE Default protocol NO, AUTO, COMMAND DB2 startup option 0 1439 (min.), 0 59 (sec.); or NOLIMIT ; Default is 0 Dealloc period DEC15, DEC31, 15, 31 Decimal arithmetic

CDSSRDEF

DSN6SPRN

CHKFREQ

DSN6SYSP

DSNTIPL

CHGDC CMTSTAT COMPACT CONDBAT CONTSTOR

DSN6SPRM DSN6FAC DSN6ARVP DSN6SYSP DSN6SPRM

DSNTIPO DSNTIPR DSNTIPA DSNTIPE DSNTIPE

COORDNTR

DSN6GRP

DSNTIPK

CTHREAD

DSN6SYSP

DSNTIPE

DATE DATELEN DBACRVW DBPROTCL DDF DEALLCT

DSNHDECP DSNHDECP DSN6PRM DSN6SYSP DSN6FAC DSN6LOGP

DSNTIP4 DSNTIP4 DSNTIPP DSNTIP5 DSNTIPR DSNTIPA

DECARTH

DSNHDECP

DSNTIPF

2002 Computer Associates International

6-19

System Information DSNZPARM


Macro Parameter DECDIV3 DECIMAL DEFLANG Macro Name DSN6SPRM DSNHDECP DSNHDECP Panel DSNTIPF DSNTIPF DSNTIPF

CA Reference Guide

Acceptable Values Description NO, YES Min divide scale .(period) or ,(comma) Decimal point is ASM, C, CPP, COBOL, COB2, IBMCOB, FORTRAN, PL1 Language default IBMUSER or the auth. ID if RACF not available Unknown AUTHID DEFAULT, (quotation mark), (apostrophe) String delimiter

DEFLTID

DSN6SPRM

DSNTIPP

DELIM

DSNHDECP

DSNTIPF

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 DSNTIPI 1-254; Default is 6 Number of resource timeout values DL/1 batch connection waits for lock release NO, YES, or blank for update Data Sharing

DLITOUT

DSN6SPRM

DSHARE DSMAX DSSTIME

DSN6GRP DSN6SPRM DSN6SYSP

DSNTIPA1

DSNTIPC 1- 32767 Max available open datasets 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 DSNTIPF YES or NO Use for DYNAMICRULES DSNTIP4 YES or NO Large EDM better fit DSNTIPC 0-2097152; default is 1048576 EDMPOOL data space max DSNTIPC 1-2097152 Size in kilobytes of the data space for the environment description manager pool DSNTIPC 1k 2097152K Environmental Descriptor Manager DSNTIPO 1, 2, 3 DPROP support DSNTIPF EBCDIC, ASCII, UNICODE Default encoding scheme DSNTIP4 NO, YES Evaluate uncommitted DSNTIP5 0-100; Default is 100 Upper limit of extra DRDA query blocks from remote server DSNTIP5 0-100; Default is 100 Upper limit of DRDA query blocks to a DRDA client.

DYNRULES EDMBFIT EDMDSMAX EDMDSPAC

DSNHDECP DSN6SPRM DSN6SPRM DSN6SPRM

EDMPOOL

DSN6SPRM

EDPROP ENSCHEME EVALUNC EXTRAREQ

DSN6SPRM DSNHDECP DSN6SPRM DSN6SYSP

EXTRASRV

DSN6SYSP

6-20

2002 Computer Associates International

For DB2 UDB for z/OS and OS/390


Macro Parameter EXTSEC GCCSID GRPNAME HOPAUTH Macro Name DSN6SYSP DSNHDECP DSN6GRP DSN6SPRM Panel

System Information DSNZPARM


Acceptable Values Description

DSNTIPR NO, YES Controls security options DSNTIPF 065533 EBCDIC CCSID (graphic) DSNTIPK 1-8 characters; DSNCAT DB2 group name DSNTIP5 BOTH, RUNNER Package owner from non-DB2 server DSNTIPE Acceptable values are 1 to 2000; Default is 20 Max batch connect DSNTIPE Acceptable values are 1 to 2000; Default is 40 DSNTIPR 0 to 9,999 idle thread timeout DSNTIP1 Any 4K BP name; Default is BP0 Default BP for user indexes DSNTIP4 YES, NO, PH1 Immediate write DSNTIPI YES, NO Auto start of IRLM Update with job DSNTIJUZ

IDBACK

DSN6SYSP

IDFORE IDTHTOIN IDXBPOOL

DSN6SYSP DSN6FAC DSN6SYSP

IMMEDWRI IRLMAUT

DSN6GRP DSN6SPRM

IRLMPRC

DSN6SPRM

DSNTIPI

IRLMPROC or the name of the IRLM proc that MVS invokes if RLM Auto Start = YES Proc name Acceptable values are 1 to 3600; Default is 60109 Resource timeout IRLM or name of IRLM subsystem Subsystem name Acceptable values are 1 to 3600; Default is 300 Time to Autostart

IRLMRWT

DSN6SPRM

DSNTIPI

IRLMSID

DSN6SPRM

DSNTIPI

IRLMSWT

DSN6SPRM

DSNTIPI

LBACKOUT

DSN6SYSP

DSNTIPL AUTO, YES, NO Backward log processing postponed DSNTIPF A valid locale of 0-50 characters; default is blank LOCALE LC_TYPE DSNTIP7 0-50; Default is 20 Max number of LE tokens active at one time DSNTIP7 1-2097152; Default is 2048 Upper limit of storage for LOB values per user DSNTIP7 1-51200; Default is 2048 Upper limit of storage for LOB values per system DSNTIPL 0-100M; Default is 0M Maximum ssnmDBM1 storage for fast log apply. DSNTIPA Acceptable values are 10 to 1000; Default is 1000 Recording max in the BSDS DSNTIPE 0 to 1999; Default is 64 Max remote DSNTIPE 0-65535; Default is 5000

LC_CTYPE

DSNHDECP

LEMAX

DSN6SPRM

LOBVALA

DSN6SYSP

LOBVALS

DSN6SYSP

LOGAPSTG

DSN6SYSP

MAXARCH

DSN6LOGP

MAXDBAT MAXKEEPD

DSN6SYSP DSN6SPRM

2002 Computer Associates International

6-21

System Information DSNZPARM


Macro Parameter Macro Name Panel

CA Reference Guide

Acceptable Values Description Total number of prepared SQL statements to save past commit.

MAXRBLK

DSN6SPRM

DSNTIPC 0, 16K-1000000K; Default is 4MB RID pool size DSNTIPA 1-99; Default is 2 Read tape units DSNTIPR 0-MAX REMOTE CONNECTED Number of Type 1 inactive threads allowed DSNTIPF 065533 EBCDIC CCSID (mixed) DSNTIPK 1 to 8 characters; DSN1 DB2 member name DSNTIPE YES, NO Manage thread storage DSNTIPF YES, NO Mixed data DSNTIPN NO, YES (Class1), list of classes (1 8), or * Monitor trace DSNTIPN 8K to 1M Monitor size DSNTIPJ Acceptable values are 0 to 50000; Default is 1000 Lock per table or tablespace DSNTIPJ Acceptable values are 0 to 100000; Default is 10000 Locks per user DSNTIP4 NO, YES Allows info to be passed to optimizer that may influence access path selection. DSNTIPL Acceptable values are 40K to 400000K; Default is 4000K Output buffer DSNTIP4 0254 Maximum degree of parallelism DSNTIP4 YES, NO, or SAME UPDATE partitioning key columns DSNTIPL 1-32767 Default is 5 Number of consecutive DB2 checkpoints since a dataset or partition was last updated DSNTIPL 1-32767 Default is 10 Default is Amt of elapsed time in 40 minutes since a dataset or partition was last updated DSNTIP5 0-9999; Default is 120 Time (in seconds) a data base access thread (DBAT) remains idle in pool before terminated. DSNTIPA blank clist calculates using blksize and log size 1 9999999 units Primary allocation DSNTIPP NO, YES Archive log RACF

MAXRTU MAXTYPE1

DSN6LOGP DSN6FAC

MCCSID MEMBNAME MINSTOR MIXED MON

DSNHDECP DSN6GRP DSN6SPRM DSNHDECP DSN6SYSP

MONSIZE NUMLKTS

DSN6SYSP DSN6SPRM

NUMLKUS

DSN6SPRM

OPTHINTS

DSN6SPRM

OUTBUFF

DSN6LOGP

PARAMDEG

DSN6SPRM

PARTKEYU

DSN6SPRM

PCLOSEN

DSN6SYSP

PCLOSET

DSN6SYSP

POOLINAC

DSN6FAC

PRIQTY

DSN6ARVP

PROTECT

DSN6ARVP

6-22

2002 Computer Associates International

For DB2 UDB for z/OS and OS/390


Macro Parameter PTASKROL Macro Name DSN6SYSP Panel --

System Information DSNZPARM


Acceptable Values Description 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 DSNTIPO YES, NO Recall database DSNTIPO Acceptable values are 0 to 32767; Default is 120 Recall delay DSNTIP4 YES, NO At commit release data page or row lock for cursor WITH HOLD. DSNTIPS RESTART, DEFER Restart or defer processing objects DSNTIPR 1, 2 99 Resync interval DSNTIPI 0-254; Default is 0 Data sharing only. How long trans. waits for an incompatible retained lock.

RECALL RECALLD

DSN6SPRM DSN6SPRM

RELCURHL

DSN6SPRM

RESTART/ DEFER RESYNC RETLWAIT

DSN6SPRM

DSN6FAC DSN6SPRM

RETVLCFK

DSN6SPRM

DSNTIP4 NO, YES VARCHAR retrieved from index DSNTIPZ Acceptable values are 1 to 8 chars. Default DSNRGCOL Owner of registration tables DSNTIPZ Acceptable values are 1 to 8 chars. Default DSNRGFDB Name of dbase that contains registration tables DSNTIPZ NO, YES DB2 subsystem controlled by a closed application thru registration DSNTIPZ ACCEPT,REJECT,APPL Action for unregistered DDL DSNTIPZ Any non-alphanumeric char ART/ORT escape character DSNTIPZ YES, NO Registered objects require fully qualified names DSNTIPZ NO, YES Install data definition control support DSNTIPZ DSN_REGISTER_OBJT Acceptable values 1 17 char Name of the Object Registration Table DSNTIPZ DSN_REGISTER_APPL Acceptable values 1 17 char Name of the Appl. Registration Table DSNTIPO NO, YES RLF auto start DSNTIPP SYSIBM or the auth ID used if RLF is automatically started Resource AUTHID DSNTIPO NOLIMIT, NORUN, values 1 5000000 RLST Access error

RGFCOLID

DSN6SPRM

RGFDBNAM

DSN6SPRM

RGFDEDPL

DSN6SPRM

RGFDEFLT RGFESCP RGFFULLQ

DSN6SPRM DSN6SPRM DSN6SPRM

RGFINSTL

DSN6SPRM

RGFNMORT

DSN6SPRM

RGFNMPRT

DSN6SPRM

RLF RLFAUTH

DSN6SYSP DSN6SYSP

RLFERR

DSN6SYSP

2002 Computer Associates International

6-23

System Information DSNZPARM


Macro Parameter RLFERRD Macro Name DSN6FAC Panel

CA Reference Guide

Acceptable Values Description

DSNTIPR NOLIMIT, NORUN, values 1 5000000 RLST Access error DSNTIPO 01 or any 2 alpha numeric chars. Not nat'l characters RLST Name suffix DSNTIPI 1 or 1 to 14 route codes with values from 1 to 16 WTO Route codes NO, YES use page level U (UPDATE) locks when using Repeatable Read isolation

RLFTBL

DSN6SYSP

ROUTCDE

DSN6SYSP

RRULOCK

DSN6SPRM

DSNTIPI

SCCID SECQTY

DSNHDECP DSN6ARVP

DSNTIPF 0-65533 EBCDIC CCSID (single-byte) DSNTIPA blank clist calculates using blksize and log size 1 9999999 units Secondary space allocation DSNTIPE BYPASS,SEQ Use 3990 - 3 seq cache

SEQCACH SEQPRES

DSN6SPRM DSN6SPRM

DSNTIPE NO, YES For utilities scanning non partition indexes followed by update to keep data in 3990 cache longer when reading data. DSNTIPO LOCALSITE or RECOVERYSITE Location of current system DSNTIPN 1 or NO, YES (Class 1), list of classes (1 5, 7, 8), or * SMF Accounting DSNTIPN YES (Classes 1, 3, 4), NO, list of classes (1 5) or * SMF Statistics DSNTIPC 240K-64000K;Default is 1MB Sort pool size DSNTIPF DEFAULT, (quotation mark), (apostrophe) SQL string delimiter DSNTIPM 1-4 characters. First must be A-Z, #, $, or @. Others must be A-Z, 1-9, #, $, or @. Subsystem name DSNTIPO SPACE, NONE, ALL, ACCESSPATH Statistics history DSNTIPN Acceptable values are 1 to 1440 min; Default is 30 Statistics time DSNTIPO YES, NO Statistics rollup DSNTIP4 YES, NO Standard SQL language DSNTIPX 0-225 Default is 0 Maximum abend count DSNTIPX 1-8 characters; Default is ssnSPAS MVS procedure name DSNTIPX 5 - 1800; Default is 180 Timeout value DSNTIPM YES, NO Suppress soft errors

SITETYP

DSN6SPRM

SMFACCT

DSN6SYSP

SMFSTAT

DSN6SYSP

SRTPOOL SQLDELI

DSN6SPRM DSNHDECP

SSID

DSNHDECP

STATHIST

DSN6SPRM

STATIME

DSN6SYSP

STATROLL STDSQL STORMXAB STORPROC

DSN6SPRM DSNHDECP DSN6SYSP DSN6SYSP

STORTIME SUPERRS

DSN6SYSP DSN6SPRM

6-24

2002 Computer Associates International

For DB2 UDB for z/OS and OS/390


Macro Parameter SYNCVAL SYSADM Macro Name DSN6SYSP DSN6SPRM Panel

System Information DSNZPARM


Acceptable Values Description

DSNTIPN NO, 0-59 Statistics sync DSNTIPP SYSADM or the 1st of 2 AUTHIDs with installation SYSADM authority System admin 1 DSNTIPP SYSADM or the 2nd of 2 AUTHIDs with installation SYSADM authority Blank = SYSADM1ID System admin 2 DSNTIPP SYSOPR or the 1st of 2 AUTHIDs with installation SYSOPR authority System operator 1 DSNTIPP SYSOPR or the 2nd of 2 AUTHIDs with installation SYSOPR authority Blank = SYSOPR1 ID System operator 1 DSNTIP1 Any 4K Buffer pool name Default is BP0 Default Buffer pool for user data DSNTIP5 NO, YES User ID only TCP/IP connections are accepted DSNTIP5 ENABLE, DISABLE, or 165534; Default is ENABLE Overrides inappropriate TCP/IP KeepAlive value DSNTIP4 ISO, USA, EUR, JIS, LOCAL Time format DSNTIP4 0, 8-254 Local time length DSNTIPN NO, YES (Classes 1 3), list of global classes (1 9), or * Trace auto start DSNTIPN Acceptable values are 4K to 396K; Default is 64K Trace size DSNTIPO NO, YES Indicates remote tracker site in case of disaster. DSNTIPH NO, YES, EXT Timestamp archives DSNTIPH 2 or 1 Number of copies DSNTIPH 2 or 1 Number of copies none YES, NO Number of BSDS

SYSADM2

DSN6SPRM

SYSOPR1

DSN6SPRM

SYSOPR2

DSN6SPRM

TBSBPOOL

DSN6SYSP

TCPALVER

DSN6FAC

TCPKPALV

DSN6FAC

TIME TIMELEN TRACSTR

DSN6SYSP DSNHDECP DSN6SYSP

TRACTBL

DSN6SYSP

TRKRSITE

DSN6SPRM

TSTAMP TWOACTV TWOARCH TWOBSDS UGCCSID

DSN6ARVP DSN6LOGP DSN6LOGP DSN6LOGP DSNHDECP

DSNTIPF 1208 UNICODE CCSID (1200 for graphic) DSNTIPF 1208 UNICODE CCSID (1208 for mixed) DSNTIPA TAPE or any device type or unit name Device type

UMCCSID

DSNHDECP

UNIT

DSN6ARVP

2002 Computer Associates International

6-25

System Information DSNZPARM


Macro Parameter UNIT2 URCHKTH Macro Name DSN6ARVP DSN6SYSP Panel

CA Reference Guide

Acceptable Values Description

DSNTIPA Device type or unit name Device type 2 DSNTIPL 0-255; Default is 0 Number of checkpoint cycles before warning of uncommitted unit of recovery. DSNTIPL 0-1000K UR log write check DSNTIPF 1208 UNICODE CCSID (367 for single-byte) DSNTIPI 1 254; Default is 6 Utility timeout

URLGWTH USCCSID

DSN6SYSP DSNHDECP

UTIMOUT WLMENV

DSN6SPRM DSN6SYSP

DSNTIPX Any valid name, 1-18 char Default WLM_ENVIRONMENT for user-defined function and stored procedure during CREATE DSNTIPI NO, YES Locking method for searched UPDATE or DELETE

XLKUPDLT

DSN6SPRM

6-26

2002 Computer Associates International

For DB2 UDB for z/OS and OS/390

System Information Lock Modes

Lock Modes
Read-Only Select
Lock Mode Locksize ISOLA TION Access Method 1 TS10 Table2 Data Page/Row 3

TS

TABLE2

CS/ RR/ RS CS/ RR/ RS CS/ RS

Any

NA

NA

Any Index, any use

IS IS4,11 IS4,11 IS4 IS4/S IS2/S

S IS4 IS4 IS4 IS4/S NA S/ NA

NA S5 S5

PAGE/ ROW/ ANY

Table space scan

Index/data probe PAGE/ ROW/ ANY Index scan6 RR Table space scan6

S S/NA

NA

INSERT ... VALUES(...) or INSERT ... subselect7


Lock Mode Locksize ISOLA TION Access Method 1 TS10 Table2 Data Page/ Row 3

TS TABLE2 PAGE/ ROW/ ANY

CS/ RR/ RS CS/ RR/ RS CS/ RR/ RS

Any Any Any

X IX IX

NA X IX

NA NA X

UPDATE or DELETE, without cursor


Lock Mode Locksize ISOLA TION Access Method 1 TS10 Table2 Data Page/Row 3

TS TABLE2

CS/ RR/ RS CS/ RR/ RS CS

Any Any Index Selection Index/data Selection Table space scan

X IX

NA X

NA NA Del:X Upd:U X U X U X Del: S X / X Upd: S/U9 X S/U9 X S/U9 X Del: S X/X Upd: S/U9 X/X S/U9X NA

PAGE/ ROW/ ANY

IX IX IX IX

IX IX IX IX

RS PAGE/ ROW/ ANY

Index selection Index/data selection Table space scan

IX IX

IX IX

RR PAGE/ ROW/ ANY

Index selection Index/data selection Table space scan

IX IX IX2/X

IX IX X/NA

2002 Computer Associates International

6-27

System Information Lock Modes


Select with FOR UPDATE OF
Locksize ISOLA TION Access Method 1 TS10

CA Reference Guide

Lock Mode Table2 Data Page/Row 3

TS TABLE2

CS/ RR/ RS CS/ RR/ RS

Any

NA

NA

Any

IS/IX

NA

PAGE/ ROW/ ANY PAGE/ ROW/ ANY RS CS

Index, any use Table space scan Index, any use Table space scan Index/data probe Index scan 6

IX IX IX IX IX IX/X

IX IX IX IX IX IX/X /NA

U U S/U/X9 S/U/X9

PAGE/ ROW/ ANY RR

S/U/X9 S/U/X9 /NA S/U/X9 /NA

Table space scan6

IX2/X X/NA

UPDATE or DELETE with cursor


ISOLA Locksize TION Access Method 1 TS10 Lock Mode Table2 Data Page/Row 3

TS TABLE2 PAGE/ ROW/ ANY 1)

Any Any CS/ RS/ RR

Any Any Index, updated Index not updated

X IX IX IX

NA X IX IX

NA NA X X

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.

6-28

2002 Computer Associates International

For DB2 UDB for z/OS and OS/390

System Information Lock Modes

IFCIDs - Performance Trace Records


Class 1: Background Events
IFCID 0001 0002 0031 0042 0043 0076 0077 0078 0079 0102 0103 0105 0106 0107 0153 Event System services statistics Database services statistics EDM pool full Begin checkpoint End checkpoint Begin EOM (End of Memory Request) End EOM Begin EOT (End of Task Request) End EOT On for short on storage Off for short on storage Buffer manager mapping of DBIDs and OBIDs System parameters in effect at trace invocation Data set OPEN/CLOSE information User defined exception condition trace

Class 2: Subsystem-Related Events


IFCID 0003 0068 0069 0070 0071 0072 0073 0074 0075 0080 0081 0082 0083 0084 0085 0086 0087 0088 0089 0106 0174 0175 Event Accounting Begin ABORT End ABORT Begin COMMIT phase 2 End COMMIT phase 2 Begin CREATE THREAD End CREATE THREAD Begin TERMINATE THREAD End TERMINATE THREAD Begin establish exit End establish exit Begin identify request End identify request Begin prepare to COMMIT (IMS/CICS) End prepare to COMMIT (IMS/CICS) Begin signon (IMS/CICS) End signon (IMS/CICS/DDF) Begin sync End sync Systems parameters in effect at trace invocation Begin archive log mode(QUIESE) command processing End archive log mode(QUIESE) command processing

Class 3: SQL-Related Events


IFCID 0022 0053 0055 0058 0059 0060 0061 0062 0063 0064 0065 0066 0092 0095 0096 0097 0106 0112 0177 0233 0237 0261 0262 Event Mini plans generated End Describe, COMMIT, RLBK, or ERROR Issuance of SET CURRENT SQLID End SQL statement Begin FETCH SQL Begin SELECT SQL Begin INSERT, UPDATE, OR DELETE Begin DDL Identify SQL statement to be parsed Begin SQL PREPARE Begin OPEN CURSOR Begin CLOSE CURSOR Access method services command start Sort started Sort ended Access method services command end System parameters in effect at trace invocation Plan attributes for successful allied thread allocation Successful package allocation Start or end of a call to a stored procedure at a DB2 server Written when SET CURRENT DEGREE statements are executed Information about group bufferpool checkpoints Information about castout threshold processing for group buffer

2002 Computer Associates International

6-29

System Information Lock Modes


0313 0324 0329 0330

CA Reference Guide

pools Records console message about long-running Urs Records function resolution information Records asynchronous wait times for IXLCACHE and IXLFCOMP requests Records active log shortage condition

Class 4: Buffer Manager I/O and EDM Pool Requests


IFCID 0006 0007 0008 0009 0010 0029 0030 0105 0106 0107 0127 0128 0226 0227 Event Begin read I/O End read I/O Begin synchronous write I/O End synchronous or asynchronous write I/O Begin asynchronous write I/O Start EDM I/O request End EDM I/O request Buffer manager mapping of DBIDs and OBIDs System parameters in effect at trace invocation Buffer manager OPEN/CLOSE activity Begin waiting for asynchronous I/O End waiting for asynchronous I/O Records the beginning of an agent suspend to wait for a page latch that is currently held under another agent Records the end of an agent suspend to wait for a page latch

Class 5: Log Manager


IFCID 0032 0033 0034 0035 0036 0037 0038 0039 0040 0041 0104 0106 0114 0115 0116 0117 0118 0119 0120 0228 0229 Event Begin log manager wait End log manager wait Begin read I/O End read I/O Begin non I/O wait End non I/O wait Begin write I/O End write I/O Begin archive write End archive write Log manager data set mapping System parameters in effect at trace invocation Begin read I/O archive End read I/O archive DASD End read I/O archive tape Begin log wait archive End log wait archive Begin BSDS write I/O End BSDS write I/O Beginning of time spent in the tape unit deallocation process End of the tape unit deallocation service task whose start is recorded in IFCID 0228

Class 6: Summary Lock Information


IFCID 0020 0044 0045 0105 0106 0107 0172 0196 0213 0214 0218 0225 Event Page lock and table space lock summary Lock suspend Lock resume Buffer manager mapping of DBIDs and OBIDs Systems parameter in effect at trace invocation Buffer manager OPEN/CLOSE activity Capture all resources and their lock states when deadlock occurs Lock request resulted in timeout of its DB2 task because one or more other tasks were holding incompatible locks on requested resource The beginning of a wait for a drain lock The end of a wait for a drain lock Information used to determine whether lock avoidance techniques can be used Records summary information about storage usage in the DBM1 address space

6-30

2002 Computer Associates International

For DB2 UDB for z/OS and OS/390

System Information Lock Modes

Class 7: Detailed Lock Information


IFCID 0021 0105 0106 0107 0223 0312 0319 Event Every lock acquired, changed, or released on return from IRLM Buffer manager mapping of DBIDs and OBIDs Systems parameter in effect at trace invocation Buffer manager OPEN/CLOSE activity Detailed information about each successful use of lock avoidance Provide an audit trail for DCE security processing Provides and audit trail for security processing

Class 8: Data Manager Detail


IFCID 0013 0014 0015 0016 0017 0018 0105 0106 0107 0125 0199 0219 0220 0221 0222 0231 0305 0311 0325 Event Begin hash scan End hash scan Input to matching/nonmatching index scan Input to the first insert Begin sequential scan End sequential scan, tablespace scans Buffer manager mapping of DBIDs and OBIDs Systems parameter in effect at trace invocation Buffer manager OPEN/CLOSE activity RID list processing usage Records data set information provided in DISPLAY BUFFERPOOL LSTATS command Records information about LISTDEF data sets Records information about BSAM data sets for utilities Degree of parallel I/O processing for a parallel group The elapsed time of a parallel group Parallel cp operations are used and a parallel group completes Information related to defining, removing, and enforcing a table check constraint Information about operations on temporary tables Records the start and end of trigger activation

Class 9: Sort Detail


IFCID 0026 0027 0028 0095 0096 0106 Event Work file obtained No. of ordered records in sort run Detailed sort information Begin SORT End SORT Systems parameter in effect at trace invocation

Class 10: Bind, Commands, and Utilities


IFCID 0023 0024 0025 0090 0091 0105 0106 0107 0108 0109 0110 0111 0201 0217 0219 0220 0256 Event Utility start Utility phase change Utility end DB2 command text DB2 command completion Buffer manager mapping of DBIDs and OBIDs Systems parameter in effect at trace invocation Buffer manager OPEN/CLOSE activity Begin BIND/REBIND End BIND/REBIND Begin FREE End FREE Status of a buffer pool before and after an alter bufferpool Records detailed information about storage usage in the DBM1 address space Records information about LISTDEF data sets Records information about BSAM data sets for utilities Attributes of group buffer pool before and after alter group bufferpool command. Written only in a data sharing environment.

Class 11: Dispatching


IFCID Event

2002 Computer Associates International

6-31

System Information Lock Modes


0046 0047 0048 0049 0050 0051 0052 0056 0057 0093 0094 0106 0113

CA Reference Guide

Begin execution unit switch. Serviceability only info. Begin new SRB. Serviceability only info. End new SRB. Serviceability only info. Begin new TCB. Serviceability only info. End new TCB. Serviceability only info. Shared latch resume. Serviceability only info. Shared latch wait. Serviceability only info. Exclusive latch wait. Serviceability only info. Exclusive latch resume. Serviceability only info. Suspend called. Serviceability only info. Event resumed. Serviceability only info. Systems parameter in effect at trace invocation. Plan attributes for successful system agent allocation.

Class 12: Storage Manager


IFCID 0098 0099 0100 0101 0106 Event Begin GETMAIN/FREEMAIN (nonpool) End GETMAIN/FREEMAIN (nonpool) Begin GETMAIN/FREEMAIN (pool related) Begin GETMAIN/FREEMAIN (pool related) Systems parameter in effect at trace invocation

Class 13: Edit and Validation Exits


IFCID 0011 0012 0019 0105 0106 0107 Event Validation exit. Edit exit. Encode. Edit exit. Decode. Buffer manager mapping of DBIDs and OBIDs. Systems parameter in effect at trace invocation. Buffer manager OPEN/CLOSE activity.

Class 14: In and Out of DB2


IFCID 0067 0106 0121 0122 Event Accounting beginning Systems parameter in effect at trace invocation Entering DB2 from an application 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 0157 0158 0159 0160 0161 0162 0163 0167 0183 Event Type of request being processed. Type of request received at the serving location. Information about create conversation and wait requests at the requesting location. Requesting agent data measured at interface between DB2 and vtam. Serving agent data measured at the interface between DB2 and vtam. Information about actions taken by the requesting location in support of distributed processing. Info about the creation and termination of database access threads. Information about conversation requests that are queued. Type of request being processed at the requester.

Class 17: Claim and Drain Detail


IFCID 0211 0212 0213 0214 Event Info on making or releasing a claim, or changing a claim duration Information about draining and releasing a drain Beginning of a wait for a drain lock End of a wait for a drain lock

6-32

2002 Computer Associates International

For DB2 UDB for z/OS and OS/390


0215 0216

System Information Lock Modes

Beginning of a wait for the number of claims to go to zero 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

2002 Computer Associates International

6-33

System Information Lock Modes

CA Reference Guide

6-34

2002 Computer Associates International

For DB2 UDB for z/OS and OS/390

QMF Information QMF Commands

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]}

2002 Computer Associates International

8-1

QMF Information QMF Commands

CA Reference Guide

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]}}

8-2

2002 Computer Associates International

For DB2 UDB for z/OS and OS/390

QMF Information QMF Commands

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]}}

2002 Computer Associates International

8-3

QMF Information QMF Commands


In CICS:

CA Reference Guide

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]}}

8-4

2002 Computer Associates International

For DB2 UDB for z/OS and OS/390 Print CHART

QMF Information QMF Commands

{{(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]}}

2002 Computer Associates International

8-5

QMF Information QMF Commands


SAve DATA As tablename

CA Reference Guide

{{(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

8-6

2002 Computer Associates International

For DB2 UDB for z/OS and OS/390

QMF Information QMF Edit Codes

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 GW graphic data 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

2002 Computer Associates International

8-7

QMF Information QMF Edit Codes


For Time Data:
Code: TTSx TTCx TTAx TTAN TTUx TT TTL Format: HHxMMxSS HHxMMxSS HHxMM HHMM HHxMM AM HHxMM PM locally defined

CA Reference Guide

Notes: 24 hour clock, with secs 12 hour clock, with secs No seconds No secs or delimiter USA format Default format See your info center

For Timestamp Data:


TSI yyyy-mm-hh.mm.ss.nnnnnn

User-Defined Edit Codes for Character and Numeric Data:


Uxxxx Vxxxx data in internal database representation character string passed to edit program; numeric data will be converted to character string

Decimal Notation Example:


M I N U S C O M M A D O L L A R P E R C E N T

EDIT CODE

Z E R O

DISPLAY OF -1234567.885

D2 DC2 I2 J2 K2 L2 P2

* *

* * * * * *

* *

* *

* * *

-$1,234,567.89 -DM1,234,567.89 -00001234567.89 000001234567.89 -1,234,567.89 -1234567.89 -1,234,567.89%

8-8

2002 Computer Associates International

For DB2 UDB for z/OS and OS/390

QMF Information QMF Usage Codes

QMF Usage Codes


ACROSS BREAKn BREAKnX GROUP OMIT

Aggregation Usage Codes:


AVERAGE * COUNT FIRST LAST MAXIMUM MINIMUM STDEV * SUM * CALCid CSUM * PCT * CPCT * TPCT * TCPCT *

* = 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

2002 Computer Associates International

8-9

QMF Information QMF QBE Keywords QMF QBE Keywords


ALL. AND AO. , AO(n). AVG. BETWEEN x and y COUNT. D. DO. . DO(n). G. I. IN (x,y,z) LIKE MAX. MIN. NOT NULL

CA Reference Guide

OR P. SUM. U. UNQ. USER

For linking, grouping, or joining of tables use: _column-new-name.

8-10

2002 Computer Associates International

For DB2 UDB for z/OS and OS/390

Index

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
2002 Computer Associates International I-1

Index
CMs to Det

CA Reference Guide

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, 119 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
I-2 2002 Computer Associates International

For DB2 UDB for z/OS and OS/390

Index

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
2002 Computer Associates International I-3

Index

CA Reference Guide

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
I-4 2002 Computer Associates International

For DB2 UDB for z/OS and OS/390

Index

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
2002 Computer Associates International I-5

Index

CA Reference Guide

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, 312 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
I-6 2002 Computer Associates International

For DB2 UDB for z/OS and OS/390

Index

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
2002 Computer Associates International I-7

Index

CA Reference Guide

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

I-8

2002 Computer Associates International

You might also like