ZOS DB2 Command Reference For
ZOS DB2 Command Reference For
1 for z/OS
Command Reference
SC18-9844-04
DB2 Version 9.1 for z/OS
Command Reference
SC18-9844-04
Note
Before using this information and the product it supports, be sure to read the general information under “Notices” at the
end of this information.
iv Command Reference
Chapter 42. DSNC STOP (CICS attachment facility) . . . . . . . . . . . . . . . . 271
Contents v
Chapter 69. SPUFI (DSN) . . . . . . . . . . . . . . . . . . . . . . . . . . . 381
vi Command Reference
Part 4. Appendixes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 493
Information resources for DB2 for z/OS and related products . . . . . . . . . . . 501
Notices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 515
Programming Interface Information . . . . . . . . . . . . . . . . . . . . . . . . . . . 516
Product-sensitive Programming Interface and Associated Guidance Information . . . . . . . . . . . 517
Trademarks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 517
Glossary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 519
Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 563
Contents vii
viii Command Reference
About this information
This information describes numerous commands that system administrators,
database administrators, and application programmers use. The commands are in
alphabetical order for quick retrieval.
This information assumes that your DB2® subsystem is running in Version 9.1
new-function mode. Generally, new functions that are described, including changes
to existing functions, statements, and limits, are available only in new-function
mode. Two exceptions to this general statement are new and changed utilities and
optimization enhancements, which are also available in conversion mode unless
stated otherwise.
The DB2 Utilities Suite is designed to work with the DFSORT™ program, which
you are licensed to use in support of the DB2 utilities even if you do not otherwise
license DFSORT for general use. If your primary sort product is not DFSORT,
consider the following informational APARs mandatory reading:
v II14047/II14213: USE OF DFSORT BY DB2 UTILITIES
v II13495: HOW DFSORT TAKES ADVANTAGE OF 64-BIT REAL
ARCHITECTURE
These informational APARs are periodically updated.
Related information
DB2 utilities packaging (Utility Guide)
When referring to a DB2 product other than DB2 for z/OS, this information uses
the product’s full name to avoid ambiguity.
Accessibility features
The following list includes the major accessibility features in z/OS products,
including DB2 Version 9.1 for z/OS. These features support:
v Keyboard-only operation.
v Interfaces that are commonly used by screen readers and screen magnifiers.
v Customization of display attributes such as color, contrast, and font size
Keyboard navigation
You can access DB2 Version 9.1 for z/OS ISPF panel functions by using a keyboard
or keyboard shortcut keys.
For information about navigating the DB2 Version 9.1 for z/OS ISPF panels using
TSO/E or ISPF, refer to the z/OS TSO/E Primer, the z/OS TSO/E User’s Guide, and
the z/OS ISPF User’s Guide. These guides describe how to navigate each interface,
including the use of keyboard shortcuts or function keys (PF keys). Each guide
includes the default settings for the PF keys and explains how to modify their
functions.
Online documentation for DB2 Version 9.1 for z/OS is available in the Information
Management Software for z/OS Solutions Information Center, which is available at
x Command Reference
the following Web site: http://publib.boulder.ibm.com/infocenter/dzichelp
http://www.ibm.com/support/docview.wss?&uid=swg27011656
This Web site has an online reader comment form that you can use to send
comments.
v You can also send comments by using the feedback link at the footer of each
page in the Information Management Software for z/OS Solutions Information
Center at http://publib.boulder.ibm.com/infocenter/db2zhelp.
Apply the following rules when reading the syntax diagrams that are used in DB2
for z/OS documentation:
v Read the syntax diagrams from left to right, from top to bottom, following the
path of the line.
The ─── symbol indicates the beginning of a statement.
The ─── symbol indicates that the statement syntax is continued on the next
line.
The ─── symbol indicates that a statement is continued from the previous line.
The ─── symbol indicates the end of a statement.
v Required items appear on the horizontal line (the main path).
required_item
required_item
optional_item
If an optional item appears above the main path, that item has no effect on the
execution of the statement and is used only for readability.
v If you can choose from two or more items, they appear vertically, in a stack.
If you must choose one of the items, one item of the stack appears on the main
path.
required_item required_choice1
required_choice2
If choosing one of the items is optional, the entire stack appears below the main
path.
required_item
optional_choice1
optional_choice2
If one of the items is the default, it appears above the main path and the
remaining choices are shown below.
default_choice
required_item
optional_choice
optional_choice
v An arrow returning to the left, above the main line, indicates an item that can be
repeated.
required_item repeatable_item
If the repeat arrow contains a comma, you must separate repeated items with a
comma.
required_item repeatable_item
A repeat arrow above a stack indicates that you can repeat the items in the
stack.
| v Sometimes a diagram must be split into fragments. The syntax fragment is
| shown separately from the main syntax diagram, but the contents of the
| fragment should be read as if they are on the main path of the diagram.
| required_item fragment-name
|
| fragment-name:
| required_item
optional_name
|
| Authorization for trusted context: You can use DB2 authorization to check DB2
| commands issued from a DSN session under TSO or DB2I by using primary
| authorization IDs, secondary authorization IDs, and role, if the commands are
| running in a trusted context with an associated role.
4 Command Reference
Chapter 2. The bind process
The bind process establishes a relationship between an application program and its
relational data. This process is necessary before you can execute your program.
DB2 allows you two basic ways to bind a program: to a package, or directly to an
application plan.
If your program uses DRDA® access to distribute data, you must use packages.
During the precompilation process, the DB2 precompiler produces both modified
source code and a database request module (DBRM) for each application program.
The modified source code must be compiled and link-edited before the program
can be run. DBRMs must be bound to a plan or package.
When determining the maximum size of a plan, you must consider several
physical limitations, including the time required to bind the plan, the size of the
EDM pool, and fragmentation. There are no restrictions to the number of DBRMs
that can be included in a plan. However, packages provide a more flexible method
for handling a large number of DBRMs within a plan. As a general rule, the EDM
pool should be at least 10 times the size of the largest DBD or plan, whichever is
greater.
Even when they are bound into packages, all application programs must be
designated in an application plan. BIND PLAN establishes the relationship
between the DB2 system and all DBRMs or packages in that plan. Plans can
specify explicitly named DBRMs, packages, collections of packages, or a
combination of these elements. The plan contains information about the designated
DBRMs or packages and about the data that the application program intends to
use. The plan is stored in the DB2 catalog.
In addition to building packages and plans, the bind process does the following
tasks:
v Validates the SQL statements using the DB2 catalog. During the bind process,
DB2 checks your SQL statements for valid table, view, and column names.
Because the bind process occurs as a separate step before program execution,
errors are detected and can be corrected before the program is executed.
v Verifies that the process binding the program is authorized to perform the
data accessing operations requested by your program’s SQL statements. When
you issue BIND, you can specify an authorization ID as the owner of the plan or
package. The owner can be any one of the authorization IDs of the process that
is performing the bind. The bind process determines whether the owner of the
plan or package is authorized to access the data the program requests.
v Selects the access paths that are needed to access the DB2 data your program
needs to process. In selecting an access path, DB2 considers indexes, table sizes,
and other factors. DB2 considers all indexes that are available to access the data
and decides which ones (if any) to use when selecting a path to the data.
6 Command Reference
Part 2. Description of DB2 and related commands
Use the DB2 for z/OS and related commands to execute database administrative
functions.
These topics provide detailed reference information for DB2 and related
commands, including the environment in which each command is issued, the
privileges and authorities that are required to issue each command, syntax and
option descriptions, usage information, and examples.
| Environment: All of the DSN subcommands, except SPUFI, run under DSN in
| either the foreground or background, and all, except END, also run under DB2
| Interactive (DB2I). SPUFI runs only in the foreground under ISPF.
|| BIND PACKAGE (DSN) The DSN subcommand BIND PACKAGE builds an
| application package. DB2 records the description of the
| package in the catalog tables and saves the prepared
| package in the directory.
| BIND PLAN (DSN) The DSN subcommand BIND PLAN builds an application
| plan. All DB2 programs require an application plan to
| allocate DB2 resources and support SQL requests made at
| run time.
| DB2 commands You can use DB2 commands to control most of the
| operational environment.
| DSN (TSO) The TSO command DSN starts a DSN session.
| END (DSN) The DSN subcommand END is used to end the DSN
| session and return to TSO.
| FREE PACKAGE (DSN) The DSN subcommand FREE PACKAGE can be used to
| delete a specific version of a package, all versions of a
| package, or whole collections of packages.
| FREE PLAN (DSN) The DSN subcommand FREE PLAN deletes application
| plans from DB2.
| Environment: The command START DB2 can be issued only from a z/OS console.
| All other DB2 commands can be issued from the following environments:
| v A z/OS console or application program
| v A DSN session
| v A DB2I panel
| v An IMS terminal
| v A CICS terminal
| v An application program, using the DB2 instrumentation facility interface (IFI)
| DB2 commands that are issued from a logged-on z/OS console or TSO SDSF can
| be checked by DB2 authorization using primary and secondary authorization IDs.
| Extended MCS Consoles: The extended MCS console feature of z/OS lets a z/OS
| system have more than 99 consoles. Because DB2 supports extended MCS consoles,
| messages returned from a DB2 command are routed to the extended MCS console
| that issued the command.
10 Command Reference
|| /CHANGE (IMS) The IMS command /CHANGE resets an indoubt unit of recovery
| as identified by the OASN keyword of the /DISPLAY command.
| That command deletes the item from the standpoint of IMS, but it
| does not communicate to DB2.
| /DISPLAY (IMS) The IMS command /DISPLAY displays the status of the connection
| between IMS and an external subsystem (as well as all application
| programs communicating with the external subsystem), or the
| outstanding recovery units that are associated with the subsystem.
| /SSR (IMS) The IMS /SSR command allows the IMS operator to enter an
| external subsystem command.
| /START (IMS) The IMS /START command (with the SUBSYS parameter) makes
| the connection between IMS and the specified external subsystem
| available. Establishing the connection allows application programs
| to access resources managed by the external subsystem.
| /STOP (IMS) The IMS /STOP command (with the SUBSYS parameter) prevents
| application programs from accessing external subsystem resources.
| /TRACE (IMS) The IMS /TRACE command directs and controls the IMS
| capabilities for tracing internal IMS events. It also starts, stops, and
| defines the activity to be monitored by the IMS Monitor.
|
| Related reference
| ″DSNAIMS stored procedure″ (DB2 Administration Guide)
| ″DSNAIMS2 stored procedure″ (DB2 Administration Guide)
|
| CICS attachment facility commands
| You can use CICS commands to control CICS connections as well as to start and
| stop connections to DB2 and display activity on the connections.
| Environment: Each CICS attachment facility command can be issued from a CICS
| terminal.
|| DSNC (CICS attachment The CICS attachment facility DSNC command allows you
| facility) to enter DB2 commands from CICS.
| DSNC DISCONNECT (CICS The CICS attachment facility command DSNC
| attachment facility) DISCONNECT disconnects threads.
| DSNC DISPLAY (CICS The CICS attachment facility command DSNC DISPLAY
| attachment facility) displays information on CICS transactions accessing DB2
| data, or statistical information associated with
| DB2ENTRYs and the DB2CONN.
| DSNC MODIFY (CICS The CICS attachment facility command DSNC MODIFY
| attachment facility) modifies the message queue destination of the DB2CONN,
| or modifies the maximum active thread value for the pool,
| for DSNC commands, or for DB2ENTRY.
| DSNC STOP (CICS attachment The CICS attachment facility command DSNC STOP stops
| facility) the attachment facility.
| DSNC STRT (CICS attachment The DSNC STRT command starts the CICS attachment
| facility) facility, which allows CICS application programs to access
| DB2 databases.
|
| Environment: Each z/OS IRLM command can be issued from a z/OS console.
|| Chapter 44, The DSNH command procedure (a TSO CLIST) is a powerful yet easy
| “DSNH (TSO method of preparing an application program for execution.
| CLIST),” on
| page 275
| DSNU The DSNU command procedure can be executed directly or by using
| DB2I.
|
12 Command Reference
| Related information
| ″Invoking a DB2 utility by using the DSNU CLIST command in TSO″ (DB2 Utility
| Guide and Reference)
Recognition character
Command
Primary keyword
Value
-DISPLAY DATABASE(J64DBASE),SPACENAM(PROJ32)
Value
Keyword
Separators
16 Command Reference
: A colon means an inclusive range. For example, (A:D) means the same as
(A,B,C,D); (1:5) means (1,2,3,4,5). The colon can be used this way only in
commands where this operation is specifically permitted.
* An asterisk means any of the following usages:
* A single asterisk as a keyword_value indicates all. For example:
-DISPLAY UTILITY (*)
*keyword_value
An asterisk as the first character of a keyword_value indicates that
a match for the value will be satisfied when all characters
following the * are the same. For example: (*BCD)
keyword*value
An intermediate asterisk indicates that a match for the value will
be satisfied when all characters preceding and all characters
following the asterisk are the same. For example: (ABC*EFG)
keyword_value*
An asterisk as the final character of a keyword_value indicates that
a match will for the value will be satisfied when all characters
preceding the asterisk are the same. For example: (ABC*)
*keyword*_value*
Asterisks used as the first, intermediate and final characters in a
string are also valid. For example: (*BCD*FGH*)
For example, DISPLAY UTILITY (*) displays the status of all utilities;
DISPLAY UTILITY (R2*) displays the status of all utilities whose identifiers
begin with R2.
The asterisk pattern-matching character is available to all DB2 commands,
but not all DB2 commands support an asterisk. The asterisk can be used
this way only in commands in which the pattern-matching operation is
specifically permitted.
NO (two-character string) negates the keyword that follows.
A negated keyword means the opposite of the keyword itself, and is often
used to override a keyword default. In keywords that have no opposite
meaning, the initial characters “NO” can be merely part of the keyword
itself; for example, in NODE.
Do not use more than one parameter after an equal sign or an error condition
occurs.
To continue a subcommand on the next line while using the DSN processor, type
either a hyphen (-) or a plus sign (+) at the end of the current line. If you use a
plus sign, precede it by at least one blank character to prevent the concatenation of
character strings from line to line. Using a plus sign causes TSO/E to delete
leading delimiters (blanks, commas, tabs, and comments) on the continuation line,
and will reduce the overall size of the command.
Important: The names of the DSN command and its subcommands cannot be
abbreviated. For compatibility with prior releases of DB2, abbreviations for some
keywords are allowed. To avoid potential problems, avoid abbreviating keywords.
All other commands have member scope. The description of each command
includes its scope.
The amount of output that you receive from a DB2 command is always less than
256 KB. The following factors determine the maximum amount of output you can
receive:
v The amount of storage available to your DB2 subsystem or to an individual
command.
v The environment from which you issue the DB2 command.
For example, if you issue a DB2 command from an IMS console, you can receive
no more than 32 KB of output.
v For DISPLAY DATABASE, the value of the LIMIT parameter.
v For DISPLAY THREAD, the number of lines of output.
DISPLAY THREAD does not display more than 254 lines of output.
If the command issues a non-zero return code, the information returned to your
program includes diagnostic information about the command processed.
The following sections provide move information on the command line processor:
v “How to start and set up the command line processor”
v “Information on the batch and interactive modes” on page 28
v “Command line processor options and settings” on page 28
v “Setting up command line processor options and settings” on page 28
v “How to connect to a DB2 server” on page 32
v “Command line processor basic commands” on page 33
v “Command line processor information commands” on page 34
v “Command line processor XML commands” on page 36
v “Command line processor help commands” on page 42
v “SQL statements for the command line processor” on page 43
The command line processor can be started in the following two modes:
v Batch mode
v Interactive Input mode
| db2
option-flag
|
Please see DB2 Installation Guide for more detailed information on installing the
command line processor.
Batch Mode
Issue the word db2, followed by the option –f filename in order to have the
command line processor take all of the data from the named file, and process all of
the commands in the file consecutively. For example, the following command will
direct the command line processor to process all the statements in the file named
demo.clp:
v db2 -f demo.clp
Interactive Mode
Issue the word db2, and the command line processor will automatically go into
interactive mode. The command line processor will prompt you to enter SQL
statements or commands, one at a time. The simplest form of the DB2 command is
as follows:
v db2
While the command line processor is executing in interactive mode, it will prompt
you for input by means of a prompt that will look like this:
v db2 =>
You can specify command options for the command line processor for either the
entire command line processor session or with option flags. You can view the
options settings by issuing the command line processor command -LIST
COMMAND OPTIONS. Option settings can be changed from the interactive input
mode or a command file by using command line processor command -UPDATE
COMMAND OPTIONS. The command line processor sets options in the following
order:
1. Sets up default options.
2. Reads option settings from the properties file to override the defaults.
3. Reads the command line options to override option settings from properties
file.
4. Accepts input from UPDATE COMMAND OPTIONS as a final override.
The table below outlines the default options for the command line processor:
Table 1. Default options table
OPTION KEYWORD IN
DESCRIPTION DEFAULT SETTING PROPERTIES FILE OPTIONS FLAG
Display SQLCA data OFF DisplaySQLCA a
Automatically ON AutoCommit c
commit SQL
statements
Read command input OFF InputFilename f<filename>
from the given file
28 Command Reference
Table 1. Default options table (continued)
OPTION KEYWORD IN
DESCRIPTION DEFAULT SETTING PROPERTIES FILE OPTIONS FLAG
Output data and ON DisplayOutput o
messages to standard
output
Stop the command OFF StopOnError s
line processor and
exit to the operating
system if error is
encountered during
execution of a
statement
Use semicolon(;) as OFF TerminationChar t
the statement
termination character.
If this option is not
set, each line will be
considered a
statement unless it
ends with a space
followed by a
backslash(\).
Use x as the OFF TerminationChar tdx
statement termination
character
Echo command text OFF Echo v
to standard output
Return data without OFF StripHeaders x
any headers,
including column
name
Output data and OFF OutputFilename z<filename>
messages are stored
in the given file
Transaction isolation CS IsolationLevel
level
Maximum number of ALL MaxLinesFromSelect
lines to return from a
SELECT query
Controls the 32 MaxColumnWidth Width=<value> pair
maximum number of
characters of a
column that would
be displayed on
execution of SQL
SELECT statements,
result set returned
from CALL stored
procedures or
command line
processor catalog
commands.
Note:
If blanks are specified for the keyword in the properties file, the default value will
be used.
If InputFilename is specified in the properties file, the command line processor will
execute in the batch mode.
You can use the following keywords to set the command line processor
non-command options in the properties file:
Table 3. properties file : table for non-command options
Keyword Name Acceptable Keyword value
IsolationLevel RR | RS | CS | UR | blank
MaxLinesFromSelect ALL | Positive numeric value | blank
30 Command Reference
Using UPDATE COMMAND OPTIONS
You can use the UPDATE COMMAND OPTIONS command using the following
format
The default options table above shows the command options that the command
line processor has for various aspects of its operation. Refer to the ’Default options
table’ above for options flags and keywords. You can change these default settings
by using this command.
or
You can tell which options are currently in effect by issuing the LIST COMMAND
OPTIONS command, which is as follows:
and the command line processor is invoked from Unix System Services prompt as:
db2 -t
Since no InputFilename is specified in the properties file and no ’-f’ options flag is
specified during the command line processor command invocation, the command
line processor will enter into interactive mode.
and the command line processor is invoked from Unix System Services prompt as:
Use the CONNECT command to connect to a DB2 server. Before you can access
any data you must first connect to a server. Issue the following command:
| server database
:port property=value;
|
The URL specifies a data source name that consists of server, port, database and
property=value fields.
The command line processor uses IBM Data Server Driver for JDBC and SQLJ type
4 connectivity to connect to data sources. Ensure that the driver packages are
bound at the target data sources and that you have execute permissions on those
packages. All characters in the DB2 location name must be uppercase characters.
The IBM Data Server Driver for JDBC and SQLJ does not convert lowercase
characters in the database value to uppercase for IBM Data Server Driver for JDBC
and SQLJ type 4 connectivity.
The location name can be determined by executing the following SQL statement on
the server:
You can also define your own alias names in the properties file and use the alias
names to connect to specified DB2 servers. The alias names specified in the
properties file should not be confused with alias that you can create for a DB2
32 Command Reference
table or view through CREATE ALIAS SQL statement. The alias name specified in
properties file should be defined as follows :
<DB2ALIASNAM>=<URL>,<username>,<password>
The following command can then be used to connect to the DB2 server.
CONNECT TO <DB2ALIASNAME>
For example, in the properties file, DSN1 is the alias name defined as follows:
DSN1=v01ec107.svl.ibm:8000/STLEC1,JOHNDOE,PASSW0RD
Then the following command can be issued using the command line processor in
order to connect to DSN1 alias.
CONNECT TO DSN1
34 Command Reference
v COLUMN_NAME - the column or parameter name
v COLUMN_TYPE- a type of column or parameter. The following are
possible return values:
– 0 - unknown
– 1 - IN parameter
– 2- INOUT parameter
– 3 - result column in ResultSet
– 4 - OUT parameter
– 5 - procedure return value
v TYPE_NAME - the data source dependant type name
v LENGTH - the length in bytes of data
v PRECISION - precision
v SCALE - the scale
v NULLABLE- has the following possible returned values:
– 0 - does not allow NULL values
– 1 - allows NULL values
– 2 - unknown if value is nullable
Example 1: Assuming that TEST.EMPLOYEE_INFO is a stored procedure
which is already defined, then the user can issue the following command
to get information about this stored procedure:
DESCRIBE CALL TEST.EMPLOYEE_INFO
DESCRIBE TABLE [schema] <tablename|view>
This command specifies the table or view that you want described. An
alias for the table cannot be used in place of the actual table. If the table
name or view is not fully qualified, then the schema used will be that of
the current user. Fully qualified table names must be in the form
<schema>.<table>.
The DESCRIBE TABLE command will list the following information about
each column:
v COLUMN_NAME - the column of the table
v TABLE_SCHEM- a table schema
v TYPE_NAME - the data source dependant type name
v COLUMN_SIZE- the column size. For character or date types, this is the
maximum number of characters. For number or decimal type, this is
precision.
v DECIMAL_DIGITS- the number of fractional digits
v IS_NULLABLE- has the following possible returned values:
– No - column does not allow NULL values
– Yes- column might allow NULL values
– Empty string - unknown if column allows NULL values
DISPLAY RESULT SETTINGS
This command displays the current settings for MAXCOLUMNWIDTH
and MAXLINESFROMSELECT.
LIST TABLES FOR <USER| ALL | SYSTEM | SCHEMA schema-name>|
This command is used to list tables, views, or aliases associated with the
connected database. If the FOR clause is not specified, then tables for
USER will be listed.
36 Command Reference
| ADD XMLSCHEMA DOCUMENT TO relational-identifier
|
|
|
ADD schemaLocation-URI FROM content-URI
WITH properties-URI
|
| COMPLETE
WITH schema-properties-URI ENABLE DECOMPOSITION
Option descriptions
TO relational-identifier
| Specifies the relational name of a registered, but incomplete, XML
| schema to which additional schema documents will be added.
| The schema of the relational identifier must be SYSXSR. If you
| specify a qualified name, the qualifier must be SYSXSR; for
| example, SYSXSR.MYSCHEMA. If you specify an unqualified
| name, you need to execute the SQL statement SET SCHEMA="SYSXSR"
| before you execute the command. A name that is enclosed in
| quotation marks, such as ″SYSXSR.MYSCHEMA″, is considered as
| an unqualified name. Qualifiers or schema names that are enclosed
| in quotation marks are not folded to uppercase. Qualifiers or
| schema names that are not enclosed in quotation marks are folded
| to uppercase.
| ADD schemaLocation-URI
| Specifies the schema location URI of an XML schema document to
| be added to this schema, as the document would be referenced
| from another XML document.
FROM content-URI
Specifies the URI where the actual content of an XML schema
document is located. The CLP supports only file:// based URI.
WITH properties-URI
Specifies the URI of a properties document to be associated with a
schema document. The CLP supports only file:// based URI.
COMPLETE
Indicates that there are no more XML schema documents to be
associated with this XML schema other than those indicated in this
ADD XML SCHEMA DOCUMENT command. Validation of the
schema will be performed, and if no errors are found the schema
will be marked as usable. Until XML schema registration is
completed, the schema is not visible to or usable in other
SQL/XML commands.
WITH schema-properties-URI
Specifies the URI of a properties document to be associated with
|
| ENABLE DECOMPOSITION
|
Option descriptions:
relational-identifier
Specifies the relational name given to an XML schema in a
previous REGISTER XMLSCHEMA command.
| The schema of the relational identifier must be SYSXSR. If you
| specify a qualified name, the qualifier must be SYSXSR; for
| example, SYSXSR.MYSCHEMA. If you specify an unqualified
| name, you need to execute the SQL statement SET SCHEMA="SYSXSR"
| before you execute the command. A name that is enclosed in
| quotation marks, such as ″SYSXSR.MYSCHEMA″, is considered as
| an unqualified name. Qualifiers or schema names that are enclosed
38 Command Reference
| in quotation marks are not folded to uppercase. Qualifiers or
| schema names that are not enclosed in quotation marks are folded
| to uppercase.
WITH schema-properties-URI
Specifies the URI of a properties document to be associated with
this XML schema. The CLP supports only file:// based URI.
ENABLE DECOMPOSITION
indicates that this schema is to be used for the purpose of
decomposing XML documents.
Example 1: Assume you have previously registered a complicated schema
consisting of multiple documents and given it the relational name
’PRODSCHEMA’. The schema has additional properties that you would
like to store in the database catalogs, which is stored locally in
/u/temp/CUSTPROP.XML. The command would be:
-COMPLETE XMLSCHEMA PRODSCHEMA WITH 'file:///u/temp/CUSTPROP.xml'
-DECOMPOSE XML DOCUMENT
| Decomposes a single XML document.
|
Option descriptions:
| xml-document-name
| The file path and file name of the input XML document to be
| decomposed.
relational-identifier
Specifies the relational name given to an XML schema in a
previous REGISTER XMLSCHEMA command.
| The schema of the relational identifier must be SYSXSR. If you
| specify a qualified name, the qualifier must be SYSXSR; for
| example, SYSXSR.MYSCHEMA. If you specify an unqualified
| name, you need to execute the SQL statement SET SCHEMA="SYSXSR"
| before you execute the command. A name that is enclosed in
| quotation marks, such as ″SYSXSR.MYSCHEMA″, is considered as
| an unqualified name. Qualifiers or schema names that are enclosed
| in quotation marks are not folded to uppercase. Qualifiers or
| schema names that are not enclosed in quotation marks are folded
| to uppercase.
Example 1: This example specifies that the XML document in
/u/gb/doc1.xml is to be decomposed according to the XSR registered
schema ’genbankschema’.
-DECOMPOSE XML DOCUMENT /u/gb/doc1.xml
XMLSCHEMA genbankschema
-REGISTER XMLSCHEMA
| Registers an XML schema with the database manager.
|
| AS relational-identifier
| sub-document-clause
|
| sub-document-clause:
|
|
|
ADD schemaLocation-URI-2 FROM content-URI
WITH properties-URI
|
| COMPLETE
WITH schema-properties-URI ENABLE DECOMPOSITION
Option descriptions
| schemaLocation-URI-1
| Specifies the schema location URI of the XML schema to be
| registered, as it is referenced from XML instance documents or the
| SQL XML schema validation function. If a single XML schema
| references multiple schema documents, each XML schema
| document other than the primary document must also be
| registered, either in the sub-document clause in the REGISTER
| XMLSCHEMA command or in a separate ADD XMLSCHEMA
| DOCUMENT command.
FROM content-URI
Specifies the URI where the actual content of an XML schema
document is located. The CLP supports only file:// based URI.
WITH properties-URI
Specifies the URI of a properties document to be associated with a
schema document. The CLP supports only file:// based URI.
AS relational-identifier
Specifies a name that can be used to refer to the XML Schema in
relational SQL/XML.
| The schema of the relational identifier must be SYSXSR. If you
| specify a qualified name, the qualifier must be SYSXSR; for
| example, SYSXSR.MYSCHEMA. If you specify an unqualified
| name, you need to execute the SQL statement SET SCHEMA="SYSXSR"
| before you execute the command. A name that is enclosed in
| quotation marks, such as ″SYSXSR.MYSCHEMA″, is considered as
| an unqualified name. Qualifiers or schema names that are enclosed
| in quotation marks are not folded to uppercase. Qualifiers or
| schema names that are not enclosed in quotation marks are folded
| to uppercase.
40 Command Reference
| ADD schemaLocation-URI-2
| Specifies the schema location URI of a related XML schema
| document, as it is referenced by this XML schema document either
| directly or indirectly.
COMPLETE
Indicates that there are no more XML schema documents to be
associated with this XML schema. Validation of the schema will be
performed, and if no errors are found the schema will be marked
as usable. Until XML schema registration is completed, the schema
is not visible to or usable in other SQL/XML commands.
WITH schema-properties-URI
Specifies the URI of a properties document to be associated with
this XML schema. The CLP supports only file:// based URI. A
schema properties document can only be specified when the XML
schema is also being completed.
ENABLE DECOMPOSITION
Indicates that this schema is to be used for the purpose of
decomposing XML documents. It can only be specified when the
XML schema is also being completed.
Example 1: Assume you want to register a simple schema referred as
EXAMPLE.TEST1 and make it available immediately. The schema is
″http://mycompany.com/prod/p1_1.xsd″, and is stored locally in
/u/temp. The command would be:
-REGISTER XMLSCHEMA http://mycompany.com/prod/p1_1.xsd
FROM file:///u/temp/p1_1.xsd AS EXAMPLE.TEST1 COMPLETE
Option descriptions:
relational-identifier
Specifies the relational name given to an XML schema in a
previous REGISTER XMLSCHEMA command.
| The schema of the relational identifier must be SYSXSR. If you
| specify a qualified name, the qualifier must be SYSXSR; for
| example, SYSXSR.MYSCHEMA. If you specify an unqualified
| name, you need to execute the SQL statement SET SCHEMA="SYSXSR"
| before you execute the command. A name that is enclosed in
| quotation marks, such as ″SYSXSR.MYSCHEMA″, is considered as
| an unqualified name. Qualifiers or schema names that are enclosed
| in quotation marks are not folded to uppercase. Qualifiers or
| schema names that are not enclosed in quotation marks are folded
| to uppercase.
Example 1: This example specifies the removal of the previously registered
schema ’PRODSCHEMA’.
-REMOVE XMLSCHEMA PRODSCHEMA
You can use the command line processor help commands in order to invoke
information or options from the command line processor. Below is the syntax you
| need to run these commands:
|
|
CLP PHRASE
OPTIONS
|
Example 2: Displays information about the command line processor command that
starts with the keyword LIST.
? LIST
Example 3: Displays information about the command line processor command that
starts with the keywords, ″Update Command.″
42 Command Reference
? Update Command
Example 4: Displays information about all of the command line processor option
flags..
? OPTIONS
SQL statements allow you to work with stored data in your database. The
statements are applied against the database you are connected to. The command
line processor will support the following SQL statements:
v ALTER
v CALL
For more information about CALL statements, see DB2 Application
programming and SQL Part 6.
v CREATE
v DELETE
v DROP
v GRANT
v INSERT
v REVOKE
v SELECT
v UPDATE
Abbreviation: -ACC
Subsections:
v “Environment”
v “Authorization”
v “Syntax” on page 48
v “Option descriptions” on page 48
v “Examples” on page 49
Environment
This command can be issued from a z/OS console, a DSN session under TSO, a
DB2I panel (DB2 COMMANDS), an IMS or CICS® terminal, or a program using
the instrumentation facility interface (IFI).
Authorization
To execute this command, you must use a privilege set of the process that includes
one of the following authorities:
v STARTDB privilege
v DBMAINT authority
v DBCTRL authority
v DBADM authority
v SYSCTRL authority
v SYSADM authority
When you are using a privilege set that does not contain the STARTDB privilege
for a specified database, DB2 issues an error message and the ACCESS command
fails.
All specified databases with the STARTDB privilege included in the privilege set of
the process are started.
DB2 commands that are issued from a logged-on z/OS console or TSO SDSF can
be checked by DB2 authorization using primary and secondary authorization IDs.
| ,
|
ACCESS DATABASE ( database-name )
|
| ,
PART( integer )
integer1:integer2
Option descriptions
48 Command Reference
accessed. When a logical partition is accessed, the index is not closed. A
nonpartitioning index must be accessed without the use of PART to close
the index.
Mode (OPEN)
Forces the physical opening of the page set or partition on just the local
member. This moves the overhead of the physical open from an SQL thread to
the command thread. This improves the transaction rate for the first SQL
thread to reference a given page set or partition.
Mode (NGBPDEP)
Converts the specified page set or partition, non-disruptively to a non-group
buffer pool dependent. You should use this before running large batch
processes against a particular page set or partition to improve performance in a
data sharing environment. Only issue this command to the member on which
you plan to run the batch programs.
Examples
Output similar to the following output indicates that the command completed
successfully:
-DSNTDDIS 'ACCESS DATABASE' NORMAL COMPLETION
Subsections:
v “Environment”
v “Authorization”
v “Syntax” on page 52
v “Option descriptions” on page 52
v “Usage notes” on page 54
v “Examples” on page 56
Environment
This command can be issued from a z/OS console, a DSN session under TSO, a
DB2I panel (DB2 COMMANDS), an IMS or CICS® terminal, or a program using
the instrumentation facility interface (IFI).
Authorization
To execute this command, you must use a privilege set of the process that includes
one of the following authorities:
v SYSOPR authority
v SYSCTRL authority
v SYSADM authority
DB2 commands that are issued from a logged-on z/OS console or TSO SDSF can
be checked by DB2 authorization using primary and secondary authorization IDs.
VPPSEQT(integer) VPXPSEQT(integer) DWQT(integer)
VDWQT(integer1,integer2) PGSTEAL( LRU )
FIFO
|
NO NO
PGFIX( YES ) AUTOSIZE( YES )
Option descriptions
( bpname )
Specifies the buffer pool to alter.
v 4-KB page buffer pools are named BP0 through BP49
v 8-KB page buffer pools are named BP8K0 through BP8K9
v 16-KB page buffer pools are named BP16K0 through BP16K9
v 32-KB page buffer pools are named BP32K through BP32K9
VPSIZE ( integer )
Changes the buffer pool size.
integer specifies the number of buffers to allocate to the active buffer pool.
| integer can range from 0 to 250000000 for 4-KB page buffer pools other than
| BP0. For BP0, the minimum value is 2000. For 8-KB page buffer pools, the
| range is from 1000 to 125000000. For 16-KB page buffer pools, the range is
| from 500 to 62500000. For 32-KB page buffer pools, the range is from 250 to
| 31250000.
DB2 limits the total VPSIZE for all buffer pools to 1 TB. In addition, DB2 limits
the amount of buffer pool storage to approximately twice the available real
storage for the z/OS image.
If you specify VPSIZE as 0 for an active buffer pool (other than BP0), DB2
quiesces all current database access and update activities for that buffer pool
and then deletes the buffer pool. Subsequent attempts to use table spaces or
indexes that are assigned to that buffer pool fail.
VPSEQT ( integer )
Changes the sequential steal threshold for the buffer pool.
integer specifies the sequential steal threshold for the buffer pool. This value is
expressed as a percentage of the total buffer pool size, and valid values range
from 0 to 100. This threshold affects the allocation of buffers in the buffer pool
to page read requests that are part of a sequential access pattern. This includes
pages being prefetched. If the number of buffers that contain sequentially
accessed pages exceeds the threshold, a sequential request attempts to reuse
52 Command Reference
one of those buffers rather than a buffer that contains a non-sequentially
accessed page. The initial default value is 80.
When VPSEQT=0, sequentially accessed pages are not kept in the buffer pool
after being released by the accessing agent. Also, prefetch is disabled.
When VPSEQT=100, DB2 does not prefer reusing sequential buffers over using
non-sequential buffers.
VPPSEQT ( integer )
Changes the parallel sequential threshold for the buffer pool. This threshold
determines how much of the buffer pool is used for parallel processing
operations.
integer specifies the parallel sequential threshold for the buffer pool. This value
is expressed as a percentage of the sequential steal threshold, and valid values
range from 0 to 100. The initial default value is 50.
When VPPSEQT=0, parallel processing operations are disabled.
VPXPSEQT ( integer )
Changes the assisting parallel sequential threshold for the buffer pool. This
threshold determines the portion of the buffer pool that is used for processing
queries that originate on other members of the data sharing group. This option
is valid and effective only when DB2 is in data sharing mode; it is ignored
when DB2 is not in data sharing mode.
integer specifies the assisting parallel sequential threshold for the buffer pool.
integer is expressed as a percentage of the parallel sequential threshold
(VPPSEQT). Whenever the sequential steal threshold or the parallel sequential
threshold is altered, it directly affects the portion of buffer resources dedicated
to assistant parallel operations. The valid values range from 0 to 100. The
initial default value is 0.
When VPXPSEQT=0, this buffer pool cannot be used to assist another DB2
with parallel processing.
DWQT ( integer )
Changes the buffer pool’s deferred write threshold.
integer specifies the deferred write threshold for the buffer pool. This value is
expressed as a percentage of the total buffer pool size, and valid values range
from 0 to 90. This threshold determines when deferred writes begin, based on
the number of unavailable buffers. When the count of unavailable buffers
exceeds the threshold, deferred writes begin. The initial default value is 30
percent.
VDWQT ( integer1 , integer2 )
Changes the buffer pool’s vertical deferred write threshold.
integer1 specifies the vertical deferred write threshold for the buffer pool.
integer1 is expressed as a percentage of the total buffer pool size, and valid
values range from 0 to 90.
This threshold determines when deferred writes begin, based on the number of
updated pages for a given data set. Deferred writes begin for that data set
when the count of updated buffers for a data set exceeds the threshold. This
threshold can be overridden for page sets accessed by DB2 utilities and must
be less than or equal to the value specified for the DWQT option.
The default value is 5 percent. A value of 0 indicates that the deferred write of
32 pages begins when the updated buffer count for the data set reaches 40.
Usage notes
The following description contains additional information about how to use the
ALTER BUFFERPOOL command.
54 Command Reference
Changing several buffer pool attributes: A failure in modifying one buffer pool
attribute has no effect on other modifications requested in the same command.
Contracting an active buffer pool: If you use ALTER BUFFERPOOL to contract the
size of an active buffer pool, DB2 contracts the pool by marking active buffers as
″to be deleted,″ which means that they are not reusable to satisfy other page
requests. However, the virtual storage might not be freed immediately. A system
administrator can determine the status of the buffer pool by issuing the DISPLAY
BUFFERPOOL command.
Deleting an active buffer pool: If you use ALTER BUFFERPOOL to delete an active
buffer pool (by specifying 0 for VPSIZE), DB2 issues a message to indicate that it is
ready to explicitly delete this buffer pool. When DB2 accepts the delete buffer pool
request, the buffer pool is marked as ″delete pending″. All current access to the
buffer pool is quiesced, later access attempts fail with an error message, and all
open page sets that refer to the buffer pool are closed.
Altering attributes stored in the BSDS: The buffer pool attributes that are stored in
the BSDS cannot be changed offline.
Setting a buffer pool to be fixed in real storage: If you use the ALTER
BUFFERPOOL command with the PGFIX option set to YES to fix a buffer pool in
real storage, the change is pending and the buffer pool becomes fixed only at the
next allocation.
In order to fix the buffer pool in real storage, issue the command ALTER
BUFFERPOOL( bpname ) PGFIX(YES). If the buffer pool that you specify for bpname is
not currently allocated, the buffer pool will become fixed in real storage when it is
allocated. If the buffer pool that you specify for bpname is currently allocated, do
one of the following procedures to fix the buffer pool in real storage:
v If the buffer pool that you specify for bpname is not one of the buffer pools that
is used for the DB2 catalog and directory (BP0, BP8K0, BP16K0, or BP32K):
1. Issue the ALTER BUFFERPOOL command with the VPSIZE option set to 0 to
deallocate the buffer pool:
-ALTER BUFFERPOOL(bpname) VPSIZE(0)
2. Issue the ALTER BUFFERPOOL command with the VPSIZE and PGFIX
options to change the buffer pool size and to use long-term page fixing at the
next allocation:
-ALTER BUFFERPOOL(bpname) VPSIZE(vpsize) PGFIX(YES)
v If the buffer pool that you specify for bpname is one of the buffer pools that is
used for the DB2 catalog and directory (BP0, BP8K0, BP16K0, or BP32K):
1. Issue the ALTER BUFFERPOOL command with the PGFIX option to change
the buffer pool to use long-term page fixing (the change is pending until the
next allocation of the buffer pool):
-ALTER BUFFERPOOL(bpname) PGFIX(YES)
2. Issue the STOP DATABASE command or the STOP DB2 command to
deallocate the buffer pool
3. Issue the START DATABASE command or the START DB2 command to
reallocate the buffer pool (depending on which command you used to
deallocate the buffer pool)
Examples
Example 1: The following command sets the buffer pool for BP0 to 2000.
-ALTER BUFFERPOOL(BP0) VPSIZE(2000)
Example 2: The following command sets the sequential steal threshold of the buffer
pool for BP0 to 75 % of the buffer pool size.
-ALTER BUFFERPOOL(BP0) VPSEQT(75)
Example 3: The following command deletes BP1. Be very careful when using this
option because specifying a 0 size for an active buffer pool causes DB2 to quiesce
all current database access. All subsequent requests to open page sets fail.
-ALTER BUFFERPOOL(BP1) VPSIZE(0)
56 Command Reference
Chapter 12. -ALTER GROUPBUFFERPOOL (DB2)
The DB2 command ALTER GROUPBUFFERPOOL alters attributes of group buffer
pools.
Subsections:
v “Environment”
v “Authorization”
v “Syntax”
v “Option descriptions” on page 58
v “Usage notes” on page 59
v “Examples” on page 60
| Environment
| This command can be issued from a z/OS console, a DSN session under TSO, a
| DB2I panel (DB2 COMMANDS), an IMS or CICS terminal, or a program using the
| instrumentation facility interface (IFI).
| Authorization
| To execute this command, you must use a privilege set of the process that includes
| one of the following authorities:
| v SYSOPR authority
| v SYSCTRL authority
| v SYSADM authority
| DB2 commands that are issued from a logged-on z/OS console or TSO SDSF can
| be checked by DB2 authorization using primary and secondary authorization IDs.
Syntax
AUTOREC( YES ) RATIO(ratio) CLASST(integer)
NO
GBPOOLT(integer) GBPCHKPT(integer)
(NO)
Indicates that gbpname is used only for cross-invalidation. This group
buffer pool contains no data entries. The GBPCACHE option of table
spaces or index spaces that use this group buffer pool is ignored.
AUTOREC
Specifies whether automatic recovery by DB2 takes place when a structure
failure occurs or when the connectivity of all members of the group to the
group buffer pool is lost.
(YES)
Enables DB2 to automatically recover page sets and partitions that have a
status of group buffer pool RECOVER pending (GRECP) and that have
pages on the logical page list.
(NO)
Disables automatic recovery. Issue a START DATABASE command to
recover page sets and partitions that have a status of GRECP or that have
pages on the logical page list.
RATIO ( ratio )
Changes the desired ratio of the number of directory entries to the number of
data pages in the group buffer pool; that is, how many directory entries exist
for each data page.
58 Command Reference
ratio can be a decimal number from 1.0 to 255, inclusive. Any digits after the
first decimal place are ignored; for example, 5.67 is treated as 5.6. If ratio is
greater than 25, any digits after the decimal point are ignored; for example,
25.98 is treated as 25. The default ratio is 5.
The actual number of directory entries and data pages that are allocated
depends on the size of the coupling facility structure, which is specified in the
coupling facility policy definitions (CFRM policy).
CLASST ( integer )
Changes the threshold at which class castout is started. integer is expressed as a
percentage of the number of data entries; it can range from 0 to 90. The default
is 5 percent.
For example, CLASST(10) starts class castout when the number of pages in that
class equals 10 % of the group buffer pool page capacity.
GBPOOLT ( integer )
Changes the threshold at which data in the group buffer pool is cast out to
disk. integer is expressed as a percentage of the number of data entries and can
range from 0 to 90. The default is 30 percent.
For example, GBPOOLT(55) casts out data if the number of pages in the group
buffer pool equals 55 % of the group buffer pool page capacity.
GBPCHKPT ( integer )
Changes the time interval, in minutes, between successive checkpoints of the
group buffer pool. integer can range from 1 to 999999. Unless a value is
explicitly specified for the GBPCHKPT option, the default value is 4 minutes.
The more frequently checkpoints are taken, the less time it takes to recover the
group buffer pool if the coupling facility fails.
Usage notes
Defaults: Issuing the ALTER GROUPBUFFERPOOL command does not change any
option that is not explicitly specified; the default is to leave the value unchanged.
The following table lists the default values for the options when the command is
first issued for a group buffer pool or a structure.
Table 6. Default option values when ALTER GROUPBUFFERPOOL is first issued
Option Value
GBPCACHE YES
RATIO 5
CLASST 5 (%)
GBPOOLT 30 (%)
GBPCHKPT 4 (minutes)
When new values take effect: When you issue the ALTER GROUPBUFFERPOOL
command, some option specifications become effective only at the next allocation
of the group buffer pool. The following table lists each option, when the new value
takes effect, and if the option is applicable for a group buffer pool that is specified
as GBPCACHE(NO).
Examples
Example 1: For group buffer pool 0, change the ratio of directory entries to data
pages to one directory entry for every data page. The RATIO specification becomes
effective at the next allocation of the group buffer pool.
-DB1G ALTER GROUPBUFFERPOOL (GBP0) RATIO(1)
Example 2: For group buffer pool 2, change the class castout threshold to 10 % and
the group buffer pool castout threshold to 50 %. The new values take effect
immediately.
-DB1G ALTER GROUPBUFFERPOOL (GBP2) CLASST(10) GBPOOLT(50)
Example 3: Assume that the DB2 group name is DSNCAT. For group buffer pool 3,
change the class castout threshold to 10 %. The new value takes effect immediately.
Because the group name is DSNCAT, the coupling facility structure name is
DSNCAT_GBP3. Also, when a structure fails, the AUTOREC(YES) option enables
DB2 to automatically recover the page sets and partitions that are in a GRECP
status or that have pages on the logical page list.
-DB1G ALTER GROUPBUFFERPOOL (DSNCAT_GBP3) CLASST(10) AUTOREC(YES)
Example 4: For group buffer pool 32K, change the GBP checkpoint frequency to
five minutes. The new value takes effect immediately. In this example, with
AUTOREC(NO) specified, DB2 does not start automatic recovery when a structure
fails. You might choose this option if you want to determine what page sets or
partitions are in a GRECP status or have pages on the logical page list before you
enter the START DATABASE command to recover the data with the options you
specify.
-DB1G ALTER GROUPBUFFERPOOL (GBP32K) GBPCHKPT(5) AUTOREC(NO)
60 Command Reference
Chapter 13. -ALTER UTILITY (DB2)
| The DB2 command ALTER UTILITY changes the values of certain parameters of an
| execution of the REORG utility that uses SHRLEVEL REFERENCE or CHANGE
| and the REBUILD utility that uses SHRLEVEL CHANGE.
| REBUILD and REORG can be altered only from the DB2 subsystem on which it is
| running.
Subsections:
v “Environment”
v “Authorization”
v “Syntax” on page 62
v “Option descriptions” on page 62
v “Usage notes” on page 63
v “Example” on page 63
Environment
This command can be issued from a z/OS console, a DSN session, a DB2I panel
(DB2 COMMANDS), an IMS or a CICS terminal, or a program using the
instrumentation facility interface (IFI).
Authorization
To execute this command, you must use the primary or some secondary
authorization ID of the process that originally submitted the utility job.
Alternatively, you must use a privilege set of the process that includes one of the
following authorities:
v DBMAINT authority
v DBCTRL authority
v DBADM authority
v SYSOPR authority
v SYSCTRL authority
v SYSADM authority
DB2 commands that are issued from a logged-on z/OS console or TSO SDSF can
be checked by DB2 authorization using primary and secondary authorization IDs.
For users with DBMAINT, DBCTRL, or DBADM authority, the command takes
effect only when a user has sufficient authority over each object that the utility job
accesses.
MAXRO( integer ) LONGLOG( CONTINUE ) DELAY(integer)
DEFER TERM
DRAIN
Option descriptions
( utility-id )
Is the utility identifier, or the UID parameter, used when creating the utility job
step.
| This job must execute REBUILD SHRLEVEL CHANGE, REORG with
| SHRLEVEL CHANGE, or SHRLEVEL REFERENCE.
If utility-id was created by the DSNU CLIST by default, it has the form
tso-userid.control-file-name .
If utility-id was created by default by the EXEC statement that executed
DSNUTILB, it has the form userid.jobname .
| REBUILD
| Specifies that a REBUILD SHRLEVEL CHANGE utility is being altered.
| REORG
| Specifies that a REORG SHRLEVEL REFERENCE or REORG SHRLEVEL
| CHANGE utility is being altered.
DEADLINE
Specifies the deadline by which the user wants the switch phase of
reorganization to start.
Only valid when altering a REORG SHRLEVEL REFERENCE or REORG
SHRLEVEL CHANGE utility.
If DB2 estimates that the switch phase will not start by the deadline, DB2
terminates reorganization. The default is the most recently specified value of
DEADLINE.
The pre-switch processing might continue until after the deadline.
( NONE )
Specifies that there is no deadline for the read-only iteration of log
processing.
( timestamp )
Specifies the deadline by which the user wants the switch phase to start
processing. This deadline must not have been reached when ALTER
UTILITY executes.
MAXRO
Specifies the maximum amount of time that is tolerated for the last iteration of
log processing during reorganization. During that iteration, applications have
read-only access.
62 Command Reference
The actual execution time of the last iteration can exceed the value specified
for MAXRO.
( integer )
Specifies the number of seconds. The default is the most recently specified
value of MAXRO.
( DEFER )
Specifies that the log phase is deferred indefinitely.
LONGLOG
Specifies the action that DB2 performs (after sending the LONGLOG message
to the console) if the number of log records that are processed during the next
iteration is not sufficiently lower than the number of log records that were
processed during the previous iterations. The default is the most recently
specified value of LONGLOG.
( CONTINUE )
Specifies that DB2 continues the log phase.
( TERM )
Specifies that DB2 terminates the utility after the delay.
( DRAIN )
Specifies that DB2 drain the write claim class after the delay (if specified).
The number of log records, and thus the estimated time, for a future
iteration of log processing will be 0.
DELAY ( integer )
| Specifies a lower bound for the interval between the time when the utility
| sends the LONGLOG message to the console and the time when the utility
| performs the action specified by the LONGLOG parameter.
| integer is the delay in seconds. The value must be nonnegative. The default is
| the most recently specified value of DELAY.
Usage notes
| You can alter a REBUILD or REORG job only from the DB2 subsystem on which it
| is running.
Example
The following example alters the execution of the REORG utility for the utility job
step whose utility identifier is REORGEMP:
-ALTER UTILITY (REORGEMP) REORG MAXRO(240) LONGLOG(DRAIN)
The following list explains what each option does in the preceding example:
v MAXRO(240) changes the maximum tolerable time for the last iteration of log
processing to 240 seconds (4 minutes).
v LONGLOG(DRAIN) specifies that DB2 drain the write claim class (if reading of
the log during REORG is not catching up to the speed at which the application
is writing the log).
v DELAY is not specified so this example does not change the existing delay
between sending the LONGLOG message to the console and performing the
action specified by LONGLOG.
v DEADLINE is not specified so this example does not change the deadline (if
any) that was defined in the last iteration of log processing.
When issued without any options, the DB2 command ARCHIVE LOG performs the
following functions:
v Truncates the current active log data sets
v Starts an asynchronous task to offload the data sets
v Archives previous active log data sets not yet archived
v Returns control to the user (immediately)
In a data sharing environment, you can truncate and archive the logs for an
individual member or for all members in the group.
When specified with the option MODE(QUIESCE), the ARCHIVE LOG command
attempts to quiesce (suspend) all DB2 user update activity on the DB2 active log
prior to the offload process. When a system-wide point of consistency is reached
(that is, when all currently active update users have reached a commit point), the
active log is immediately truncated, and the offload process is initiated. The
resulting point of consistency is captured in the current active log before it is
off-loaded. In a data sharing environment, you can create a system-wide point of
consistency only for the entire group.
Subsections:
v “Environment”
v “Authorization”
v “Syntax” on page 66
v “Option descriptions” on page 66
v “Usage notes” on page 68
v “Examples” on page 69
Environment
This command can be issued from a z/OS console, a DSN session under TSO, a
DB2I panel (DB2 COMMANDS), an IMS or CICS terminal, or a program using the
instrumentation facility interface (IFI).
The ARCHIVE LOG command can also be issued from the z/OS subsystem
interface (SSI) to enable automated scheduling systems and other programs to
execute the command via supervisor call instruction (SVC) 34.
Authorization
To execute this command, you must use a privilege set of the process that includes
one of the following privileges or authorities:
DB2 commands that are issued from a logged-on z/OS console or TSO SDSF can
be checked by DB2 authorization using primary and secondary authorization IDs.
Syntax
ARCHIVE LOG
MODE(QUIESCE)
TIME(nnn) NO
WAIT( )
YES
MEMBER
SCOPE( GROUP )
CANCEL OFFLOAD
Option descriptions
MODE(QUIESCE)
Halts all new update activity by the DB2 subsystem for a specified period of
time and attempts to bring all existing users to a point of consistency after a
commit or rollback. When a point of consistency is reached and captured in the
current active log data set, the current active log data set is truncated, and
another log data set in the inventory becomes current. Offload processing then
begins with the oldest active log data set and ends with the active log data set
that was truncated.
In a data sharing environment, before archiving logs of any member, this
option quiesces all active members of a data sharing group. MODE(QUIESCE)
also ensures that each inactive member had successfully quiesced its update
activity and resolved any indoubt units of recovery (URs) before the inactive
subsystem completed normal termination. If any DB2 subsystem is in a failed
state, fails during quiesce processing, or is stopped with outstanding URs, the
ARCHIVE LOG command fails, and the remaining active members allow
update activity to proceed.
If no indoubt URs exist on all quiesced members, active or inactive, the archive
operation can continue for active members in the group. Thus, you can archive
logs of a data sharing group normally without forcing all members to be
active. The current logs of inactive members are truncated and off-loaded after
they start.
If a system-wide point of consistency cannot be reached during the quiesce
period, which is a length of time you can specify, execution of the ARCHIVE
LOG command fails and an error message is issued. In a data sharing
environment, the maximum time period applies for the whole group, and if
any DB2 subsystem cannot quiesce within the time allowed, the command
fails.
66 Command Reference
If there is no update activity on DB2 data when the command ARCHIVE LOG
MODE(QUIESCE) is issued, the active log is truncated and off-loaded
immediately.
TIME( nnn )
Specifies the maximum length of time, in seconds, in which the DB2
subsystem is allowed to attempt a full system quiesce.
If you do not specify a time, the default is the length of time specified in
the field QUIESCE PERIOD of installation panel DSNTIPA.
nnn can range from 001 to 999 seconds. You must allocate an appropriate
time period for the quiesce processing or the following events can occur:
v The quiesce processing can expire before a full quiesce is accomplished.
v An unnecessary DB2 lock contention can be imposed.
v A time-out can occur.
This option is valid only when used in conjunction with the option
MODE(QUIESCE).
WAIT
Specifies whether the DB2 subsystem should wait until the quiesce
processing has completed before returning control to the invoking console
or program, or should return control when the quiesce processing begins.
This option is valid only when used in conjunction with the option
MODE(QUIESCE).
( NO )
Specifies that control must be returned to the invoking program when
the quiesce processing begins.
If WAIT(NO) is used, quiesce processing is asynchronous to the user;
that is, you can issue additional DB2 commands after the ARCHIVE
LOG command returns control to you.
(YES)
Specifies that the quiesce processing must complete before returning
control to the invoking console or program.
If WAIT(YES) is used, quiesce processing is synchronous to the user;
that is, additional DB2 commands can be issued, but they are not
processed by the DB2 command processor until the ARCHIVE LOG
command is complete.
SCOPE
Specifies whether the command applies to the entire data sharing group or to a
single member only. The SCOPE option is valid only in a data sharing
environment; the option is ignored in a non-data-sharing environment. SCOPE
cannot be specified if MODE(QUIESCE) is specified; the two keywords are
mutually exclusive.
(MEMBER)
Initiates offload processing only for the member from which the command
is issued. User update activity is not suspended. If that member, or the
entire group, is already archiving, the command fails. This is the default,
except when MODE(QUIESCE) is specified.
(GROUP)
Initiates offload processing for every member of the DB2 group. User
update activity is not suspended. If any member of the group, or the entire
group, is already archiving, the command fails.
Usage notes
Remote site recovery: The ARCHIVE LOG command is very useful when
performing a DB2 backup in preparation for a remote site recovery. For example,
the command allows the DB2 subsystem to quiesce all users after a commit point,
and capture the resulting point of consistency in the current active log before the
archive is taken. Therefore, when the archive log is used with the most current
image copy (during an offsite recovery), the number of data inconsistencies will be
minimized.
Available active log space: ARCHIVE LOG cannot be used when the current active
log is the last available active log data set because of the following reasons:
v All available active log space would be used.
v The DB2 subsystem would halt processing until an offload is complete.
Executing ARCHIVE LOG while STOP DB2 is in progress: ARCHIVE LOG without
the option MODE(QUIESCE) is permitted when STOP DB2 MODE(QUIESCE) is in
progress. However, if an attempt is made to execute the ARCHIVE LOG command
when a STOP DB2 MODE(FORCE) is in progress, error message DSNJ315I is
issued and the ARCHIVE LOG command is not processed.
ARCHIVE LOG with the option MODE(QUIESCE) is not allowed when a STOP
DB2 MODE(FORCE) or STOP DB2 MODE(QUIESCE) is in progress. If an attempt
is made to run the ARCHIVE LOG command under these circumstances, error
message DSNJ315I or DSNJ316I is issued.
If the system was not fully quiesced (as determined by the number of users which
could not be quiesced), error message DSNJ317I is issued and ARCHIVE LOG
command processing is terminated. The current active log data set is not truncated
and switched to the next available active log data set, and the archive log is not
created.
68 Command Reference
Demand on DB2 resources: Using the option MODE(QUIESCE) during times of
peak activity or during periods in which time is critical causes a significant
disruption in the availability of DB2 for all users of DB2 resources.
Examples
Example 1: Truncate the current active log data sets and initiate an asynchronous
job to offload the truncated data sets. No quiesce processing occurs.
-ARCHIVE LOG
Example 2: Initiate a quiesce period. If all DB2 update activity is stopped within
this period, truncate the current active log data set and switch to the next available
active log data set. Let the value in the field QUIESCE PERIOD of installation
panel DSNTIPA determine the length of the quiesce period. The MODE(QUIESCE)
processing is asynchronous.
If the DB2 subsystem can successfully block all update activity before the quiesce
period ends, it proceeds to the next processing step. If the quiesce time period is
insufficient to successfully quiesce the DB2 subsystem, the active log data sets are
not truncated and the archive does not occur.
-ARCHIVE LOG MODE(QUIESCE)
Example 3: Initiate a quiesce period. If all DB2 update activity is stopped within
this period, truncate the current active log data set and switch to the next available
active log data set. The maximum length of the quiesce processing period is seven
minutes (420 seconds) and the processing is synchronous for the entire seven
minutes.
If the DB2 subsystem can successfully block all update activity before the quiesce
period ends, it proceeds to the next processing step. If the quiesce time period is
insufficient to successfully quiesce the DB2 subsystem, the active log data sets are
not truncated and the archive does not occur.
-ARCHIVE LOG MODE(QUIESCE) WAIT(YES) TIME(420)
Example 4: In a data sharing environment, initiate a quiesce period for all members
of the data sharing group. If all DB2 update activity is stopped within this period,
truncate the current active log data set and switch to the next available active log
data set. Specify a quiesce time period of 10 minutes (600 seconds) to override the
value in the field QUIESCE PERIOD of installation panel DSNTIPA for member
DB1G. If the update activity has not quiesced after the 10 minute quiesce period,
the command fails and new update activity is allowed to proceed.
-DB1G ARCHIVE LOG MODE(QUIESCE) TIME(600)
Example 6: In a data sharing environment, truncate the data sets for all members
of the data sharing group and initiate an asynchronous job to offload the truncated
data sets, without any quiesce processing.
-DB2G ARCHIVE LOG SCOPE(GROUP)
70 Command Reference
Chapter 15. BIND PACKAGE (DSN)
The DSN subcommand BIND PACKAGE builds an application package. DB2
records the description of the package in the catalog tables and saves the prepared
package in the directory.
Environment
You can use BIND PACKAGE from DB2I, or from a DSN session under TSO that
runs in either the foreground or background.
Authorization
The package owner must have authorization to execute all statements embedded
in the package for BIND PACKAGE to build a package without producing error
messages. (The SYSADM authority includes this authorization.) For
VALIDATE(BIND), DB2 verifies the authorization at bind time. For
VALIDATE(RUN), DB2 verifies the authorization initially at bind time, but if the
authorization check fails, DB2 rechecks it at run time.
| The package owner must be a role to execute BIND PACKAGE in a trusted context
| with role ownership. If performing a bind in a trusted context that has a
| role-as-object owner, then the owner of the package will be a role. If OWNER is
| specified, then it is assumed to be a role. If it is not specified, then the role of the
| binder becomes the owner.
72 Command Reference
Table 8. Summary of privileges needed for BIND PACKAGE options (continued)
Installation panel field BIND NEW Authorization required to run BIND
Bind option PACKAGE PACKAGE
ADD, specifying an OWNER other BINDADD If the binder does not have SYSADM
than the primary authorization ID (1, 2)
or SYSCTRL authority, the
authorization ID or role of the
OWNER must have one of the
following to add a new package or
new version of an existing package to
a collection:
v The BINDADD system privilege
and either the CREATE IN
privilege or PACKADM authority
on the collection or on all
collections
v SYSADM or SYSCTRL authority
The binder can also be a role.
BIND If the binder does not have SYSADM
or SYSCTRL authority, the
authorization ID or role of the
OWNER must have one of the
following to add a new package or
new version of an existing package to
a collection:
v The BINDADD system privilege
and either the CREATE IN
privilege or PACKADM authority
on the collection or on all
collections
v SYSADM or SYSCTRL authority
v PACKADM authority on the
collection or on all collections
v The BIND package privilege (can
only add a new version of an
existing package)
The binder can also be a role.
REPLACE, using the default owner or BINDADD or BIND Primary authorization ID or role must
primary authorization ID have one of the following:
v Ownership of the package
| v BIND privilege on the package. If
| the package does not exist, see the
| authorization that is required for
| ″ADD, using the default owner or
| primary authorization ID.″
v PACKADM authority on the
collection or on all collections
v SYSADM or SYSCTRL authority
74 Command Reference
| Syntax
|
| enable-block member-block
| QUALIFIER(qualifier-name) DEFER(PREPARE)
NODEFER(PREPARE)
|
| ACTION (REPLACE) NO
REPLVER(version-id) CURRENTDATA( YES )
(ADD)
|
| DRDA 1 DYNAMICRULES( RUN )
DBPROTOCOL( PRIVATE ) DEGREE( ANY ) BIND
DEFINEBIND
DEFINERUN
INVOKEBIND
INVOKERUN
|
| ENCODING( ASCII ) NO I
EBCDIC EXPLAIN( YES ) FLAG( W )
UNICODE E
ccsid C
|
| IMMEDWRITE( NO ) (1) NO
YES ISOLATION( CS ) KEEPDYNAMIC( YES )
RR
RS
UR
NC
(2) OPTHINT( ’hint-id’ ) ,
NONE
(3) PATH( schema-name )
REOPT( ALWAYS ) USER
ONCE
AUTO
ROUNDING ( CEILING )
DOWN RELEASE( COMMIT ) NOPACKAGE
FLOOR DEALLOCATE SQLERROR( CONTINUE )
HALFDOWN
HALFEVEN
HALFUP
UP
RUN
VALIDATE( BIND )
|
Notes:
| 1 The default for a local package is the plan value. The default for a remote package is CS.
member-block:
MEMBER(dbrm-member-name)
LIBRARY(dbrm-pds-name)
COPY(collection-id.package-id)
COPYVER(version-id) COMPOSITE
OPTIONS( COMMAND )
DEPLOY(collection-id.package-id) COPYVER(version-id)
enable-block:
ENABLE(*)
,
ENABLE ( BATCH )
DISABLE DLIBATCH ,
DB2CALL
CICS DLIBATCH( connection-name )
IMS ,
IMSBMP
IMSMPP CICS( applid )
REMOTE ,
RRSAF
IMSBMP( imsid )
,
IMSMPP( imsid )
,
REMOTE( location-name )
<luname>
Option descriptions
For descriptions of the options shown in the syntax diagram, see “Bind and rebind
options”.
Examples
Assume that a supervisor routinely executes SQL statements using SPUFI to check
the status of parts as they go through the assembly process and to update a table
with the results of her inspection. She does not need to know the exact status of
the parts; a small margin of error is acceptable.
The supervisor queries the status of the parts from a production table called
ASSEMBLY-STATUS and makes the updates in a non-production table called
REPORTS. She uses the SPUFI option AUTOCOMMIT NO and has the habit of
leaving data on the screen while she performs other tasks.
BEGIN
...
END
Subsections:
v “Environment”
v “Authorization”
v “Syntax” on page 81
v “Option descriptions” on page 82
v “Examples” on page 82
Environment
You can use BIND PLAN through DB2I, or from a DSN session under TSO that
runs in either the foreground or background.
Authorization
The plan owner must have authorization to execute all SQL statements embedded
in the plan for BIND PLAN to build a plan without producing error messages.
This excludes statements included in DBRMs that are bound to packages included
in the package list of the plan. The SYSADM authority includes this authorization.
For VALIDATE(BIND), DB2 verifies the authorization at bind time. For
VALIDATE(RUN), DB2 verifies the authorization initially at bind time, but if the
authorization check fails, DB2 rechecks it at run time.
| The plan owner must be a role to execute BIND PLAN in a trusted context with
| role ownership.
The following table explains the authorization required to run BIND PLAN,
depending on the options specified.
Table 9. Summary of privileges needed for BIND PLAN options
Option Authorization required to run BIND PLAN
ADD, using the Primary authorization ID (default owner) must have one of the
default owner or following:
primary v BINDADD privilege
authorization ID
v SYSADM or SYSCTRL authority
ADD, specifying an If the binder does not have SYSADM or SYSCTRL authority, the
OWNER other than authorization ID of the new OWNER must have one of the following:
the primary v BINDADD privilege
authorization ID
v SYSADM or SYSCTRL authority
Specifying the OWNER for ADD and REPLACE: If any of the authorization IDs
of the process has SYSADM authority or SYSCTRL authority, OWNER
authorization-id can be any value. If any of the authorization IDs has the
BINDAGENT privilege granted from the owner, authorization-id can specify the
grantor as OWNER. Otherwise, OWNER authorization-id must be one of the
primary or secondary authorization IDs of the binder.
| If you specify OWNER authorization-id , DB2 first checks if the OWNER has the
| necessary bind privilege. If the OWNER does not have the necessary bind privilege
| and if the IFCID 140 trace is active, the trace record is written. DB2 then checks the
| binder for SYSCTRL or SYSADM authority. If the binder has the privilege, the
| BIND is successful.
80 Command Reference
Syntax
NODEFER(PREPARE)
DEFER(PREPARE) USE (REPLACE) CACHESIZE(decimal-value)
ACQUIRE( ALLOCATE ) RETAIN
ACTION (ADD)
NO CURRENTSERVER(location-name) DBPROTOCOL( DRDA ) 1
CURRENTDATA( YES ) PRIVATE DEGREE( ANY )
EXPLICIT RUN ENCODING( ASCII ) NO
DISCONNECT( AUTOMATIC ) DYNAMICRULES( BIND ) EBCDIC EXPLAIN( YES )
CONDITIONAL UNICODE
ccsid
|
I IMMEDWRITE( NO ) CS NO
FLAG( W ) YES ISOLATION( RR ) KEEPDYNAMIC( YES )
E RS
C UR
(1) OPTHINT( ’hint-id’ ) , COMMIT
NONE RELEASE( DEALLOCATE )
(2) PATH( schema-name )
REOPT( ALWAYS ) USER
ONCE
AUTO
|
ROUNDING( CEILING ) DB2 RUN
DOWN SQLRULES( STD ) VALIDATE( BIND )
FLOOR
HALFDOWN
HALFEVEN
HALFUP
UP
Notes:
1 NOREOPT(VARS) can be specified as a synonym of REOPT(NONE)
2 REOPT(VARS) can be specified as a synonym of REOPT(ALWAYS)
enable-block:
ENABLE ( BATCH )
DISABLE DLIBATCH ,
DB2CALL
CICS DLIBATCH( connection-name )
IMS ,
IMSBMP
IMSMPP CICS( applid )
RRSAF ,
ENABLE(*)
IMSBMP( imsid )
,
IMSMPP( imsid )
member-block:
MEMBER( dbrm-member-name )
,
LIBRARY( dbrm-pds-name )
,
Option descriptions
For descriptions of the options shown in the syntax diagram, see “Bind and rebind
options”.
Examples
Example 1: This subcommand creates a new plan called IMSONLY. The SQL
statements for the plan are in the DBRM member DSN8BC81. An ISOLATION
level of cursor stability (CS) provides maximum concurrency when you run the
plan, and protects database values only while the program uses them. DEPTM92
owns the plan, but PRODUCTN qualifies any unqualified table, view, index, and
alias names that are referenced in the DBRM.
A cache size of 0 indicates that users will not run the plan repeatedly. Caching the
names of users authorized to run the plan helps only when the same user runs the
plan repeatedly while it is in the EDM pool. Because this is not the case with this
plan, there is no need to reserve space in the EDM pool for a cache that the plan
does not use.
82 Command Reference
The option ENABLE(IMS) runs the plan only from an IMS environment (DLI
Batch, BMP and MPP). If you attempt to run the plan from another environment,
such as TSO Batch, the plan allocation fails.
BIND PLAN(IMSONLY) -
MEMBER(DSN8BC81) -
ACTION(ADD) -
ISOLATION(CS) -
OWNER(DEPTM92) -
QUALIFIER(PRODUCTN) -
CACHESIZE -
ENABLE(IMS)
To allow other users having only the EXECUTE privilege on a plan to run both the
embedded and dynamic SQL statements, you must bind that plan with the option
DYNAMICRULES(BIND). When DYNAMICRULES(BIND) is in effect for plan
IMSONLY:
v A single authorization ID, the authorization ID for DEPTM92, is used for
authorization checking of both the embedded and dynamic SQL statements in
the DBRM.
v PRODUCTN is the implicit qualifier of unqualified object names referenced in
both the embedded and dynamic SQL statements in the DBRM.
Example 3: This subcommand creates a new plan called CICSONLY. The plan
specifies an ISOLATION level of cursor stability (CS). DEPTM12 owns the plan,
but TESTSYS qualifies any unqualified table, view, index, and alias names
referenced in the DBRM. A cache size of 0 indicates that users will not run the plan
repeatedly.
The option ENABLE(CICS) CICS(CON1) runs the plan only from CICS VTAM®
node CON1 which is specified in the APPLID parameter of the CICS SIT table. If
you attempt to run the plan from another environment or from another CICS
VTAM® note, the run attempt fails.
BIND PLAN(CICSONLY) -
MEMBER(DSN8BC81) -
ACTION(ADD) -
ISOLATION(CS) -
84 Command Reference
Chapter 17. BIND and REBIND options
There are several options you can use for binding or rebinding plans and packages.
Some of the options are common for both bind and rebind and for both plans and
packages.
Defaults: The default for an option is the value used if you omit the entire option.
A default of plan value for BIND PACKAGE means that the default is the same
as the value determined during the bind or rebind of the plan to which the
package is appended at run time.
A default of existing value for REBIND PLAN or REBIND PACKAGE means
that the default is the value that was determined during the previous bind or
rebind of the plan or package that you are rebinding.
Catalog records: The DB2 catalog records information about plans and packages,
chiefly in the tables SYSIBM.SYSPLAN and SYSIBM.SYSPACKAGE. The
descriptions of where the options record information omit the constant qualifier,
SYSIBM, of those table names.
For all other cases, the option descriptions note the specific defaults, which DB2
assigns at bind time. If a specific default value exists, that value is underlined.
The following BIND and REBIND options are listed in alphabetical order.
ACQUIRE
ACQUIRE ( USE ) On: BIND and REBIND PLAN
( ALLOCATE )
Determines whether to acquire resources for DBRMs specified in the MEMBER list
when the application first accesses them or when the plan is allocated. Local or
remote packages associated with the plan acquire their resources when the
application first accesses them.
( USE )
Acquires table space locks only when the application program bound to the
plan first uses them.
(ALLOCATE)
Acquires all table space locks when the plan is allocated. The value has no
effect on dynamic SQL statements, which always use ACQUIRE(USE).
If you use ACQUIRE(ALLOCATE), you must also use
RELEASE(DEALLOCATE). ACQUIRE(ALLOCATE) can increase the plan size,
because additional items become resident in the plan.
Defaults:
Process
Default value
BIND PLAN
USE
ACTION
ACTION ( REPLACE ) On: BIND PLAN and
( REPLACE ) REPLVER (BIND PACKAGE only) PACKAGE
( REPLACE ) RETAIN (BIND PLAN only)
( ADD )
Determines whether the object (plan or package) replaces an existing object with
the same name or is new.
( REPLACE )
The object replaces an existing one with the same identifier, and a new entry
replaces the old one in the catalog table SYSPLAN or SYSPACKAGE. If no
object with the given identifier already exists, the bind process creates the new
object and a new entry.
The authorization ID designated explicitly or implicitly by the option OWNER
becomes the owner of the new object. If that authorization ID is not the
previous owner, all grants of privileges for the object that the previous owner
issued change to name the new owner as the grantor.
If the bind fails, the old object and its entry remain.
For BIND PACKAGE: You cannot use REPLACE with a remote package
bound with either of the options ENABLE or DISABLE. The attempt causes the
bind to fail.
REPLVER ( version-id ) (For BIND PACKAGE only)
Replaces a specific version of the package, identified by version-id . If the
package with the specified version-id does not exist, the bind fails.
The default for version-id comes from the DBRM if you use the MEMBER
option on BIND, or from the COPYVER option if you use the COPY
option.
RETAIN (For BIND PLAN only)
Preserves EXECUTE privileges when you replace the plan. If ownership of
the plan changes, the new owner grants the privileges BIND and
EXECUTE to the previous owner.
RETAIN is not the default. If you do not specify .RETAIN, everyone but
the plan owner loses the EXECUTE privilege (but not the BIND privilege).
If plan ownership changes, the new owner grants the BIND privilege to
the previous owner.
( ADD )
Adds a new object, but does not replace an existing one. If the object name
86 Command Reference
already exists in the catalog, the bind fails. If the bind fails for any reason, the
bind process does not produce a new package or plan and makes no entry in
the catalog.
Defaults:
Process
Default value
BIND PLAN
REPLACE
BIND PACKAGE
REPLACE
REBIND PLAN
N/A
REBIND PACKAGE
N/A
CACHESIZE
CACHESIZE ( value of field PLAN AUTH CACHE ) On: BIND and REBIND PLAN
( decimal-value )
Determines the size (in bytes) of the authorization cache acquired in the EDM pool
for the plan. At run time, the authorization cache stores user IDs authorized to run.
Consulting the cache can avoid a catalog lookup for checking authorization to run
the plan.
decimal-value
The size of the cache can range from 0 to 4096. Nonzero values that are not
multiples of 256 round to the next highest multiple of 256. CACHESIZE(0)
specifies creating no cache when the plan runs.
Defaults:
Process
Default value
COPY
COPY ( collection-id.package-id ) On: BIND PACKAGE
( collection-id.package-id ) COPYVER
Determines that you are copying an existing package and names that package.
Copying the package recalculates the access paths in the copy.
To create a remote copy, this option copies SQL statements from a package at your
local server. Therefore, you must hold the COPY privilege or its equivalent at the
local server.
collection-id
The name of the collection that contains the package to copy, as listed in
column COLLID of catalog table SYSPACKAGE.
package-id
The name of the package to copy, as listed in column NAME of catalog table
SYSPACKAGE.
COPYVER ( version-id )
Determines the version of the package to copy. The default for version-id is the
empty string.
Restrictions:
v collection-id.package-id must identify a package on the local server.
v You cannot copy to a package in the same collection. If you make the copy on
the local server, collection-id. on the COPY option must not name the collection
used on the PACKAGE option.
| v DB2 uses the ISO format for output values unless the SQL statement explicitly
| specifies a different format. Input values can be specified in one of the standard
| formats, or in a format that is recognized by the server’s local date/time exit.
Defaults:
Process
Default value
BIND PLAN
N/A
BIND PACKAGE
None
88 Command Reference
REBIND PLAN
N/A
REBIND PACKAGE
N/A
COPY has no default. If you do not use COPY, you must use MEMBER. You
cannot use both options.
The option values of the package copied (except the values of ENABLE, DISABLE,
OWNER, and QUALIFIER) become the defaults for binding the new package. You
can override a default by choosing a new value for an option on the BIND
PACKAGE command.
Copy packages to remote servers: To copy and bind packages from DB2 Version 9.1
for z/OS to some other server that does not support all the new BIND options in
Version 9.1, use the OPTIONS(COMMAND) option on BIND PACKAGE COPY.
Any options you do not explicitly specify on the BIND PACKAGE subcommand
are set to the server’s defaults. Using this option can prevent bind errors when you
bind and copy packages to servers other than DB2 Version 9.1 for z/OS.
| BIND PACKAGE for remote SQL: To execute SQL statements in the native SQL
| procedure after a CONNECT SQL statement or SQL statements that contain a
| three-part name from a remote server, you need a package at the target server. Use
| the BIND PACKAGE COPY command to specify the following:
| v Target location as the target site on the CONNECT/implicit DRDA SQL
| v Collection ID as the native SQL procedure’s schema
| v Package ID as the native SQL procedure’s name
| v COPYVER as the native SQL procedure’s version
| Example 2: To use the SQL statement SET CURRENT PACKAGESET with the
| BIND PACKAGE command , issue:
| CREATE PROCEDURE TEST.MYPROC LANGUAGE SQL VERSION ABC ...
| BEGIN
| ...
| SET CURRENT PACKAGESET = 'COLL2'
| If you need to create a new copy because the native SQL procedure has changed
| and requires a regeneration, use the BIND COPY ACTION(REPLACE) command.
CURRENTDATA
CURRENTDATA ( NO ) On: BIND and REBIND PLAN
( YES ) and PACKAGE, REBIND
TRIGGER PACKAGE
Determines whether to require data currency for read-only and ambiguous cursors
when the isolation level of cursor stability is in effect. It also determines whether
block fetching can be used for distributed, ambiguous cursors.
( NO ) Specifies that currency is not required for read-only and ambiguous
cursors. Block fetching for distributed, ambiguous cursors is allowed.
If your application attempts to dynamically prepare and execute a DELETE
WHERE CURRENT OF statement against an ambiguous cursor, after that
cursor is opened, use of CURRENTDATA(NO) is not recommended. You
receive a negative SQLCODE if your application attempts a DELETE
WHERE CURRENT OF statement for any of the following cursors:
v A cursor that is using block fetching
v A cursor that is using query parallelism
v A cursor that is positioned on a row that is modified by this or another
application process
( YES )
Specifies that currency is required for read-only and ambiguous cursors.
DB2 acquires page or row locks to ensure data currency. Block fetching for
distributed, ambiguous cursors is inhibited.
Restriction for remote rebinds: You cannot use CURRENTDATA when rebinding a
package at a remote server. To change the value of CURRENTDATA, you can:
v Issue BIND REPLACE, remotely or locally.
v Free the package and issue BIND ADD, remotely or locally.
v Rebind the package locally at the location where the package resides.
Defaults:
Process
Default value
BIND PLAN
| NO
BIND PACKAGE
| NO
REBIND PLAN
Existing value
90 Command Reference
REBIND PACKAGE
Existing value
DBPROTOCOL
DBPROTOCOL ( DRDA ) On: BIND and REBIND PLAN
( PRIVATE ) and PACKAGE
Specifies which protocol to use when connecting to a remote site that is identified
by a three-part name statement.
For DRDA, a package must be bound to each remote site that is referenced by a
three-part name statement. Specify DRDA to inform DB2 that the three-part name
statements in the plan or package are to be converted to DRDA protocol.
If you specify an option on the BIND PACKAGE command, DB2 uses that remote
access method for the package statements, regardless of the BIND PLAN option.
For remote bind, the default is the system default at the remote site.
If you specify an option on the BIND PLAN statement, that information is stored
in table SYSPLAN.
(DRDA)
DBPROTOCOL(DRDA) is passed on BIND PACKAGE, BIND PLAN, REBIND
PACKAGE, or REBIND PLAN invocation. This keyword is the default.
(PRIVATE)
| A warning is issued if you bind or rebind a package or plan with this
| keyword. An application that uses DB2 private protocol access cannot include
| SQL statements that were added to DB2 after Version 7. An application that
| uses DB2 private protocol access cannot include SQL statements that were
| added to DB2 after Version 7.
Defaults:
Process
Default value
BIND PLAN
DRDA
BIND PACKAGE
System default
REBIND PLAN
Value that was specified the last time the plan was bound
| REBIND PACKAGE
| Value that was specified the last time the package was bound
| For DB2 private protocol access, when a static SQL statement refers to a remote
| object, the transparent PREPARE statement and the EXECUTE statements are
| automatically combined and transmitted across the network together. The
| PREPARE statement is deferred only if you specify the bind option
| DEFER(PREPARE).
Defaults:
Process
Default value
92 Command Reference
BIND PLAN
NODEFER
BIND PACKAGE
Plan value
REBIND PLAN
Existing value
REBIND PACKAGE
Existing value
DEGREE
DEGREE (1) On: BIND and REBIND PLAN
( ANY ) and PACKAGE
For plans, the value of DEGREE applies only to the DBRMs bound directly to the
plan (named in the MEMBER option on BIND PLAN), and has no affect on
PKLIST names. The value has no effect on dynamic SQL statements, which use the
value of the special register CURRENT DEGREE. The value of the special register
can be changed by executing the SET CURRENT DEGREE statement.
(1) Prohibits parallel processing.
( ANY )
Allows parallel processing.
Defaults:
Process
Default value
BIND PLAN
1
BIND PACKAGE
1
REBIND PLAN
Existing value
REBIND PACKAGE
Existing value
| DEPLOY
|| DEPLOY (collection-id.package-id ) On: BIND PACKAGE
| COPYVER(version-id)
|
| Specify BIND PACKAGE DEPLOY COPYVER only when the target DB2 is a DB2
| for z/OS server. You can use the DSNTBIND or DSNACCTS procedure to submit
| this command from a remote requester environment.
| You can specify the target collection-id, QUALIFIER, ACTION, and OWNER
| options on the BIND PACKAGE DEPLOY command. If you specify any other bind
| option DB2 returns message DSNT215I. If you do not specify QUALIFIER and
| OWNER their default values are the authorization ID that issues the BIND
| DEPLOY command.
| Using DEPLOY with the ACTION option: If you specify ACTION(ADD) for a
| version that does not exist at the target location, DB2 creates or adds a new version
| of the native SQL procedure and its associated package while keeping the source
| native SQL procedure’s logic. DB2 adds a new version if a native SQL procedure
| with the same target name already exists.
| Authorization:
| Defaults:
| Process
| Default value
| BIND PLAN
| N/A
| BIND PACKAGE
| None
| REBIND PLAN
| N/A
94 Command Reference
| REBIND PACKAGE
| N/A
| DEPLOY has no default. If you do not use DEPLOY, you must use MEMBER or
| COPY.
DISCONNECT
DISCONNECT ( EXPLICIT ) On: BIND and REBIND PLAN
( AUTOMATIC )
( CONDITIONAL )
Defaults:
Process
Default value
BIND PLAN
EXPLICIT
BIND PACKAGE
N/A
REBIND PLAN
Existing value
REBIND PACKAGE
N/A
DYNAMICRULES
DYNAMICRULES ( RUN ) On: BIND and REBIND
( BIND ) PLAN and PACKAGE
( DEFINEBIND ) (BIND and REBIND PACKAGE only)
( DEFINERUN ) (BIND and REBIND PACKAGE only)
( INVOKEBIND ) (BIND and REBIND PACKAGE only)
( INVOKERUN ) (BIND and REBIND PACKAGE only)
96 Command Reference
| v If you are running a trusted context with a role, or when the owner is a
| role, DB2 uses the authorization ID of the owner of the package or plan
| for authorization checking of dynamic SQL statements. The same rules
| that are used to determine the authorization ID for static (embedded)
| statements are used for dynamic statements. DB2 uses the authorization
| ID of the owner of the package or plan for authorization checking of
| dynamic SQL statements. The privilege set is the privileges that are held
| by the authorization ID of the owner of the package or plan. The owner
| can also be a role. The identifier specified in the QUALIFIER option of
| the bind command that is used to bind the SQL statements is the
| implicit qualifier for all unqualified tables, views, aliases, indexes, and
| sequences. If this bind option was not used when the plan or package
| was created or last rebound, the implicit qualifier is the authorization ID
| of the owner of the plan or package. The owner can also be a role.
( DEFINEBIND )
Processes dynamic SQL statements using one of two behaviors, define
behavior or bind behavior.
When the package is run as or runs under a stored procedure or
user-defined function package, DB2 processes dynamic SQL statements
using define behavior, which consists of the following attribute values:
v DB2 uses the authorization ID of the user-defined function or stored
procedure owner for authorization checking of dynamic SQL statements
in the application package.
v The default qualifier for unqualified objects is the user-defined function
or stored procedure owner.
v The attribute values that are described in Common attribute values for
bind, define, and invoke behaviors.
| v If you are running a trusted context with a role, or when the owner is a
| role, then define behavior applies only if the dynamic SQL statement is
| in a package that is run as a stored procedure or user-defined function
| (or runs under a stored procedure or user-defined function package),
| and the package is bound with DYNAMICRULES (DEFINEBIND). DB2
| uses the authorization ID of the stored procedure or user-defined
| function owner for authorization checking of dynamic SQL statements in
| the application package. This can be a primary or secondary
| authorization ID or a role. In this case, the privilege set is the privileges
| that are held by the authorization ID of the stored procedure or
| user-defined function owner. This owner can be a primary or secondary
| authorization ID or a role. The authorization ID of the stored procedure
| or user-defined function owner is also the implicit qualifier for
| unqualified table, view, alias, index, and sequence names. The owner can
| also be a role.
When the package is run as a stand-alone program, DB2 processes
dynamic SQL statements using bind behavior, which is described in BIND
keyword.
( DEFINERUN )
Processes dynamic SQL statements using one of two behaviors, define
behavior or run behavior.
When the package is run as or runs under a stored procedure or
user-defined function package, dynamic SQL statements have define
behavior, which is described in DEFINEBIND keyword.
98 Command Reference
When the package is run as a stand-alone program, DB2 processes
dynamic SQL statements using bind behavior, which is described in BIND
keyword.
( INVOKERUN )
Processes dynamic SQL statements using one of two behaviors, invoke
behavior or run behavior.
When the package is run as or runs under a stored procedure or
user-defined function package, DB2 processes dynamic SQL statements
using invoke behavior, which is described in INVOKEBIND keyword.
| If you are running a trusted context with a role, or when the owner is a
| role, then invoke behavior applies only if the dynamic SQL statement is in
| a package that is run as a stored procedure or user-defined function (or
| runs under a stored procedure or user-defined function package), and the
| package was bound with DYNAMICRULES( INVOKERUN). DB2 uses the
| authorization ID of the stored procedure or user-defined function invoker
| for authorization checking of dynamic SQL statements in the application
| package. The invoker can also be a role. The privilege set is the privileges
| that are held by the authorization ID of the stored procedure or
| user-defined function invoker. However, if the invoker is the primary
| authorization ID of the process or the CURRENT SQLID value, secondary
| authorization IDs are also checked along with the primary authorization
| ID’s role. Therefore, the privilege set is the union of the set of privileges
| held by each authorization ID of the process and the primary authorization
| ID’s role. The authorization ID of the stored procedure or user-defined
| function invoker is also the implicit qualifier for unqualified table, view,
| alias, index, and sequence names. The invoker can also be a role.
When the package is run as a stand-alone program, DB2 processes
dynamic SQL statements using run behavior, which is described in RUN
keyword.
Common attribute values for bind, define, and invoke behavior: The following
attribute values apply to dynamic SQL statements in plans or packages that have
bind, define, or invoke behavior:
v You can execute the statement SET CURRENT SQLID in a package or plan that
is bound with any DYNAMICRULES value. However, DB2 does not use the
value of CURRENT SQLID as the authorization ID for dynamic SQL statements.
DB2 always uses the value of CURRENT SQLID as the qualifier for the
EXPLAIN output and optimizer hints input PLAN_TABLE. (If the value of
CURRENT SQLID has an alias on PLAN_TABLE and has the appropriate
privileges, that PLAN_TABLE is populated.)
v If the value of installation option USE FOR DYNAMICRULES is YES, DB2 uses
the application programming default values that were specified during
installation to parse and semantically verify dynamic SQL statements. If the
value of USE for DYNAMICRULES is NO, DB2 uses the precompiler options to
parse and semantically verify dynamic SQL statements.
v GRANT, REVOKE, CREATE, ALTER, DROP, and RENAME statements cannot be
executed dynamically.
Remote DB2 servers: For a package that uses DRDA access, DB2 sends the
DYNAMICRULES option to the DB2 server at bind time.
The following table summarizes the dynamic SQL statement attribute values for
each behavior.
Table 10. Definitions of dynamic SQL statement behaviors
Value for bind Value for run Value for define Value for invoke
Dynamic SQL attribute behavior behavior behavior behavior
Authorization ID Package OWNER Current SQLID User-defined function Authorization ID of
or stored procedure invoker
owner
Default qualifier for Bind OWNER or Current SQLID User-defined function Authorization ID of
unqualified objects QUALIFIER value or stored procedure invoker
owner
CURRENT SQLID Initialized to Initialized to Initialized to primary Initialized to primary
primary authid. primary authid. authid. SET SQLID is authid. SET SQLID is
SET SQLID is SET SQLID is allowed. allowed.
allowed. allowed.
Source for application As determined by Installation panel As determined by the As determined by the
programming options the DSNHDECP DSNHDECP DSNHDECP DSNHDECP parameter
parameter application parameter DYNRULS DYNRULS
DYNRULS defaults
Can execute GRANT, No Yes No No
REVOKE, CREATE,
ALTER, DROP, RENAME?
Determines which connections can use the plan or package. You cannot use both
DISABLE and ENABLE. For packages, DISABLE and ENABLE are valid only for
local bind operations.
With some connection types you can list connection IDs to identify specific
connections of the type to disable or enable.
If you list connection IDs as disabled, any connections not listed for the same
connection type are enabled.
If you list connection IDs as enabled, any connections not listed for the same
connection type are disabled.
A connection ID is valid only after the keyword that names its corresponding
connection type.
Connection types:
(*)
Specifies all valid connection types. Use only with ENABLE.
( BATCH )
Indicates that all TSO connections are either enabled or disabled for the plan or
package.
( CICS )
Identifies the CICS Connection®. All CICS VTAM node names specified in the
CICS SIT table are either enabled or disabled for the plan or package.
( CICS ) CICS ( applid , ...)
Identifies the CICS VTAM node name specified in the APPLID parameter of
the CICS SIT table. The CICS VTAM node identified by applid is either enabled
or disabled for the plan or package.
( DB2CALL )
Indicates that the call attachment facility (CAF) connection is either enabled or
disabled for the plan or package.
( DLIBATCH )
Identifies the Data Language I (DL/I) Batch Support Facility connection. All
connection identifiers from the DDITV02 data set or the job name in the JCL
that the DL/I batch support system needs to have are either enabled or
disabled for the plan or package.
( DLIBATCH ) DLIBATCH ( connection-name , ...)
Specifies the connection identifier as from the DDITV02 data set or the job
name in the JCL that the DL/I batch support system needs to have. The DL/I
batch connection identified by connection-name is either enabled or disabled for
the plan or package.
( IMS )
Specifies that all Information Management System (IMS) connections,
DLIBATCH, IMSBMP, and IMSMPP are either enabled or disabled for the plan
or package.
( IMSBMP )
Specifies the IMS connection for the Batch Message Program (BMP) region. All
IMS BMP connections identified by the value of IMSID on the CTL parameter
EXEC are either enabled or disabled for the plan or package.
Defaults:
Process
Default value
BIND PLAN
ENABLE(*)
BIND PACKAGE
ENABLE(*)
REBIND PLAN
Existing value
REBIND PACKAGE
Existing value
ENCODING
ENCODING ( ASCII )( EBCDIC )( UNICODE )( ccsid ) On: BIND and REBIND PLAN
and PACKAGE
| Specifies the application encoding for all host variables in static statements in the
| plan or package. EBCDIC is the only valid option for a plan or package that was
| precompiled on DB2 Version 6 or earlier. If you specify ccsid on any plan or
| package precompiled prior to Version 7, the value of ccsid must match the EBCDIC
| CCSID specified on the installation panel DSNTIPF (the SYSTEM EBCDIC CCSID).
| You can specify ASCII, UNICODE, or ccsid, where ccsid is a value other than the
| SYSTEM EBCDIC CCSID for any plan or package precompiled on Version 7 or
| later. You might select this option when a data source, such as a terminal emulator,
| uses a CCSID that is not the same as the SYSTEM EBCDIC CCSID. For example, a
| user has a terminal emulator with a CCSID of 1047, but the SYSTEM EBCDIC
| CCSID is 37. In this case, the plan or package being used by that user should be
| bound with ENCODING (1047).
ENCODING also affects the content of the data that is returned by the SQL
statement DESCRIBE. DB2 will return column names, label names, or both (if
requested) in the specified application encoding scheme.
Defaults: The default package application encoding scheme is not inherited from
the plan application encoding option. The default for a package that is bound on a
remote DB2 for z/OS system is the remote server’s default application encoding
scheme. Similarly, when a plan or package is run on a remote DB2 for z/OS server,
the specified ENCODING option is ignored. Instead, the remote server’s encoding
scheme is used.
| The following statements set the value of the host variable and do not require the
| package or DBRM to be bound into the plan:
SET CURRENT PACKAGE SET = :HV ,
SET :HV = CURRENT PACKAGE SET ,
SET :HV = CURRENT PACKAGE PATH ,
SET CURRENT PACKAGE PATH = :HV
| The host variable uses the system default application encoding scheme, even when
| the application is bound with the ENCODING (EBCDIC/UNICODE) bind option.
Process
Default value
BIND PLAN
The system default application encoding scheme that was specified at
installation time.
BIND PACKAGE
The system default application encoding scheme that was specified at
installation time.
| REBIND PLAN
| The value that was specified the last time that the plan was bound.
| REBIND PACKAGE
| The value that was specified the last time the package was bound.
EXPLAIN
PSPI
Obtains information about how SQL statements in the package, or in the member
list of the plan, are to execute. It inserts that information into the table owner
.PLAN_TABLE. Owner can be the authorization ID of the owner of the plan or
package. Alternatively, the authorization ID of the owner of the plan or package
can have an alias as owner .PLAN_TABLE that points to the base table,
PLAN_TABLE. Owner must also have the appropriate SELECT and INSERT
privileges on that table. This option does not obtain information for statements that
access remote objects.
PLAN_TABLE must have a base table and can have multiple aliases with the same
table name, PLAN_TABLE, but using different authids; it cannot be a view or a
synonym. It should exist before the bind process begins.
The EXPLAIN option also populates two optional tables, if they exist:
DSN_STATEMNT_TABLE and DSN_FUNCTION_TABLE.
You can get EXPLAIN output for a statement that is embedded in a program that
is bound with EXPLAIN(NO) by embedding the SQL statement EXPLAIN in the
program. Otherwise, the value of the EXPLAIN option applies to all explainable
SQL statements in the program, and to the fullselect portion of any DECLARE
CURSOR statements.
For automatic rebind: EXPLAIN(YES) is in effect if you bind the plan or package
with EXPLAIN(YES) and if the value of field EXPLAIN PROCESSING on
installation panel DSNTIPO is YES. If EXPLAIN(YES) and VALIDATE(BIND) are in
effect and PLAN_TABLE is not correct, the automatic rebind fails.
( NO ) Provides no EXPLAIN information.
( YES )
Inserts information in the tables populated by EXPLAIN. If owner
.PLAN_TABLE does not exist at bind time, the value of the option
VALIDATE determines the success of the bind operation.
v If the value is BIND, the bind fails.
Defaults:
Process
Default value
BIND PLAN
NO
BIND PACKAGE
NO
REBIND PLAN
Existing value
REBIND PACKAGE
Existing value
PSPI
FLAG
FLAG ( I )( W )( E )( C ) On: BIND and REBIND PLAN
and PACKAGE, REBIND
TRIGGER PACKAGE
Defaults:
IMMEDWRITE
IMMEDWRITE ( NO )( YES ) On: BIND and REBIND PLAN
and PACKAGE
Indicates whether immediate writes are to be done for updates that are made to
group buffer pool dependent page sets or partitions. This option is only applicable
for data sharing environments. The IMMEDWRITE subsystem parameter has no
effect on the IMMEDWRITE bind option at bind time. The following table shows
the implied hierarchy of this option as it affects run time. The IMMEDWRITE
option values are as follows:
( NO ) Specifies that normal write activity is done. Updated pages that are group
buffer pool dependent are written at or before phase one of commit or at
the end of abort for transactions that have rolled back.
( YES )
Specifies that updated pages that are group buffer pool dependent are
immediately written as soon as the buffer update completes. Updated
pages are written immediately even if the buffer is updated during
forward progress or during rollback of a transaction. Specifying this option
might impact performance.
Table 11. The implied hierarchy of the IMMEDWRITE option
IMMEDWRI subsystem
IMMEDWRITE bind option parameter Value at run time
NO NO NO
NO PH1 PH1
NO YES YES
PH1 NO PH1
PH1 PH1 PH1
PH1 YES YES
YES NO YES
YES PH1 YES
YES YES YES
Note: The NO and PH1 options are equivalent. The PH1 option is shown for
backward compatibility only.
Defaults:
Process
Default value
BIND PLAN
NO
BIND PACKAGE
NO
REBIND PLAN
Existing value
REBIND PACKAGE
Existing value
ISOLATION
| ISOLATION ( CS )( RS )( RR )( UR )( NC ) On: BIND and REBIND PLAN
and PACKAGE, REBIND
TRIGGER PACKAGE
Determines how far to isolate an application from the effects of other running
applications.
| ( CS ) Cursor stability. Ensures, like repeatable read, that your application does not
read a row that another process changes until that process releases that
Defaults:
Process
Default value
BIND PLAN
CS
BIND PACKAGE
| Plan value for a local server; CS for a remote server.
REBIND PLAN
Existing value
REBIND PACKAGE
Existing value
For REBIND PACKAGE, you cannot change ISOLATION from a specified value to
a default of the plan value by using REBIND PACKAGE. To do that, you must use
BIND PACKAGE ACTION(REPLACE).
Determines whether DB2 keeps dynamic SQL statements after commit points.
( NO ) Specifies that DB2 does not keep dynamic SQL statements after commit
points.
( YES )
Specifies that DB2 keeps dynamic SQL statements after commit points.
If you specify KEEPDYNAMIC(YES), DDF server threads that are used to execute
KEEPDYNAMIC(YES) packages will remain active. Active DDF server threads are
subject to idle thread timeouts.
Defaults:
Process
Default value
BIND PLAN
NO
BIND PACKAGE
NO
REBIND PLAN
Existing value
REBIND PACKAGE
Existing value
LIBRARY
LIBRARY ( dbrm-pds-name )( dbrm-pds-name , ...) (BIND PLAN only) On: BIND PLAN, BIND
PACKAGE
Determines what partitioned data sets (libraries) to search for the DBRMs listed in
the MEMBER option. The libraries must be cataloged.
The bind process searches for the libraries in the order that you list them. If the
libraries do not contain some DBRM listed in the MEMBER option, and if a JCL
statement exists for DBRMLIB DD, then the process searches for the member
among the libraries that the JCL statement describes.
For BIND PACKAGE, you can specify only one library to search.
For BIND PLAN, you can specify one or more libraries to search.
Defaults:
Process
Default value
BIND PLAN
None
BIND PACKAGE
None
REBIND PLAN
N/A
REBIND PACKAGE
N/A
The default is to search only the libraries described by the DD statement for
DBRMLIB.
MEMBER
MEMBER ( dbrm-member-name )( dbrm-member-name , ...) (BIND PLAN On: BIND PLAN, BIND
only) PACKAGE
For BIND PLAN, you can list many members. DB2 sorts the member list in
alphabetical order. If you do not use MEMBER, you must use PKLIST.
Defaults:
Process
Default value
BIND PLAN
None
BIND PACKAGE
None
REBIND PLAN
N/A
REBIND PACKAGE
N/A
OPTHINT
OPTHINT (’ hint-id ’) On: BIND and REBIND PLAN
and PACKAGE
Controls whether query optimization hints are used for static SQL.
(’ hint-id ’)
A character string of up to 128 characters in length, which is used by the
optimizer when searching the PLAN_TABLE for rows to use as input to
the optimizer. The delimiters can only be single quotation marks (’).
If ’ hint-id ’ contains all blank characters, DB2 does not use optimization
hints for static SQL statements.
| DB2 uses optimization hints only when optimization hints are enabled for your
| system. To enable optimization hints, specify YES in the OPTIMIZATION HINTS
| field of installation panel DSNTIP8.
Defaults:
Process
Default value
BIND PLAN
All blanks, use normal optimization
BIND PACKAGE
All blanks, use normal optimization
REBIND PLAN
Existing value
OPTIONS
OPTIONS (COMPOSITE) (COMMAND) On: BIND PACKAGE COPY
Defaults:
Process
Default value
BIND PACKAGE COPY
COMPOSITE
OWNER
OWNER ( authorization-id ) On: BIND and REBIND PLAN
and PACKAGE
Determines the authorization ID of the owner of the object (plan or package). The
owner must have the privileges required to execute the SQL statements contained
in the object.
If ownership changes, all grants for privileges on the object that the previous
owner issued change to name the new owner as the grantor. The new owner has
the privileges BIND and EXECUTE on the object and grants them to the previous
owner.
You can bind or rebind only the objects for which the authorization ID has bind
privileges. If you do not specify an authorization ID, the process rebinds only the
objects for which the primary ID has bind privileges.
For remote BIND or REBIND PACKAGE only, the value of OWNER is subject to
translation when sent to the remote system.
Defaults:
Process
Default value
BIND PLAN
Primary ID
BIND PACKAGE
Primary ID
REBIND PLAN
Existing value
REBIND PACKAGE
Existing value
The default owner is the primary authorization ID of the agent that runs the bind
process.
PACKAGE
PACKAGE ( location-name.collection-id.package-id.(version-id) )( * ) (REBIND On: BIND and REBIND
PACKAGE only) PACKAGE
The following options identify the location, collection, package name, and version
of the package. You can identify a location and collection. For BIND, the DBRM
PATH
PATH ( schema-name ) On: BIND and REBIND PLAN
( USER ) and PACKAGE
( schema-name , USER , ...)
For the PATH option, consider the following guidelines when you specify a
schema-name :
v The specified schema names are not folded to uppercase by DB2. This behavior
is different than that for schema names in SQL statements, which are folded to
uppercase before being stored in the catalog. If you do not specify these
nondelimited schema names in upper case, DB2 cannot find a match in the
catalog for those schema names.
v You can specify delimited identifiers in both mixed and uppercase characters.
Defaults:
Process
Default value
Although plan qualifier is the default value for BIND PLAN, it is not stored in the
catalog. Instead, the catalog value is blank. The catalog value is also blank for
package qualifier.
PATHDEFAULT
PATHDEFAULT On: REBIND PLAN and
PACKAGE
Defaults:
Process
Default value
BIND PLAN
N/A
BIND PACKAGE
N/A
REBIND PLAN
None
REBIND PACKAGE
None
PKLIST determines what packages to include in the package list for the plan. The
order in which you list packages with partial identifiers determines the search
order at run time and can affect performance.
NOPKLIST is used with REBIND PLAN only. NOPKLIST determines that the plan
rebinds without a package list. If a package list already exists, NOPKLIST deletes
it.
location-name or *
Names the location of the DBMS where the package resides, or defers that
Defaults:
Process
Default value
BIND PLAN
None
BIND PACKAGE
N/A
REBIND PLAN
Existing value
REBIND PACKAGE
N/A
PKLIST has no default; if you do not use PKLIST, you must use MEMBER.
The default for NOPKLIST is to use the package list specified in the PKLIST
option, if any, during the current or previous bind or rebind.
PLAN
PLAN ( plan-name ) * (*) (REBIND PLAN only) On: BIND and
REBIND PLAN
QUALIFIER
QUALIFIER ( qualifier-name ) On: BIND and REBIND PLAN
and PACKAGE
Determines the implicit qualifier for unqualified names of tables, views, indexes,
and aliases contained in the plan or package.
( qualifier-name )
Specifies the value of the implicit qualifier. This value is not subject to
translation when sent to a remote system for BIND or REBIND PACKAGE.
Defaults:
Process
Default value
BIND PLAN
Owner ID
BIND PACKAGE
Owner ID
REBIND PLAN
Existing value
REBIND PACKAGE
Existing value
The default is the owner’s authorization ID, whether you use the OWNER option
or its default.
| PLANMGMT
|| PLANMGMT On: REBIND PACKAGE and
| REBIND TRIGGER PACKAGE
|
| Wildcards:PLANMGMT settings remain valid when wildcards (*) are used in the
| REBIND syntax. When you use REBIND PACKAGE to rebind more than one
| package, DB2 retains previous and original copies for each package separately.
| Defaults:
| Process
| Default value
| BIND PLAN
| N/A
| BIND PACKAGE
| N/A
| REBIND PLAN
| Existing value
| REBIND PACKAGE
| Existing value
RELEASE
RELEASE ( COMMIT ) On: BIND and REBIND PLAN
( DEALLOCATE ) and PACKAGE, REBIND
TRIGGER PACKAGE
Determines when to release resources that a program uses, either at each commit
point or when the program terminates.
( COMMIT )
Releases resources at each commit point.
(DEALLOCATE)
Releases resources only when the program terminates.
| RELEASE(DEALLOCATE) has no effect on packages that are run on a DB2
| server through a DRDA connection with a client system. The value also has no
| effect on dynamic SQL statements, which always use RELEASE(COMMIT),
| with one exception: When you use RELEASE(DEALLOCATE) and
| KEEPDYNAMIC(YES), and your subsystem is installed with YES for field
| CACHE DYNAMIC SQL on installation panel DSNTIP8, the
| RELEASE(DEALLOCATE) option is honored for dynamic SELECT, INSERT,
| UPDATE and DELETE statements.
Locks that are acquired for dynamic statements are held until one of the
following events occurs:
v The application process ends (deallocation).
v The application issues a PREPARE statement with the same statement
identifier. (Locks are released at the next commit point.)
v The statement is removed from the cache because it has not been used.
(Locks are released at the next commit point.)
Defaults:
Process
Default value
BIND PLAN
COMMIT
BIND PACKAGE
Plan value
REBIND PLAN
Existing value
REBIND PACKAGE
Existing value
REOPT
REOPT ( NONE ) On: BIND and REBIND PLAN and
PACKAGE
( ALWAYS )
( ONCE )
( AUTO )
Specifies whether to have DB2 determine an access path at run time by using the
values of host variables, parameter markers, and special registers.
(NONE)
Does not determine an access path at run time. You can use
NOREOPT(VARS) as a synonym for REOPT(NONE).
| (ALWAYS)
Determines the access path again at run time each time the statement is
run. DB2 determines access paths at both bind time and run time for
statements that contain one or more of the following variables:
v Host variables
v Parameter markers
v Special registers
At run time, DB2 uses the values in those variables to determine the access
paths. You can use REOPT(VARS) as a synonym for REOPT(ALWAYS).
(ONCE)
Determines the access path for any dynamic statement only once, at the
first run time or at the first time the statement is opened. This access path
is used until the prepared statement is invalidated or removed from the
dynamic statement cache and needs to be prepared again.
| (AUTO)
Autonomically determines if a new access path needs to be generated to
further optimize the performance for each execution. DB2 determines the
Usage notes:
Defaults:
Process
Default value
BIND PLAN
NONE
BIND PACKAGE
NONE
REBIND PLAN
Existing value
REBIND PACKAGE
Existing value
REOPT(NONE) is the default for a package that is bound on a remote DB2 server.
| Specifies the rounding mode at bind time. Use rounding mode to manipulate
| DECFLOAT data.
| CEILING
| Round toward +infinity. If all of the discarded digits are zero or if the sign
| is negative the result is unchanged other than the removal of discarded
| digits. Otherwise, the result coefficient should be incremented by 1 (round
| up).
| DOWN
| Round toward 0 (TRUNCATION). The discarded digits are ignored.
| FLOOR
| Round toward -infinity. If all of the discarded digits are zero or if the sign
| is positive the result is unchanged other than the removal of discarded
| digits. Otherwise, the sign is negative and the result coefficient should be
| incremented by 1.
| HALFDOWN
| Round to the nearest; if equidistant, round down. If the discarded digits
| represent greater than half (0.5) of the value of a one in the next left
| position then the result coefficient should be incremented by 1 (rounded
| up). Otherwise, (the discarded digits are 0.5) or less) the discarded digits
| are ignored.
| HALFEVEN
| Round to the nearest; if equidistant, round so that the final digit is even. If
| the discarded digits represent greater than half (0.5) the value of a one in
| the next left position then the result coefficient should be incremented by 1
| (rounded up). If they represent less than half, then the result coefficient is
| not adjusted (that is, the discarded digits are ignored). Otherwise, (they
| represent exactly half) the result coefficient is unaltered if its rightmost
| digit is even, or incremented by 1 (rounded up) if its rightmost digit is odd
| (to make an even digit).
| This option is the default.
| HALFUP
| Round to nearest; if equidistant, round up. If the discarded digits represent
| greater than or equal to half (0.5) of the value of a one in the next left
| position then the result coefficient should be incremented by 1 (rounded
| up). Otherwise, the discarded digits are ignored.
| UP Round away from 0. If all the discarded digits are zero the result is
| unchanged other than they removal of discarded digits. Otherwise, the
| result coefficient should be incremented by 1 (rounded up).
| Defaults:
SQLERROR
SQLERROR ( NOPACKAGE ) On: BIND PACKAGE only
( CONTINUE )
Defaults:
Process
Default value
BIND PLAN
N/A
BIND PACKAGE
NOPACKAGE
REBIND PLAN
N/A
REBIND PACKAGE
N/A
Because you cannot use the option SQLERROR for REBIND PACKAGE, the value
for the previous package remains in effect when you rebind that package. If you
rebind a package that uses SQLERROR(CONTINUE), those SQL statements found
in error at bind time do not rebind.
SQLRULES
SQLRULES ( DB2 ) On: BIND and REBIND PLAN
( STD )
For local operations, the value of SQLRULES is used for the initial value of the
SQL special register CURRENT RULES.
Defaults:
Process
Default value
BIND PLAN
DB2
BIND PACKAGE
N/A
REBIND PLAN
Existing value
REBIND PACKAGE
N/A
SWITCH
SWITCH ( PREVIOUS )( ORIGINAL ) On: REBIND PACKAGE, REBIND
TRIGGER PACKAGE
Restores all previous or original package information in the catalog tables and
directory to that of the specified package copy. This option allows you to fallback
to an older copy of a package in the event of a performance regression. You cannot
specify SWITCH with any other rebind options. If the package you specified does
not have the previous or original copy to switch to, DB2 will issue an error
message, and will then continue processing the rest of the list. Use this option with
wildcards (*) in the syntax.
( PREVIOUS )
Switches between the current and previous copies of a package. The
current copy takes the place of the previous copy, and the previous copy
takes the place of the current copy.
Defaults:
Process
Default value
BIND PLAN
NO
BIND PACKAGE
NO
REBIND PLAN
Existing value
REBIND PACKAGE
Existing value
VALIDATE
VALIDATE ( RUN ) On: BIND and REBIND PLAN
( BIND ) and PACKAGE
Determines whether to recheck, at run time, errors of the type ″OBJECT NOT
FOUND″ and ″NOT AUTHORIZED″ found during bind or rebind. The option has
no effect if all objects and needed privileges exist.
( RUN )
Indicates that if not all objects or privileges exist at bind time, the process
issues warning messages, but the bind succeeds. DB2 checks existence and
authorization again at run time for SQL statements that failed those checks
during bind. The checks use the authorization ID of the plan or package
owner.
( BIND )
Indicates that if not all objects or needed privileges exist at bind time, the
process issues error messages, and does not bind or rebind the plan or
package, except that:
For BIND PACKAGE only, if you use the option
SQLERROR(CONTINUE), the bind succeeds, but the SQL statements in
it that have errors cannot execute.
Defaults:
Process
Default value
BIND PLAN
RUN
BIND PACKAGE
RUN
REBIND PLAN
Existing value
Subsections:
v “Environment”
v “Authorization”
v “Syntax”
v “Option descriptions”
v “Usage notes” on page 131
v “Examples” on page 133
Environment
This command can be issued from a z/OS console, a DSN session under TSO, a
DB2I panel (DB2 COMMANDS), an IMS or a CICS terminal, or a program using
the instrumentation facility interface (IFI).
Authorization
To execute this command, you must use a privilege set of the process that includes
one of the following authorities:
v SYSOPR authority
v SYSCTRL authority
v SYSADM authority
DB2 commands that are issued from a logged-on z/OS console or TSO SDSF can
be checked by DB2 authorization using primary and secondary authorization IDs.
Syntax
| CANCEL THREAD(token)
DDF THREAD( luwid ) DUMP LOCAL NOBACKOUT
token
Option descriptions
THREAD ( token )
Identifies a specific thread, either distributed or not, whose processing you
want to cancel. DB2 assigns a token to each thread that is unique for that DB2
subsystem, but not necessarily unique across subsystems.
Canceling distributed threads: Canceling a distributed thread can cause the thread
to enter the indoubt state. Message DSNL450I is issued if the CANCEL command
causes the DDF thread to be converted from active to indoubt. DB2 releases the
resources that the thread holds when the indoubt state is resolved by automatic
indoubt resolution with the coordinator, or by resolution with the command
RECOVER INDOUBT.
| Canceling threads on applications that update NOT LOGGED tables spaces: Take
| care when you issue a CANCEL command for an application that updates a NOT
| LOGGED table space. The CANCEL THREAD command can cause the NOT
| LOGGED table space to be placed in the LPL, so that the table space must be
| recovered.
To cancel a thread’s VTAM session, you need to know the VTAM session IDs
(SIDs) that correspond to the thread. Take the following steps:
1. Issue the DB2 command DISPLAY THREAD(*) LUWID(nnnn) DETAIL. (The
value of nnnn is the token or LUWID provided by CANCEL DDF THREAD.)
This gives you the VTAM session IDs that must be canceled. Sessions are
identified by the column header SESSID as shown in the following DISPLAY
THREAD output:
-DIS THD(*) LUWID(123) DETAIL
| DSNV401I - DISPLAY THREAD REPORT FOLLOWS:
| DSNV402I - ACTIVE THREADS:
| NAME ST A REQ ID AUTHID PLAN ASID TOKEN
| BATCH TR * 5 BKH2C SYSADM BKH2 000D 123
| V444-DB2NET.LUND0.C4B23F1F4D06=123 ACCESSING DATA AT
| ( 1)SAN JOSE-LUND1
| V447--INDEX SESSID A ST TIME
| V448--( 1) 00D3590EA1E89701 S1 0923816181452
| V448--( 1) 00D3590EA1E89822 N R1 0923816181584
| DISPLAY ACTIVE REPORT COMPLETE
| DSN9022I - DSNVDT '-DIS THD' NORMAL COMPLETION
| The N indicates the thread is processing in VTAM.
D NET,ID=LUND0,SCOPE=ACT
4. Issue the VTAM command VARY NET,TERM for each of the VTAM SIDs
associated with the DB2 thread. In this case, you might need to cancel only the
session ID that DISPLAY THREAD shows to be processing in VTAM
(D2D3590EA1E89822).
Depending on whether the thread is a DB2 requester or server thread, take the
following steps:
v Terminating TCP/IP connection for a requester thread:
1. Issue the DB2 command DISPLAY THREAD(*) LUWID(nnnn) DETAIL. (The
value of nnnn is the token or LUWID provided by CANCEL THREAD.)
Find the IP address and local port for the connection to the partner, as
shown in the following DISPLAY THREAD output:
| #display thread(*) detail
|
| DSNV401I # DISPLAY THREAD REPORT FOLLOWS -
| DSNV402I # ACTIVE THREADS -
| NAME ST A REQ ID AUTHID PLAN ASID TOKEN
| TEST0001 TR 4 CTHDCORID001 SYSADM DONSQL1 0027 19
| V444-USIBMSY.SYEC715B.C4B220851392=19 ACCESSING DATA AT
| ( 1)-STL714A-::FFFF:9.112.114.102..446
| V447--INDEX SESSID A ST TIME
| V448--( 1) 1028:446 N R2 0923814011448
| DISPLAY ACTIVE REPORT COMPLETE
| DSN9022I # DSNVDT '-DIS THD' NORMAL COMPLETION
| In this case, the partner’s IP address and port is 9.112.114.102 446, and the
| local port is 1028. N indicates that the thread is processing in TCP/IP.
2. Determine the associated TCP/IP connection ID:
Examples
Example 1: To cancel a non-distributed thread whose token you found through the
DISPLAY THREAD command and to produce a diagnostic dump, issue:
-CANCEL THREAD (123) DUMP
Example 2: To cancel a distributed thread whose LUWID you found through the
DISPLAY THREAD command, issue:
-CANCEL DDF THREAD (LUDALLAS.DB2SQL1.3042512B6425)
As in the first example, specifying DUMP with any of the commands shown in this
example causes a diagnostic dump to be produced.
Abbreviation: /CHA
Subsections:
v “Environment”
v “Authorization”
v “Syntax”
v “Option descriptions”
v “Usage note” on page 136
v “Examples” on page 136
Environment
Authorization
Syntax
Option descriptions
SUBSYS
Deletes IMS recovery elements from one or more subsystems. You must code
one of the following subparameters:
subsystem-name
Specifies one or more subsystems, separated by commas, from which
recovery elements will be deleted.
subsystem-name OASN schedule-number
Deletes one or more origin application schedule numbers, separated by
commas, from one subsystem, specified by subsystem-name .
Usage note
Examples
Example 3: Reset indoubt recovery units identified by OASN numbers 99, 685, and
2920 for subsystem DB2.
/CHA SUBSYS DB2 OASN 99 685 2920 RESET
Subsections:
v “Environment”
v “Authorization”
v “Syntax” on page 138
v “Option descriptions” on page 138
v “Usage notes” on page 142
v “Examples” on page 144
Environment
Authorization
To execute this command, you must use a privilege set of the process that includes
one of the following privileges or authorities:
v Ownership of the table or view
v SELECT privilege on the table or view
v DBADM authority on the database containing the table
v SYSADM authority
v SYSCTRL authority (catalog tables only)
AT(location-name)
LIBRARY(library name )
(member-name) /password
ADD LANGUAGE( PLI ) NAMES(prefix)
ACTION( REPLACE ) C
IBMCOB
CPP
STRUCTURE(structure-name) APOST NO
QUOTE LABEL( YES )
DBCSSYMBOL( G ) YES
N DBCSDELIM( NO )
NO NO STD
COLSUFFIX( YES ) INDVAR( YES ) RMARGIN( WIDE )
|
NO
DCLBIT( YES )
Option descriptions
TABLE
Specifies the table or view for which a declaration is generated. table-name or
view-name is the qualified or unqualified name of the table or view.
The name must follow these rules:
v If the name is a single-byte or mixed string and contains special characters
other than underscores (_), it must be enclosed between apostrophes (’). If
the language is COBOL, single-byte underscores in the name are translated
into hyphens (-) by DCLGEN. Double-byte character set (DBCS) names need
not be enclosed in apostrophes.
v If the name contains single-byte apostrophes, each one must be doubled (’’).
(Some host languages do not permit apostrophes in variable names.)
A table or view name that contains a period and is not enclosed by
apostrophes is a qualified table name. The characters to the left of the period
constitute the table owner, and those to the right of the period constitute the
table name. Any table name enclosed in apostrophes is an unqualified table
name. To understand how DCLGEN determines the table name qualifier, see
the description of the OWNER option, which follows.
AT( location-name )
Identifies the location of the table or view name specified in TABLE (
table-name ). location-name , which can consist of 1 to 16 characters, uniquely
identifies an instance of a table or view in a network.
If you specify AT, location-name is used as the prefix for the table name, and
table-name or table-view must be a qualified name.
DCLGEN supports the use of underscore (_) as a valid character in the
location-name keyword parameter.
LIBRARY( library-name ( member-name )/ password )
Specifies the data set into which the declarations go. This data set must already
exist and be accessible to the declarations generator. It can be either sequential
or partitioned. password is optional.
If the library name is not enclosed within apostrophes, DCLGEN constructs the
following full data set name:
user-prefix.library-name.language.(member-name)
where:
user-prefix
The user prefix of the primary authorization ID of the transaction.
language
The value of the LANGUAGE option: PLI, or C;
( member-name )
Optional; if not used, the output goes to a sequential data set.
ACTION
Indicates whether to add or replace the data set.
( ADD )
Adds the data set as a new member, if it does not already exist.
Usage notes
Comments: The output for all host languages includes comments. The leading
comment block echoes the DCLGEN subcommand that requested the declarations.
The trailing comment block indicates the number of variables declared.
Prompts: Online TSO will prompt for missing or incorrectly specified options.
Editing the output: It is expected that the output of DCLGEN will not meet every
need. You can freely edit the output before including it in a program. For example,
you might want to change a variable name, or include SQL escape characters.
You can edit the output to add WITH DEFAULT to NOT NULL for columns that
do not allow null values. If you edit the output, you must provide a default value.
If your column names contain embedded blanks, they will also be reflected in the
host variable declarations, and you will have to remove, or translate, any blank
characters to some other value.
| For a column with an XML data type, DCLGEN generates the following output:
| SQL TYPE IS XML AS CLOB(1M). The default length value for the XML host
| variable is 1MB. You can manually update the DCLGEN output if you want a
| larger or smaller size.
COBOL and binary integers: DB2 uses the full size of binary integers. It can place
larger values than allowed in the specified number of digits in the COBOL
declaration, which can result in truncated values.
For small integers that can exceed 9999, use S9(5). For large integers that can
exceed 999999999, use S9(10) COMP-3 to obtain the decimal data type. If COBOL is
used for integers that exceed the COBOL PICTURE, specify the column as decimal
to ensure that the data types match and perform well.
COBOL and the underscore character: Because COBOL does not allow the use of
the underscore character, DCLGEN translates any underscore characters in the
table’s column names into hyphens (-) for use in the generated structure.
COBOL and DBCS: OS/VS COBOL does not support DBCS, but later versions of
COBOL (VS COBOL II and COBOL/370™) do. Although DB2 accepts values
outside of the range from X’41’ to X’FE’, in COBOL data definition statements,
both bytes of each double-byte character in data names must be within this range.
Data names must also contain at least one DBCS character that does not have X’42’
as its first byte.
Examples
Example 1: This example shows the use of the DCLGEN. Issue the following
statement from a DSN session or through DB2I:
DCLGEN TABLE(VEMPL) -
LIBRARY('prefix.SRCLIB.DATA(DSN8MPEM)') -
LANGUAGE(PLI) -
APOST
/*********************************************************************/
/* DCLGEN TABLE(VEMPL) - */
/* LIBRARY('prefix.SRCLIB.DATA(DSN8MPEM)') - */
/* LANGUAGE(PLI) - */
/* APOST */
/* ... IS THE DCLGEN COMMAND THAT MADE THE FOLLOWING STATEMENTS */
/*********************************************************************/
EXEC SQL DECLARE VEMPL TABLE
( EMPNO CHAR(6) NOT NULL,
FIRSTNME VARCHAR(12) NOT NULL,
MIDINIT CHAR(1) NOT NULL,
LASTNAME VARCHAR(15) NOT NULL,
WORKDEPT CHAR(3) NOT NULL
) ;
/*********************************************************************/
/* PLI DECLARATION FOR TABLE VEMPL */
/*********************************************************************/
DCL 1 DCLVEMPL,
5 EMPNO CHAR(6),
5 FIRSTNME CHAR(12) VAR,
5 MIDINIT CHAR(1),
5 LASTNAME CHAR(15) VAR,
5 WORKDEPT CHAR(3);
/*********************************************************************/
/* THE NUMBER OF COLUMNS DESCRIBED BY THIS DECLARATION IS 5 */
/*********************************************************************/
Example 2: This example shows the use of NAMES and STRUCTURE. Issue the
following statement from a DSN session or through DB2I:
DCLGEN TABLE(VEMPL) -
LIBRARY('prefix.SRCLIB.DATA(DSN8MPEM)') -
LANGUAGE(PLI) -
NAMES(FIELD) -
STRUCTURE(EMPRECORD) -
APOST
/*********************************************************************/
/* PLI DECLARATION FOR TABLE VEMPL */
/*********************************************************************/
DCL 1 EMPRECORD,
5 FIELD1 CHAR(6),
5 FIELD2 CHAR(12) VAR,
5 FIELD3 CHAR(1),
5 FIELD4 CHAR(15) VAR,
5 FIELD5 CHAR(3);
/*********************************************************************/
/* THE NUMBER OF COLUMNS DESCRIBED BY THIS DECLARATION IS 5 */
/*********************************************************************/
| Example 3: The following example creates a table with columns that are defined as
| FOR BIT DATA:
| CREATE TABLE MYTABLE
| ( COL1 CHAR(10) NOT NULL
| ,COL2 CHAR(10) FOR BIT DATA
| ,COL3 VARCHAR(12) NOT NULL
| ,COL4 VARCHAR(12) FOR BIT DATA NOT NULL
| );
Environment
Subsections:
v “Environment”
v “Authorization”
v “Syntax”
v “Option descriptions”
v “Output” on page 148
v “Example” on page 149
Authorization
This command requires an appropriate level of IMS authority.
Syntax
Option descriptions
Output
The absence of a PSB name for a thread indicates that a connection to the external
subsystem exists, but an application program is not currently occupying the region.
The presence or absence of an LTERM name indicates whether a region is
message-driven.
Example
Subsections:
v “Environment”
v “Authorization”
v “Syntax”
v “Usage note”
v “Example” on page 152
Environment
This command can be issued from a z/OS console, a DSN session under TSO, a
DB2I panel (DB2 COMMANDS), an IMS or CICS terminal, or a program using the
instrumentation facility interface (IFI).
Authorization
To execute this command, you must use a privilege set of the process that includes
one of the following privileges or authorities:
v ARCHIVE system privilege
v DISPLAY system privilege
v SYSOPR authority
v SYSCTRL authority
v SYSADM authority
DB2 commands that are issued from a logged-on z/OS console or TSO SDSF can
be checked by DB2 authorization using primary and secondary authorization IDs.
Syntax
DISPLAY ARCHIVE
Usage note
Use the following command to display information about archive log data sets in
use.
-DISPLAY ARCHIVE
Subsections:
v “Environment”
v “Authorization”
v “Syntax” on page 154
v “Option descriptions” on page 154
v “Output” on page 156
v “Examples” on page 159
Environment
This command can be issued from a z/OS console, a DSN session under TSO, a
DB2I panel (DB2 COMMANDS), an IMS or CICS terminal, or a program using the
instrumentation facility interface (IFI).
Authorization
To execute this command, you must use a privilege set of the process that includes
one of the following privileges or authorities:
v DISPLAY system privilege
v SYSOPR authority
v SYSCTRL authority
v SYSADM authority
DB2 commands that are issued from a logged-on z/OS console or TSO SDSF can
be checked by DB2 authorization using primary and secondary authorization IDs.
ACTIVE
DISPLAY BUFFERPOOL( * )
, INTERVAL
DETAIL( )
bpname *
ACTIVE ACTIVE
LIST( ) LSTATS( )
* *
*
,
DBNAME ( database-name )
name1:name2
name*
* GBPDEP( YES )
, NO
SPACENAM( space-name )
name1:name2
name*
CASTOWNR( YES )
NO
Option descriptions
( ACTIVE )
Displays the current buffer pool status for all active buffer pools.
(*) Displays the current buffer pool status for all active or inactive buffer pools.
( bpname )
Names the buffer pool for which current status is to be displayed.
v 4-KB page buffer pools are named BP0 through BP49
v 8-KB page buffer pools are named BP8K0 through BP8K9
v 16-KB page buffer pools are named BP16K0 through BP16K9
v 32-KB page buffer pools are named BP32K through BP32K9
DETAIL
Produces a detail report for one or more buffer pools. If DETAIL is not
specified, a summary report is produced.
Output
Summary report
Identification
BUFFERPOOL NAME
Buffer pool external name (BP0, BP1, ..., BP49, or BP32K, BP32K1, ...,
BP32K9).
BUFFERPOOL ID
Buffer pool internal identifier (0-49, 80-89, 100-109, 120-129).
USE COUNT
Number of open table spaces or index spaces that reference this buffer
pool. (Inactive pools have a zero use count.)
Thresholds
VP SEQUENTIAL
Sequential steal threshold for the buffer pool.
DEFERRED WRITE
Deferred write threshold for the buffer pool.
VERTICAL DEFERRED WRT
Vertical deferred write threshold for the buffer pool.
PARALLEL SEQUENTIAL
Parallel sequential threshold for the buffer pool.
ASSISTING PARALLEL SEQT
Assisting parallel sequential threshold for the buffer pool.
Detail report
A detail report includes all summary report information and additional buffer pool
related statistics. You can request cumulative statistics (accumulated since DB2
startup) or incremental statistics (accumulated since the last incremental display). A
sample report appears in Example 2. The statistics in a detail report are grouped in
the following categories:
Examples
Example 1: A summary report is the default report if the DETAIL option is not
specified. The following example shows a summary report that can be produced
by the command:
-DISPLAY BUFFERPOOL(BP0) LIST(*) DBNAME(DSN8*)
DSNB401I - BUFFERPOOL NAME BP0, BUFFERPOOL ID 0, USE COUNT 20
DSNB402I - BUFFERPOOL SIZE = 2000
BUFFERS ALLOCATED = 2000
TO BE DELETED = 0
IN-USE/UPDATED = 0
BUFFERS ACTIVE = 2000
DSNB404I - THRESHOLDS -
VP SEQUENTIAL = 80
DEFERRED WRITE = 85
VERTICAL DEFERRED WRT = 80
PARALLEL SEQUENTIAL = 50
ASSISTING PARALLEL SEQT = 0
DSNB406I - PGFIX ATTRIBUTE -
CURRENT = NO
PENDING = YES
PAGE STEALING METHOD = LRU
DSN9022I - DSNB1CMD '-DISPLAY BUFFERPOOL' NORMAL COMPLETION
Example 2: A detail report can be generated that includes all summary report
information and additional buffer pool related statistics. The following example
shows a detail report that can be produced by the command:
-DISPLAY BUFFERPOOL(BP0) DETAIL
DSNB401I - BUFFERPOOL NAME BP0, BUFFERPOOL ID 0, USE COUNT 10
DSNB402I - BUFFERPOOL SIZE = 2000
BUFFERS ALLOCATED = 2000
TO BE DELETED = 0
IN-USE/UPDATED = 200
BUFFERS ACTIVE = 2000
DSNB404I - THRESHOLDS -
VP SEQUENTIAL = 80
DEFERRED WRITE = 50
VERTICAL DEFERRED WRT = 10
PARALLEL SEQUENTIAL = 50
ASSISTING PARALLEL SEQT = 0
Example 3: With the summary or detail report, you can list open table spaces and
index spaces associated with the buffer pool. You can also request a display of
statistics for each listed table space and index space. An example of a report
generating this information could be produced by the command:
-DISPLAY BUFFERPOOL(BP0) LIST LSTATS
DSNB401I - BUFFERPOOL NAME BP0, BUFFERPOOL ID 0, USE COUNT 3
DSNB402I - BUFFERPOOL SIZE = 2000
BUFFERS ALLOCATED = 2000
TO BE DELETED = 0
IN-USE/UPDATED = 200
BUFFERS ACTIVE = 2000
DSNB404I - THRESHOLDS -
VP SEQUENTIAL = 80
DEFERRED WRITE = 50
VERTICAL DEFERRED WRT = 10
PARALLEL SEQUENTIAL = 50
ASSISTING PARALLEL SEQT = 0
DSNB455I - SYNCHRONOUS I/O DELAYS -
AVERAGE DELAY = 22
MAXIMUM DELAY = 35
TOTAL PAGES = 23
DSN9022I - DSNB1CMD '-DISPLAY BUFFERPOOL' NORMAL COMPLETION
The DISPLAY DATABASE command displays information about the status of the
following objects:
v DB2 databases
v Table spaces
v Tables in segmented table spaces
| v XML table spaces
v LOB table spaces
v Index spaces within a database
v Indexes on auxiliary tables
v Partitions of partitioned table spaces
v Partitions of index spaces
In a data sharing environment, the command can be issued from any DB2
subsystem in the group that has access to the database.
Abbreviation: -DIS DB
Subsections:
v “Environment”
v “Authorization”
v “Syntax” on page 163
v “Option descriptions” on page 164
v “Usage notes” on page 169
v “Output” on page 171
v “Examples” on page 172
Environment
This command can be issued from a z/OS console, a DSN session under TSO, a
DB2I panel (DB2 COMMANDS), an IMS or CICS terminal, or a program using the
instrumentation facility interface (IFI).
Authorization
The DISPLAY system privilege allows you to display status information for any
database. The resulting display lists those databases for which the primary
authorization ID or any of the secondary authorization IDs has the DISPLAYDB
| For implicitly created databases, the database privilege or authority can be held on
| the implicitly created database or on DSNDB04. If the DISPLAY DATABASE
| command is issued on specific table spaces or index spaces in an implicitly created
| database, ownership of the table spaces is sufficient to display status information
| about them. This means that the owner can display information about an implicitly
| created table space or index space if the command explicitly specifies that table
| space or index space name.
DB2 commands that are issued from a logged-on z/OS console or TSO SDSF can
be checked by DB2 authorization using primary and secondary authorization IDs.
USE
CLAIMERS
LOCKS
LPL
WEPR
,
SPACENAM( space-name )
*
spacename1:spacename2 USE ONLY
spacename* CLAIMERS
*spacename LOCKS
*spacename* LPL
*spacestring1*spacestring2* WEPR
(1)
ONLY
, (2)
OVERVIEW
PART( integer )
integer1:integer2
50
LIMIT( integer )
*
restrict-block
AFTER ACTIVE ,
ADVISORY ( )
ICOPY
AUXW
ARBDP
AREO*
Notes:
1 If you specify the ONLY option without the SPACENAM() keyword, only
the LIMIT, AFTER, and RESTRICT keywords apply.
2 The OVERVIEW keyword cannot be specified with any other keywords
except SPACENAM, LIMIT, and AFTER.
,
RESTRICT ( )
ACHKP
CHKP
COPY
GRECP
LPL
RBDP
RECP
REORP
RO
STOP
UT
UTRO
UTRW
UTUT
UT*
WEPR
Option descriptions
( database-name , ...)
Identifies one or more databases whose status is to be displayed.
(*)
Displays information on all databases that are defined to the DB2
subsystem for which the privilege set of the process has the required
authorization.
dbname and dbstring can have any of the forms listed in the following table
(where dbname1 and dbname2 represent any strings of from one to eight
characters, and dbname represents any string of from one to seven characters).
Table 13. Forms of dbname and dbstring
Form Displays the status of...
| dbname1:dbname2 All databases whose names, in UNICODE, are between dbname1
| and dbname2 inclusive
dbname* All databases whose names begin with the string dbname
*dbname All databases whose names end with the string dbname
*dbname* All databases whose names contain the string dbname
*dbstring1*dbstring2* All databases whose names contain the strings dbstring1 and
dbstring2
SPACENAM
Specifies what space to display. If you use SPACENAM, you must also specify
the corresponding database name. If (*) is used to specify multiple databases,
SPACENAM(*) can be specified to display all objects in these databases.
Abbreviation: SPACE, SP
spacename and spacestring can have any of the forms listed in the following
table (where spacename1 and spacename2 represent any strings of from one
to eight characters, and spacename represents any string of from one to
seven characters).
Table 14. Forms of spacename and spacestring
Form Displays the status of...
| spacename1:spacename2 All table spaces or index spaces whose names, in
| UNICODE, are between spacename1 and spacename2
| inclusive
spacename* All table spaces or index spaces whose names begin with
the string spacename
*spacename All table spaces or index spaces whose names end with the
string spacename
*spacename* All table spaces or index spaces whose names contain the
string spacename
*spacestring1*spacestring2* All table spaces or index spaces whose names contain the
strings spacestring1 and spacestring2
USE
Displays the following information:
v The applications and subsystems of the database or space that have internal
DB2 resources allocated
v The applications and subsystems of the database or space on whose behalf
locks for the space are held or waited for
v The connection IDs, correlation IDs, and authorization IDs for all
applications allocated to spaces and partitions whose statuses are displayed
v The LUWID and location of any remote threads accessing the local database
CLAIMERS
Displays the following information:
v The claims on all table spaces, index spaces and partitions whose statuses
are displayed
v The LUWID and location of any remote threads accessing the local database
v The connection IDs, correlation IDs, and authorization IDs for all
applications allocated to spaces whose statuses are displayed
v The logical partitions that have logical claims and their associated claims
Usage notes
Displaying DB2 catalog tables: You can always display the DB2 catalog tables.
However, if a table space in the catalog containing information about user
databases or user table spaces is stopped, those databases or table spaces cannot be
displayed. Trying to display them will cause an error.
If you issue DISPLAY DATABASE LOCKS on the catalog (DSNDB06), you might
see a lock held on SYSDBASE with the correlation ID 020.DBCMD_05 or
020.DBCMD_06. This simply indicates the lock that DISPLAY DATABASE itself
needs and is normal.
Displaying restricted and advisory status objects: To display all resources that are
in restricted status, you must issue the DISPLAY DATABASE command twice. To
display table spaces and indexes in restricted status, use the SPACENAM
parameter with RESTRICT. To display databases in restricted status, do not use the
SPACENAM parameter. Spaces could be unavailable even if they show RW mode
if the database is in restricted status.
To display all resources that are in advisory status, issue the DISPLAY DATABASE
ADVISORY command without the RESTRICT option.
| Displaying logical partitions: If you issue DISPLAY DATABASE with the PART
| parameter for a logical partition of a type 2 index, DB2 does not display physical
| claimers and physical locks in the output. Nonpartitioned indexes are displayed
| with a type of ’IX’ and with partition numbers displayed either as ’L’ followed by
| a four-digit number, or as ’L*.’ When the information for all the logical partitions is
| the same, partition numbers are displayed as ’L*.’ If there is unique information to
| be displayed for a particular logical partition, L is used with that partition number
| to represent the logical part.
| Displaying XML table spaces: DISPLAY DATABASE can display information about
| the status of XML table spaces. XML table spaces are displayed with a type of ’XS’.
| Displaying clone table information: The information about base table objects and
| their clones is automatically displayed if a clone table exists. The information for
| both base objects and clones is displayed because clone objects can have different
| states than their base counterparts. DISPLAY will indicate what the current base
| and clone data set instance numbers are.
| Base table objects that have been cloned are noted with the character ’B’ in the
| TYPE column of the DISPLAY output. Cloned objects are noted with the character
| ’C’ in the TYPE column. Immediately following the ’B’ or ’C’ character is the data
| set instance number. The data set number is always a ’1’ or ’2’. All the base table
| objects have the same data set instance number. All of the clone table objects have
| the same instance number, which is different than the base table objects’ instance
| number. Data set instance number associations change during each data exchange.
| You can also query the INSTANCE column of the SYSTABLESPACE catalog table
| to determine the current instance number associated with a particular base table.
| If you drop a cloned table of a base table with a instance number ’2’ then the
| DISPLAY output of the base table still indicates that a clone once existed. The
| DISPLAY command output still shows ’B2’ in the TYPE column to indicate that the
| base object is using instance number ’2’. If you drop a cloned table and the base
| object instance number is ’1’ then the DISPLAY command outputs information that
| does not indicate that a clone ever existed. There is no ’B’ character or instance
| number in the TYPE column.
| See the following Examples section for examples of how to display cloned table
| information.
Message DSNT392I status information: The status codes that are displayed by the
DISPLAY DATABASE command and their respective descriptions are as follows:
ARBDP
Indicates that the index should be rebuilt to improve performance and
allows the DB2 subsystem to pick this index for index-only access.
AREO*
Indicates that the table space, index, or partition identified should be
reorganized for optimal performance.
ACHKP
Indicates an error in the LOB column of the base table space. The base
table space has the auxiliary CHECK-pending restrictive status.
AREST
Indicates that an object (a table space, index space, or a physical partition
of a table space or index space) is in an advisory RESTART-pending state.
If backout activity against the object is not already underway, initiate it
either by issuing the RECOVER POSTPONED command, or by recycling
the system with the system parameter LBACKOUT=AUTO.
AUXW
| Either the base table space or XML table space is in the auxiliary warning
| advisory status, indicating an error in the LOB column, or the LOB table
| space is in the auxiliary warning advisory status, indicating an invalid
| LOB. This message can also indicate an error in a base table space with an
| XML column or in an XML table space.
CHKP The object (a table space, a partition within a table space, or an index) is in
the CHECK-pending status.
COPY The object (a table space or a partition within a table space) is in the
COPY-pending status. An image copy is required for this object.
DBETE
Indicates that the DBET status for the object (a table space, a partition
within a table space, an index space, an index partition, or a logical index
partition) is in error. The error occurred when the DBET states were being
modified during log apply or must-complete processing. This prohibited
DB2 from successfully updating the DBET states.
GRECP
The object is GBP-dependent and a group buffer pool RECOVER is
pending.
ICOPY
| The table space or index space is in the informational COPY-pending
| advisory status.
LPL The object has entries in the logical page list.
LSTOP
The logical partition of a nonpartitioning index is stopped.
PSRBD
The entire nonpartitioning index space is in a page set REBUILD-pending
status.
RBDP The physical or logical index partition is in the REBUILD-pending status.
Examples
Example 1: Display information about table space TBS33 in database CB3. The USE
option causes connection-name (CONNID), correlation-id (CORRID), and authorization
ID (USERID) information to be displayed.
-DISPLAY DATABASE(CB3) SPACENAM(TBS33) USE
Example 2: Display information about table space TBS33 in database CB3. The
LOCKS option displays lock information for table spaces and tables specified;
LUWIDs and locations of any remote threads; and connection-name , correlation-id ,
and authorization ID information.
-DISPLAY DATABASE(CB3) SPACENAM(TBS33) LOCKS
Example 3: Display information about table space TBS33 in database CB3. The
CLAIMERS option displays claim types and durations; LUWIDs and locations of
any remote threads; and connection-name , correlation-id , and authorization ID
information.
-DISPLAY DATABASE(CB3) SPACENAM(TBS33) CLAIMERS
Example 4: In a data sharing environment, display information about locks held for
a table space. The application that is identified as LSS001 on member DB1G has
locked partitions 1 and 2. LSS002 on member DB2G has locked partitions 1 and 3.
Partition 4 has no locks held on it.
-DISPLAY DATABASE(DSN8D51A) SPACENAM(TSPART) LOCKS
If DB2 cannot selectively lock the partitions, it must lock all of the partitions and
the display looks similar to the following output. The LOCKINFO field shows a
value of S, indicating that this is a table space lock. If partitions are held in
different statuses, those statuses are listed below the table space locks.
NAME TYPE PART STATUS CONNID CORRID LOCKINFO
-------- ---- ----- ----------------- -------- ------------ ---------
TSPART TS LSS001 DSN2SQL H-IS,S,C
- MEMBER NAME DB1G
TSPART TS LSS002 DSN2SQL H-IS,S,C
- MEMBER NAME DB2G
TSPART TS 0001 RO H-S,PP,I
- MEMBER NAME DB1G
TSPART TS 0002 RW H-S,PP,I
- MEMBER NAME DB2G
TSPART TS 0003 RW H-S,PP,I
- MEMBER NAME DB2G
TSPART TS 0004 RW
Example 5: Display information about page sets in database DSNDB01 that have
entries in the logical page list. Limit the number of messages displayed to the
space available.
-DB1G DISPLAY DATABASE(DSNDB01) SPACENAM(*) LIMIT(*) LPL
Example 6: Suppose DB2 is unable to selectively lock the partitions of table space
TSPART, which is in database DSN8D81A. When you specify the following
command, two applications are accessing TSPART, and the partitions have different
statuses.
-DB1G DISPLAY DATABASE(DSN8D81A) SPACE(TSPART) PART(1,4) LOCKS
DB2 displays the locks as table space locks, as shown in the following output:
NAME TYPE PART STATUS CONNID CORRID LOCKINFO
-------- ---- ----- ----------------- -------- ------------ ---------
TSPART TS LSS001 DSN2SQL H-IS,S,C
TSPART TS LSS002 DSN2SQL H-IS,S,C
TSPART TS 0001 RO
TSPART TS 0004 RW
Example 7: Suppose that you have executed the ALTER TABLESPACE statement
on table space TSPART so that TSPART is now defined with LOCKPART YES.
LOCKPART YES causes DB2 to do selective partition locking on TSPART. When
you specify the following command, two applications are accessing TSPART. The
application identified by connection ID LSS001 has locked partitions 1 and 2. The
application identified by connection ID LSS002 has locked partitions 1 and 3.
-DB1G DISPLAY DATABASE(DSN8D81A) SPACE(TSPART) PART(1:4) LOCKS
DB2 displays the locks as partition locks, as shown in the following output:
NAME TYPE PART STATUS CONNID CORRID LOCKINFO
-------- ---- ----- ----------------- -------- ------------ ---------
TSPART TS 0001 RO LSS001 DSN2SQL H-IS,P,C
TSPART TS 0001 RO LSS002 DSN2SQL H-IS,P,C
TSPART TS 0002 RW LSS001 DSN2SQL H-IS,P,C
TSPART TS 0003 RW LSS002 DSN2SQL H-IS,P,C
TSPART TS 0004 RW
Example 8: Display information about all table spaces and index spaces in the
range of databases from DBKD0101 to DBKD0106 that are in a restrictive status.
Limit the number of messages that are displayed to the available space.
-DISPLAY DATABASE(DBKD0101,DBKD0103) SPACENAM(*) RESTRICT LIMIT(*)
Example 9: Display information about all table spaces that are in the auxiliary
warning advisory status (AUXW), and all index spaces that are in informational
COPY-pending status (ICOPY) in database DBIQUQ01. Limit the number of
messages that are displayed to the available space.
-DISPLAY DATABASE(DBIQUQ01) SPACENAM(*) LIMIT(*) ADVISORY
Example 10: Display a list of all objects in database DB486A. This example shows
five objects in the database. TS486A is a table space with four parts and TS486C is
a nonpartitioned table space. IX486A is a nonpartitioned index for table space
TS486A, IX486B is a partitioned index with four parts, and IX486C is a
nonpartitioned index.
-DISPLAY DATABASE(DB486A) SPACE(*) OVERVIEW
Example 12: Display information about all indexes in the DBKD0101 database.
INDEX2 contains information to be displayed at a logical level. Partitions 0001 and
0002 of INDEX3 are data-partitioned secondary indexes, as indicated by ’D’ in the
partition number.
-DISPLAY DATABASE(DBKD0101) SPACENAM(INDEX*)
Example 13: Display information about all table spaces in the DBKD0103 database
that are in the advisory REBUILD-pending status (ARBDP) and the advisory
REORG-status (AREO*). Limit the number of messages that are displayed to the
available space. Assume that you specify the following command:
-DISPLAY DATABASE(DBKD0103) SPACENAM(*) LIMIT(*) ADVISORY(ARBDP,AREO*)
Example 14: Display information about table space DB2TSP in database DB2. The
PART option includes both lists and ranges to display a very specific set of
partitions. The table space underwent a single ROTATE operation before the final
partitions were added.
-DISPLAY DATABASE(DB2) SPACENAME(DB2TSP) PART(1,2,4:6,9,10:12)
Example 15: If the table space is opened for update while it has the NOT LOGGED
attribute the table space is placed in the Informational Copy Pending state. The
DISPLAY DATABASE ADVISORY command is enhanced to display the
Informational Copy Pending (ICOPY) state for table spaces in the database.
-DISPLAY DATABASE(DBIQUQ01) SPACENAM(*) ADVISORY
Example 16: Display information about base table and clone table objects as well as
objects that are not involved with cloning.
-DISPLAY DATABASE(MYDB*) SPACENAM(*) LIMIT(*)
Subsections:
v “Environment”
v “Authorization”
v “Syntax”
v “Option descriptions”
v “Output” on page 182
v “Examples” on page 182
Environment
This command can be issued from a z/OS console, a DSN session under TSO, a
DB2I panel (DB2 COMMANDS), an IMS or CICS terminal, or a program using the
instrumentation facility interface (IFI).
Authorization
To execute this command, you must use a privilege set of the process that includes
one of the following privileges or authorities:
v DISPLAY privilege
v SYSOPR authority
v SYSCTRL authority
v SYSADM authority
DB2 commands that are issued from a logged-on z/OS console or TSO SDSF can
be checked by DB2 authorization using primary and secondary authorization IDs.
Syntax
DISPLAY DDF
DETAIL
Option descriptions
DETAIL
Displays additional statistics and configuration information.
| Message DSNL087I displays column headers for a table that contains the alias
| names and their associated ports. Message DSNL088I displays each alias name,
| and its associated port (if any), defined in the BSDS DDF record. The DSNL087I
| and DSNL088I are provided only if alias information is present in the BSDS DDF
| record.
Examples
Example 1: The following command is used to display a DDF detail report where
DDF has not yet been started:
#display ddf detail
| Example 3: The following command is used to display a DDF detail report where
DDF is started:
#display ddf detail
| Example 4: The following example shows the DISPLAY DDF command report
| when alias information is present in the BSDS DDF record.
| #display ddf
Environment
This command can be issued from a z/OS console, a DSN session under TSO, a
DB2I panel (DB2 COMMANDS), an IMS or CICS terminal, or a program using the
instrumentation facility interface (IFI).
Data sharing scope: Group or local, depending on the value of the SCOPE option.
Authorization
To run this command, you must use a privilege set of the process that includes one
of the following authorities for each function:
v Ownership of the function
v DISPLAY privilege
v SYSOPR authority
v SYSCTRL authority
v SYSADM authority
DB2 commands that are issued from a logged-on z/OS console or TSO SDSF can
be checked by DB2 authorization using primary and secondary authorization IDs.
(*.*) LOCAL
SCOPE ( GROUP )
,
( schema.specific-function-name )
schema.partial-name*
Option descriptions
schema.specific-function-name
Displays information for the specific named function in the specified schema.
You cannot specify a function name as you can in SQL; you must use the
specific name. If a specific name was not specified on the CREATE FUNCTION
statement, query SYSIBM.SYSROUTINES for the correct specific name:
SELECT SPECIFICNAME, PARM_COUNT
FROM SYSIBM.SYSROUTINES
WHERE NAME='function_name'
AND SCHEMA='schema_name';
Usage notes
Displaying information for all functions: If you do not specify a partial or specific
function name, DB2 displays information for all functions that DB2 applications
have accessed since the DB2 subsystem was started.
This command displays one line of output for each function that a DB2 application
has accessed.
Information returned by this command reflects a dynamic status. By the time DB2
displays the information, the status might have changed.
------- SCHEMA=PAYROLL
FUNCTION STATUS ACTIVE QUED MAXQ TIME FAIL WLM_ENV
APPL1 STARTED 1 0 0 0 0 PAYROLL
APPL2 STARTED 1 0 0 0 1 PAYROLL
APPL3 STARTED 0 1 2 0 0 PAYROLL
APPL5 STOPREJ 0 0 0 0 0 SANDBOX
APPL6 STOPABN 0 0 0 0 1 PAYROLL
FUNC1 STOPQUE 0 0 0 0 0 SANDBOX
Examples
Example 1: Display information about functions in the PAYROLL schema and the
HRPROD schema.
-DISPLAY FUNCTION SPECIFIC(PAYROLL.*, HRPROD.*)
------ SCHEMA=PAYROLL
FUNCTION STATUS ACTIVE QUED MAXQ TIMEOUT FAIL WLM_ENV
PAYRFNC1 STARTED 0 0 1 0 0 WLMENV1
PAYRFNC2 STOPQUE 0 5 5 3 0 WLMENV1
PAYRFNC3 STARTED 2 0 6 0 0 WLMENV1
USERFNC4 STOPREJ 0 0 1 0 0 WLMENV3
------ SCHEMA=HRPROD
FUNCTION STATUS ACTIVE QUED MAXQ TIMEOUT FAIL WLM_ENV
HRFNC1 STARTED 0 0 1 0 0 WLMENV2
HRFNC2 STOPREJ 0 0 1 0 0 WLMENV2
DSNX9DIS DISPLAY FUNCTION SPECIFIC REPORT COMPLETE
DSN9022I = DSNX9COM '-DISPLAY FUNC' NORMAL COMPLETION
------ SCHEMA=PAYROLL
FUNCTION STATUS ACTIVE QUED MAXQ TIMEOUT FAIL WLM_ENV
USERFNC2 STOPQUE 0 5 5 3 0 WLMENV3
USERFNC4 STOPREJ 0 0 1 0 0 WLMENV3
DSNX9DIS DISPLAY FUNCTION SPECIFIC REPORT COMPLETE
DSN9022I = DSNX9COM '-DISPLAY FUNC' NORMAL COMPLETION
Example 3: Display information about all functions that are in the SYSADM
schema that DB2 applications have accessed. Assume that the STOP FUNCTION
SPECIFIC(SYSADM.FN*) ACTION(QUEUE) command is in effect at the time you
Enter the following command:
-DISPLAY FUNCTION SPECIFIC(SYSADM.*)
------ SCHEMA=SYSADM
FUNCTION STATUS ACTIVE QUED MAXQ TIMEOUT FAIL WLM_ENV
FNC1 STOPQUE 0 0 0 0 0 WLMENV1
FNC2 STOPQUE 0 0 0 0 0 WLMENV3
DSNX9DIS FUNCTIONS FN - FN* STOP QUEUE
DSNX9DIS DISPLAY FUNCTION SPECIFIC REPORT COMPLETE
DSN9022I = DSNX9COM '-DISPLAY FUNC' NORMAL COMPLETION
DISPLAY GROUP DETAIL displays the DB2 subsystem and group mode
(conversion mode, enabling new function mode, or DB2 Version 8 new-function
mode or later).
Subsections:
v “Environment”
v “Authorization”
v “Syntax”
v “Option descriptions” on page 190
v “Usage notes” on page 190
v “Examples” on page 192
Environment
This command can be issued from a z/OS console, a DSN session under TSO, a
DB2I panel (DB2 COMMANDS), an IMS or CICS terminal, or a program using the
instrumentation facility interface (IFI).
Authorization
To execute this command, you must use a privilege set of the process that includes
one of the following privileges or authorities:
v DISPLAY privilege
v SYSOPR authority
v SYSCTRL authority
v SYSADM authority
DB2 commands that are issued from a logged-on z/OS console or TSO SDSF can
be checked by DB2 authorization using primary and secondary authorization IDs.
Syntax
DISPLAY GROUP
DETAIL
Usage notes
Member status: Message DSN7106I includes information about the XCF status of
the members (STATUS in the display output). The status can be ACTIVE,
QUIESCED, or FAILED.
ACTIVE indicates that the DB2 subsystem is active, and FAILED indicates that it is
failed. A QUIESCED status results from a STOP DB2 command and consists of
several subcategories:
QUIESCED
Indicates a normal quiesced state, as the result of a normal STOP DB2
command.
Q Q (quiesced) can be paired with one or more of the following letters:
I Indoubt or postponed abort units of recovery (URs) are
outstanding. This means that retained locks are held.
| C The member was shut down without completing castout
| processing. This event might have occurred because DB2 was
| started with the LIGHT(YES) option or stopped with the
| CASTOUT(NO) option, or because an error was encountered while
| attempting to cast out data from the coupling facility to the disk.
| If DB2 encounters errors during castout processing, ensure that no
| connectivity problems exist between the coupling facility and the
| processor before restarting DB2.
R Retained information is needed for DB2 to perform
resynchronization with one or more remote locations.
When DB2 is restarted, this resynchronization occurs.
ACTIVE
Indicates a normal active state without conditions.
A The member is active, but with the additional conditions. A (active) can be
paired with the following letter:
I Indoubt or postponed abort units of recovery (URs) are
outstanding. This indicates that retained locks are held.
Output
DISPLAY GROUP command output: The DISPLAY GROUP command displays the
following output:
*** BEGIN
The name of the DB2 group
If the output indicates that either the lock structure or SCA are 0 % in use, it does
not mean that the structure is empty. It could mean that the structure is very large
and that the number of locks held or the number of records in the SCA is less than
1 %.
Examples
Example 1: The following sample output for a data sharing group can be generated
by using the DISPLAY GROUP command:
-DB1A DISPLAY GROUP
Example 3: You can obtain more information about the data sharing group, as
shown in the following example, using the DISPLAY GROUP command with
DETAIL option:
-DB1A DISPLAY GROUP DETAIL
Subsections:
v “Environment”
v “Authorization”
v “Syntax” on page 196
v “Option description” on page 196
v “Output” on page 197
v “Examples” on page 202
Environment
This command can be issued from a z/OS console, a DSN session under TSO, a
DB2I panel (DB2 COMMANDS), an IMS or CICS terminal, or a program using the
instrumentation facility interface (IFI).
Authorization
To execute this command, you must use a privilege set of the process that includes
one of the following privileges or authorities:
v DISPLAY privilege
v SYSOPR authority
v SYSCTRL authority
v SYSADM authority
DB2 commands that are issued from a logged-on z/OS console or TSO SDSF can
be checked by DB2 authorization using primary and secondary authorization IDs.
DISPLAY GROUPBUFFERPOOL
*
,
( gbpname )
structure-name
* MDETAIL
TYPE( GCONN ) INTERVAL
MCONN ( )
NOCACHE *
GDETAIL NO
INTERVAL CONNLIST( YES )
( )
*
Option description
(*)
Displays the group buffer pool status for all group buffer pools.
( gbpname )
Names the group buffer pool for which status is to be displayed.
v 4-KB group buffer pools are named GBP0 through GBP49
v 8-KB group buffer pools are named GBP8K0 through GBP8K9
v 16-KB group buffer pools are named GBP16K0 through GBP16K9
v 32-KB group buffer pools are named GBP32K through GBP32K9
( structure-name )
Names the backing coupling facility structure for the group buffer pool. The
coupling facility structure name has the following format:
groupname_gbpname
where groupname is the DB2 data sharing group name and the underscore (_)
separates groupname and gbpname .
TYPE
Indicates the type of group buffer pools (among those that are specified) for
which information is displayed.
(*)
All group buffer pools are specified. This is the default.
(GCONN)
Group buffer pools that are currently connected to any member of the data
sharing group. The connection can be “active” or “failed-persistent”.
(MCONN)
Group buffer pools that are currently connected to the member to which
the command is directed.
Output
Summary report
You can display summary information about group buffer pools. The report
indicates whether this DB2 subsystem is actively connected to the group buffer
pools for which you requested information. The summary report also shows the
following information:
The group detail report shows detailed statistical information reflecting the activity
of the entire group for the specified group buffer pools. This statistical information
is helpful in tuning the size and other characteristics of group buffer pools. The
group detail report includes the same information as the summary report in
addition to the following information:
The member detail report includes the summary report and additional information
about how a particular member’s system is responding to the current environment.
Examples
Message DSNB799I is displayed if the group buffer pool is duplexed and the
secondary group buffer pool is currently allocated. If a secondary group buffer
pool is not allocated, message DSNB799I is not included in the output.
Example 2: Assume you want a summary report about group buffer pool 29
(GBP29), including all connections to that group buffer pool. Enter the following
command:
-DISPLAY GROUPBUFFERPOOL(GBP29) CONNLIST(YES)
Example 3: This example shows a group detail report that is produced by the
following command:
-DISPLAY GROUPBUFFERPOOL(GBP29) GDETAIL(*)
Message DSNB762I is displayed in the output only if the secondary group buffer
pool is allocated.
Messages DSNB764I and DSNB793I are displayed in the output only if the
secondary group buffer pool is allocated.
DSNB750I - DISPLAY FOR GROUP BUFFER POOL GBP29 FOLLOWS
DSNB755I - DB2 GROUP BUFFER POOL STATUS
CONNECTED = YES
CURRENT DIRECTORY TO DATA RATIO = 5
PENDING DIRECTORY TO DATA RATIO = 5
CURRENT GBPCACHE ATTRIBUTE = YES
PENDING GBPCACHE ATTRIBUTE = YES
DSNB756I - CLASS CASTOUT THRESHOLD = 10%
GROUP BUFFER POOL CASTOUT THRESHOLD = 50%
GROUP BUFFER POOL CHECKPOINT INTERVAL = 8 MINUTES
RECOVERY STATUS = NORMAL
AUTOMATIC RECOVERY = Y
DSNB757I - MVS CFRM POLICY STATUS FOR DSNCAT_GBP29 = NORMAL
MAX SIZE INDICATED IN POLICY = 2048 KB
DUPLEX INDICATOR IN POLICY = ENABLED
CURRENT DUPLEXING MODE = DUPLEX
ALLOCATED = YES
DSNB758I - ALLOCATED SIZE = 2048 KB
VOLATILITY STATUS = VOLATILE
REBUILD STATUS = DUPLEXED
CFNAME = CACHE01
OPERATIONAL CFLEVEL = 5
ACTUAL CFLEVEL = 7
DSNB759I - NUMBER OF DIRECTORY ENTRIES = 1950
NUMBER OF DATA PAGES = 389
NUMBER OF CONNECTIONS = 2
DSNB798I - LAST GROUP BUFFER POOL CHECKPOINT
17:08:41 OCT 16, 2002
GBP CHECKPOINT RECOVERY LRSN = AF6BBAEF3307
STRUCTURE OWNER = V61B
DSNB799I - SECONDARY GBP ATTRIBUTES
ALLOCATED SIZE = 2048 KB
VOLATILITY STATUS = VOLATILE
CFNAME = LF01
OPERATIONAL CFLEVEL = 5
ACTUAL CFLEVEL = 7
NUMBER OF DIRECTORY ENTRIES = 1950
NUMBER OF DATA PAGES = 389
DSNB772I - CUMULATIVE MEMBER DETAIL STATISTICS SINCE 17:08:41 OCT 16,
2002
DSNB773I - MEMBER DETAIL STATISTICS
SYNCHRONOUS READS
DUE TO BUFFER INVALIDATION
DATA RETURNED = 0
DATA NOT RETURNED = 0
DSNB774I - DUE TO DATA PAGE NOT IN BUFFER POOL
DATA RETURNED = 0
DATA NOT RETURNED = 0
DSNB775I - PREFETCH READS
DATA NOT RETURNED = 0
DSNB789I - REGISTER PAGE LIST = 0
PAGES RETRIEVED = 0
FAILED READS DUE TO LACK OF STORAGE = 0
DSNB776I - SYNCHRONOUS WRITES
CHANGED PAGES = 5
CLEAN PAGES = 0
DSNB777I - ASYNCHRONOUS WRITES
If you specify the DETAIL option, each line can be followed by information
regarding conversations owned by DB2 system threads that are communicating
with the location.
Subsections:
v “Environment”
v “Authorization”
v “Syntax” on page 210
v “Option descriptions” on page 210
v “Output” on page 210
v “Examples” on page 211
Environment
This command can be issued from a z/OS console, a DSN session under TSO, a
DB2I panel (DB2 COMMANDS), an IMS or CICS terminal, or a program using the
instrumentation facility interface (IFI).
Authorization
To execute this command, you must use a privilege set of the process that includes
one of the following privileges or authorities:
v DISPLAY privilege
v SYSOPR authority
v SYSCTRL authority
v SYSADM authority
DB2 commands that are issued from a logged-on z/OS console or TSO SDSF can
be checked by DB2 authorization using primary and secondary authorization IDs.
DISPLAY LOCATION
* DETAIL
,
( location-name )
partial-location*
<luname>
ipaddr
Option descriptions
(*)
Displays information for all remote locations.
( location-name )
Lists one or more location names, separated by commas.
Because DB2 does not receive a location name from requesters that are not DB2
for z/OS subsystems, you can enter the LUNAME or IP address of such a
requester. Refer to the option descriptions for the < luname > and ( ipaddr )
options for more information about using the LUNAME or IP address to
specify a requester that is not a DB2 for z/OS subsystem.
( partial-location *)
Selects all location names that begin with the string partial-location and can end
with any string, including the empty string. For example, LOCATION(ABC*)
selects all location names that begin with the string ’ABC’.
< luname >
Requests information about the remote clients that are connected to DDF
through the remote SNA LU that is specified. Enclose the LU name in the
less-than (<) and greater-than (>) symbols. For example, DISPLAY
LOCATION(<LULA>) displays information about a remote location (that is not
DB2 for z/OS) with the LU name of LULA.
You can use an asterisk (*) when specifying an LU name in the same manner
as previously described for specifying a partial-location name. For example,
DISPLAY LOCATION(<LULA*) selects all remote locations (that are not DB2
for z/OS) with an LU name that begins with the string ’LULA’.
( ipaddr )
Requests information about the clients that are connected to DDF through the
remote TCP/IP host. Enter the IP address. For example,
DISPLAY LOCATION(124.63.51.17) displays information about clients at the
remote TCP/IP host whose dotted decimal IP address is 124.63.51.17.
DETAIL
Displays additional information about conversation activity for DB2 system
threads, as shown in Example 2.
Output
| Note: The maximum value for REQSTR, SERVER, and CONVS is 999999. The
| LINKNAME information is provided as an extension of the DSNL202I message,
| and only if the LINKNAME is different than LOCATION.
Examples
| Example 2: Display information about threads and conversations with all remote
| locations. Additionally, display detail conversation information about DB2 system
| threads that communicate with other locations. This is an example of the output
| generated by the following command:
| -DISPLAY LOCATION DETAIL
|
| DSNL200I - DISPLAY LOCATION REPORT FOLLOWS-
| LOCATION PRDID REQSTR SERVER CONVS
| SAN_JOSE DSN09010 1 0 3
| LUND1
| L203-SYSTASK SESSID A ST TIME
| L204-SYSCON-O E15FDE02D310FB80 S 0820914411180
| L204-SYSCON-I E15FDE02D310FB81 W R 0820914411181
| Example 3: Display information for a DB2 system that is connected with the
| following DRDA partners:
| v A non-z/OS server named DRDALOC via TCP/IP IPv4.
| v Several TCP/IP clients from the same TCP/IP host as the DRDALOC server.
| v A DB2 for z/OS server named DB2SERV via SNA.
| v A DB2 for z/OS client via TCP/IP IPv6.
| DISPLAY LOCATION(*)
|
| DSNL200I - DISPLAY LOCATION REPORT FOLLOWS -
| LOCATION PRDID REQSTR SERVER CONVS
| DRDALOC SQL09053 3 0 3
| ::FFFF:124.63.51.17
| ::FFFF:124.63.51.17 SQL09053 0 15 15
| DB2SERV DSN09010 1 0 1
| LULA
| 2002:91E:610:1::5 DSN09015 0 1 1
| DISPLAY LOCATION REPORT COMPLETE
| Example 4: The following example shows the requestor report from the DISPLAY
| LOCATION command where the connection is established as trusted.
| -DISPLAY LOC
|
| DSNL200I - DISPLAY LOCATION REPORT FOLLOWS -
| LOCATION PRDID REQSTR SERVER CONVS
| STL912B 1 0 1
| 9.30.115.135
| CONTEXTNAME= DOMINOCONTEXT
| DISPLAY LOCATION REPORT COMPLETE
Subsections:
v “Environment”
v “Authorization”
v “Syntax”
v “Usage notes”
v “Examples” on page 214
Environment
This command can be issued from a z/OS console, a DSN session under TSO, a
DB2I panel (DB2 COMMANDS), an IMS or CICS terminal, or a program using the
instrumentation facility interface (IFI).
Authorization
To execute this command, you must use a privilege set of the process that includes
one of the following privileges or authorities:
v DISPLAY privilege
v SYSOPR authority
v SYSCTRL authority
v SYSADM authority
DB2 commands that are issued from a logged-on z/OS console or TSO SDSF can
be checked by DB2 authorization using primary and secondary authorization IDs.
Syntax
DISPLAY LOG
Usage notes
Information provided by the DISPLAY LOG command : You can use the DISPLAY
LOG command to view the current LOGLOAD setting, including information
about the current active log data sets and status of the offload task. You can obtain
additional information about log data sets and checkpoint information by using the
Print Log Map utility (DSNJU004).
This command displays one line of output for each stored procedure that a DB2
application has accessed. You can qualify stored procedure names with a schema
name.
Subsections:
v “Environment”
v “Authorization”
v “Syntax” on page 216
v “Option descriptions” on page 216
v “Output” on page 217
v “Examples” on page 218
Environment
This command can be issued from a z/OS console, a DSN session under TSO, a
DB2I panel (DB2 COMMANDS), an IMS or a CICS terminal, or a program using
the instrumentation facility interface (IFI).
Data sharing scope: Group or local, depending on the value of the SCOPE option.
Authorization
To run this command, you must use a privilege set of the process that includes one
of the following privileges or authorities:
v Ownership of the stored procedure
v DISPLAY privilege
v SYSOPR authority
v SYSCTRL authority
v SYSADM authority
DB2 commands that are issued from a logged-on z/OS console or TSO SDSF can
be checked by DB2 authorization using primary and secondary authorization IDs.
Syntax
(*.*)
DISPLAY PROCEDURE
,
( schema.procedure-name )
schema.partial-name*
procedure-name
partial-name*
LOCAL
SCOPE ( GROUP )
Option descriptions
(*.*)
Displays information for all stored procedures in all schemas that DB2
applications have accessed since DB2 was started.
( schema.procedure-name )
Displays the specified stored procedure in the specified schema.
( schema.partial-name *)
Displays a set of stored procedures in the specified schema that DB2
applications have accessed since DB2 was started. The names of all procedures
in the set begin with partial-name and can end with any string, including the
empty string. For example, PAYROLL.ABC* displays information for all stored
procedure names beginning with ABC in the PAYROLL schema.
( procedure-name )
Displays one or more specific stored procedure names in the SYSPROC
schema. If no procedures are named, DB2 displays information for all stored
procedures that have been accessed by DB2 applications.
( partial-name *)
Displays information for a set of stored procedures in the SYSPROC schema
that DB2 applications have accessed since DB2 was started. The names of all
procedures in the set begin with partial-name and can end with any string,
including the empty string. For example, ABC* displays information for all
stored procedures in the SYSPROC schema with names that begin with ABC.
SCOPE
Specifies the scope of the command.
( LOCAL )
Specify to display information about procedures on the local member only.
Output
| Displaying native SQL procedures: Native SQL procedures, SQL procedures that are
| created using the new support introduced in Version 9, are not displayed in the
| DISPLAY PROCEDURE output unless you run the procedure in DEBUG mode. If
| you do run the procedure in DEBUG mode the WLM environment column in the
| output contains the WLM ENVIRONMENT FOR DEBUG that you specified when
| you created the native SQL procedure.
| The DISPLAY PROCEDURE output shows the statistics of native SQL procedures
| as ’0’ if the native SQL procedures are under the effect of a STOP PROCEDURE
| command.
Examples
Example 1: Display information about all stored procedures that have been
accessed by DB2 applications.
-DISPLAY PROCEDURE
------ SCHEMA=SYSPROC
PROCEDURE STATUS ACTIVE QUED MAXQ TIMEOUT FAIL WLM_ENV
USERPRC2 STOPQUE 0 5 5 3 0 SANDBOX
USERPRC4 STOPREJ 0 0 1 0 0 SANDBOX
DSNX9DIS DISPLAY PROCEDURE REPORT COMPLETE
DSN9022I = DSNX9COM '-DISPLAY PROC' NORMAL COMPLETION
------ SCHEMA=PAYROLL
PROCEDURE STATUS ACTIVE QUED MAXQ TIMEOUT FAIL WLM_ENV
------ SCHEMA=HRPROD
PROCEDURE STATUS ACTIVE QUED MAXQ TIMEOUT FAIL WLM_ENV
HRPRC1 STARTED 0 0 1 0 0 HRPROCS
HRPRC2 STOPREJ 0 0 1 0 0 HRPROCS
DSNX9DIS DISPLAY PROCEDURE REPORT COMPLETE
DSN9022I = DSNX9COM '-DISPLAY PROC' NORMAL COMPLETION
------ SCHEMA=SYSADM
PROCEDURE STATUS ACTIVE QUED MAXQ TIMEOUT FAIL WLM_ENV
SPC1 STOPQUE 0 0 0 0 0 WLMENV1
SPC2 STOPQUE 0 0 0 0 0 WLMENV3
DSNX9DIS PROCEDURES SP - SP* STOP QUEUE
DSNX9DIS DISPLAY PROCEDURE REPORT COMPLETE
DSN9022I = DSNX9COM '-DISPLAY PROC' NORMAL COMPLETION
Subsections:
v “Environment”
v “Authorization”
v “Syntax”
v “Output”
v “Examples” on page 222
Environment
This command can be issued from the z/OS console, through a batch job or
instrumentation facility interface (IFI). The command is only used by tools, such as
the Optimization Service Center for DB2 for z/OS. Individual users should not
issue this command.
Authorization
To execute this command, you must use a privilege set of the process that includes
one of the following authorities:
v SYSOPR authority
v SYSCTRL authority
v SYSADM authority
| Syntax
|
| DISPLAY PROFILE
|
Output
Message DSNT753I status information: The status codes that are displayed by the
DISPLAY PROFILE command and their respective descriptions are as follows:
status Indicates the value is either ON, OFF, SUSPENDED, STARTING, or
STOPPING.
ON Profiling is active.
OFF Profiling is inactive.
Examples
Example 1: This command displays the status of the profiling activities, as either
active or inactive.
-DISPLAY PROFILE
| If the facility has already been started, DISPLAY RLIMIT also displays the ID of
| the resource limit specification table or the resource limit middleware table that is
| being used.
Subsections:
v “Environment”
v “Authorization”
v “Example”
Environment
This command can be issued from a z/OS console, a DSN session, a DB2I panel
(DB2 COMMANDS), an IMS or CICS terminal, or a program using the
instrumentation facility interface (IFI).
Authorization
To execute this command, you must use a privilege set of the process that includes
one of the following authorities:
v SYSOPR authority
v SYSCTRL authority
v SYSADM authority
DB2 commands that are issued from a logged-on z/OS console or TSO SDSF can
be checked by DB2 authorization using primary and secondary authorization IDs.
Syntax
DISPLAY RLIMIT
Example
If the resource limit facility (RLF) is inactive, the following output is generated:
DSNT701I - RESOURCE LIMIT FACILITY IS INACTIVE
DSN9022I - DSNTCDIS 'DISPLAY RLIMIT' NORMAL COMPLETION
A DB2 thread can be an allied thread, a database access thread, or a parallel task
thread. Threads can be active, inactive, indoubt, or postponed.
Distributed threads are those threads that have a connection with a remote location
(active or inactive) or that had a connection with a remote location (indoubt). An
allied thread and a parallel task thread can be distributed or non-distributed; a
database access thread is always distributed.
The DISPLAY THREAD command allows you to select the type of information you
want to display by using one or more of the following criteria:
v Active threads, inactive threads, indoubt threads, postponed threads, procedure
threads, system threads, or the set of active, indoubt, postponed, and system
threads (see the descriptions under the TYPE option for more information)
v Allied threads, including those threads that are associated with the address
spaces whose connection names are specified
v Distributed threads, including those threads that are associated with a specific
remote location
v Detailed information about connections with remote locations
v A specific logical unit of work ID (LUWID)
Subsections:
v “Environment”
v “Authorization” on page 226
v “Syntax” on page 226
v “Option descriptions” on page 227
v “Usage notes” on page 230
v “Output” on page 232
v “Examples” on page 234
Environment
This command can be issued from a z/OS console, a DSN session under TSO, a
DB2I panel (DB2 COMMANDS), an IMS or CICS terminal, or a program using the
instrumentation facility interface (IFI).
To execute this command, you must use a privilege set of the process that includes
one of the following privileges or authorities:
v DISPLAY privilege
v SYSOPR authority
v SYSCTRL authority
v SYSADM authority
DB2 commands that are issued from a logged-on z/OS console or TSO SDSF can
be checked by DB2 authorization using primary and secondary authorization IDs.
| Syntax
|
| DISPLAY THREAD ( )
| ,
connection-name
partial-connection*
*
| LOCAL
| SCOPE ( GROUP )
ACTIVE
TYPE( INDOUBT )
*
INACTIVE
POSTPONED
PROC
SYSTEM
|
| ,
LOCATION( location-name )
partial-location*
*
,
LUWID( luwid )
partial-luwid*
token
|
| 512 DETAIL ,
LIMIT( integer )
* RRSURID( rrs-urid )
*
Only under certain conditions, as described in the following lists, are any of the
following options required.
If you do not specify either ( connection-name ) or (*), the following rules apply:
v If the command is issued from a DSN session under TSO, a DB2I panel (DB2
COMMANDS), or an IMS or CICS terminal, the connection name is inherited
from the associated address space.
v If the command is not issued from one of those environments, the following
rules apply:
– If you do not specify either LOCATION or LUWID, processing terminates
with a DSNV413I message.
– If you do specify LOCATION or LUWID, only distributed threads of the type
selected by the TYPE option are displayed.
– When you explicitly specify location-name , only distributed threads of the
type selected by the TYPE option that either have (active or inactive threads)
or had (indoubt threads) a connection with the specified location are
displayed.
( connection-name , ...)
Lists one or more connection names (of 1 to 8 characters each). Allied threads
are selected only from the address spaces associated with those connection
names. The LOCATION option can restrict what is displayed:
v If you specify LOCATION(*), only distributed threads of the type specified
in the TYPE option are displayed.
v When you explicitly specify location-name , only distributed threads of the
specified type that either have or had a connection with the specified
location are displayed.
( partial-connection* , ...)
Selects the connections that begin with the string partial-connection and can end
with any string, including the empty string. For example, DISPLAY
THREAD(CICS*,IMS*) selects all connection names that begin with the string
’CICS’ or ’IMS’. The LOCATION option can restrict the display exactly the
same way as previously described for location-name .
(*)
Displays all threads in all address spaces attached to DB2 and all database
access threads of the types specified in the TYPE option. The LOCATION
option can restrict what is displayed:
v If you specify LOCATION(*), only distributed threads are displayed.
v When you explicitly specify location-name , only distributed threads that
either have (active or inactive threads) or had (indoubt threads) a connection
with the specified location are displayed.
The default is to display only the connections that are associated with the
transaction manager from which the command was entered.
SCOPE
Specifies the scope of the command.
( LOCAL )
Displays threads on only the current member.
(GROUP)
Displays all threads on the data sharing group.
Usage notes
Formatted report for distributed threads
The series of messages, DSNV444I through DSNV446I, augment the
formatted report for DISPLAY THREAD TYPE (ACTIVE or INACTIVE) for
distributed threads.
| Threads for connections to remote servers
A database access thread that is connected to a requester can also be
Output
The following table shows sample DISPLAY THREAD commands and the types of
output they generate. Numbers in each row refer to the descriptions at the bottom
of the table. The DETAIL keyword is not included because it affects only the
amount of information displayed about a distributed thread.
If you specify the DETAIL keyword for active, inactive, or indoubt threads, DB2
also displays message DSNV441I, which, if available, displays accounting suffix
information as a character string. DB2 will recognize accounting information, and
display suffix information that originates from the following systems:
v DB2 for z/OS systems
v Any system where the accounting information matches the format that is
described in DSNSQMDA.QMDASQLI, which includes the product ID prefixes
JCC (IBM Data Server Driver for JDBC and SQLJ) and SQL (DB2® Universal
Database™ for Linux®, UNIX, and Windows®).
If you specify the DETAIL option for active threads, DB2 also displays message
DSNV440I, which, if applicable, displays the contents (in hexadecimal
representation) of the remote client’s XID.
| If you specify the DETAIL option for active threads, the DSNV445I and DSNV446I
| messages provide an index number in parenthesis, ’(ix)’. This index number is
| related to the table of conversation detail information described by the DSNV447I
| and DSNV448I messages. This index reference is appended to the front of the
| location name information. The detail report contains the index reference even if
| only one location is reported.
| The location information is reported using a dash to delimit the first two location
| name and address (SNA LUNAME, or TCP/IP IP address) components. In the case
| of TCP/IP connections, a double colon is used to delimit the third port component.
Examples
Example 1: The output of the command DISPLAY THREAD shows a token for
every thread, distributed or not. This example shows the token for an allied thread
that is not distributed. The token is 123. You can use the thread’s token as the
parameter in the CANCEL THREAD command.
-DISPLAY THREAD(*)
Example 3: In this example, a system at Site 1 has a TSO application and an IMS
application. The system at Site 1 fails after DB2 commits the TSO application, but
before the commit decision has been communicated to the participant subsystems
at Site 2. The failure occurs before IMS has communicated the commit or rollback
decision to the Site 1 DB2 subsystem. The DISPLAY THREAD commands that are
issued at Site 1 and 2 show report output similar to the following:
Example 4: This example shows a thread executing within a stored procedure and
a thread waiting for a stored procedure to be scheduled. Assume that an
application makes a call to stored procedure PROC1 and then to stored procedure
PROC2. PROC2 is in a STOP QUEUE state.
The output for PROC1 while it is executing shows a status of SP in the ST column,
which indicates that a thread is executing within a stored procedure:
-DISPLAY THREAD(*)
The output for PROC2, while it is queued, shows a status of SW in the ST column,
which indicates that a thread is waiting for a stored procedure to be scheduled:
-DISPLAY THREAD(*)
Example 7: This example shows the detail report for a DB2 client that uses TCP/IP
to access a remote DRDA server.
-DISPLAY THREAD(*) LOCATION(*) DETAIL
| Example 8: This example shows the detail report for a client that supports IPv6
| addressing and provides a 58-character extended correlation token to the DB2
| server. That token is displayed in message V442.
| -DISPLAY THREAD(*)
| Example 9: This example shows information about units of work whose back-out
processing has been postponed.
-DISPLAY THREAD (*) TYPE (POSTPONED)
Example 10: This example shows the token for a thread that is executing a
user-defined function. The token is 18.
-DISPLAY THREAD(*) DETAIL
Example 11: This example shows information about a thread that is involved in an
RRS unit of recovery.
-DISPLAY THREAD(*) RRSURID(*)
Example 12: This example shows information about a thread where DB2 is the
coordinator for an indoubt RRS unit of recovery. DB2 has committed the thread but
has not been able to resolve the RRS UR with RRS.
-DISPLAY THREAD(*) TYPE(I) RRSURID(*)
Example 13: This example shows the XID for an active thread that is associated
with an XA transaction manager:
-DISPLAY THREAD(*) DETAIL
| Example 14: This example shows a DISPLAY report of a thread associated with a
| trusted context.
| Example 15: This example shows the command during restart. A DSNV506I
| message will indicate what state DB2 is in, such as STARTING, ACTIVE,
| STOPPING. The message will also indicate the phase of restart or shutdown, if
| available.
| -DIS THD(*) TYPE(SYSTEM)
| DSNV401I - DISPLAY THREAD REPORT FOLLOWS -
| DSNV497I - SYSTEM THREADS -
| DB2 STARTING PHASE=Subsystem Startup Recovery Log Manager
| NAME ST A REQ ID AUTHID PLAN ASID TOKEN
| V91A N * 0 031.GlmTsk00 SYSOPR 002D 0
| V490-SUSPENDED 05136-13:53:12.73 DSN7LSTK +00000D0C 05.45
| V91A N * 0 023.GCSCNM03 SYSOPR 002D 0
| DISPLAY SYSTEM THREAD REPORT COMPLETE
| DSN9022I ) DSNVDT '-DIS THD' NORMAL COMPLETION
| Example 16: This example shows the command executing while DB2 is active.
| Many system threads are suspended as shown in the DSNV490I messages. In
| addition, system thread 023.GSCN6 03 is currently executing the -DISPLAY
| THREAD(*) TYPE(SYSTEM) command.
| -DIS THD(*) TYPE(SYSTEM)
| DSNV401I ) DISPLAY THREAD REPORT FOLLOWS -
| DSNV497I ) SYSTEM THREADS -
| DB2 ACTIVE
| NAME ST A REQ ID AUTHID PLAN ASID TOKEN
| V91A N * 0 020.PEXCTL00 SYSOPR 002E 0
| V490-SUSPENDED 05136-13:53:29.55 DSNTLCTL +000004F0 16.31
| V91A N * 0 010.PMICMS01 SYSOPR 002E 0
| V490-SUSPENDED 05136-13:53:47.29 DSNB1CMS +000005E8 12.21
| V91A N * 0.010.PMITMR02 SYSOPR 002E 0
| ...
| ...
| V91A N * 0.004.JW007 01 SYSOPR 002D 0
| V490-SUSPENDED 05136-13:54:03.60 DSNJW107 +000002B2 12.27
| V91A N * 0.004.JTIMR 00 SYSOPR 002D 0
| V91A N * 0.016.WVSMG 00 SYSOPR 002D 0
| V490-SUSPENDED 05136-13:53:23.83 DSNWVSMG +00000534 01.54
| V91A N * 0.026.WVZXT 01 SYSOPR 002D 0
| V91A N * 0.016.WVSMT 01 SYSOPR 002D 0
| V490-SUSPENDED 05136-13:53:48.10 DSNWVSMT +00000D7C 01.54
| V91A N * 0.023.GSCN6 03 SYSOPR 002D 0
| V501-COMMAND EXECUTING: -DIS THD(*) TYPE(SYSTEM)
| DISPLAY SYSTEM THREAD REPORT COMPLETE
| DSN9022I ) DSNVDT '-DIS THD' NORMAL COMPLETION
| DISPLAY SYSTEM THREAD REPORT COMPLETE
| DSN9022I ) DSNVDT '-DIS THD' NORMAL COMPLETION
| Example 17: This display shows the command executing while DB2 is stopping.
| The DSNV506I message identifies the phase of shutdown.
| -DIS THD(*) TYPE(SYSTEM)
| DSNV401I - DISPLAY THREAD REPORT FOLLOWS -
| DSNV497I - SYSTEM THREADS -
| NAME ST A REQ ID AUTHID PLAN ASID TOKEN
| V91A N * 0 020.PEXCTL00 SYSOPR 002E 0
| Example 18: This example shows information about an active database access
| thread that is disconnected.
| -DISPLAY THREAD(*) DETAIL
An additional option to this command and additional values for a few options of
this command are not described here. They are intended for service and use under
the direction of IBM support personnel.
Subsections:
v “Environment”
v “Authorization”
v “Syntax” on page 242
v “Option descriptions” on page 243
v “Usage notes” on page 247
v “Examples” on page 249
Environment
This command can be issued from a z/OS console, a DSN session, a DB2I panel
(DB2 COMMANDS), an IMS or CICS terminal, or a program using the
instrumentation facility interface (IFI).
Data sharing scope: Group or local, depending on the value of the SCOPE option.
Authorization
To execute this command, you must use a privilege set of the process that includes
one of the following privileges or authorities:
v DISPLAY privilege
v SYSOPR authority
v SYSCTRL authority
v SYSADM authority
DB2 commands that are issued from a logged-on z/OS console or TSO SDSF can
be checked by DB2 authorization using primary and secondary authorization IDs.
| ,
| *
DISPLAY TRACE ( ) DEST( GTF )
PERFM SMF constraint block DETAIL(output-type) COMMENT(string)
ACCTG SRV
STAT OPn
AUDIT
MONITOR
|
| LOCAL RMID
SCOPE ( GROUP )
|
| constraint block:
|
| * * *
, , ,
|
| * * *
, , ,
|
| * LOCATION( * ) *
, , ,
|
| * *
, ,
|
| * *
, ,
|
| * constraint block 2
,
ROLE( connection-role )
partial-connection-role-id
|
|
| , ,
|
| , ,
|
| , , ,
|
| , ,
|
| , ,
|
| ,
XROLE( connection-role )
partial-connection-role-id
|
Option descriptions
None of the options are required. The command DISPLAY TRACE lists all active
traces. Each option that is used, except TNO, limits the effect of the command to
active traces that were started using the same option, either explicitly or by
default, with exactly the same parameter values. For example, the following
command lists only the active traces that were started using the options PERFM
and CLASS (1,2); it does not list, for example, any trace started using CLASS(1).
-DISPLAY TRACE (PERFM) CLASS (1,2)
(*)
Does not limit the list of traces. The default is ( * ).
The CLASS option cannot be used with DISPLAY TRACE (*).
Each of the following keywords limits the list to traces of the corresponding
type.
Type (Abbrev)
Description
| Usage notes
| Displaying traced threads using the * wildcard: You can use the wildcard suffix,
| “*” to filter threads that you want to display. For example, if you specify
| “-DISPLAY TRACE PLAN (A,B,C*)”, DB2 will display traces A, B, CDE, CDEFG,
| CDEFGH, and so on. It will display traced threads “A”, “B” and all threads
| starting with “C”.
| Displaying traced threads using the positional, (_) wildcard: You can utilize the
| positional wildcard, which is represented by the, “_” character, to display traced
| threads when you want the wildcard in the middle, or when you want to trace
| threads of a specific length. For example, if you specify “-DISPLAY TRACE PLAN
| (A_B), all display all traced threads that have “A” as the first character, any
| character for the ″_,″ and “C” as the plan filter.
| Displaying multiple traced threads at once using wildcards: You also have the
| option of displaying multiple traced threads based on multiple trace qualifications.
| For example, you can specify, “-DISPLAY TRACE PLAN (A*, B*, C*) to
| simultaneously display all traced threads for plan that start with “A”, “B”, and
| “C”. The wildcard character, “*” will display all traced threads. You can specify
| more complex combinations such as, “-DISPLAY TRACE PLAN (A_B*, C*, AND
| C/_D*)”, which will return all threads that:
| v begin with “A”, have a one character wild card as the second character in the
| thread, have a “B” as the third character in the thread, and end with any type or
| number of characters (ADBIOP, AOBTYJDP,)
| v begin with “C”, and end with any combination of characters (CDE, CGHKO)
| v begin with “C_D” and end with any type of character combination (C_DEFGH,
| C_DlMNOP)
| All of the possible thread combinations listed above will be returned with the
| command above.
| You have the ability to filter multiple threads at the same time, setting specific
| criteria for the trace. For example, you can specify, “-DISPLAY TRACE PLAN (A)
| USERID (B).″ This will display all traced threads where the plan thread is ″A,″ and
| Filtering traced threads that you want to display using exclude functionality:
| When you specify an “X” with any constraint keyword, such as “XPLAN”, when
| you are filtering threads, you are using the exclude functionality for the display
| trace command. You have the option of excluding specific types of threads you
| want to display when you are running trace commands. You can use the “X”
| character to exclude specific combinations of characters when you are running a
| display trace command. For example, you can specify “-DISPLAY TRACE
| XPLAN(A), to display all traced threads EXCEPT “A”. In this instance B, BCD,
| BCDE, or CD could possibly be returned.
| You also have the option of excluding multiple types of threads from your trace.
| For example, you can specify, “-DISPLAY TRACE XPLAN (A*, B*) to display all
| traced threads EXCEPT those starting with “A”, with any combination of
| characters following “A”, and all those characters starting with “B”, with any
| combination of characters following “B”. Note: Specifying XPLAN (*) will exclude
| all threads from your search, and is not allowed. You also cannot use the wildcard
| in the middle of a display trace command with exclude functionality, such as,
| “-DISPLAY TRACE XPLAN (A*C).” You can, however, specify “-DISPLAY TRACE
| XPLAN (A_ _ C *)”, which will return all threads EXCEPT those starting with “A”,
| a variety of TWO characters next, a “C” in the fourth space, and a variety of
| characters at the end. The wildcard symbol cannot be placed in the middle of trace
| criteria.
| You have the ability to display two traces at once, in order to help you optimize
| your tracing capabilities. For example, you can specify (-DISPLAY TRACE XPLAN
| (A, B, C) USERID (D))”. This tells DB2 to display all threads that are being traced
| for “plan” EXCEPT threads “A”, “B”, or “C”, only where the user ID = “D”.
| Combining trace qualifiers: You can customize the threads you trace by
| commanding DB2 to trace specific threads, while excluding other specific threads.
| For example, you can specify, “-DISPLAY TRACE USERID(A,B) XPLAN (C)” . This
| criteria only traces threads where the user ID is equal to “A” or “B”, and plan is
| NOT equal to “C”. In this example, a thread where the user ID is “A” and the plan
| is equal to “D” would pass, and be traced, but a thread where the user ID is “A”
| and plan is “C” would not pass, and would not be traced.
| You can introduce wildcards into your display trace commands to add more
| customization to your traces. For example, you can specify “-DISPLAY TRACE
| PLAN (C*) USERID (Z, X) XPLAN (C, D, E)”. In this example, for the thread to be
| traced, the plan must begin with ″C,″ the user ID must be equal to ″Z″ or to ″X,″
| and the plan cannot be ″C,″ ″D,″ or ″E.″ So a plan of ″CB,″ with a user ID of ″Z″
| would pass, and the thread being traced would be displayed, but plan C with a
| user ID of ″X″ would fail because the command specifies not to trace threads
| where the plan is “C”, without additional characters in the thread.
Example 1: List all traces that have the generalized trace facility as their only
destination.
-DISPLAY TRACE (*) DEST (GTF)
Example 3: List all active audit traces for threads that are connected to the DB2
subsystem with location name USIBMSTODB23.
-DISPLAY TRACE (AUDIT) LOCATION (USIBMSTODB23)
Example 4: Output from the DISPLAY TRACE command is a set of messages that
look similar to the following messages:
- 10.26.34 -DISPLAY TRACE
- 10.26.34 STC 21 DSNW127I - CURRENT TRACE ACTIVITY IS -
- TNO TYPE CLASS DEST QUAL
- 01 STAT 01 SMF NO
- 02 ACCTG 01 SMF YES
- 03 PERFM 01,02,03 GTF YES
- 04 AUDIT 01,02,03,04, SMF YES
- 04 06,07
- 05 MON 01,02,03 OP1 NO
- *********END OF DISPLAY TRACE SUMMARY DATA*********
- 10.26.34 STC 21 DSN9022I - DSNWVCM1 '-DISPLAY TRACE' NORMAL COMPLETION
Example 5: Output from the DISPLAY TRACE command is a set of messages that
look similar to the following messages:
- 13.47.09 )dis trace(*)
- 13.47.09 STC00068 DSNW127I - CURRENT TRACE ACTIVITY IS -
- TNO TYPE CLASS DEST QUAL
- 01 STAT 01 SMF NO
- 02 ACCTG 01 SMF YES
- 03 PERFM 01,02,03 GTF YES
- 04 AUDIT 01,02,03,04, SMF YES
- 04 06,07
- 05 MON 01,02,03 OP1 NO
- *********END OF DISPLAY TRACE SUMMARY DATA*********
- 10.26.34 STC 21 DSN9022I - DSNWVCM1 '-DISPLAY TRACE' NORMAL COMPLETION
Example 6: Output from the DISPLAY TRACE command with the XPLAN option,
is a message that looks similar to the following message:
- 10.54.16 STC00051 DSNW127I ) CURRENT TRACE ACTIVITY IS -
- TNO TYPE CLASS DEST QUAL IFCID
- 02 ACCTG 01 SMF YES
- *********END OF DISPLAY TRACE SUMMARY DATA*********
- 10.54.16 STC00051 DSN9022I ) DSNWVCM1 '-DIS TRACE' NORMAL COMPLETION
If you dont have a trace started with XPLAN(A) qualifier, then you will get this:
- 10.55.41 STC00051 DSNW137I ) SPECIFIED TRACE NOT ACTIVE
- 10.55.41 STC00051 DSN9022I ) DSNWVCM1 '-DIS TRACE' NORMAL COMPLETION
The output from the command consists of informational messages only. One set of
messages is returned for each job identified by the command. For utility jobs in a
data sharing group, the output shows the member name of the system on which
each utility job is running.
The status from the display represents the current status, except in a data sharing
group when the utility is running on a member other than the one from which the
command is issued. In that case, the status is current as of the last checkpoint.
Subsections:
v “Environment”
v “Authorization”
v “Syntax”
v “Option descriptions” on page 252
v “Usage notes” on page 252
v “Output” on page 252
v “Examples” on page 254
Environment
This command can be issued from a z/OS console, a DSN session, a DB2I panel
(DB2 COMMANDS), an IMS or CICS terminal, or a program using the
instrumentation facility interface (IFI).
Data sharing scope: Group or member, depending on which option you choose
Authorization
None is required.
Syntax
,
MEMBER( member-name )
Use at least one of the following options but do not use the same option more than
once.
( utility-id )
Identifies a single job by its utility identifier, the value given for the UID
parameter when the job was created.
If utility-id was created by the DSNU CLIST by default, it has the form of
tso-userid.control-file-name .
If utility-id was omitted when the utility job was created, utility-id has the form
userid.jobname .
( partial-utility-id* )
Identifies a set of utility jobs. A status message is shown for each utility
identifier that begins with the characters of partial-utility-id .
For example, -DISPLAY UTILITY(ABCD*) shows the status of every utility job
known to DB2 whose identifier begins with the characters ABCD.
(*) Shows the status of all utility jobs known to DB2, including jobs currently
running in a data sharing group.
MEMBER ( member-name , ...)
Restricts the display for the identified utility jobs to specific members of the
data sharing group. The default is to display utility jobs running on any
member. In a non-data-sharing environment, the option is ignored.
One set of messages is returned for each job identified by the command.
Usage notes
DISPLAY status
The status displayed in the returned message is the status at the time the
DB2 utility function received the command. Execution has proceeded,
therefore the current state of the utility can be different from the state
reported. For instance, the DISPLAY UTILITY command can indicate that a
particular utility identifier is active, but, when the message is received by
the requester, the utility job step could have terminated so that the utility
identifier is no longer known to DB2.
Command response
In a data sharing environment, messages DSNU100I, DSNU105I, DSNU106I
show the name of the member on which the utility job is running. If you
specify a single member name in the MEMBER option and that member
does not belong to the group, or if you specify a list of member names in
the MEMBER option and none of those members belong to the group, the
command fails and a message is issued.
Output
Output during LOG phase of REORG with SHRLEVEL CHANGE: During the LOG
phase of REORG with SHRLEVEL CHANGE, the output of DISPLAY UTILITY
now includes the additional information found in message DSNU383I, as shown in
Example 4.
CURRENT ITERATION NUMBER
Indicates the current iteration number.
WRITE ACCESS ALLOWED IN CURRENT ITERATION
Indicates “YES” or “NO” according to whether write access is allowed in
the current iteration of log processing.
ITERATION BEFORE PREVIOUS ITERATION
Indicates the ELAPSED TIME so far, and the NUMBER OF LOG
RECORDS PROCESSED in the iteration. Their value is zero if the current
iteration number is one or two.
PREVIOUS ITERATION
Indicates the ELAPSED TIME and the NUMBER OF LOG RECORDS
PROCESSED for the previous iteration. Their value is zero if the current
iteration number is one.
CURRENT ITERATION:
Indicates the ESTIMATED ELAPSED TIME, the ACTUAL ELAPSED TIME
SO FAR and the ACTUAL NUMBER OF LOG RECORDS BEING
PROCESSED.
CURRENT ESTIMATE FOR NEXT ITERATION
For the next iteration, indicates the currently ELAPSED TIME and the
currently estimated NUMBER OF LOG RECORDS TO BE PROCESSED.
| Progress of the RECOVER utility: During the LOGAPPLY phase, you can use the
| DISPLAY UTILITY command to check the progress status of the RECOVER utility.
| Message DSNU116I provides an estimate of the log processing that has been
| completed for the recovery job. This function is available in conversion mode.
Examples
Example 1: Display status information for all utility jobs currently known to DB2.
-DISPLAY UTILITY (*)
Example 2: Display the status of utilities jobs on all members of the data sharing
group.
-DB1G DISPLAY UTILITY (*)
The following output, which shows utility jobs on members DB1G and DB2G, is
generated:
DSNU100I -DB1G DSNUGDIS USER = SAMPID
MEMBER = DB1G
UTILID = RUNTS
PROCESSING UTILITY STATEMENT 1
UTILITY = RUNSTATS
PHASE = RUNSTATS COUNT = 0
STATUS = STOPPED
DSNU100I -DB1G DSNUGDIS USER = SAMPID
MEMBER = DB2G
UTILID = CHKIX1
PROCESSING UTILITY STATEMENT 8
UTILITY = CHECK
PHASE = UNLOAD COUNT = 0
STATUS = STOPPED
DSN9022I -DB1G DSNUGCC '-DB1G DISPLAY UTILITY' NORMAL COMPLETION
The TSO command DSN enables you to issue the following DSN subcommands:
v ABEND
v BIND
v DCLGEN
v END
v FREE
v REBIND
v RUN
v SPUFI
During a DSN session, you can enter DB2 commands or comments. DB2
commands must start with a hyphen (-). Comments must start with an asterisk (*).
During a DSN session, you can also issue TSO commands, except for FREE, RUN,
TEST, and TIME. To use TSO TEST to debug an application program, run it with
the DSN command; for example:
TEST 'prefix.SDSNLOAD(DSN)' CP
The ABEND subcommand is used for diagnostic purposes only, and is intended to
be used only under the direction of IBM Software Support. Use it only when
diagnosing a problem with DSN or DB2. Percent commands are not recognized
during a DSN session, they are only supported by the TSO command processor.
Subsections:
v “Environment”
v “Authorization” on page 258
v “Syntax” on page 258
v “Option descriptions” on page 258
v “Usage notes” on page 259
v “Examples” on page 260
Environment
A DSN session runs under TSO in either foreground or background mode. When
you run it in background mode, you are not prompted for corrections or additional
required information.
You can also start a DSN session from a CLIST running in either foreground or
background mode.
None is required for the DSN command, but authorization is required for most
subcommands.
| Syntax
|
| DSN
| DSN 0
SYSTEM( subsystem-name ) RETRY( integer )
group-attachment-name
|
| TEST(integer) YES ASUSER(userid)
GROUP( )
NO
|
Option descriptions
The default is SYSTEM( DSN ). This value can be modified during DB2
installation.
RETRY( integer )
Specifies the number (integer) of additional times connection to the DB2
subsystem should be attempted if DB2 is not up or the maximum number of
batch connections has been reached when DSN is issued. Retries occur at
30-second intervals.
The default is RETRY( 0 ). The maximum number of retries is 120.
TEST( integer )
Specifies the last two digits (integer) of the module name in order to trace a
single DSN module. Specify a number greater than 100 to trace all DSN
modules. DSN trace information messages are written to the TSO SYSTSPRT
DD statement, and optionally, to the DSNTRACE DD statement.
GROUP
( YES )
Specify to consider group attach processing when the specified system
is not active.
(NO) Specifies that group attach processing is not considered.
| ASUSER( userid )
| Specifies a user ID to associate with the trusted connection for the current DSN
| session.
Usage notes
Beginning a DSN session: Issue the DSN command to begin a DSN session, which
allows you to enter DSN subcommands. The following rules govern the session:
v In foreground operation, you are prompted for input by the prompt string DSN
at the terminal. In background mode, your input is read from the SYSTSIN data
set.
v Except for delimited table names in the DCLGEN command, input in lowercase
letters is changed to uppercase.
v If duplicate keywords of any subcommand are specified, only the last of these
keywords is processed. For example, if both MEMBER( dbrm-member-name1 ) and
MEMBER( dbrm-member-name2 ) are specified with BIND PLAN, DB2 receives
only the latter, MEMBER( dbrm-member-name2 ).
v If ATTENTION (PA1) is pressed during a DSN session, and PROMPT is
specified in the TSO user profile, message DSNE005 appears: EXECUTION IS
INTERRUPTED, ENTER C TO CANCEL, OR ANY OTHER REPLY TO RESUME THE
subcommand SUBCOMMAND.
If you enter C, the current subcommand is canceled and the current DB2
connection terminates; a new one is established, and another DSN prompt
appears. Any other reply, except ATTENTION, causes the current subcommand
to continue from the point at which it was interrupted.
If a DSN session is started from a CLIST, or a CLIST is executed under DSN,
CONTROL PROMPT must be specified in the CLIST in order to receive message
DSNE005.
v After a command is processed during a DSN session, you are prompted for
input. That cycle continues until you end the session.
v You can end the session by doing one of the following:
– Issue the END subcommand. Control is passed to TSO.
– Press ATTENTION and respond to the message by pressing ATTENTION
again.
– Issue another DSN command. The old session ends and a new one begins.
DSN return code processing: At the end of a DSN session, register 15 contains the
highest value used by any DSN subcommand in the session or by any program
run using the RUN subcommand. Your run-time environment might format that
value as a return code. The value does not, however, originate in DSN.
Examples
Example 1: Start a DSN session. If the attempt to connect to DB2 fails, up to five
retries (at 30 second intervals) will be made.
DSN SYSTEM (DB2) RETRY (5)
Example 2: Start a DSN session, run a program, and then end the session and
return to TSO.
TSO prompt : READY
USER enters: DSN SYS (SSTR)
DSN prompt : DSN
USER enters: RUN PROGRAM (MYPROG)
DSN prompt : DSN
USER enters: END
TSO prompt : READY
Subsections:
v “Environment”
v “Authorization”
v “Syntax”
v “Option descriptions”
v “Usage note”
v “Example” on page 262
Environment
Authorization
Entering the DSNC command requires no privileges from DB2 security. For a
description of the privileges required to issue a DB2 command using the DSNC
command, see the command’s description.
Syntax
DSNC db2-command
destination
Option descriptions
destination
Identifies another terminal to receive display information. It must be a valid
terminal that is defined to CICS and supported by CICS basic mapping
support (BMS).
db2-command
Specifies the exact DB2 command that you want to enter from a CICS terminal.
It must be preceded by a hyphen.
Usage note
Screen scrolling: The CICS SIT table keyword SKRxxxx can be used to support the
scrolling of DSNC DB2 commands from your terminal.
Example: Issue the DB2 command DISPLAY THREAD from a CICS terminal.
DSNC -DISPLAY THREAD
Subsections:
v “Environment”
v “Authorization”
v “Syntax”
v “Option description”
v “Usage notes”
v “Example” on page 264
Environment
Authorization
Syntax
Option description
plan-name
Specifies a valid application plan.
Usage notes
You can stop the transactions associated with a particular plan ID in CICS with the
MAXACTIVE setting for TRANCLASS. This prevents new instances of the
transaction from causing a re-creation of a thread.
Example
Subsections:
v “Environment”
v “Authorization”
v “Syntax”
v “Option descriptions”
v “Usage notes” on page 266
v “Output” on page 266
v “Examples” on page 268
Environment
Authorization
Syntax
Option descriptions
PLAN plan-name
Displays information about transactions by plan name.
plan-name is a valid plan name for which information is displayed.
Default: If you do not specify plan-name (or if you specify an asterisk, *),
information is displayed for all active transactions.
TRANSACTION transaction-id
Displays information about transactions by transaction ID.
Abbreviation: TRAN
Usage notes
Output
For each created thread, the output for the DSNC DISPLAY (PLAN or
TRANSACTION) command, as seen in Example 2, displays the following
information:
DB2ENTRY
The name of the DB2ENTRY, *POOL for the pool, or *COMMAND for
DSNC command calls.
S The status field. A status of A indicates the thread is active within a unit of
work. A status of I indicates that a protected thread is waiting for work.
PLAN The plan that is associated with the thread. Command threads have no
plan.
PRI –AUTH
The primary authorization ID for the thread.
SEC –AUTH
The secondary authorization ID (if any) for the thread.
If the thread is active within a unit of work, its CICS transaction name (TRAN),
task number (TASK), and CICS local unit of work ID (UOW-ID) are also displayed.
Examples
Example 1: This command displays information about all active threads. The
display information is to be sent to another terminal designated as MTO2.
DSNC DISP PLAN * MTO2
Example 2: This example shows the output for the DSNC DISPLAY (PLAN or
TRANSACTION) command.
DFHDB2013 07/09/98 15:26:47 IYK4Z2G1 DISPLAY REPORT FOLLOWS FOR THREADS
ACCESSING DB2 DB3A
Example 3: This command displays statistical counters that are associated with
DB2ENTRY.
DSNC DISP STAT
Example 4: This example shows the output for the DSNC DISPLAY STATISTICS
command:
DFHDB2014 07/09/98 14:35:45 IYK4Z2G1 STATISTICS REPORT FOLLOWS
-----COMMITS-----
DB2ENTRY PLAN CALLS AUTHS W/P HIGH ABORTS 1-PHASE 2-PHASE
*COMMAND 1 1 1 1 0 0 0
*POOL POOL 0 0 0 0 0 0 0
XC01 DSNXC01 22 1 11 2 0 7 5
XC02 DSNXC02 0 0 0 0 0 0 0
XA81 DSNA81 0 0 0 0 0 0 0
XCD4 DSNCED4 0 0 0 0 0 0 0
XP03 DSNTP03 1 1 0 1 0 1 0
XA20 DSNTA20 1 1 0 1 0 0 1
XA88 ******** 0 0 0 0 0 0 0
DFHDB2020 07/09/98 15:45:27 IYKA4z2G1 THE DISPLAY COMMAND IS COMPLETE
Subsections:
v “Environment”
v “Authorization”
v “Syntax”
v “Option descriptions”
v “Usage notes” on page 270
v “Examples” on page 270
Environment
Authorization
Syntax
Option descriptions
DESTINATION
Specifies that the MSGQUEUE parameter of the DB2CONN is to be changed,
replacing the old destination ID with the new destination ID.
Abbreviation: DEST
old
Specifies any destination ID that is currently active in the MSGQUEUE of
the DB2CONN.
new
Specifies a new destination identifier. CICS verifies the new destination to
ensure that it is an existing transient data entry in the destination control
table.
Usage notes
Protected threads: If you increase the active thread value by using the command
DSNC MODIFY TRANSACTION, the attributes of the DB2ENTRY are used.
Examples
Example 4: Change the thread limit of the DB2ENTRY that is used by the
transaction XP05 to 8.
DSNC MODIFY TRANSACTION XP05 8
Subsections:
v “Environment”
v “Authorization”
v “Syntax”
v “Option descriptions”
v “Usage notes”
v “Example” on page 272
Environment
Authorization
Syntax
QUIESCE
DSNC STOP FORCE
Option descriptions
QUIESCE
Specifies that the CICS attachment facility is to be stopped after CICS
transactions that are currently running terminate.
Abbreviation: Q
FORCE
Specifies that the CICS attachment facility is to be stopped immediately by
forcing disconnection with DB2, regardless of any transactions that are
running.
Usage notes
Output destinations: Output from the command DSNC STOP is sent to the
requesting terminal, which remains locked until shutdown is complete.
Subsections:
v “Environment”
v “Authorization”
v “Syntax”
v “Option description”
v “Usage note”
v “Examples”
Environment
Authorization
Syntax
DSNC STRT
ssid
Option description
ssid
Specifies the subsystem ID (SSID) that is to override the ID that is specified in
the CICS DB2CONN.
Default: The DB2ID that is specified in the last installed DB2CONN. If the
DB2CONN contains a blank DB2ID, the default is the SSID that is specified in
the CICS INTIPARM parameter.
Usage note
Output destinations: Output from the DSNC START command is sent to the
requesting terminal. If no DB2CONN is installed when you issue DSNC STRT,
error message DFHDB2031 is sent to the terminal.
Examples
The DSNH command procedure (a TSO CLIST) prepares a program for execution,
and executes it if it runs under TSO. By issuing a single command, you can select
numerous options required for the preparation of an application and execute it
under TSO.
DSNH processing is a sequential process that can include any of the actions listed
in the following table.
Individual steps or a sequence of steps can be performed, and you can end the
process at any point you choose. Any steps in the process that are skipped must
have previously been completed successfully by DSNH.
Table 16. DSNH actions and the corresponding step names
For invoking the... Use step name
PL/I macro processor MP
DB2 precompiler PC
CICS command language translator TR
DSN BIND PLAN subcommand for binding a plan BI
DSN BIND PACKAGE subcommand for binding a package BP
Compiler or assembler for your program CO
A C compiler prelink utility for including compile-time parameters PL
Link-editor to produce an executable load module LE
DSN RUN subcommand to execute the program RU
Note: The step names are used in the heading of Table 18 on page 277.
Subsections:
v “Environment”
v “Authorization” on page 276
v “Syntax” on page 276
v “Usage notes” on page 299
v “Examples” on page 300
Environment
The DSNH CLIST can run in TSO foreground or in batch under the TSO terminal
monitor program. DB2I uses the DSNH CLIST on the precompiler panel to control
program preparation. You can pass DSNH parameters from DB2I panels on the
″Other options″ lines.
See the appropriate description for information about the privileges necessary to
bind a package.
See the appropriate description for information about the privileges necessary to
bind a plan.
See the appropriate description for information about the privileges necessary to
run a plan.
Syntax
DSNH INPUT(data-set-name)
clist-parameter
The CLIST parameters provide the processing options for each step; specify them
when you execute DSNH. Some parameters are used for more than one step, as
indicated in Table 18 on page 277. This table shows where each parameter is used,
using the following notation:
v Y in any cell shows that the option listed at the beginning of the row is used in
the step whose name appears at the top of the column.
v * in any cell indicates that the option listed at the beginning of the row is used
in another step which affects the step whose name appears at the top of the
column.
Notation of CLIST parameters for the BIND PLAN and BIND PACKAGE steps:
Many parameters of BIND PLAN and of BIND PACKAGE provide the same
function and are spelled alike. CLIST parameters for BIND PLAN and BIND
PACKAGE are differentiated from general parameters and from each other by
prefixes. A parameter name prefixed by the letter B applies to the BIND PLAN
subcommand; a parameter name prefixed by the letter P applies to BIND
PACKAGE. The following table shows the possible variations for a single
parameter name.
Table 17. DSNH CLIST prefixing rules
Parameter value Function or subcommand Example
parameter If no prefix is specified, the parameter applies to DBRMLIB
a single function or subcommand.
B/parameter The prefix B is used to indicate that this B/DBRMLIB
variation of the parameter applies only to the
BIND PLAN step.
P/parameter The prefix P is used to indicate that this P/DBRMLIB
variation of the parameter applies only to the
BIND PACKAGE step.
Due to similarities in name and function, the CLIST parameters for BIND PLAN
and BIND PACKAGE are described separately from the parameters in Table 19 on
page 281. For a summary of:
v BIND PLAN parameters, refer to Table 20 on page 294
v BIND PACKAGE parameters, refer to Table 21 on page 297
The only parameter that is required on the DSNH statement is INPUT; the others
are optional. In Table 19 on page 281:
v Parameter values must be enclosed between parentheses.
v Parameter values need not be enclosed between apostrophes, except in either of
the following cases:
dsname
CCPLIB NONE Specifies a data set that contains include modules for PL/I routines. This
dsname parameter is used only for IBM C/370 Version 2 or earlier.
CCPMSGS dsname Specifies a data set that contains the message library that is to be used by
the IBM prelink editor when preparing C programs.
LIST displays TSO commands after substitution for symbols and before
command execution.
DBRMLIB specifies the DBRM library and member that is defined on the
DBRMLIB DD statement during DB2 precompiler processing.
DEFAULT indicates that the same DBRM library data set that is defined for
the DB2 precompiler process (DBRMLIB(parameter)) is also used on the
LIBRARY(dsname) subcommand keyword. If the precompiler DBRMLIB is
not specified, the default generated DBRMLIB library that is based on the
INPUT data set name is used.
member is obtained from the data set member name that is specified on the
DSNH INPUT parameter or from the data set name as follows:
v Given INPUT(outname.DBRM(dbrmmem)):
– outname.DBRM(dbrmmem) - If the member name is specified
– outname.DBRM(dbrm) - If no member name is specified
The default is the value of the DECIMAL POINT field, set on the DB2
APPLICATION PROGRAMMING DEFAULTS panel during installation.
DEFAULT designates the value chosen during installation for the STRING
DELIMITER field on the APPLICATION PROGRAMMING DEFAULTS
panel.
APOST specifies the apostrophe as the string delimiter for host language
statements.
QUOTE specifies a quotation mark as the string delimiter for host language
statements.
ENTRY entry-name Specifies the entry point that is assigned by the linkage editor.
The default depends on the host language and the value of RUN.
v For the PL/I language, the ENTRY value default is:
– NONE if the RUN value is CICS
– PLISTART for any other RUN value.
v For assembler language, the ENTRY value default is DLITASM if the
RUN value is IMS.
v For COBOL, the ENTRY value default is DLITCBL if the RUN value is
IMS.
v For any other language, the ENTRY value default is NONE (no specified
entry point) for any RUN value.
FLAG I Specifies the messages that you want to see. Use one of the following
C values to show messages of the corresponding types:
E I All informational, warning, error, and completion messages
W W Only warning, error, and completion messages
E Only error and completion messages
C Only completion messages
FORTLIB dsname Specifies the linkage editor include library that is to be used for Fortran
routines.
The default is the value of the LANGUAGE DEFAULT field, set on the DB2
APPLICATION PROGRAMMING DEFAULTS panel during installation.
IMSPRE prefix Specifies the prefix for RESLIB, which is used for routines that are to be
included by the linkage editor for IMS.
YES indicates that the linkage editor is to be executed. The DSNHLI entry
point from the precompiler is directed to the appropriate language interface
module that is specified by the RUN parameter.
The LLIB and LnLIB libraries are concatenated with the XLIB library and
the linkage editor include libraries for the specific host language. Object
and load module libraries must not be mixed in this concatenation.
The default plan name is the first of the following available choices defined
in the INPUT data set:
v DBRM member name
v Leftmost qualifier
This parameter can apply to IBMCOB that also has a prelink step. Whether
the prelink step applies to C or IBMCOB is determined by the choice of
values C, CPP, or IBMCOB for the HOST parameter.
dsname specifies a data set that is to be used for the output. Do not enclose
dsname between apostrophes. The current user profile is prefixed to dsname.
The following suffixes are also added:
v SYSCPRT.LIST for PL/I macro listings (these listings are overwritten by
the compiler listings)
v PCLIST for precompiler listings
v CXLIST for CICS command translator listings
v LIST for compiler listings
The PRINT parameter is ignored for the compile step when HOST(CPP)
is specified.
v SYSOUT.PRELLIST for C prelink utility listings
v LINKLIST for link-edit listings
LEAVE sends output to the specified print data set. You can allocate the
print data set in one of the following ways:
v Dynamically
v In the JCL that is used to run the DSNH CLIST (if in batch mode)
v With the TSO ALLOCATE command (before running DSNH)
The default is 8.
LEAVE gets input from SYSIN if the only steps taken are LINK and RUN.
LEAVE gets input from FT05F001 if the language is Fortran. Do not use
LEAVE in any other case.
LEAVE sends output to SYSPRINT if the only steps taken are LINK and
RUN. LEAVE sends output to FT06F001 if the language is Fortran. Do not
use LEAVE in any other case.
The default, DB2, indicates that SQL statements are to be interpreted and
syntax is to be checked for use by DB2 for z/OS. SQL(DB2) is the
recommended mode for DRDA access when the server is a DB2 subsystem.
ALL indicates that SQL statements are to be interpreted for use by database
management systems that are not DB2 for z/OS. SQL syntax checking is
deferred until bind time so that the remote location can bind the resulting
DBRM. When SQL(ALL) is in effect, the precompiler issues an
informational message if SAA® reserved words are used as identifiers.
SQL(ALL) is the recommended mode if you have written your application
to be executed in a environment that is not DB2 for z/OS.
This parameter is effective only for COBOL. For PL/I, Fortran, and
assembler language programs, the precompiler forces the APOSTSQL
option.
DEFAULT designates the value that is chosen during installation for the
SQL STRING DELIMITER field on the APPLICATION PROGRAMMING
DEFAULTS panel.
APOSTSQL specifies that the string delimiter is the apostrophe (’) and the
escape character is the quotation mark (″).
QUOTESQL specifies that the string delimiter is the quotation mark (″) and
the escape character is the apostrophe (’).
STDSQL NO Specify whether to interpret SQL using a subset of ANSI rules.
YES or 86
NO specifies that DB2 rules are used.
dsname specifies a data set that is to be used for terminal output. Do not
enclose dsname between apostrophes. The following suffixes are added to
dsname :
v PCTERM for precompiler output
v LIST for compiler output
VERSION version-id Specifies the name of the version ID for the program and associated DBRM
AUTO during the DB2 precompile step.
AUTO specifies that the consistency token is used to generate the version
ID. If the consistency token is a timestamp, the timestamp is converted into
ISO character format and used as the version identifier.
The default in any other mode is the UADS unit name for the current TSO
user.
WSECSPAC integer Specifies the amount of secondary space to allocate for work data sets, in
the units given by SPACEUN.
Table 20 and Table 21 on page 297 differentiate the functions that support BIND
PLAN and BIND PACKAGE. Each table associates the DSNH CLIST parameter
and its corresponding DSN BIND PLAN or BIND PACKAGE subcommand
keyword, if any. In general:
v The function and value of a CLIST parameter is identical to that of its
corresponding DSN subcommand keyword unless otherwise noted.
v A DSNH parameter value of NONE indicates that the corresponding DSN
keyword is not specified on subcommand invocation. Exceptions are noted
where applicable.
Usage notes
CICS translator: Do not use CICS translator options in the source language for
assembler programs; pass the options to the translator with the CICSOPT option.
Several COBOL options require DD statements that are not provided by the DSNH
CLIST, as shown in the following table.
Table 22. COBOL options that require additional DD statements
Option Statements required for...
CDECK SYSPUNCH
COUNT SYSCOUNT, SYSDBG, SYSDBOUT, SYSUT5, a debug file
DECK SYSPUNCH
DUMP SYSABEND, SYSDUMP, or SYSUDUMP
FDECK SYSPUNCH
FLOW SYSCOUNT, SYSDBG, SYSDBOUT, SYSUT5, a debug file
LVL SYSUT6
STATE SYSCOUNT, SYSDBG, SYSDBOUT, SYSUT5, a debug file
SYMDUMP SYSCOUNT, SYSDBG, SYSDBOUT, SYSUT5, a debug file
SYST SYSOUT
SYSx SYSOUx
TEST SYSUT5
COBOL parameters: The BUF and SIZE parameters passed to the COBOL compiler
might need to be changed.
COPTION: Do not use the COPTION parameter to specify values for the
LINECOUNT, SOURCE, TERM, and XREF compiler options; use the DSNH
LINECOUNT, SOURCE, TERM, and XREF keywords.
Fortran and PL/I considerations: Variable-format input records are not supported.
Link-edit:
v DSNH cannot process programs that need additional link-edit control statements
and cannot link-edit programs that use the call attachment facility.
v You cannot use the NOLOAD and SYNTAX link-edit options.
NONE is a reserved word: NONE cannot be the name of an input or a load library,
or the value of the string passed with PARMS.
SQL host variables: You must explicitly define SQL host variables.
SYSPROC: If compilation is done, the SYSPROC data set must include the DB2
CLIST library.
WORKUNIT parameter: You must use the WORKUNIT parameter when running
the DSNH CLIST in batch mode. This insures that the temporary and intermediate
data sets are allocated to the correct devices.
Examples
Example 1: Precompile, bind, compile, link-edit, and run the COBOL program in
data set prefix .SDSNSAMP(DSN8BC4).
v The compiler load module is in SYS1.LINKLIB (IKFCBL00).
v Additional load modules to be included are in prefix .RUNLIB.LOAD and prefix
.SDSNSAMP.
v The load module is to be put into the data set prefix .RUNLIB.LOAD(DSN8BC4).
v The plan name is DSN8BC81 for the bind and run.
v DCLGEN data from prefix .SRCLIB.DATA is required for the precompile.
This example assumes that the DSNH CLIST is in your SYSPROC concatenation.
DSNH INPUT('prefix.SDSNSAMP(DSN8BC4)'') -
COBLOAD('SYS1.LINKLIB(IKFCBL00)'') -
LLIB('prefix.RUNLIB.LOAD'') -
L2LIB('prefix.SDSNSAMP'') -
LOAD('prefix.RUNLIB.LOAD'') -
PLAN(DSN8BC81) -
PLIB('prefix.SRCLIB.DATA'')
Example 2: Precompile, bind, compile, and link-edit the program in data set prefix
.SDSNSAMP.PLI(DSN8BP4).
v The program is written in PL/I; the macro pass is not needed.
v The PL/I compiler options MAP and LIST are to be used.
The COPTION parameters are enclosed between single apostrophes so that they
are passed by TSO as a single parameter. If a single token is being passed as a
parameter, no apostrophes are needed. That same rule applies to the PARMS and
CICSOPT parameters.
If a data set name is being passed as a parameter, and you want TSO to add your
user prefix, no apostrophes are needed. If the usual TSO prefixing and suffixing
must not be performed, the data set name must be enclosed between sets of three
apostrophes if the CLIST is executed implicitly, and sets of six apostrophes if the
CLIST is executed explicitly.
The user prefix for that example is prefix ; if it had been SMITH, the listing data set
names would be as shown in the preceding example, except that SMITH would be
used as the first level qualifier. For example, the compiler listings would have gone
to SMITH.PROG.LIST.
Subsections:
v “Environment”
v “Authorization”
v “Syntax”
v “Usage note”
v “Example”
Environment
This subcommand originates from a TSO input stream when DSN is running in
either background or foreground mode.
Authorization
None is required.
Syntax
END
Usage note
Ending the DSN session in batch or foreground: In batch, if END is not found in
the SYSIN stream, /* or // ends the DSN session. From the foreground, pressing
the ATTENTION key twice ends the DSN session.
Example
The FREE PACKAGE subcommand deletes corresponding table entries from the
catalog tables. Authorization for a package name is removed only when no more
versions of the package exist. After a version of a package has been freed, that
package name is then available for use in a BIND PACKAGE subcommand to
create a new package.
The FREE PACKAGE subcommand does not proceed until all currently running
applications using the package finish running.
Subsections:
v “Environment”
v “Authorization”
v “Syntax” on page 306
v “Option descriptions” on page 306
v “Usage notes” on page 307
v “Examples” on page 307
Environment
You can enter this subcommand from DB2I, or from a DSN session under TSO that
is running in either foreground or background.
Authorization
To execute this subcommand, you must use a privilege set of the process that
includes one of the following privileges or authorities:
v Ownership of the package
v BINDAGENT privilege granted by the owner of the package
v SYSCTRL authority
v SYSADM authority
v PACKADM authority for the collection or for all collections
The BIND privilege on a package is not sufficient to allow a user to free a package.
FREE PACKAGE
( collection-id . package-id )
location-name. * * .( )
version-id
*
*
I PLANMGMTSCOPE( )
FLAG( W ) ALL
E INACTIVE
C
Option descriptions
location-name
Specifies the location of the DBMS where the package is to be freed. The
location name must be defined in the SYSIBM.LOCATIONS table. If this table
does not exist or the DBMS is not found, you receive an error message. If the
location name is specified, the name of the local DB2 subsystem must be
defined.
The default is the local DB2 subsystem if you omit location-name .
collection-id or (*)
Identifies the collection of the package to be freed. There is no default.
You can use an asterisk ( * ) to free all local packages with the specified
package-id in all the collections that you are authorized to free. (You cannot use
the * to free remote packages.)
package-id or (*)
Identifies the package to be freed. There is no default.
You can use an asterisk ( * ) to free all local packages in collection-id that you
are authorized to free. (You cannot use the * to free remote packages.)
version-id or (*)
Identifies the version of the package to be freed.
You can use an asterisk ( * ) to free all local packages in the collection-id and
package-id that you are authorized to free. (You cannot use the * to free remote
packages.)
If you specify () for version-id , the empty string is used for the version ID.
If you omit the version-id , the default depends on how you specify package-id .
If you use * for package-id , version-id defaults to *. If you provide an explicit
value for package-id , version-id defaults to an empty string.
DBRMs created before DB2 Version 2 Release 3 use an empty string for
version-id by default.
Usage notes
Freeing multiple packages: If you free multiple packages with this subcommand,
each successful free is committed before freeing the next package.
Freeing trigger packages: You cannot free a trigger package using the FREE
PACKAGE subcommand.
Examples
Example 2: Free all packages at the local server in the collection named
TESTCOLLECTION.
FREE PACKAGE (TESTCOLLECTION.*)
The FREE PLAN subcommand deletes corresponding table entries from the
SYSIBM.SYSPLAN catalog tables. All authorization against an application plan
name is dropped. The application plan name is then available for use in a BIND
PLAN subcommand to create a new package.
The FREE PLAN subcommand does not proceed until all currently executing
applications using that plan finish executing.
Subsections:
v “Environment”
v “Authorization”
v “Syntax”
v “Option descriptions” on page 310
v “Usage notes” on page 310
v “Example” on page 310
Environment
You can enter this subcommand from DB2I, or from a DSN session under TSO that
is running in either foreground or background.
Authorization
To execute this command, you must use a privilege set of the process that includes
one of the following privileges or authorities:
v Ownership of the plan
v BIND privilege on the plan
v BINDAGENT privilege granted by the plan owner
v SYSCTRL authority
v SYSADM authority
Syntax
Usage notes
Freeing multiple plans: If you free multiple plans with this subcommand, each
successful free is committed before freeing the next plan.
Example
Free plan DSN8BC81 from DB2. Generate only warning, error, and completion
messages (not informational messages).
FREE PLAN (DSN8BC81) FLAG (W)
When the SHUTDOWN option is specified, the administrative task scheduler will
wait until the execution of all currently running tasks completes. When all running
tasks are complete, the administrative will terminate.
Subsections:
v “Environment”
v “Authorization”
v “Syntax”
v “Option descriptions”
v “Examples”
Environment
Authorization
Syntax
Option descriptions
admtproc
Specifies the procedure name of the administrative task scheduler task to that
you want to modify.
Examples
It is not required to stop the scheduler to access the trace. If you want to turn trace
on or off when the administrative task scheduler starts, you can do one of the
following:
v Modify the procedure parameter TRACE in the JCL job that starts the
administrative task scheduler. This job has the name admtproc and was copied
into one of the PROCLIB library during the installation. Specify TRACE=ON or
TRACE=OFF.
v Dynamically overwrite the trace parameter on the operator’s console when
starting the administrative task scheduler. This option does not exist when DB2
starts the administrative task scheduler automatically, and can only be done
manually.
Subsections:
v “Environment”
v “Authorization”
v “Syntax”
v “Option descriptions”
v “Examples” on page 314
Environment
Authorization
Syntax
Option descriptions
admtproc
Specifies the procedure name of the administrative task scheduler task that you
want to modify.
Examples
Example 1: This command modifies the admtproc scheduler and turns the trace on.
Example 2: This command modifies the admtproc scheduler and turns the trace off.
Abbreviation: F
Subsections:
v “Environment”
v “Authorization”
v “Syntax”
v “Option descriptions”
v “Usage notes” on page 316
v “Example” on page 316
Environment
Authorization
The command requires an appropriate level of operating system authority.
Syntax
DUMP
MODIFY irlmproc,ABEND,
NODUMP
Option descriptions
Usage notes
Terminating IRLM: Use the STOP irlmproc (z/OS IRLM) command to terminate
IRLM.
Deregistering IRLM: You can use the NODUMP option to deregister IRLM before
stopping it. This action prevents the automatic restart manager from immediately
trying to restart IRLM.
Example
Enter the following command on the system console:
F KRLM001,ABEND
The default is dump. If you do not want a dump, you must specify the following
command:
F KRLM001,ABEND,NODUMP
If IRLM detects a delay in the child-lock propagation process, it retries the XES
calls in order to recover. Use the MODIFY irlmproc , DIAG command under the
direction of IBM Software Support if this situation occurs.
Abbreviation: F
Subsections:
v “Environment”
v “Authorization”
v “Syntax”
v “Option descriptions”
v “Usage note” on page 318
v “Example” on page 318
Environment
Authorization
Syntax
Option descriptions
Usage note
The MODIFY irlmproc,DIAG command should be used only under the direction of
IBM Software Support.
This command is active for only one incident per IRLM, that is, after an IRLM
instance detects the delay and initiates the dump. You can initiate one dump per
IRLM in the group. You must enter the command again to initiate another dump.
Be aware that when you enter this command for one member of the data sharing
group, any member that detects the delay initiates a dump.
The irlmproc identifies the procedure name for IRLM. If multiple IRLM instances
exist in the same system, each procedure must have a unique name.
Example
Issue this command to initiate one diagnostic dump for the IR21PROC IRLM
subsystem. The dump occurs once, after the propagation of child locks takes longer
than 45 seconds.
MODIFY IR21PROC,DIAG,DELAY
The command causes all retained locks for the specified DB2 to be deleted from
the system, thereby making them available for update. Because retained locks
protect updated resources, it should be used only after understanding what the
resources are and the consequence to data integrity if they are deleted.
Abbreviation: F
Subsections:
v “Environment”
v “Authorization”
v “Syntax”
v “Option descriptions”
v “Usage notes”
v “Example” on page 320
Environment
Authorization
Syntax
MODIFY irlmproc,PURGE,db2name
Option descriptions
Usage notes
DB2 subsystem inactive: The DB2 subsystem that owns the retained locks must be
inactive or else this command fails.
Example
Example: For an active DB2 subsystem named db2b with irlmproc name db2birlm,
issue the following command to display all active and inactive subsystems in a
data sharing sysplex:
F db2birlm,STATUS,ALLD
Abbreviation: F
Subsections:
v “Environment”
v “Authorization”
v “Syntax”
v “Option description”
v “Usage notes” on page 323
v “Examples” on page 323
Environment
Data sharing scope: Group or Member, depending on whether you specify the
DEADLOCK or LTE options.
Authorization
| Syntax
|
Option description
Usage notes
Effect of an IRLM restart: The values you set using the MODIFY irlmproc,SET
command do not persist through a stop and restart of IRLM. The number of trace
buffers for each trace type returns to the default value of 10.
Deadlock value range for non-supporting members: When an IRLM that supports
subsecond deadlock joins a group that has a member that does not support
subsecond deadlock, if the deadlock value of the new member is less than one
second, the value is set to one second.
Examples
Abbreviation: F
Subsections:
v “Environment”
v “Authorization”
v “Syntax”
v “Option descriptions”
v “Usage notes” on page 327
v “Examples” on page 327
Environment
Data sharing scope: Member or group, depending on which option you choose
Authorization
Syntax
,irlmx
MODIFY irlmproc,STATUS
,ALLD
,ALLI
,MAINT
,STOR
,TRACE
Option descriptions
irlmproc
Specifies the IRLM that is to process the command.
irlmx
Specifies which IRLM’s status is to be displayed. irlmx is the concatenation of
Usage notes
Examples
Explanation: The operator on the z/OS system has requested information about
the DB2 systems connected to the IRLM identified by the IRLM procedure named
IRTPROC.
Example 2: Assume that you have a data sharing group. Enter the following
command on the system console:
MODIFY DB1GIRLM,STATUS,ALLD
Explanation: The output shows all the DB2 subsystems that are connected to
IRLMs in this data sharing group (the group to which the IRLM processing the
request belongs). Other information includes:
STATUS
Indicates the status of the DB2 subsystem:
UP The value UP in the STATUS field indicates that the DB2
subsystem is active.
DOWN
The value DOWN in the STATUS field indicates that the DB2
subsystem is failed. All modify type locks held by this DB2
subsystem have been retained by IRLM. The DB2 subsystem is
known to be down only if it holds retained locks.
SYSFAIL
The value SYSFAIL in the STATUS field indicates that the IRLM
that this DB2 subsystem is identified to is disconnected from the
data sharing group. All modify type lock that are held by this DB2
subsystem are retained by IRLM. The DB2 subsystem is known to
be SYSFAIL only if it holds retained locks.
RET_LKS
The number of retained locks that are owned by this DB2 subsystem.
IRLMID
The ID of the IRLM to which this DB2 subsystem is identified.
IRLM_NAME
The name of the IRLM to which this DB2 subsystem is identified.
IRLM_LEVL
The IRLM release and function level that this DB2 subsystem requested on
the identify to IRLM. This is in the form of r.fff .
Example 4: Again, assume data sharing is in effect. Enter the following command
on the system console:
MODIFY DB1GIRLM,STATUS,ALLI
Explanation: The output shows the IRLMs that are participating in this data
sharing group (the group which includes the IRLM processing the request). Other
information includes:
STATUS
The value “UP” in the STATUS field indicates that the IRLM is active.
STATUS shows “DOWN” if the IRLM is failed. An IRLM is known to be
“DOWN” only if the DB2 subsystem that was identified to it holds
retained locks. This connection between a failed DB2 subsystem and IRLM
is lost after a REBUILD or a group restart.
LEVEL
The current IRLM release and function level in the form of r.fff .
SERVICE
The IRLM service or release that corresponds to the release and function
level that is given in ″LEVEL″.
MIN_LEVEL
The minimum IRLM function level with which this IRLM can coexist.
MIN_SERVICE
The IRLM service or release that corresponds to the function level given in
″MIN-LEVEL.″
Group Function Level
The IRLM release and function level that is in use by all the IRLMs in this
data sharing group.
Explanation: The output shows information only for the specified IRLM. The
group function level that is shown is the function level for the specified IRLM.
Refer to Example 3 for additional information about interpreting output.
Explanation: The example shows that current storage allocated for IRLM is 312 KB,
and the greatest amount that has been allocated since the last time IRLM was
started is also 312 KB. The storage for the locking structures (RHB and RLB) is
contained within IRLM private storage. Use the following information to interpret
the display output:
PC Displays the current value for the PC option of the IRLM startup
procedure. For DB2 Versions 8 and 9, this value will always be YES.
BB PVT
Displays the current amount of private storage below the bar. The PVT
value is 1738 MB in this example.
AB PVT (MEMLIMIT)
Displays the current limit to private storage above the bar, also known as
the MEMLIMIT, which is managed by MVS. This storage is used for locks.
The AB PVT value is 2 GB in this example.
LTE The number of lock table entries that were available in the coupling facility
the last time this IRLM was connected to the group. Each unit consists of 1
048 576 entries. If LTE is less than one unit, the value will be zero.
LTEW The lock table entry width is the number of bytes needed for each lock
table entry in the lock structure. The more users in the group, the more
bytes are needed to manage each lock table entry. For up to 6 users, the
LTEW is 2, for up to 22 users, the LTEW is 4, and for up to 32 users, the
LTEW is 8.
RLE The number of record table entries that were available in the coupling
facility the last time this IRLM was connected to the group.
RLEUSE
The number of RLE that are in use in the coupling facility at the time you
issue the MODIFY command. If the IRLM is disconnected from the CF, this
number represents the RLE that were in use when the IRLM last updated
prior to DISCONNECT.
CSA USE
CSA USE is unused in DB2 Versions 8 and 9, and is displayed for
compatibility reasons only.
CUR Shows the total current CSA and ECSA usage. In this case, the current
usage (CUR) is 312 KB, and the high water mark (HWM) is also 312 KB.
The accountable storage is a subset of this total storage.
ACCNT
The ACCNT row of the report is a breakdown of lock control block
structures and their storage use.
Explanation: This example shows that the storage currently allocated for IRLM
tracing is 256 KB, the maximum number of trace buffers allowed per trace type is
set to 10, and the external CTRACE writer is not active.
Use the z/OS TRACE CT command to activate or deactivate traces. You cannot
turn off the EXP and INT traces. The XIT (for data sharing), EXP, and INT traces
are automatically activated when you start IRLM. All traces are automatically
activated with IRLMPROC TRACE=YES.
The trace size for each buffer is 64 KB. Use the MODIFY irlmproc,SET,TRACE=
nnn command to change the maximum number of trace buffers.
Explanation: The output shows the maintenance levels of IRLM load module
CSECTS in a two-column format.
Subsections:
v “Environment”
v “Authorization”
v “Syntax” on page 334
v “Option descriptions” on page 334
v “Example” on page 335
Environment
This command can be issued from a z/OS console, a DSN session, a DB2I panel
(DB2 COMMANDS), an IMS or CICS terminal, or a program using the
instrumentation facility interface (IFI).
Traces started by a IFI/IFC program: Before you modify an active trace, ensure
that an IFI application program or the IFC Selective Dump utility (DSN1SDMP)
did not start the trace. If you modify a trace started by DSN1SDMP, the
DSN1SDMP utility abnormally terminates. When DSN1SDMP terminates, it stops
the trace. This stop could interfere with the MODIFY TRACE command, which
stops and restarts the trace.
Authorization
To execute this command, you must use a privilege set of the process that includes
one of the following privileges or authorities:
v TRACE privilege
v SYSOPR authority
v SYSCTRL authority
v SYSADM authority
DB2 commands that are issued from a logged-on z/OS console or TSO SDSF can
be checked by DB2 authorization using primary and secondary authorization IDs.
*
,
*
,
IFCID( ifcid_nbr )
COMMENT(string)
Option descriptions
TRACE
Determines which IFCIDs are started. The following table lists each trace type,
its abbreviation, and a brief description of each type.
One additional trace type is not described in the table because it is intended
for service and is to be used under the direction of IBM Software Support.
Table 23. Trace types
Type Abbreviation Description
PERFM P Performance records of specific events
ACCTG A Accounting records for each transaction
STAT S Statistical data
AUDIT AU Audit data
MONITOR MON Monitor data
Example
Example 1:Change trace number six so that it collects only statistics and accounting
data. You can define CLASS(30) at your site.
-MODIFY TRACE(S) IFCID(1,2,3) TNO(6) CLASS(30)
COMMENT ('STATS AND ACCOUNTING ON')
For example, you can use REBIND PACKAGE when you change the
authorizations, create a new index for the package, or use RUNSTATS. When the
REBIND PACKAGE(*) command is issued, trigger packages will not be affected.
Subsections:
v “Environment”
v “Authorization”
v “Syntax” on page 339
v “Option descriptions” on page 340
v “Usage notes” on page 340
v “Example” on page 340
Environment
You can use REBIND PACKAGE through DB2I, or enter the REBIND PACKAGE
subcommand from a DSN session running in foreground or background.
Authorization
The package owner must have authorization to execute all SQL statements
embedded in the package for REBIND PACKAGE to build a package without
producing error messages. For VALIDATE(BIND), DB2 verifies the authorization at
bind time. For VALIDATE(RUN), DB2 verifies the authorization initially at bind
time, but if the authorization check fails, DB2 rechecks it at run time.
The following table explains the authorization required to run REBIND PACKAGE,
depending on the options specified.
REBIND PACKAGE
( . collection-id . package-id . )
location-name * * ( )
version-id
*
*
enable-block
OWNER(authorization-id) QUALIFIER(qualifier-name) CURRENTDATA( YES )
NO
DBPROTOCOL( DRDA ) DEFER(PREPARE) DEGREE( 1 ) DYNAMICRULES( RUN )
PRIVATE NODEFER(PREPARE) ANY BIND
DEFINE
INVOKE
ENCODING( ASCII ) EXPLAIN( YES ) I IMMEDWRITE( NO )
EBCDIC NO FLAG( W ) YES
UNICODE E
ccsid C
ISOLATION( RR ) NO (1) OPTHINT(’hint-id’)
RS KEEPDYNAMIC( YES ) NONE
CS (2)
UR REOPT( ALWAYS )
NC ONCE
AUTO
, (3) PLANMGMT( )
PATHDEFAULT OFF
PATH( schema-name ) BASIC
USER EXTENDED
RELEASE( COMMIT ) SWITCH( PREVIOUS ) VALIDATE( RUN )
DEALLOCATE ORIGINAL BIND
Notes:
1 NOREOPT(VARS) can be specified as a synonym of REOPT(NONE)
enable-block:
,
ENABLE ( BATCH )
DISABLE DLIBATCH ,
DB2CALL
CICS DLIBATCH( connection-name )
IMS ,
IMSBMP
IMSMPP CICS( applid )
REMOTE ,
RRSAF
ENABLE(*) IMSBMP( imsid )
,
IMSMPP( imsid )
,
REMOTE( location-name )
<luname>
Option descriptions
For descriptions of the options shown in the syntax diagram, see the topic
Chapter 17, “BIND and REBIND options,” on page 85.
Usage notes
Rebinding multiple packages: If you rebind multiple packages, DB2 commits each
successful rebind before rebinding the next package.
Example
For example, you can use REBIND PLAN when you change authorizations, create
a new index for the plan, or use RUNSTATS. If the rebind is successful, the process
prepares an application plan and updates its description in the catalog table
SYSPLAN.
REBIND PLAN is generally faster and more economical than BIND PLAN. But if
you change the SQL statements or recompile a program, you should use BIND
PLAN with the option ACTION(REPLACE).
Subsections:
v “Environment”
v “Authorization”
v “Syntax” on page 343
v “Option descriptions” on page 344
v “Usage note” on page 344
v “Example” on page 344
Environment
You can use REBIND PLAN through DB2I, or enter the REBIND PLAN
subcommand from a DSN session running in foreground or background.
Authorization
The plan owner must have authorization to execute all SQL statements embedded
in the plan for REBIND PLAN to build a plan without producing error messages.
For VALIDATE(BIND), DB2 verifies the authorization at bind time. For
VALIDATE(RUN), DB2 initially verifies the authorization at bind time, but if the
authorization check fails, DB2 rechecks it again at run time. If you use the PKLIST
keyword, you must have EXECUTE authority for the packages or collections
specified on PKLIST.
| The plan owner must be a role to execute REBIND PLAN in a trusted context with
| role ownership.
The following table explains the authorization required to run REBIND PLAN,
depending on the options specified.
NODEFER(PREPARE) ACQUIRE( USE ) CACHESIZE(decimal-value) CURRENTDATA( NO )
DEFER(PREPARE) ALLOCATE YES
CURRENTSERVER(location-name) DBPROTOCOL( DRDA ) DEGREE( 1 ) DISCONNECT( EXPLICIT )
PRIVATE ANY AUTOMATIC
CONDITIONAL
DYNAMICRULES( RUN ) ENCODING( ASCII ) EXPLAIN( NO ) I
BIND EBCDIC YES FLAG( W )
UNICODE E
ccsid C
IMMEDWRITE( NO ) ISOLATION( RR ) NO (1)
YES RS KEEPDYNAMIC( YES ) NONE
CS (2)
UR REOPT( ALWAYS )
ONCE
AUTO
OPTHINT(’hint-id’) , (3) RELEASE( COMMIT )
PATHDEFAULT DEALLOCATE
PATH( schema-name )
USER
SQLRULES( DB2 ) VALIDATE( RUN )
STD BIND
Notes:
1 REOPT(VARS) can be specified as a synonym of REOPT(ALWAYS)
2 NOREOPT(VARS) can be specified as a synonym of REOPT(NONE)
3 The PATHDEFAULT keyword is mutually exclusive with the PATH keyword. Do not specify both
keywords in the same REBIND command.
enable-block:
ENABLE ( BATCH )
DISABLE DLIBATCH ,
DB2CALL
CICS DLIBATCH( connection-name )
IMS ,
IMSBMP
IMSMPP CICS( applid )
RRSAF ,
ENABLE(*)
IMSBMP( imsid )
,
IMSMPP( imsid )
pklist-block:
,
Option descriptions
For descriptions of the options shown in the syntax diagram, see the topic
Chapter 17, “BIND and REBIND options,” on page 85.
Usage note
If you rebind multiple plans, DB2 commits each successful rebind before rebinding
the next plan.
Example
Rebind plan DSN8BC81 to enable DB2 to take advantage of a newly created index.
Use FLAG(W) to issue warning, error, and completion messages, but not
informational messages. Use VALIDATE(BIND) to point out any error conditions
during the bind process. Use ISOLATION(CS) to prevent other applications from
changing the database values that this application uses only while the application
is using them. This isolation level protects changed values until the application
commits or terminates. Omit the OWNER keyword to leave the plan’s owner
authorization ID the same. Omit the ENABLE or DISABLE keywords to use the
connections previously defined for the plan.
REBIND PLAN (DSN8BC81) -
FLAG (W) -
VALIDATE (BIND) -
ISOLATION (CS)
You can use this subcommand to change a limited subset of the default bind
options that DB2 used when creating the package. You might also rebind a trigger
package to re-optimize its SQL statements after you create a new index or use the
RUNSTATS utility. Additionally, you can rebind a trigger package if it has been
marked invalid because an index, or another object it was dependent on, was
dropped.
If the rebind is successful, the trigger package is marked valid. When REBIND
TRIGGER PACKAGE(*) is issued, the rebind will affect all trigger packages that the
issuer is authorized to rebind. Trigger packages cannot be rebound remotely. The
location name is permitted when specifying the package name on a REBIND
TRIGGER PACKAGE subcommand. However, the location name must not refer to
a remote location.
Subsections:
v “Environment”
v “Authorization”
v “Syntax” on page 346
v “Option descriptions” on page 346
v “Usage notes” on page 347
v “Output” on page 347
v “Example” on page 347
Environment
You can use REBIND TRIGGER PACKAGE through DB2I, or enter the REBIND
TRIGGER PACKAGE subcommand from a DSN session that is running in
foreground or background.
Authorization
To build a package without producing error messages, the package owner must
have authorization to execute all SQL statements that are embedded in the package
for REBIND TRIGGER PACKAGE.
To execute this subcommand, you must use a privilege set of the process that
includes one of the following privileges or authorities:
v Ownership of the trigger package
v BIND privilege on the trigger package
v BINDAGENT privilege from the owner of the trigger package
v PACKADM authority on the collection or on all collections
v SYSADM authority
v SYSCTRL authority
© Copyright IBM Corp. 1983, 2009 345
When the trigger package is bound, the privileges of the current authorization ID
are used when checking authority to bind statements within the triggered action.
On REBIND TRIGGER PACKAGE, you need one of the following privileges or
authorities:
v Ownership of the package
v BIND privilege on the package
v BINDAGENT privilege granted from owner
v PACKADM authority
v SYSADM authority
v SYSCTRL authority
Syntax
( collection-id . package-id )
location-name. * *
NO EXPLAIN( YES ) I
CURRENTDATA( YES ) NO FLAG( W )
E
C
IMMEDWRITE( NO ) ISOLATION( RR )
YES RS
CS
UR
NC
|
PLANMGMT( ) RELEASE( COMMIT )
OFF DEALLOCATE
BASIC
EXTENDED
SWITCH( PREVIOUS )
ORIGINAL
Option descriptions
TRIGGER PACKAGE
Determines what trigger package or packages to rebind. The following options
identify the location, collection, and package name of the package. You can
identify a location and collection. For REBIND TRIGGER, you must identify a
trigger package name.
location-name
Identifies the current local location. Remote rebind of a trigger package is
not allowed. location-name is the location of the DBMS where the package
rebinds and where the description of the package resides.
For descriptions of the options that are shown in the syntax diagram, see the topic
Chapter 17, “BIND and REBIND options,” on page 85.
Usage notes
A trigger package cannot be copied, and it can only be rebound locally. Remote
rebind of a trigger package is not allowed.
Rebinding multiple trigger packages: If you rebind multiple trigger packages, DB2
commits each successful rebind before rebinding the next package.
Output
REBIND TRIGGER PACKAGE updates the COLLID and NAME columns in the
SYSPACKAGE catalog table.
Example
Enter the following command to rebind trigger package TRIG1 in the ADMF001
collection of packages:
REBIND TRIGGER PACKAGE (ADMF001.TRIG1);
Subsections:
v “Environment”
v “Authorization”
v “Syntax”
v “Usage note” on page 350
v “Example” on page 350
Environment
This command can be issued from a z/OS console, a DSN session, a DB2I panel
(DB2 COMMANDS), an IMS or CICS terminal, or a program using the
instrumentation facility interface (IFI).
Authorization
To execute this command, you must use a privilege set of the process that includes
one of the following privileges or authorities:
v BSDS privilege
v SYSCTRL authority
v SYSADM authority
DB2 commands that are issued from a logged-on z/OS console or TSO SDSF can
be checked by DB2 authorization using primary and secondary authorization IDs.
Syntax
RECOVER BSDS
Using RECOVER BSDS following a BSDS I/O error: For a detailed description of
the steps you must take to reestablish dual BSDS mode after a BSDS I/O error
occurs, see the topic “Recovering the BSDS from a backup copy” in the DB2
Administration Guide.
Example
This command should only be used when automatic resolution will not work. The
commit coordinator must determine the commit or abort decision.
Subsections:
v “Environment”
v “Authorization”
v “Syntax” on page 352
v “Option descriptions” on page 352
v “Usage note” on page 353
v “Examples” on page 354
Environment
This command can be issued from a z/OS console, a DSN session, a DB2I panel
(DB2 COMMANDS), an IMS or CICS terminal, or a program using the
instrumentation facility interface (IFI).
Authorization
To execute this command, you must use a privilege set of the process that includes
one of the following privileges or authorities:
v RECOVER privilege
v SYSOPR authority
v SYSCTRL authority
v SYSADM authority
DB2 commands that are issued from a logged-on z/OS console or TSO SDSF can
be checked by DB2 authorization using primary and secondary authorization IDs.
ID( correlation-id )
*
,
NID( network-id )
,
LUWID( luwid )
token
Option descriptions
( connection-name )
Specifies a one- to eight-character connection name. Allied threads (including
those that are distributed) that belong to the connection name are recovered.
This parameter is ignored if LUWID is specified.
The default is the connection name from which you enter the command. If you
enter this command from a z/OS console, and you are recovering an allied
thread using the ID or NID parameter, you must supply a connection name; no
default connection name is available.
ACTION
Specifies whether to commit or cancel the indoubt thread. If there are any
downstream participants for which the local thread is the coordinator, the
commit or abort decision is propagated to these participants.
Abbreviation: ACT
(COMMIT)
Commits the thread.
(ABORT)
Cancels the thread.
ID( correlation-id , ...)
Specifies whether to recover a specific allied thread or all allied threads
(including those that are distributed) that are associated with the connection
name.
correlation-id
Is the correlation ID (1 to 12 characters) of a specific thread that is to be
recovered. If you use more than one correlation ID, separate the IDs with
commas.
Do not use a correlation ID that is associated with more than one network
ID. Instead, use the NID option.
Usage note
If you specify a thread in the command that is part of a global transaction, the
command is executed against all threads that are in the global transaction.
Example 1: Recover indoubt allied threads. Schedule a commit for all threads that
are associated with the connection name from which the command is entered.
-RECOVER INDOUBT ACTION(COMMIT) ID(*)
Example 3: Recover indoubt threads from remote requesters. Schedule an abort for
two indoubt threads. The first thread has an LUWID of
DB2NET.LUNSITE0.A11A7D7B2057.0002. (The 0002 in the last segment of the
LUWID represents the commit sequence number.) The second thread has a token
of 442.
-RECOVER INDOUBT ACTION(ABORT)
LUWID (DB2NET.LUNSITE0.A11A7D7B2057.0002, 442)
Subsections:
v “Environment”
v “Authorization”
v “Syntax”
v “Option descriptions” on page 356
v “Usage note” on page 356
v “Output” on page 356
v “Example” on page 356
Environment
This command can be issued from a z/OS console, a DSN session, a DB2I panel
(DB2 COMMANDS), or an IMS or CICS terminal.
Authorization
To execute this command, you must use a privilege set of the process that includes
one of the following privileges or authorities:
v RECOVER privilege
v SYSOPR authority
v SYSCTRL authority
v SYSADM authority
DB2 commands that are issued from a logged-on z/OS console or TSO SDSF can
be checked by DB2 authorization using primary and secondary authorization IDs.
Syntax
RECOVER POSTPONED
CANCEL
Usage note
Recovery action: Recovery (rollback) action is always taken for all POSTPONED
ABORT units of recovery.
Output
Example
When this command is run, previous copies of the EARLY modules are deleted
from the system the next time that DB2 is started. This command is only valid
when DB2 is inactive and the normal DSNY003I message will be issued if the
REFRESH command is issued when DB2 is active.
Subsections:
v “Environment”
v “Authorization”
v “Syntax”
v “Option descriptions”
v “Usage notes” on page 360
v “Examples” on page 360
Environment
This command can only be issued from a z/OS console. The name of the DB2
subsystem is determined by the command prefix. For example, -START indicates
that the DB2 subsystem to be started is the one with ’-’ as the command prefix.
The command is rejected if the DB2 subsystem is already active. The EARLY code
can only be properly updated when DB2 is not active
Authorization
None is required. However, the command can be executed only from a z/OS
console with the START command capability. This command is rejected when DB2
is active, so no other authorization is required.
Syntax
-REFRESH DB2,EARLY
Option descriptions
Usage notes
Examples
The command must be issued from the DB2 subsystem that has the VTAM affinity
to the particular partner LU whose information you are purging.
Subsections:
v “Environment”
v “Authorization”
v “Syntax”
v “Option descriptions” on page 362
v “Usage notes” on page 362
v “Examples” on page 362
Environment
This command can be issued from a z/OS console, a DSN session under TSO, a
DB2I panel (DB2 COMMANDS), an IMS or CICS terminal, or a program using the
instrumentation facility interface (IFI).
Authorization
To execute this command, you must use a privilege set of the process that includes
one of the following authorities:
v SYSOPR authority
v SYSCTRL authority
v SYSADM authority
DB2 commands that are issued from a logged-on z/OS console or TSO SDSF can
be checked by DB2 authorization using primary and secondary authorization IDs.
Syntax
Usage notes
The following conditions must be satisfied for the RESET GENERICLU command
to be successful:
v DDF must be started.
v No VTAM sessions can be active to the partner LU that is specified on the
command.
v DB2 must not have any indoubt thread resolution information associated with
the specified partner LU.
Examples
Example 1: Purge the VTAM generic name mapping that is associated with partner
NET1.USER5LU.
-DB2A RESET GENERICLU(NET1.USER5LU)
Example 2: Purge the VTAM generic name mappings for all LUs that are partners
of this DB2 subsystem. Use this version of the command only when removing this
DB2 subsystem from the data sharing group.
-DB2A RESET GENERICLU(*)
This command must be used to purge indoubt thread information in the following
situations:
v For threads where DB2 has a coordinator responsibility that it cannot fulfill
because of participant cold start, sync point protocol errors, or indoubt
resolution protocol errors.
v For threads that were indoubt but were resolved with the RECOVER INDOUBT
command, and subsequent resynchronization with the coordinator shows
heuristic damage.
The RESET column of a display thread report for indoubt threads indicates
whether information in the report must be purged with this command.
This command can also be used to purge indoubt thread information for threads
where:
v DB2 has a coordinator responsibility even when no errors have been detected
that preclude automatic resolution with the participants. The FORCE keyword
must be specified to purge this information. Resynchronization with affected
participants is not performed.
v DB2 has a participant responsibility even when no errors have been detected
that preclude automatic resolution with the coordinator. Resynchronization with
the coordinator will not be performed.
Subsections:
v “Environment”
v “Authorization”
v “Syntax” on page 364
v “Option descriptions” on page 364
v “Output” on page 365
v “Usage notes” on page 365
Environment
This command can be issued from a z/OS console, a DSN session under TSO, a
DB2I panel (DB2 COMMANDS), an IMS or CICS terminal, or a program using the
instrumentation facility interface (IFI).
Authorization
To execute this command, you must use a privilege set of the process that includes
one of the following privileges or authorities:
v RECOVER privilege
v SYSOPR authority
© Copyright IBM Corp. 1983, 2009 363
v SYSCTRL authority
v SYSADM authority
DB2 commands that are issued from a logged-on z/OS console or TSO SDSF can
be checked by DB2 authorization using primary and secondary authorization IDs.
| Syntax
|
| ,
LOCATION( location-name )
,
IPADDR( ipaddr..port )
* FORCE
,
LUWID( luwid )
token LOCATION(location-name)
|
Option descriptions
LUNAME( luname , ...)
Purges all qualifying indoubt information that pertains to the specified
LUNAME.
luname
Is expressed as a one- to eight-character name. If you use more than one
LUNAME, separate each name with a comma.
(*) Purges indoubt information for all SNA locations.
FORCE
Forces the purging of coordinator and participant indoubt resolution
responsibility even when no errors that preclude automatic resolution have
been detected. FORCE can be used in conjunction with IPADDR or LUNAME.
Purging resynchronization information when no errors that preclude automatic
resynchronization have been detected simulates a cold start. Thus, no
connections can exist between DB2 and the named partner when this
command is executed. After you run the FORCE option, the next connection
with the named partner location will be a cold start connection. If a connection
with the named partner exists at the time this command is run, the command
fails with message DSNL448I.
FORCE can be used to bypass warm start connectivity problems when errors
that are occurring in the recovery log name exchange result in the partner
refusing the connection attempt.
LOCATION( location-name , ...)
Purges all qualifying indoubt information that pertains to the named location.
Output
The response from this command includes any of the messages from DSNL440I
through DSNL449I.
Usage notes
Purging participant indoubt information: Use caution when you specify the
FORCE option to purge participant indoubt information. Normally, after the use of
the RECOVER INDOUBT command, automatic resolution with the coordinator
Purging coordinator indoubt information: Use caution when you specify the
FORCE option to purge coordinator indoubt information when no errors are
precluding automatic resolution. When the information is purged, any participant
that is indoubt is forced to use a heuristic decision process to resolve the indoubt
logical unit of work.
Subsections:
v “Environment”
v “Authorization”
v “Syntax”
v “Option descriptions”
v “Usage note” on page 369
v “Examples” on page 369
Environment
This subcommand can be issued under the DSN command processor running in
either foreground or background mode, or it can be issued by using the DB2I RUN
panel.
Authorization
To execute this command, you must use a privilege set of the process that includes
one of the following privileges or authorities:
v EXECUTE privilege on the plan
v Ownership of the plan
v SYSADM authority
To run an application, the plan must be enabled for your local server. Any
associated packages from which you execute statements must also be enabled.
Syntax
RUN PROGRAM(program-name)
PLAN(plan-name)
CP PLAN(plan-name)
LIBRARY(library-name) PARMS(parameter-string)
Option descriptions
Use at least one of the two following clauses, but do not use the same clause twice.
PROGRAM ( program-name )
Identifies the program that you want to run.
Usage note
Examples
Example 1: Run application program DSN8BC4. The application plan has the same
name. The program is in library ’ prefix .RUNLIB.LOAD’.
DSN SYSTEM (DSN)
RUN PROGRAM (DSN8BC4) LIB ('prefix.RUNLIB.LOAD')
This command overrides the values that are specified during installation or in a
previous invocation of the SET ARCHIVE command. The changes that SET
ARCHIVE makes are temporary; at restart, DB2 again uses the values that are set
during installation.
Subsections:
v “Environment”
v “Authorization”
v “Syntax” on page 372
v “Option descriptions” on page 372
v “Usage notes” on page 373
v “Output” on page 373
v “Examples” on page 373
Environment
This command can be issued from a z/OS console, a DSN session under TSO, a
DB2I panel (DB2 COMMANDS), an IMS or CICS terminal, or a program using the
instrumentation facility interface (IFI).
Authorization
To execute this command, you must use a privilege set of the process that includes
one of the following privileges or authorities:
v ARCHIVE privilege
v SYSOPR authority
v SYSCTRL authority
v SYSADM authority
DB2 commands that are issued from a logged-on z/OS console or TSO SDSF can
be checked by DB2 authorization using primary and secondary authorization IDs.
SET ARCHIVE
COUNT (integer) TIME( minutes )
,seconds
,seconds
1440
NOLIMIT
DEFAULT
Option descriptions
The following options override the READ TAPE UNITS(COUNT) and DEALLC
PERIOD TIME subsystem parameters that are specified during installation.
COUNT( integer )
Specifies the maximum number of tape units that can be dedicated to reading
archive logs. This value affects the number of concurrent reads that are
allowed for unique archive data sets that reside on tapes.
integer can range from 1 to 99.
v If the number that you specify is greater than the current specification, the
maximum number of tape units allowable for reading archive logs increases.
v If the number that you specify is less than the current specification, tape
units that are not being used are immediately deallocated to adjust to the
new COUNT value. Active (or premounted) tape units remain allocated;
only tape units that are inactive are candidates for deallocation because of a
lowered COUNT value.
TIME
Specifies the length of time during which an allocated archive read tape unit is
allowed to remain unused before it is deallocated.
( minutes )
Specifies the maximum number of minutes.
minutes must be an integer between 0 and 1439.
( seconds )
Specifies the maximum number of seconds.
seconds must be an integer between 1 and 59.
(NOLIMIT) or (1440)
Indicates that the tape unit will never be deallocated. Specifying
TIME(1440) is equivalent to TIME(NOLIMIT). The seconds specification is
not allowed when you specify that TIME is 1440.
DEFAULT
Resets the COUNT and TIME parameters back to the values that were
specified during DB2 installation.
Archive tape reading performance: To achieve the best performance for reading
archive tapes, specify the maximum values that are allowed (within system
constraints) for both the COUNT and TIME options.
Output
The response from this command includes any of the messages from DSNJ334I
through DSNJ337I.
Examples
Example 1: Allocate two tape units that can remain unused for 30 seconds before
they are deallocated.
-SET ARCHIVE COUNT(2) TIME(,30)
Example 2: Allocate four tape units that can remain unused for 2 minutes before
they are deallocated.
-SET ARCHIVE COUNT(4) TIME(2)
This command also overrides the value that was specified in a previous invocation
of the SET LOG command. The changes that SET LOG makes are temporary; at
restart, DB2 again uses the values that were set during installation. The LOGLOAD
value takes effect following the next system checkpoint. SET LOG can also be used
to SUSPEND or RESUME logging and update activity for the current DB2
subsystem.
Subsections:
v “Environment”
v “Authorization”
v “Syntax”
v “Option descriptions” on page 376
v “Usage notes” on page 377
v “Examples” on page 377
Environment
This command can be issued from a z/OS console, a DSN session under TSO, a
DB2I panel (DB2 COMMANDS), an IMS or CICS terminal, or a program that uses
the instrumentation facility interface (IFI).
Authorization
To execute this command, you must use a privilege set of the process that includes
one of the following privileges or authorities:
v ARCHIVE privilege
v SYSOPR authority
v SYSCTRL authority
v SYSADM authority
DB2 commands that are issued from a logged-on z/OS console or TSO SDSF can
be checked by DB2 authorization using primary and secondary authorization IDs.
Syntax
How LOGLOAD and CHKTIME values affect DB2 performance: LOGLOAD and
CHKTIME values can affect the amount of time needed to restart DB2 after
abnormal termination. A large value for either option can result in lengthy restart
times. A low value can result in DB2 taking excessive checkpoints. However, when
you specify LOGLOAD(0) or CHKTIME(0), the checkpoint request is synchronous
when issued from a batch job, and it is asynchronous when issued from a z/OS or
TSO console.
Use the DISPLAY LOG command to display the current LOGLOAD setting.
The value that you specify for LOGLOAD or CHKTIME is reset to the value
specified in the subsystem parameter when DB2 is restarted. If you load a different
value by issuing the command SET SYSPARM, the new value is used.
When to suspend logging: Specify SET LOG SUSPEND before making a remote
copy of the entire database and logs for a system-level, point-in-time recovery or
disaster recovery. You can make remote copies with peer-to-peer remote recovery
(PPRC) and FlashCopy®. Suspending logging to make a remote copy of the
database lets you avoid quiescing update activity. Read-only activity continues
while logging is suspended.
The backup that is made between the SET LOG SUSPEND and the SET LOG
RESUME window might contain uncommitted data. If you must restore the entire
DB2 subsystem to the time when the log was suspended, restore the entire
database and logs from the backup, and then restart DB2 to recover the entire DB2
subsystem to a consistent state.
Examples
Example 2: Modify the system checkpoint interval to every 150000 log records.
-SET LOG LOGLOAD(150000)
Subsections:
v “Environment”
v “Authorization”
v “Syntax”
v “Option descriptions”
v “Usage notes” on page 380
v “Examples” on page 380
Environment
This command can be issued from a z/OS console, a DSN session under TSO, a
DB2I panel (DB2 COMMANDS), an IMS or CICS terminal, or a program that uses
the instrumentation facility interface (IFI).
Authorization
To execute this command, you must use a privilege set of the process that includes
one of the following authorities:
v SYSOPR authority
v SYSCTRL authority
v SYSADM authority
DB2 commands that are issued from a logged-on z/OS console or TSO SDSF can
be checked by DB2 authorization using primary and secondary authorization IDs.
Syntax
Option descriptions
LOAD( load-module-name )
Specifies the name of the load module to load into storage. The default load
module is DSNZPARM.
RELOAD
Reloads the last named subsystem parameter load module into storage.
Usage notes
Examples
Example 3: Reload the subsystem parameters that the DB2 subsystem loaded at
startup.
-SET SYSPARM STARTUP
Subsections:
v “Environment”
v “Authorization”
v “Syntax”
v “Usage notes”
Environment
You can use this subcommand only under ISPF. You can issue it from ISPF option
6, or from a CLIST.
Authorization
None is required.
Syntax
SPUFI
Usage notes
SPUFI session: The SPUFI subcommand runs SPUFI and presents the SPUFI panel
as the start of a SPUFI session.
In the SPUFI session, you can access the CURRENT SPUFI DEFAULTS panel. You
can change DB2I defaults by splitting the screen and accessing the DB2I
DEFAULTS panel, or by changing the defaults before starting the SPUFI session.
SPUFI panel variables: The SPUFI panel variables you enter after invoking SPUFI
directly with the DSN command are not saved in the same place. Panel variables,
therefore, vary depending on whether you execute the facility directly, or through
DB2I.
Subsections:
v “Environment”
v “Authorization”
v “Syntax”
v “Option description”
v “Usage note”
Environment
Authorization
Syntax
/SSR subsystem-command
Option description
subsystem-command
Specifies a valid subsystem command. The first character following /SSR must
be the subsystem recognition character of the subsystem to which the
command is to be directed (in this case DB2). The IMS subsystem recognition
character is defined in the IMS SSM member for the external subsystem.
Usage note
Routing the command: IMS uses the command recognition character (CRC) to
determine which external subsystem, in this case DB2, receives the command. The
only action taken by IMS is to route the command to the appropriate subsystem.
This command can be started at the operator’s console, or during DB2 startup or
initialization. Once started, the administrative task scheduler is always up, unless it
is stopped by a STOP command at the operator’s console.
Each DB2 subsystem has a coordinated administrative task scheduler address space
for starting a z/OS started task procedure, therefore if there are many DB2
subsystems running on one z/OS, there is a separate administrative task scheduler
with a separate name for each. Two instances of the same administrative task
scheduler cannot run simultaneously. To avoid starting up a duplicate
administrative task scheduler, at startup the administrative task scheduler checks
all of the address spaces for duplicate names. If another address space with the
same name is already running, the administrative task scheduler that is starting up
will immediately shut down with a console error message. The administrative task
scheduler can only check the address spaces in the same system, but not the entire
Sysplex.
Subsections:
v “Environment”
v “Authorization”
v “Syntax”
v “Option descriptions” on page 386
v “Examples” on page 386
Environment
Authorization
Syntax
START admtproc,
TRACE= ON
OFF
Examples
Subsections:
v “Environment”
v “Authorization”
v “Syntax”
v “Option descriptions”
v “Usage note” on page 388
Environment
Authorization
Syntax
/START
,
SUBSYS subsystem-name
SUBSYS ALL
Option descriptions
SUBSYS
Specifies one or more names of external subsystems to be connected to IMS, or
all external subsystems.
subsystem-name , ...
Identifies one or more names of external subsystems to be connected to
IMS.
ALL
Indicates that all external subsystems are to be connected to IMS.
Inactive entries: The copy in main storage of the external subsystem PROCLIB
entry is refreshed as part of /START command function when that entry is not
active (that is, when the connection does not exist). This allows the installation to
stop the subsystem connection, change the specifications in the PROCLIB entry,
and restart the subsystem connection without bringing down IMS.
Depending on which options you specify, the following objects can be made
available for read-only processing, read-write processing, or utility-only processing:
v Databases
v Table spaces
v Index spaces
v Physical partitions of partitioned table spaces or index spaces (including index
spaces housing data-partitioned secondary indexes (DPSIs))
v Logical partitions of nonpartitioned secondary indexes.
In a data sharing environment, the command can be issued from any DB2
subsystem in the group that has access to the specified database.
Abbreviation: -STA DB
Subsections:
v “Environment”
v “Authorization”
v “Syntax” on page 391
v “Option descriptions” on page 391
v “Usage notes” on page 394
v “Examples” on page 396
Environment
This command can be issued from a z/OS console, a DSN session, a DB2I panel
(DB2 COMMANDS), an IMS or CICS terminal, or a program using the
instrumentation facility interface (IFI).
Authorization
To execute this command, you must use a privilege set of the process that includes
one of the following authorities:
v STARTDB privilege
v DBMAINT authority
v DBCTRL authority
| For implicitly created databases, the database privilege or authority can be held on
| the implicitly created database or on DSNDB04. If the START DATABASE
| command is issued on specific table spaces or index spaces in an implicitly created
| database, ownership of the table spaces is sufficient to start them. This means that
| the owner can display information about an implicitly created table space or index
| space if the command explicitly specifies that table space or index space name.
All specified databases with the STARTDB privilege included in the privilege set of
the process are started.
DB2 commands that are issued from a logged-on z/OS console or TSO SDSF can
be checked by DB2 authorization using primary and secondary authorization IDs.
Table space DBD01 in database DSNDB01 and table spaces and index spaces in
database DSNDB06 are required to check the authorization for using the START
DATABASE command. If a table space or index space required for this
authorization check is stopped, or is unavailable because it is in LPL or GRECP
status, installation SYSADM authority is required to start any database, table space,
or index space, including the ones required for the authorization check.
| ,
|
START DATABASE ( database-name )
*
dbname1:dbname2
dbname*
*dbname
*dbname*
*dbstring1*dbstring2*
|
| ,
SPACENAM( space-name )
* , CLONE
spacename1:spacename2
spacename* PART( integer )
*spacename integer1:integer2
*spacename*
*spacestring1*spacestring2*
|
| RW
ACCESS( RO )
UT
FORCE
Option descriptions
( database-name , ...)
Specifies the name of a database, or a database for the table spaces or index
spaces that are to be started. If you use more than one name, separate names
in the list with commas.
(*) Starts all databases for which the privilege set of the process has at least
DBMAINT authority or STARTDB privilege (except databases that are
already started). You cannot use (*) with ACCESS(FORCE).
You can start DSNDB01, DSNDB06, and work file databases, such as
DSNDB07, only by explicitly specifying them (for example, START
DATABASE(DSNDB01)).
dbname and dbstring can have any of the forms in the following list (where
dbname1 and dbname2 represent any 1- to 8-character string, and dbname
represents any 1- to 7-character string):
Form Starts
dbname1:dbname2
| All databases whose names, in UNICODE, are greater than or equal to
| dbname1 and less than or equal to dbname2
dbname*
All databases whose names begin with the string dbname
spacename and spacestring can have any of the forms in the following list
(where spacename1 and spacename2 represent any 1- to 8-character string,
and spacename represents any 1- to 7-character string):
Form Displays the status of
spacename1:spacename2
| All table spaces or index spaces whose names, in UNICODE, are
| greater than or equal to spacename1 and less than or equal to
| spacename2
spacename*
All table spaces or index spaces whose names begin with the string
spacename
*spacename
All table spaces or index spaces whose names end with the string
spacename
*spacename*
All table spaces or index spaces whose names contain the string
spacename
Usage notes
Data sets offline: Disk packs that contain partitions, table spaces, or indexes, do
not necessarily need to be online when a database is started. Packs must, however,
be online when partitions, table spaces, or indexes are first referred to. If they are
not online, an error in opening occurs.
Table spaces and indexes explicitly stopped: If table spaces and indexes are
stopped explicitly (using the STOP DATABASE command with the SPACENAM
option), they must be started explicitly. Starting the database does not start table
spaces or indexes that have been explicitly stopped.
Effect on objects marked with GRECP or with LPL entries: If a table space,
partition, or index is in the group buffer pool RECOVER pending (GRECP) status,
or if it has pages in the logical page list (LPL), the START DATABASE command
begins recovery of the object. You must specify the SPACENAM option and
ACCESS (RW) or (RO).
If the object is stopped when the command is issued, then the START DATABASE
command both starts the object and clears the GRECP or LPL status. If the GRECP
or LPL recovery action cannot complete, the object is still started.
If any table space or index space that is required to check command authority is
unavailable, Installation SYSADM or Installation SYSOPR authority will be
required to issue the START DATABASE command.
When recovering objects that are in GRECP or LPL status, avoid using
pattern-matching characters (*) for both the database name and the space name.
Multiple START DATABASE(dbname) SPACENAM(*) commands running in parallel
should complete faster than one START DATABASE(*) SPACENAM(*) command.
If you use pattern-matching characters (*) for both the database name and space
name, you must have DBMAINT authority and ensure that the catalog and
directory databases have already been explicitly started in the following order:
Although not recommended, you can start an object using START DATABASE
ACCESS(FORCE). That deletes all LPL and write error page range entries without
recovering the pages. It also clears the GRECP status.
| When a table space or partition is placed in the LPL because undo processing is
| needed for a NOT LOGGED table space, the -START DATABASE command does
| not remove the table space or partition from the LPL.
When starting a LOB table space defined as LOG NO and either in GRECP or
having pages in the LPL, the LOB table space will be placed in the AUXW state
and the LOB will be invalidated if DB2 detects that log records required for LPL
recovery are missing due to the LOG NO attribute.
If an object has retained locks (that is, a member of a DB2 data sharing group has
failed and the locks it held on the object are retained in the lock structure), START
DATABASE ACCESS (FORCE) is not allowed.
Restricted mode (RO or UT): When a START DATABASE command for a restricted
mode (RO and UT) takes effect depends on whether applications are started after
the START DATABASE command has completed, or whether applications are
executing at the time the command is issued. For applications that are started after
START DATABASE has completed, access restrictions are effective immediately. For
applications that are executing at the time START DATABASE is issued, the access
restrictions take effect when a subsequent claim is requested or the application is
allowed to run to completion. Whether the application is interrupted by the START
DATABASE command depends on various factors. These factors include the
ACCESS mode that is specified on the START DATABASE command, the type of
drain activity, if any, on the table space or partition, and whether any cursors are
being held on the table space or partition.
Starting a LOB table space: The START DATABASE command can be used to start
LOB table spaces and indexes on auxiliary tables. LOB table spaces are started
independently of the base table space with which the LOB table space is
associated.
Examples
Example 1: Start table space DSN8S81E in database DSN8D81A. Recover the table
space if it is in GRECP status or recover the pages on the LPL if one exists.
-START DATABASE (DSN8D81A) SPACENAM (DSN8S81E)
Example 2: Start all databases (except DSNDB01, DSNDB06, and work file
databases) for which you have authority. Recovery for any objects with GRECP or
LPL status is not performed.
-START DATABASE (*)
Example 4: Start all table spaces that begin with ″T″ and end with the string
″IQUA03″ in database DBIQUA01 for read and write access.
-START DATABASE (DBIQUA01) SPACENAM (T*IQUA03) ACCESS (RW)
The effect of restarting the system can be controlled by a conditional restart control
record, which you create by using the DSNJU003 (change log inventory) utility. For
more details about the effects, see “Usage notes” on page 401.
Subsections:
v “Environment”
v “Authorization”
v “Syntax” on page 400
v “Option descriptions” on page 400
v “Usage notes” on page 401
v “Examples” on page 402
Environment
This command can be issued only from a z/OS console. The name of the DB2
subsystem is determined by the command prefix. For example, -START indicates
that the DB2 subsystem to be started is the one with ’-’ as the command prefix.
The command is rejected if the DB2 subsystem is already active. The restart
recovery status of DB2 resources is determined from the prior DB2 shutdown
status.
Authorization
None is required. However, the command can be executed only from a z/OS
console with the START command capability.
| START DB2
PARM( module name ) *
ACCESS( )
MAINT
|
NO MSTR(jcl-substitution)
LIGHT( )
YES
NOINDOUBTS
DBM1(jcl-substitution) DIST(jcl-substitution)
Option descriptions
Usage notes
Command prefix: If your installation has more than one DB2 subsystem, you must
define more than one command prefix.
Light restart with ARM: To enable a light restart in an ARM environment, you
must code an ARM policy for DB2 and IRLM.
The following example shows an ARM policy for DB2, where the element name is
the DB2 data sharing group name and member name concatenated. For example,
DSNDB0GDB1G.
ELEMENT(elementname)
RESTART_METHOD(SYSTERM,STC,'cmdprfx S irlmproc')
The element name that DB2 uses is the DB2 data sharing group name and member
name concatenated. For example, DSNDB0GDB1G.F
Endless wait during start: The start operation might begin and fail to complete, if
the system services address space starts and the database services address space
cannot start. If a seemingly endless wait occurs, cancel the system services address
space from the console, and check both startup procedures for JCL errors.
Examples
Example 2: Start the DB2 subsystem, and provide a new value for the REGION
parameter in the startup procedure for the system services address space.
-START DB2 MSTR('REGION=6000K')
Example 3: Start the DB2 subsystem. Assuming that the EXEC statement of the JCL
that executes the startup procedure for the system services address space uses the
symbol RGN, provide a value for that symbol.
-START DB2 MSTR('RGN=6000K')
Example 4: DB2 subsystems DB1G and DB2G are members of a data sharing
group. Both were installed with a command prefix scope of STARTED. Start DB1G
and DB2G by routing the appropriate commands to the z/OS system on which
they are to be started, MVS1 and MVS2.
ROUTE MVS1,-DB1G START DB2
ROUTE MVS2,-DB2G START DB2
Subsections:
v “Environment”
v “Authorization”
v “Syntax”
v “Usage note”
v “Example”
Environment
This command can be issued from a z/OS console, a DSN session under TSO, a
DB2I panel (DB2 COMMANDS), an IMS or CICS terminal, or a program using the
instrumentation facility interface (IFI).
Authorization
To execute this command, you must use a privilege set of the process that includes
one of the following authorities:
v SYSOPR authority
v SYSCTRL authority
v SYSADM authority
DB2 commands that are issued from a logged-on z/OS console or TSO SDSF can
be checked by DB2 authorization using primary and secondary authorization IDs.
Syntax
START DDF
Usage note
The START DDF command activates the DDF interface to VTAM and TCP/IP.
When this command is issued after STOP DDF MODE(SUSPEND), suspended
threads are resumed and DDF activity continues.
Example
You do not need to issue the START FUNCTION SPECIFIC command when
defining a new function to DB2. DB2 automatically starts the new function on the
first SQL statement that invokes the new function.
Subsections:
v “Environment”
v “Authorization”
v “Syntax” on page 406
v “Option descriptions” on page 406
v “Usage notes” on page 406
v “Examples” on page 407
Environment
This command can be issued from a z/OS console, a DSN session under TSO, a
DB2I panel, an IMS or CICS terminal, or a program that uses the instrumentation
facility interface (IFI).
Data sharing scope: Group or local, depending on the value of the SCOPE option.
Authorization
To execute this command, you must use a privilege set of the process that includes
one of the following authorities for each function:
v Ownership of the function
v SYSOPR authority
v SYSCTRL authority
v SYSADM authority
Syntax
(*.*)
START FUNCTION SPECIFIC
,
( schema.specific-function-name )
schema.partial-name*
LOCAL
SCOPE ( GROUP )
Option descriptions
* (asterisk)(*.*)
Starts all functions in all schemas. This is the default.
( schema.specific-function-name )
Starts the specific function name in the schema. You cannot specify a function
name in the same way that you do in SQL; you must use the specific name. If
a specific name was not specified on the CREATE FUNCTION statement,
query SYSIBM.SYSROUTINES for the correct specific name:
SELECT SPECIFICNAME, PARM_COUNT
FROM SYSIBM.SYSROUTINES
WHERE NAME='function_name'
AND SCHEMA='schema_name';
Usage notes
Examples
Example 2: Start functions USERFN1 and USERFN2. If any requests are queued for
these functions, the functions are executed.
-START FUNCTION SPECIFIC(PAYROLL.USERFN1,PAYROLL.USERFN2)
Subsections:
v “Environment”
v “Authorization”
v “Syntax”
v “Option descriptions” on page 410
v “Examples” on page 413
Environment
Authorization
Syntax
START irlmproc,
DEADLOK=’iiii,kkkk’
IRLMGRP=’irlm-group-name’
IRLMID=n
IRLMNM=irlmname
LOCKTABL=irlmltnm
LTE=nnnn
MAXCSA=
MAXUSRS=nnn
PC=
PGPROT= YES
NO
SCOPE= LOCAL
GLOBAL
NODISCON
TRACE= NO
YES
MAXCSA=
MAXCSA= is a required positional parameter but is currently unused.
MAXUSRS= nnn
Specifies the initial maximum number of members in the data sharing
group, set by the IRLM which results in structure allocation. The specified
nnn must be a one- to two-digit number from 1 to 32. The default is 7. The
recommended value is 7 or less.
In a non-data-sharing environment (SCOPE=LOCAL), MAXUSRS is
ignored.
PC=
PC= is a required positional parameter but is currently unused.
PGPROT=
Specifies whether the IRLM load modules that are resident in common
storage are placed in z/OS page-protected storage.
YES The IRLM load modules that are resident in common storage are
placed in z/OS page-protected storage.
NO The IRLM load modules that are resident in common storage are
not placed in z/OS page-protected storage.
SCOPE=
Specifies whether the IRLM is to be used in a data sharing environment.
LOCAL
Specifies the IRLM is in a non-data-sharing environment and there is
no intersystem sharing.
GLOBAL
Specifies the IRLM is in a data sharing environment and that
intersystem sharing is to be performed.
NODISCON
Specifies that IRLM is in a data sharing environment and that
intersystem sharing is to be performed. IRLM remains connected to the
data sharing group even when no database management systems are
identified to it. You must explicitly stop IRLM to bring it down.
If you specify the NODISCON option, there is less impact on other
systems when a DB2 subsystem fails because the operating system is
not required to perform certain recovery actions that it normally
performs when IRLM comes down. Using the NODISCON option
might allow DB2 to restart more quickly after a DB2 subsystem
normally or abnormally terminates because it does not have to wait for
IRLM to rejoin the IRLM data sharing group.
TRACE=
Specifies whether the IRLM is to capture traces in wrap-around IRLM
buffers. Each buffer is reused when the previous buffer is filled. Traces are
captured at IRLM startup. You should specify TRACE=YES in the irlmproc
to place traces in wrap-around mode.
NO
Does not capture traces unless the TRACE CT command is issued.
Examples
Example: This command starts the IRLM with a lock table storage size of 64 MB,
assuming a width of 2-bytes for each lock table entry.
You do not need to issue START PROCEDURE when you define a new stored
procedure to DB2. DB2 automatically activates the new definition when it first
receives an SQL CALL statement for the new procedure.
Subsections:
v “Environment”
v “Authorization”
v “Syntax” on page 416
v “Option descriptions” on page 416
v “Usage notes” on page 416
v “Examples” on page 417
Environment
This command can be issued from a z/OS console, a DSN session under TSO, a
DB2I panel (DB2 COMMANDS), an IMS or CICS terminal, or a program using the
instrumentation facility interface (IFI).
Data sharing scope: Group or local, depending on the value of the SCOPE option.
Authorization
To execute this command, you must use a privilege set of the process that includes
one of the following authorities:
v Ownership of the stored procedure
v SYSOPR authority
v SYSCTRL authority
v SYSADM authority
DB2 commands that are issued from a logged-on z/OS console or TSO SDSF can
be checked by DB2 authorization using primary and secondary authorization IDs.
(*.*)
START PROCEDURE
,
( schema.procedure-name )
schema.partial-name*
procedure-name
partial-name*
LOCAL
SCOPE ( GROUP )
Option descriptions
(*.*)
Marks all stored procedures in all schemas as available to be called.
( schema.procedure-name )
Starts the specified stored procedure in the specified schema.
( schema.partial-name *)
Starts a set of stored procedures in the specified schema. The names of all
procedures in the set begin with partial-name and can end with any string,
including the empty string. For example, PAYROLL.ABC* starts all stored
procedures with names that begin with ABC in the PAYROLL schema.
procedure-name
Marks one or more specific stored procedures as available to be called.
partial-name *
Marks a set of stored procedures in the SYSPROC schema as available to be
called. The names of all procedures in the set begin with partial-name and can
end with any string, including the empty string. For example, ABC* starts all
stored procedure names that begin with ABC in the SYSPROC schema.
SCOPE
Specifies the scope of the command.
( LOCAL )
Starts the specified stored procedures in only the local members.
(GROUP)
Starts the specified stored procedures in all members of the data sharing
group.
Usage notes
Errors in a definition of a stored procedure: Errors are detected at create time for a
stored procedure.
If this data structure already exists, DB2 deletes it, and a new structure is created.
The profile table must be loaded by issuing the command above explicitly. The
table is not loaded when the database is initialized at the startup time. After
loading the database, the functions specified in the profile become active. Only the
rows in the profile table with column PROFILE_ENABLED=’Y’ are activated.
Subsections:
v “Environment”
v “Authorization”
v “Syntax”
v “Examples”
Environment
Authorization
To execute this command, you must use a privilege set of the process that includes
one of the following authorities:
v SYSOPR authority
v SYSCTRL authority
v SYSADM authority
| Syntax
|
| START PROFILE
|
Examples
Example 1: This command is required to load the profile table into memory.
-START PROFILE
| You can issue START RLIMIT even if the resource limit facility is already active.
| The resource limit specification table or the resource limit middleware table that
| you identify is used for new threads, and existing threads continue to be subject to
| the limits in the table that was active at the time they were created.
Subsections:
v “Environment”
v “Authorization”
v “Syntax”
v “Option description”
v “Example” on page 422
Environment
This command can be issued from a z/OS console, a DSN session under TSO, a
DB2I panel (DB2 COMMANDS), an IMS or CICS terminal, or a program using the
instrumentation facility interface (IFI).
Authorization
To execute this command, you must use a privilege set of the process that includes
one of the following authorities:
v SYSOPR authority
v SYSCTRL authority
v SYSADM authority
DB2 commands that are issued from a logged-on z/OS console or TSO SDSF can
be checked by DB2 authorization using primary and secondary authorization IDs.
Syntax
START RLIMIT
ID=id
Option description
Example
An additional option for this command and additional values for a few other
options exist. This additional information is intended for service and use under the
direction of IBM Software Support.
Subsections:
v “Environment”
v “Authorization”
v “Syntax” on page 424
v “Option descriptions” on page 426
v “Usage notes” on page 435
v “Examples” on page 437
Environment
This command can be issued from a z/OS console, a DSN session, a DB2I panel
(DB2 COMMANDS), an IMS or CICS terminal, or a program using the
instrumentation facility interface (IFI).
Data sharing scope: Group or local, depending on the value of the SCOPE option.
Authorization
To execute this command, you must use a privilege set of the process that includes
one of the following privileges or authorities:
v TRACE privilege
v SYSOPR authority
v SYSCTRL authority
v SYSADM authority
DB2 commands that are issued from a logged-on z/OS console or TSO SDSF can
be checked by DB2 authorization using primary and secondary authorization IDs.
LOCAL
SCOPE ( GROUP )
|
| constraint block:
|
| * *
, ,
|
| * * *
, , ,
|
| LOCATION( * ) * *
, , ,
|
| * *
, ,
|
| * * filtering block
, ,
|
| * * ,
, BUFSIZE( k_bytes )
TDATA( CORRELATION )
IFCID( ifcid ) TRACE
CPU
DISTRIBUTED
|
|
| filtering block:
|
| , ,
|
| , , ,
|
| , ,
|
| , ,
|
| ,
XROLE( connection-role )
partial-connection-role-id
|
Option descriptions
The options PERFM, ACCTG, STAT, AUDIT, and MONITOR identify the type of
trace that is started.
( PERFM )
Specifies a trace that is intended for performance analysis and tuning. This
trace includes records of specific events in the system.
Abbreviation: P
( ACCTG )
Specifies a trace that is intended to be used in accounting for a particular
program or authorization ID. This trace includes records that are written for
each thread.
Abbreviation: A
( STAT )
Specifies a trace that collects statistical data that is broadcast by various
components of DB2, at time intervals that can be chosen during installation.
Abbreviation: S
LOCATION cannot be specified when you choose a statistics trace.
The constraint block places optional constraints on the kinds of data that are
collected by the trace. The allowable constraints depend on the type of trace
started, as shown in the following table.
Table 29. Allowable constraints for each trace type
Type PLAN AUTHID CLASS LOCATION
PERFM Allowed Allowed Allowed Allowed
ACCTG Allowed Allowed Allowed Allowed
STAT NO NO Allowed NO
| To start a trace for a client with the IP address of 123.34.101.98, enter the
| following command:
| -START TRACE (PERFM) CLASS (*) LOCATION (::FFFF:123.34.101.98)
Number of traces: If you use one or no values for PLAN, AUTHID, or LOCATION,
the START TRACE command starts a single trace. If you use multiple values for
PLAN, AUTHID, or LOCATION, the command starts a trace for each plan,
authorization ID, or location. There can be up to 32 traces going at one time. If a
START TRACE command is entered from the console or from the DB2I panels to
an OP n or an OPX destination, message DSNW133I is issued to indicate trace data
lost.
Using the options PLAN, AUTHID, or LOCATION when starting monitor trace
class 1 has no effect on the amount of data returned on IFI READS requests.
Using the options PLAN, AUTHID, or LOCATION has no effect when starting
either accounting or monitor trace classes 2, 5, or 7.
Stopping and starting DB2: If DB2 is stopped and started after you have started a
trace, the trace is not restarted automatically.
If a trace is started with SCOPE(GROUP), and a new member joins the data
sharing group after the trace is started, the new member also writes the trace data
that is specified by the START TRACE command.
Starting a trace with SCOPE(GROUP) can generate large amounts of trace data, so
you might need to increase the size of the return area in your monitor program to
hold the extra data.
Tracing threads using the * wildcard: You can use the wildcard suffix, “*” to filter
threads. For example, if you specify “-START TRACE PLAN (A,B,C*)”, DB2 will
trace, and then return A, B, CDE, CDEFG, CDEFGH, and so on. It will trace
threads “A”, “B” and all threads starting with “C”.
Tracing threads using the positional, (_) wildcard: You can utilize the positional
wildcard, which is represented by the, “_” character, to trace threads when you
want the wildcard in the middle, or when you want to trace threads of a specific
length. For example, if you specify “-START TRACE PLAN (A_C), all threads will
be traced that are three characters that have “A” as the first character, and “C” as
the third. This command would return “ABC”, “ADC”, “AEC”, and so on. If you
want to trace the thread “A_C” then you can specify “-START TRACE PLAN
(A/_C). The “/” before the “_” tells DB2 to trace for the underscore in the search,
rather than treating it as a wildcard. The same logic applies if you are trying to
trace a thread that includes a “/” or “*” character. Because the character “/” is an
escape character, if you are trying to trace a thread that has an “/” character in it,
you can specify, for example, “-START TRACE PLAN (A//C)” to trace the thread
“A/C”. You can also specify “-START TRACE PLAN (A/*C) to trace the thread
“A*C”.
Tracing multiple threads at once using wildcards: You also have the option of
tracing multiple threads based on multiple trace qualifications. For example, you
You have the ability to filter multiple threads at the same time, setting specific
criteria for the trace. For example, you can specify “-START TRACE PLAN (A)
USERID (B). This will trace the threads where the plan thread is A, and the user ID
is B. When tracing threads, you can only specify more than one thread criteria for
one filter per “-START TRACE” command. For example, you can specify “-START
TRACE PLAN (A,B) USERID (B) WRKSTN (E),” but you cannot specify “-START
TRACE PLAN (A, B) USERID (A, B) WRKSTN (E) because, in this example, two of
the filter qualifications have two elements defined to be traced, and DB2 only
allows for one attribute to have more than one trace element to be defined per
trace.
Filtering threads using exclude functionality: When you specify an “X” with any
constraint keyword, such as “XPLAN”, when you are filtering threads, you are
using the exclude functionality for the –START TRACE command. You have the
option of excluding specific types of threads when you are running trace
commands. You can use the “X” character to exclude specific combinations of
characters when you are running a trace. For example, you can specify “-START
TRACE XPLAN(A), to trace all threads EXCEPT “A”. In this instance b, bcd, bcde,
or cd could possibly be returned.
You also have the option of excluding multiple types of threads from your trace.
For example, you can specify, “-START TRACE XPLAN (A*, B*) to trace all threads
except those starting with “A”, with any combination of characters following “A”,
and all those characters starting with “B”, with any combination of characters
following “B”. Note: Specifying XPLAN (*) will exclude all threads from your
search, and is not allowed. You also cannot use the wildcard in the middle of a
start trace command with exclude functionality, such as, “-START TRACE XPLAN
(A*C).” You can, however, specify “-START TRACE XPLAN (A_ _ C *)”, which
will return all threads except those starting with “A”, a variety of two characters
next, a “C” in the fourth space, and a variety of characters at the end. The
wildcard symbol cannot be placed in the middle of trace criteria.
You have the ability to start two traces at once, in order to help you optimize your
tracing capabilities. For example, you can specify (-START TRACE XPLAN (A, B,
C) USERID (D))”. This tells DB2 to start tracing threads for “plan” except threads
“A”, “B”, or “C”, only where the user ID = “D”.
Combining trace qualifiers: You can customize the threads you trace by
commanding DB2 to trace specific threads, while excluding other specific threads.
For example, you can specify, “-START TRACE USERID (A,B) XPLAN (C)” . This
criteria only traces threads where the user ID is equal to “A” or “B”, and plan is
not equal to “C”. In this example, a thread where the user id is “A” and the plan
You can introduce multiple wildcards into your start trace commands to add more
customization to your traces. For example, you can specify “-START TRACE PLAN
(C*) USERID (Z, X) XPLAN (C, D, E)”. In this example, for the thread to be traced,
the plan must begin with C, the user ID must be equal to Z or to X, and the plan
cannot be C, D, or E. So a plan of CB, with a user ID of Z would pass, and the
thread would be traced, but plan C with a user ID of X would fail because the
command specifies not to trace threads where the plan is “C”, without additional
characters in the thread.
Examples
Example 1: Start a performance trace for threads with remote activity to location
USIBMSTODB21. Only activate IFCIDs 44 (lock suspends) and 54 (lock contention).
Trace class 30 is available for installation use.
-START TRACE (PERFM)
DEST(GTF)
LOCATION(USIBMSTODB21)
CLASS(30)
IFCID(44)
Example 2: Start an accounting trace for plan DSN8BC81. Write records to SMF
(that will happen by default). Include a comment to identify the trace.
-START TRACE (ACCTG)
PLAN (DSN8BC81)
COMMENT ('ACCTG TRACE FOR DSN8BC81')
Example 3: Start the statistics trace. Write records to SMF (by default).
-START TRACE=S
The command should only be issued to bring down the administrative task
scheduler for maintenance or to prepare for an IPL. To stop the administrative task
scheduler for other purposes, issue the command: modify admtproc,
appl=shutdown.
Subsections:
v “Environment”
v “Authorization”
v “Syntax”
v “Option descriptions”
v “Examples”
Environment
Authorization
Syntax
STOP admtproc
Option descriptions
admtproc
| Specifies the procedure name of the administrative task scheduler task that you
| want to stop.
Examples
Subsections:
v “Environment”
v “Authorization”
v “Syntax”
v “Option descriptions”
v “Usage note”
Environment
Authorization
Syntax
Option descriptions
SUBSYS
Specifies whether connection is to be stopped for one or more names of
external subsystems presently connected to IMS, or for all of them.
subsystem-name , ...
Specifies one or more names of external subsystems whose connection to
IMS is to be stopped.
ALL
Indicates that connection is to be stopped for all external subsystems
presently connected to IMS.
Usage note
When to use /STOP: The /STOP command allows application programs currently
accessing external resources to complete normally. When all applications have
The /STOP command can also be used to stop the subsystem connection in order
to change the specifications in the external subsystem’s PROCLIB member entry.
The /START command then refreshes the copy in main storage of the PROCLIB
entry with the modified entry.
When used to stop a logical partition of a secondary index, the command does not
close any data sets that are associated with the index.
In a data sharing environment, the command applies to every member of the data
sharing group. If a GBP-dependent object is stopped with the command STOP
DATABASE, DB2 performs the necessary processing to make the object no longer
GBP-dependent.
Abbreviation: -STO DB
Subsections:
v “Environment”
v “Authorization”
v “Syntax” on page 444
v “Option descriptions” on page 444
v “Usage notes” on page 447
v “Examples” on page 448
Environment
This command can be issued from a z/OS console, a DSN session under TSO, a
DB2I panel (DB2 COMMANDS), an IMS or CICS terminal, or a program using the
instrumentation facility interface (IFI).
Authorization
To execute this command, you must use a privilege set of the process that includes
one of the following privileges or authorities:
v STOPDB privilege
v DBMAINT authority
v DBCTRL authority
v DBADM authority
v SYSCTRL authority
v SYSADM authority
© Copyright IBM Corp. 1983, 2009 443
Error messages are produced for those specified databases for which this set does
not have the STOPDB privilege.
| For implicitly created databases, the database privilege or authority can be held on
| the implicitly created database or on DSNDB04. If the STOP DATABASE command
| is issued on specific table spaces or index spaces in an implicitly created database,
| ownership of the table spaces is sufficient to stop them. This means that the owner
| can display information about an implicitly created table space or index space if
| the command explicitly specifies that table space or index space name.
DB2 commands that are issued from a logged-on z/OS console or TSO SDSF can
be checked by DB2 authorization using primary and secondary authorization IDs.
Database DSNDB06 contains the table spaces and index spaces that are required to
check authorization. If you stop any table space or index space that is required for
the START DATABASE authorization check, installation SYSADM authority is
required to restart it.
| Syntax
|
| ,
|
STOP DATABASE ( database-name )
*
dbname1:dbname2
dbname*
*dbname
*dbname*
*dbstring1*dbstring2*
|
| ,
SPACENAM( space-name )
* , CLONE
spacename1:spacename2
spacename* PART( integer )
*spacename integer1:integer2
*spacename*
*spacestring1*spacestring2*
|
| AT(COMMIT)
Option descriptions
dbname and dbstring can have any of the forms in the following list (where
dbname1 and dbname2 represent any strings of from 1 to 8 characters, and
dbname represents any string of from 1 to 7 characters):
Form Stops...
dbname1:dbname2
| All databases whose names, in UNICODE, collate greater than or equal
| to dbname1 and less than or equal to dbname2
dbname*
All databases whose names begin with the string dbname
*dbname
All databases whose names end with the string dbname
*dbname*
All databases whose names contain the string dbname
*dbstring1*dbstring2*
All databases whose names contain the strings dbstring1 and dbstring2
SPACENAM( space-name , ...)
Indicates names of table spaces or indexes within the specified database to
stop.
Abbreviation: SPACE, SP
space-name
Is the name of one or more table spaces or index spaces to stop.
You can write space-name like database-name to designate:
v The name of a single table space or index space
v A range of names
v A partial name, including a beginning or ending pattern-matching
character (*), pattern-matching character between two strings, or any
combination of these uses. Consecutive pattern-matching characters (*)
are not allowed, and you cannot specify two pattern-matching characters
in the middle of a keyword string.
See the following section for instructions on how to start a table space or
index space again.
(*) Stops all table spaces and indexes of the specified database.
spacename and spacestring can have any of the forms in the following list
(where spacename1 and spacename2 represent any strings of from 1 to 8
characters, and spacename represents any string of from 1 to 7 characters):
Form Displays the status of...
Usage notes
Explicitly stopped databases: If table spaces and indexes are stopped explicitly
(using the STOP DATABASE command with the SPACENAM option), they must
be started explicitly using the START DATABASE command. Starting the database
does not start table spaces or indexes that have been stopped explicitly.
Stopped table spaces, indexes, and partitions: Table spaces, indexes, and partitions
are physically closed when the STOP DATABASE command is issued, except for
logical partitions of a nonpartitioning index of a partitioned table space. Index
spaces for declared temporary tables cannot be stopped or started.
Operation in TSO, z/OS, and batch: When the STOP DATABASE command is
issued from a TSO or a z/OS console, the command operates asynchronously to
keep the terminal free. When the command is issued from a batch job, it operates
synchronously in case later steps depend on the database being stopped. The STOP
DATABASE command drains work in progress on the database before stopping it.
If it cannot get the drain locks on the first request, it repeatedly tries again. The
command fails if it times out more than 15 times trying to get the locks or if a
serious deadlock situation occurs.
Ensuring that all databases are stopped: When the STOP DATABASE command is
processing asynchronously, message DSN9022I might be issued before the
command completes. Message DSNT736I is issued to indicate that the
asynchronous processing of the STOP DATABASE command is complete.
Use the DISPLAY DATABASE command to check the stopped status of table
spaces and indexes in a database. A status of STOPP indicates that the object is in
the process of being stopped. A status of STOP indicates that the stop has
completed and the object is in a stopped state. An object is not stopped until all
currently active threads accessing the object are quiesced.
An object might remain in the STOP pending (STOPP) status if the STOP
DATABASE command does not successfully complete processing.
Stopping the communication database and the resource limit database: If the
communication database (CDB) and the resource limit database (RLST) are active,
they cannot be stopped. Those databases are active when created and are activated
by DB2.
Stopping DSNDB01: If you try to stop the DSNDB01 database while an application
plan or package is executing, you might receive a time out because of locking
contention on DSNDB01. This is most likely to occur when an application plan or
package is executing for the first time since DB2 was started, or if the skeleton
cursor table (SKCT) for the plan or the skeleton package table (SKPT) for the
package was swapped out of the EDM pool.
After a disk failure: Issuing the STOP DATABASE command before interrupting
the I/O interface between the failed device and DB2 can result in incomplete I/O
requests. To prevent this hang situation, create an interruption either by forcing the
device offline using the z/OS command VARY with the FORCE option, or by
setting the I/O timing interval for the device before any failures. You can set the
I/O timing interval through the IECIOSxx z/OS parmlib member or by issuing the
z/OS command:
SETIOS MIH,DEV=dddd,IOTIMING=mm:ss
Stopping a LOB table space: The STOP DATABASE command can be used to stop
LOB table spaces and indexes on auxiliary tables. LOB table spaces are stopped
independently of the base table space with which the LOB table space is
associated.
The following table summarizes the locking used by the STOP DATABASE
command.
Table 31. Locking used by the STOP DATABASE command
Command Table space type Locks acquired
STOP AT COMMIT Partitioned PART IX mass delete lock. Drain-all on partitions
specified.
IX mass delete lock. Drain-all on all partitions.
Nonpartitioned IX mass delete lock. Drain-all on table space.
STOP Partitioned PART X-lock partitions specified. Drain-all on partitions
specified.
X-lock all partitions. Drain-all on all partitions.
Nonpartitioned X-lock table space. Drain-all on table space.
Examples
Example 1: Stop table space DSN8S81E in database DSN8D81A and close the data
sets that belong to that table space.
-STOP DATABASE(DSN8D81A) SPACENAM(DSN8S81E)
Example 2: Stop all databases (except DSNDB01, DSNDB06, and work file
databases)
-STOP DATABASE(*)
Example 3: Stop all databases (except DSNDB01, DSNDB06, and work file
databases) when all jobs release their claims and all utilities release their drain
locks.
-STOP DATABASE(*) AT(COMMIT)
Example 5: Stop all table spaces with names that begin with ″T″ and end with the
″IQUA03″ string in database DSN8D81A.
-STOP DATABASE(DSN8D81A) SPACENAM(T*IQUA03)
Output similar to the following output indicates that the command completed
successfully:
DSN9022I - DSNTDDIS 'STOP DATABASE' NORMAL COMPLETION
DSNT736I - ASYNCHRONOUS STOP DATABASE COMMAND HAS
COMPLETED FOR COMMAND: STOP DB(DSN8D81A) SPACE(T*IQUA03)
Subsections:
v “Environment”
v “Authorization”
v “Syntax”
v “Option descriptions”
v “Usage notes” on page 452
v “Example” on page 452
Environment
This command can be issued from a z/OS console, a DSN session, a DB2I panel
(DB2 COMMANDS), an IMS or CICS terminal, or a program using the
instrumentation facility interface (IFI).
Authorization
To execute this command, you must use a privilege set of the process that includes
one of the following privileges or authorities:
v STOPALL privilege
v SYSOPR authority
v SYSCTRL authority
v SYSADM authority
DB2 commands that are issued from a logged-on z/OS console or TSO SDSF can
be checked by DB2 authorization using primary and secondary authorization IDs.
Syntax
STOP DB2
QUIESCE YES
MODE( ) CASTOUT( )
FORCE NO
Option descriptions
MODE
Indicates whether currently executing programs will be allowed to complete.
For the effects of this option on distributed threads see the description of the
MODE option of Chapter 86, “-STOP DDF (DB2),” on page 455.
Usage notes
With CASTOUT(NO), the DB2 member shuts down with QC status, as displayed
by the DISPLAY GROUP command, which indicates that the member quiesced
with some castout processing not completed. A retained page set or partition
P-lock is held in IX state for each object for which the DB2 member was the last
updater. Also, group buffer pool connections enter a failed-persistent state.
Example
Example 1: Stop the DB2 subsystem. Allow currently active programs to complete.
Do not allow new programs to identify to DB2.
-STOP DB2 MODE (QUIESCE)
Subsections:
v “Environment”
v “Authorization”
v “Syntax”
v “Option descriptions” on page 456
v “Usage notes” on page 456
v “Examples” on page 457
Environment
This command can be issued from a z/OS console, a DSN session under TSO, a
DB2I panel (DB2 COMMANDS), an IMS or CICS terminal, or a program using the
instrumentation facility interface (IFI).
Authorization
To execute this command, you must use a privilege set of the process that includes
one of the following authorities:
v SYSOPR authority
v SYSCTRL authority
v SYSADM authority
DB2 commands that are issued from a logged-on z/OS console or TSO SDSF can
be checked by DB2 authorization using primary and secondary authorization IDs.
Syntax
QUIESCE
STOP DDF MODE( )
FORCE
SUSPEND CANCEL(n)
WAIT(n)
Usage notes
The following table summarizes the actions that DB2 takes when START DDF,
STOP DDF, START DB2, and STOP DB2 commands are issued with different DDF
states.
Table 32. The result of commands on the DDF status
STOP DB2 or STOP
DDF command STOP DB2 or STOP STOP DDF command
START DDF without DDF command with with
DDF status command MODE(FORCE) MODE(FORCE) MODE(SUSPEND)
Starting DSNL003I DSNL003I DSNL003I DSNL003I
Started DSNL001I DDF stops DDF forced stop DDF suspends
Stopping DSNL005I DSNL005I DSNL005I DSNL005I
Stopped DDF starts DSNL002I DSNL002I DSNL002I
Suspending DDF resumes DDF stops DDF forced stop DSNL069I
Suspended DDF resumes DDF stops DDF forced stop DSNL065I
Examples
This command does not prevent SQL statements with invocations of the functions
from running if they have already been queued or scheduled by DB2. You cannot
use this command to stop built-in functions or user-defined functions that are
sourced on another function.
Subsections:
v “Environment”
v “Authorization”
v “Syntax” on page 460
v “Option descriptions” on page 460
v “Usage notes” on page 461
v “Examples” on page 461
Environment
This command can be issued from a z/OS console, a DSN session under TSO, a
DB2I panel (DB2 COMMANDS), an IMS or CICS terminal, or a program using the
instrumentation facility interface (IFI).
Data sharing scope: Group or local, depending on the value of the SCOPE option.
Authorization
To execute this command, you must use a privilege set of the process that includes
one of the following authorities for each function:
v Ownership of the function
v SYSOPR authority
v SYSCTRL authority
v SYSADM authority
DB2 commands that are issued from a logged-on z/OS console or TSO SDSF can
be checked by DB2 authorization using primary and secondary authorization IDs.
(*.*)
STOP FUNCTION SPECIFIC
,
( schema.specific-function-name )
schema.partial-name*
QUEUE LOCAL
ACTION ( REJECT ) SCOPE ( GROUP )
Option descriptions
(*.*)
Stops access to all functions, including functions that DB2 applications have
not yet accessed.
If no functions are named, all functions are stopped.
schema.specific-function-name
Stops one specific function name. You cannot specify a function name as you
can in SQL; you must use the specific name. If a specific name was not
specified on the CREATE FUNCTION statement, query
SYSIBM.SYSROUTINES for the correct specific name:
SELECT SPECIFICNAME, PARM_COUNT
FROM SYSIBM.SYSROUTINES
WHERE NAME='function_name'
AND SCHEMA='schema_name';
Usage notes
Examples
Example 1: Stop access to all functions. While the STOP FUNCTION SPECIFIC
command is in effect, DB2 queues all attempts to execute functions.
-STOP FUNCTION SPECIFIC ACTION(QUEUE)
Example 2: Stop access to all functions. While the STOP FUNCTION SPECIFIC
command is in effect, DB2 rejects attempts to execute functions.
-STOP FUNCTION SPECIFIC ACTION(REJECT)
Abbreviation: P
Subsections:
v “Environment”
v “Authorization”
v “Syntax”
v “Option description”
v “Usage note”
v “Example”
Environment
Authorization
The command requires an appropriate level of operating system authority.
Syntax
STOP irlmproc
Option description
irlmproc
Identifies the procedure name for the IRLM to be stopped.
Usage note
Terminating the IRLM: If IRLM does not shut down normally, issue the MODIFY
irlmproc,ABEND command to terminate the IRLM abnormally:
F irlmproc,ABEND,DUMP
| If outstanding DB2 requests are in process and IRLM does not terminate, use the
| z/OS CANCEL command. If all other means of removing the subsystem fail, issue
| the z/OS FORCE CANCEL command.
Example
In a data sharing environment: You cannot issue the STOP irlmproc command to
IRLM in a data sharing group until no DB2 subsystems are identified to that IRLM
and the IRLM issues the following messages:
DXR136I IR21 HAS DISCONNECTED FROM THE DATA SHARING GROUP
You can qualify stored procedure names with a schema name. This command does
not prevent CALL statements from running if they have already been queued or
scheduled by DB2.
DB2 implicitly issues the command STOP PROCEDURE ACTION(REJECT) for any
stored procedure that exceeds the maximum abend count. That count is set by the
MAX ABEND COUNT field of installation panel DSNTIPX.
Subsections:
v “Environment”
v “Authorization”
v “Syntax” on page 466
v “Option descriptions” on page 466
v “Usage notes” on page 467
v “Examples” on page 467
Environment
This command can be issued from a z/OS console, a DSN session under TSO, a
DB2I panel (DB2 COMMANDS), an IMS or CICS terminal, or a program using the
instrumentation facility interface (IFI).
Data sharing scope: Group or local, depending on the value of the SCOPE option.
Authorization
To execute this command, you must use a privilege set of the process that includes
one of the following authorities:
v Ownership of the stored procedure
v SYSOPR authority
v SYSCTRL authority
v SYSADM authority
DB2 commands that are issued from a logged-on z/OS console or TSO SDSF can
be checked by DB2 authorization using primary and secondary authorization IDs.
(*.*)
STOP PROCEDURE
,
( schema.procedure-name )
schema.partial-name*
procedure-name
partial-name*
QUEUE LOCAL
ACTION ( REJECT ) SCOPE ( GROUP )
Option descriptions
(*.*)
Stops access to all stored procedures in all schemas, including procedure
definitions that have not yet been accessed by DB2 applications.
( schema.procedure-name )
Identifies the fully-qualified procedure name that is to be stopped.
( schema.partial-name *)
Stops a set of stored procedures in the specified schema. The names of all
procedures in the set begin with partial-name and can end with any string,
including the empty string. For example, PAYROLL.* stops all stored
procedures in the PAYROLL schema.
procedure-name
Identifies one or more specific stored procedure names to be stopped. The
procedure name is implicitly qualified with the SYSPROC schema name.
partial-name *
Stops a set of stored procedures within the SYSPROC schema. The names of all
procedures in the set begin with partial-name and can end with any string,
including the empty string. For example, ABC* stops all stored procedures
with names that begin with ABC.
ACTION
Indicates what to do with a CALL statement that is received while the
procedure is stopped. If STOP PROCEDURE is issued more than once for a
given procedure, the action taken is determined by the ACTION option on the
most recent command.
(QUEUE)
Queues the request until either:
v The wait exceeds the installation timeout value, or
v The stored procedure is started by the command START
PROCEDURE.
(REJECT)
Rejects the request
Usage notes
Examples
Example 1: Stop access to all stored procedures, and terminate the DB2 stored
procedures address space. While the STOP PROCEDURE command is in effect,
attempts to execute stored procedures are queued.
-STOP PROCEDURE ACTION(QUEUE)
DSNX947I - DSNX9SP2 STOP PROCEDURE SUCCESSFUL FOR *.*
DSN9022I - DSNX9COM '-STOP PROC' NORMAL COMPLETION
Example 2: Stop access to all stored procedures, and terminate the DB2 stored
procedures address space. While the STOP PROCEDURE command is in effect,
attempts to execute stored procedures are rejected.
-STOP PROCEDURE ACTION(REJECT)
DSNX947I - DSNX9SP2 STOP PROCEDURE SUCCESSFUL FOR *.*
DSN9022I - DSNX9COM '-STOP PROC' NORMAL COMPLETION
Example 3: Stop stored procedures USERPRC1 and USERPRC3. While the STOP
PROCEDURE command is in effect, attempts to execute these stored procedure are
queued.
-STOP PROCEDURE(USERPRC1,USERPRC3)
DSNX947I - DSNX9SP2 STOP PROCEDURE SUCCESSFUL FOR USERPRC1
DSNX947I - DSNX9SP2 STOP PROCEDURE SUCCESSFUL FOR USERPRC3
DSN9022I - DSNX9COM '-STOP PROC' NORMAL COMPLETION
Example 4: Stop stored procedures USERPRC1 and USERPRC3. While the STOP
PROCEDURE command is in effect, attempts to execute these stored procedure are
rejected.
-STOP PROCEDURE(USERPRC1,USERPRC3) ACTION(REJECT)
DSNX947I - DSNX9SP2 STOP PROCEDURE SUCCESSFUL FOR USERPRC1
DSNX947I - DSNX9SP2 STOP PROCEDURE SUCCESSFUL FOR USERPRC3
DSN9022I - DSNX9COM '-STOP PROC' NORMAL COMPLETION
Subsections:
v “Environment”
v “Authorization”
v “Syntax”
v “Examples”
Environment
Authorization
To execute this command, you must use a privilege set of the process that includes
one of the following authorities:
v SYSOPR authority
v SYSCTRL authority
v SYSADM authority
| Syntax
|
| STOP PROFILE
|
Examples
All previously limited SQL statements (SELECT, UPDATE, DELETE, and INSERT)
executed through an SQL PREPARE or EXECUTE IMMEDIATE statement run with
no limit.
Subsections:
v “Environment”
v “Authorization”
v “Syntax”
v “Example”
Environment
This command can be issued from a z/OS console, a DSN session under TSO, a
DB2I panel (DB2 COMMANDS), an IMS or CICS terminal, or a program using the
instrumentation facility interface (IFI).
Authorization
To execute this command, you must use a privilege set of the process that includes
one of the following authorities:
v SYSOPR authority
v SYSCTRL authority
v SYSADM authority
DB2 commands that are issued from a logged-on z/OS console or TSO SDSF can
be checked by DB2 authorization using primary and secondary authorization IDs.
Syntax
STOP RLIMIT
Example
One additional option to this command and additional values for a few other
options exist. This additional information is intended for service and use under the
direction of IBM Software Support.
Subsections:
v “Environment”
v “Authorization”
v “Syntax” on page 474
v “Option descriptions” on page 476
v “Usage notes” on page 479
v “Examples” on page 482
Environment
This command can be issued from a z/OS console, a DSN session, a DB2I panel
(DB2 COMMANDS), an IMS or CICS terminal, or a program using the
instrumentation facility interface (IFI).
Data sharing scope: Group or local, depending on the value of the SCOPE option.
Authorization
To execute this command, you must use a privilege set of the process that includes
one of the following privileges or authorities:
v TRACE privilege
v SYSOPR authority
v SYSCTRL authority
v SYSADM authority
DB2 commands that are issued from a logged-on z/OS console or TSO SDSF can
be checked by DB2 authorization using primary and secondary authorization IDs.
COMMENT(string) LOCAL
SCOPE( GROUP )
|
| constraint block:
|
| * * *
, , ,
|
| * LOCATION( * ) *
, , ,
|
| * *
, ,
|
| * *
, ,
|
| * filtering block
,
ROLE( connection-role )
partial-connection-role-id
|
|
| filtering block:
|
| , ,
|
| , , ,
|
| , ,
|
| , ,
|
| ,
XROLE( connection-role )
partial-connection-role-id
|
Option descriptions
For additional descriptions of each of the following trace types, see Chapter 81,
“-START TRACE (DB2),” on page 423.
( PERFM )
Specify to stop a trace that is intended for performance analysis and tuning.
Abbreviation: P
( ACCTG )
Specify to stop an accounting trace.
Abbreviation: A
( STAT )
Specify to stop a trace that collects statistical data. The LOCATION option
cannot be specified when you choose a statistics trace.
Abbreviation: S
( AUDIT )
Specify to stop a trace that collects audit data from various components of
DB2.
Abbreviation: AU
Usage notes
Stopping specific traces: Each option that you use, except TNO, limits the effect of
the command to active traces that were started using the same option, either
explicitly or by default, with exactly the same parameter values. For example, the
following command stops only the active traces that were started using the options
PERFM and CLASS (1,2):
-STOP TRACE (PERFM) CLASS (1,2)
This command does not stop, for example, any trace started using CLASS(1).
You must specify a trace type or an asterisk. For example, the following command
stops all active traces:
-STOP TRACE (*)
To stop monitor trace class 6, you must explicitly specify it as one of the arguments
of the CLASS option of the STOP TRACE command, including any other monitor
trace classes that were started with monitor trace class 6. For example, if monitor
trace class 6 was started with the command START TRACE(MON) CLASS(1,3,6),
the following command stops it:
-STOP TRACE(MON) CLASS(1,3,6)
In the case where monitor trace class 6 was started with the command START
TRACE(MON) CLASS(*), you must explicitly specify all 32 monitor trace classes to
have monitor trace class 6 stopped:
-STOP TRACE(MON) CLASS(1,2,3,4,5,6,...32)
However, if monitor trace class 6 is not active the STOP TRACE(*) command stops
all active traces.
Traces started by a IFI/IFC program: Before you stop an active trace, ensure that
an IFI application program or the IFC Selective Dump utility (DSN1SDMP) did not
start the trace. If you stop a trace started by DSN1SDMP, the DSN1SDMP utility
abnormally terminates.
Tracing threads using the * wildcard: You can use the wildcard suffix, “*” to filter
threads. For example, if you specify “-STOP TRACE PLAN (A,B,C*)”, DB2 will
trace, and then return A, B, CDE, CDEFG, CDEFGH, and so on. It will trace
threads “A”, “B” and all threads starting with “C”.
Tracing threads using the positional, (_) wildcard: You can utilize the positional
wildcard, which is represented by the, “_” character, to trace threads when you
want the wildcard in the middle, or when you want to trace threads of a specific
length. For example, if you specify “-STOP TRACE PLAN (A_C), all threads will
be traced that are three characters that have “A” as the first character, and “C” as
the third. This command would return “ABC”, “ADC”, “AEC”, and so on. NOTE:
if you want to trace the thread “A_C” then you can specify “-STOP TRACE PLAN
(A/_C). The “/” before the “_” tells DB2 to trace for the underscore in the search,
rather than treating it as a wildcard. The same logic applies if you are trying to
trace a thread that includes a “/” or “*” character. Because the character “/” is an
escape character, if you are trying to trace a thread that has an “/” character in it,
you can specify, for example, “-STOP TRACE PLAN (A//C)” to trace the thread
“A/C”. You can also specify “-STOP TRACE PLAN (A/*C) to trace the thread
“A*C”.
Tracing multiple threads at once using wildcards: You also have the option of
tracing multiple threads based on multiple trace qualifications. For example, you
can specify, “-STOP TRACE PLAN (A*, B*, C*) to simultaneously trace ALL threads
for plan that start with “A”, “B”, and “C”. The wildcard character, “*” will trace all
threads. You can specify more complex combinations such as, “-STOP TRACE
PLAN (A_B*, C*, AND C/_D*)”, which will return all threads that:
v Begin with “A”, have a one character wild card as the second character in the
thread, have a “B” as the third character in the thread, and end with any type or
number of characters (ADBIOP, AOBTYJDP,)
You have the ability to filter multiple threads at the same time, setting specific
criteria for the trace. For example, you can specify “-STOP TRACE PLAN (A)
USERID (B). This will trace the threads where the plan thread is A, and the user ID
is B. When tracing threads, you can only specify more than one thread criteria for
one filter per “-STOP TRACE” command. For example, you can specify “-STOP
TRACE PLAN (A,B) USERID (B) WRKSTN (E),” but you cannot specify “-STOP
TRACE PLAN (A, B) USER ID (A, B) WRKSTN (E) because, in this example, two
of the filter qualifications have two elements defined to be traced, and DB2 only
allows for one attribute to have more than one trace element to be defined per
trace.
Filtering threads using exclude functionality: When you specify an “X” with any
constraint keyword, such as “XPLAN”, when you are filtering threads, you are
using the exclude functionality for the –STOP TRACE command. You have the
option of excluding specific types of threads when you are running trace
commands. You can use the “X” character to exclude specific combinations of
characters when you are running a trace. For example, you can specify “-STOP
TRACE XPLAN(A), to trace all threads except “A”. In this instance B, BCD, BCDE,
or CD could possibly be returned.
You also have the option of excluding multiple types of threads from your trace.
For example, you can specify, “-STOP TRACE XPLAN (A*, B*) to trace all threads
except those starting with “A”, with any combination of characters following “A”,
and all those characters starting with “B”, with any combination of characters
following “B”. Note: Specifying XPLAN (*) excludes all threads from your search,
and is not allowed. You also cannot use the wildcard in the middle of a -STOP
TRACE command with exclude functionality, such as, “-STOP TRACE XPLAN
(A*C).” You can, however, specify “-STOP TRACE XPLAN (A_ _ C *)”, which will
return all threads except those starting with “A”, a variety of two characters next,
a “C” in the fourth space, and a variety of characters at the end. The wildcard
symbol cannot be placed in the middle of trace criteria.
You have the ability to stop two traces at once, in order to help you optimize your
tracing capabilities. For example, you can specify (-STOP TRACE XPLAN (A, B, C)
USERID (D))”. This tells DB2 to stop tracing all threads for plans except threads
“A”, “B”, or “C”, only where the user ID = “D”.
Combining trace qualifiers: You can customize the threads you trace by
commanding DB2 to trace specific threads, while excluding other specific threads.
For example, you can specify, “-STOP TRACE USERID (A,B) XPLAN (C)”. This
criteria only traces threads where the user ID is equal to “A” or “B”, and the plan
is not equal to “C”. In this example, a thread where the user ID is “A” and the
plan is equal to “D” would pass, and be traced, but a thread where the user ID is
“A” and plan is “C” would not pass, and would not be traced.
You can introduce wildcards into your stop trace commands to add more
customization to your traces. For example, you can specify “-STOP TRACE PLAN
(C*) USER ID (Z, X) XPLAN (C, D, E)”. In this example, for the thread to be
traced, the plan must begin with C, the user ID must be equal to Z or to X, and
Examples
Example 1: Stop all traces that have the generalized trace facility as their only
destination.
-STOP TRACE (*) DEST (GTF)
Example 2: Stop an accounting trace of all threads between the local and
USIBMSTODB21 DB2 subsystems for plan DSN8BC81. Include a comment.
-STOP TRACE (ACCTG)
PLAN (DSN8BC81)
LOCATION (USIBMSTODB21)
COMMENT('ACCTG TRACE FOR DSN8BC81')
When executing, a utility does not terminate until it checks to see that the TERM
UTILITY command was issued. Active utilities perform this check periodically. If
the utility is stopped, all its resources are released by the TERM UTILITY
command. An active utility can be terminated only from the DB2 on which it is
running. A stopped utility can be terminated from any active member of the data
sharing group.
Subsections:
v “Environment”
v “Authorization”
v “Syntax” on page 484
v “Option descriptions” on page 484
v “Usage notes” on page 484
v “Examples” on page 485
Environment
This command can be issued from a z/OS console, a DSN session, DB2I panels
DB2 COMMANDS and DB2 UTILITIES, an IMS or CICS terminal, or a program
using the instrumentation facility interface (IFI).
Data sharing scope: Group or member. The utility is implicitly of group scope
when the utility is stopped.
Authorization
To execute this command, you must use the primary or some secondary
authorization ID of the process that originally submitted the utility job, or you
must use a privilege set of the process that includes one of the following
authorities:
v DBMAINT authority
v DBCTRL authority
v DBADM authority
v SYSOPR authority
v SYSCTRL authority
v SYSADM authority
| For utilities that run on objects in implicitly created databases, the database
| privilege or authority can be held on the implicitly created database or on
| DSNDB04. Ownership of the table spaces or index spaces on which the utility
| operates is also sufficient to terminate the utility. This means that the owner can
| display information about an implicitly created table space or index space if the
| command explicitly specifies that table space or index space name.
DB2 commands that are issued from a logged-on z/OS console or TSO SDSF can
be checked by DB2 authorization using primary and secondary authorization IDs.
For users with DBMAINT, DBCTRL, or DBADM authority, the command takes
effect only when DB2 can determine that the user has sufficient authority over
each object that the utility job accesses.
Database DSNDB06 contains the table spaces and index spaces that are required to
check authorization. If a table or index space that is required for authorization
checking is affected by a utility that you need to terminate, installation SYSADM
authority is required to terminate that utility.
Syntax
Option descriptions
Usage notes
Restarting utilities: A terminated utility job step cannot be restarted. You must
resubmit the step as a new utility job.
What happens to particular utilities: In some cases, terminating a utility job can
leave work in an undesirable state, requiring special processing before the job can
be resubmitted. The following list describes the effects of TERM UTILITY on jobs
for each of the utilities:
Utility Special effects of the TERM UTILITY command
Examples
Example 1: Terminate all utility jobs for which you are authorized.
-TERM UTILITY (*)
Abbreviation: /TRA
Subsections:
v “Environment”
v “Authorization”
v “Syntax”
v “Option descriptions”
v “Examples” on page 488
Environment
Authorization
To enter this command, users must have passed the IMS security check.
The syntax diagram includes only those parameters that DB2 users need to know.
Syntax
/TRACE SET ON
OFF ALL NOLOG
TABLE SUBS OPTION LOG
Option descriptions
This topic provides information about the two parameters of the TRACE command
that are especially important for DB2 users.
SUBS
Indicates that the external subsystem trace table (containing information about
every interaction with DB2) is to be enabled or disabled. SET ON TABLE SUBS
enables the DB2 trace facility, and SET OFF TABLE SUBS disables it.
If nothing is specified with the TABLE keyword, then the default is ALL; ALL
includes SUBS, as well as other trace tables.
LOG
Specifies that traced data is to be written to the IMS system log. Because IMS
has a tracing mechanism that writes trace entries to the IMS system log, it is
Examples
IRLM does not support all the options available on the TRACE command.
Subsections:
v “Environment”
v “Authorization”
v “Syntax”
v “Option descriptions”
v “Usage notes” on page 490
Environment
Authorization
The syntax diagram and option descriptions for this command are purposely
incomplete.
Syntax
,WRAP
TRACE CT, WTRSTART=parmlibmem
,NOWRAP
WTRSTOP=jobname
ON, COMP=irlmssnm
,SUB=( DBM )
EXP
INT
SLM
XCF
XIT
OFF
Option descriptions
CT
Specifies the component trace. (Do not use other trace options available on the
z/OS TRACE command).
WTRSTART= parmlibmem
Identifies the member that contains source JCL. That JCL executes the
© Copyright IBM Corp. 1983, 2009 489
CTRACE writer and defines the data set to which it writes the trace
buffers. This member can be a procedure cataloged in SYS1.PROCLIB or a
job.
WRAP
Specifies that when the system reaches the end of the group of data
sets, it writes over the oldest data at the beginning of the first data set
in the group. The system uses only the primary extents of the data
sets.
NOWRAP
Specifies that the system stops writing to the data sets when they are
all full. The system uses the primary and secondary extents of the data
sets.
WTRSTOP= jobname
Stops the CTRACE writer for a trace that is running. The system also
closes the data sets that the writer used.
jobname identifies the trace, either by:
v Member name, if the source JCL is a procedure
v Job name, if that appears on a JOB statement in the source JCL
ON
Turns on the trace.
COMP= irlmssnm
Gives the IRLM subsystem name.
SUB= subname
Specifies the type of sublevel trace. Traces INT, EXP, and XIT are
ON by default. You cannot turn off traces INT and EXP. If you do
not specify a subname on the TRACE command, the trace is
performed on all subnames that you control. Specifying one
subname restricts the traces to that trace plus the EXP and INT
traces.
Use: To trace:
DBM Interactions with the identified DBMS
EXP Any exception condition
INT Member and group events outside normal locking activity
SLM Interactions with the z/OS locking component
XCF All interactions with z/OS cross-system coupling services
XIT Only asynchronous interactions with the z/OS locking
component
OFF
Turns off the trace. If IRLM is connected to a CTRACE writer for the
component trace, the system disconnects it.
Usage notes
Include the IRLM load module in the z/OS link list: This command uses z/OS
component trace services. Include the IRLM load module DXRRL183, which
contains a routine for stopping and starting, in the z/OS link list.
Setting the number of trace buffers: To set the number of trace buffers used by
traces, use the z/OS MODIFY irlmproc,SET command.
Sample procedure for the CTRACE writer: This procedure identifies the data set to
| which the next sample procedure writes data. The external trace writer must be
| executed at the same or higher dispatch priority as IRLM. This allows the I/O to
| keep up with the filling of the trace buffers.
//CTWTR PROC
// EXEC PGM=ITTTRCWR
//TRCOUT01 DD DSNAME=SYS1.WTR1,DISP=OLD
//TRCOUT02 DD DSNAME=SYS1.WTR2,DISP=OLD
Sample procedure to start and stop a DBM trace to the CTRACE writer: After you
enter the command TRACE CT,WTRSTART, turn the trace on and connect the
writer, using the WTR parameter in the reply for the command TRACE CT.
TRACE CT,WTRSTART=CTWTR
| TRACE
. CT,ON,COMP=IRLM,SUB=(DBM)
.
.
. (z/OS asks for a reply)
.
.
R 15,WTR=CTWTR,END
| TRACE
. CT,OFF,COMP=IRLM,SUB=(DBM)
.
.
(Wait to make sure trace buffers are externalized.)
TRACE CT,WTRSTOP=CTWTR
Sample procedure to start and stop traces in wrap-around mode: Traces captured
in this procedure are saved in a limited number of buffers that are provided by
IRLM. Each buffer is reused when the previous buffer is filled. To start the trace in
this wrap-around mode, enter the following commands:
| TRACE
. CT,ON,COMP=IRLM
.
.
. (z/OS asks for a reply)
.
.
R
. 15,END
.
.
| TRACE CT,OFF,COMP=IRLM
Impact of setting TRACE CT ON: Each active subname type requires up to 0.7 MB
of ECSA. Because IRLM initializes its own traces when it starts, the DISPLAY
TRACE command shows that all traces are off. After you issue the TRACE ON
command, the reports are accurate except for the two subname types, INT and
EXT, which cannot be turned off.
The following table displays each macro parameter, and the macro where it is
located. The table also shows the name of the installation panel that is associated
with each parameter, whether each parameter can be updated online, and
corresponding topics. Online update capability does not apply to macro
DSNHDECP; therefore, update values are not listed for those parameters.
| OJPERFEH DSN6SPRM — No
OPTHINTS DSN6SPRM DSNTIP8 Yes
| OPTHYBCST DSN6SPRM — Yes
| OPTIOWGT DSN6SPRM — Yes
| OPTOIRCPF DSN6SPRM — Yes
| OTC_LICENSE DSN6SYSP — No
OUTBUFF DSN6LOGP DSNTIPL No
PADIX DSN6SPRM DSNTIPE Yes
| PADNTSTR DSNHDECP DSNTIP4 Yes
PARAMDEG DSN6SPRM DSNTIP8 Yes
| PARTKEYU DSN6SPRM DSNTIP8 Yes
PCLOSEN DSN6SYSP DSNTIPL Yes
PCLOSET DSN6SYSP DSNTIPL Yes
| PLANMGMT DSN6SPRM — Yes
| POOLINAC DSN6FAC DSNTIP5 Yes
PRIQTY DSN6ARVP DSNTIPA Yes
PROTECT DSN6ARVP DSNTIPP Yes
PTASKROL DSN6SYSP — Yes
QUIESCE DSN6ARVP DSNTIPA Yes
| RANDOMATT DSN6GRP — Yes
RECALL DSN6SPRM DSNTIPO No
RECALLD DSN6SPRM DSNTIPO Yes
| REFSHAGE DSN6SPRM DSNTIP8 Yes
| REORG_IGNORE_FREESPACE DSN6SPRM — Yes
RESTART/DEFER DSN6SPRM DSNTIPS —
| RESTORE_RECOVER_FROMDUMP DSN6SPRM DSNTIP6 Yes
| RESTORE_TAPEUNITS DSN6SPRM DSNTIP6 Yes
| RESYNC DSN6FAC DSNTIPR Yes
RETLWAIT DSN6SPRM DSNTIPI Yes
RETVLCFK DSN6SPRM DSNTIP8 Yes
RGFCOLID DSN6SPRM DSNTIPZ No
RGFDBNAM DSN6SPRM DSNTIPZ No
RGFDEDPL DSN6SPRM DSNTIPZ No
RGFDEFLT DSN6SPRM DSNTIPZ No
RGFESCP DSN6SPRM DSNTIPZ No
RGFFULLQ DSN6SPRM DSNTIPZ No
RGFINSTL DSN6SPRM DSNTIPZ No
RGFNMORT DSN6SPRM DSNTIPZ No
RGFNMPRT DSN6SPRM DSNTIPZ No
RLF DSN6SYSP DSNTIPO No
RLFAUTH DSN6SYSP DSNTIPP Yes
RLFERR DSN6SYSP DSNTIPO Yes
RLFERRD DSN6FAC DSNTIPR Yes
RLFTBL DSN6SYSP DSNTIPO Yes
ROUTCDE DSN6SYSP DSNTIPO No
RRULOCK DSN6SPRM DSNTIPI Yes
SCCSID DSNHDECP DSNTIPF —
SECQTY DSN6ARVP DSNTIPA Yes
SEQCACH DSN6SPRM DSNTIPE Yes
| SEQPRES DSN6SPRM DSNTIP6 Yes
SITETYP DSN6SPRM DSNTIPO No
Disclaimer: Any Web addresses that are included here are accurate at the time this
information is being published. However, Web addresses sometimes change. If you
visit a Web address that is listed here but that is no longer valid, you can try to
find the current Web address for the product information that you are looking for
at either of the following sites:
v http://www.ibm.com/support/publications/us/library/index.shtml, which lists
the IBM information centers that are available for various IBM products
v http://www.elink.ibmlink.ibm.com/public/applications/publications/cgibin/
pbi.cgi, which is the IBM Publications Center, where you can download online
PDF books or order printed books for various IBM products
The primary place to find and use information about DB2 for z/OS is the
Information Management Software for z/OS Solutions Information Center
(http://publib.boulder.ibm.com/infocenter/imzic), which also contains information
about IMS, QMF™, and many DB2 and IMS Tools products. This information center
is also available as an installable information center that can run on a local system
or on an intranet server. You can order the Information Management for z/OS
Solutions Information Center DVD (SK5T-7377) for a low cost from the IBM
Publications Center (www.ibm.com/shop/publications/order).
The majority of the DB2 for z/OS information in this information center is also
available in the books that are identified in the following table. You can access
these books at the DB2 for z/OS library Web site (http://www.ibm.com/software/
data/db2/zos/library.html) or at the IBM Publications Center
(http://www.ibm.com/shop/publications/order).
Table 34. DB2 Version 9.1 for z/OS book titles
Available in Available in
Publication information Available in BookManager® Available in
Title number center PDF format printed book
DB2 Version 9.1 for z/OS SC18-9840 X X X X
Administration Guide
DB2 Version 9.1 for z/OS Application SC18-9841 X X X X
Programming & SQL Guide
DB2 Version 9.1 for z/OS Application SC18-9842 X X X X
Programming Guide and Reference for
Java
DB2 Version 9.1 for z/OS Codes GC18-9843 X X X X
DB2 Version 9.1 for z/OS Command SC18-9844 X X X X
Reference
DB2 Version 9.1 for z/OS Data Sharing: SC18-9845 X X X X
Planning and Administration
In the following table, related product names are listed in alphabetic order, and the
associated Web addresses of product information centers or library Web pages are
indicated.
These resources include information about the following products and others:
v DB2 Administration Tool
v DB2 Automation Tool
v DB2 Log Analysis Tool
v DB2 Object Restore Tool
v DB2 Query Management Facility
v DB2 SQL Performance Analyzer
DB2 Universal Database Information center: http://www.ibm.com/systems/i/infocenter/
for iSeries®
Debug Tool for z/OS Information center: http://publib.boulder.ibm.com/infocenter/pdthelp/v1r1/index.jsp
Enterprise COBOL for Information center: http://publib.boulder.ibm.com/infocenter/pdthelp/v1r1/index.jsp
z/OS
Enterprise PL/I for z/OS Information center: http://publib.boulder.ibm.com/infocenter/pdthelp/v1r1/index.jsp
IMS Information center: http://publib.boulder.ibm.com/infocenter/imzic
Information resources for DB2 for z/OS and related products 503
Table 35. Related product information resource locations (continued)
Related product Information resources
IMS Tools One of the following locations:
v Information center: http://publib.boulder.ibm.com/infocenter/imzic
v Library Web site: http://www.ibm.com/software/data/db2imstools/library.html
These resources have information about the following products and others:
v IMS Batch Terminal Simulator for z/OS
v IMS Connect
v IMS HALDB Conversion and Maintenance Aid
v IMS High Performance Utility products
v IMS DataPropagator™
v IMS Online Reorganization Facility
v IMS Performance Analyzer
Integrated Data Information center: http://publib.boulder.ibm.com/infocenter/idm/v2r2/index.jsp
Management products
This information center has information about the following products and others:
v IBM Data Studio
v InfoSphere™ Data Architect
v InfoSphere Warehouse
v Optim™ Database Administrator
v Optim Development Studio
v Optim Query Tuner
PL/I Information center: http://publib.boulder.ibm.com/infocenter/pdthelp/v1r1/index.jsp
This resource includes information about the following z/OS elements and components:
v Character Data Representation Architecture
v Device Support Facilities
v DFSORT
v Fortran
v High Level Assembler
v NetView®
v SMP/E for z/OS
v SNA
v TCP/IP
v TotalStorage® Enterprise Storage Server®
v VTAM
v z/OS C/C++
v z/OS Communications Server
v z/OS DCE
v z/OS DFSMS™
v z/OS DFSMS Access Method Services
v z/OS DFSMSdss™
v z/OS DFSMShsm™
v z/OS DFSMSdfp™
v z/OS ICSF
v z/OS ISPF
v z/OS JES3
v z/OS Language Environment
v z/OS Managed System Infrastructure
v z/OS MVS
v z/OS MVS JCL
v z/OS Parallel Sysplex®
v z/OS RMF™
v z/OS Security Server
v z/OS UNIX System Services
z/OS XL C/C++ http://www.ibm.com/software/awdtools/czos/library/
The following information resources from IBM are not necessarily specific to a
single product:
v The DB2 for z/OS Information Roadmap; available at: http://www.ibm.com/
software/data/db2/zos/roadmap.html
v DB2 Redbooks® and Redbooks about related products; available at:
http://www.ibm.com/redbooks
v IBM Educational resources:
– Information about IBM educational offerings is available on the Web at:
http://www.ibm.com/software/sw-training/
Information resources for DB2 for z/OS and related products 505
– A collection of glossaries of IBM terms in multiple languages is available on
the IBM Terminology Web site at: http://www.ibm.com/software/
globalization/terminology/index.jsp
v National Language Support information; available at the IBM Publications
Center at: http://www.elink.ibmlink.ibm.com/public/applications/publications/
cgibin/pbi.cgi
v SQL Reference for Cross-Platform Development; available at the following
developerWorks® site: http://www.ibm.com/developerworks/db2/library/
techarticle/0206sqlref/0206sqlref.html
The following information resources are not published by IBM but can be useful to
users of DB2 for z/OS and related products:
v Database design topics:
– DB2 for z/OS and OS/390® Development for Performance Volume I, by Gabrielle
Wiorkowski, Gabrielle & Associates, ISBN 0-96684-605-2
– DB2 for z/OS and OS/390 Development for Performance Volume II, by Gabrielle
Wiorkowski, Gabrielle & Associates, ISBN 0-96684-606-0
– Handbook of Relational Database Design, by C. Fleming and B. Von Halle,
Addison Wesley, ISBN 0-20111-434-8
v Distributed Relational Database Architecture™ (DRDA) specifications;
http://www.opengroup.org
v Domain Name System: DNS and BIND, Third Edition, Paul Albitz and Cricket
Liu, O’Reilly, ISBN 0-59600-158-4
v Microsoft® Open Database Connectivity (ODBC) information;
http://msdn.microsoft.com/library/
v Unicode information; http://www.unicode.org
Stay current with the latest information about DB2 by visiting the DB2 home page
on the Web:
www.ibm.com/software/db2zos
On the DB2 home page, you can find links to a wide variety of information
resources about DB2. You can read news items that keep you informed about the
latest enhancements to the product. Product announcements, press releases, fact
sheets, and technical articles help you plan and implement your database
management strategy.
The official DB2 for z/OS information is available in various formats and delivery
methods. IBM provides mid-version updates to the information in the information
center and in softcopy updates that are available on the Web and on CD-ROM.
Information Management Software for z/OS Solutions Information Center
DB2 product information is viewable in the information center, which is
the primary delivery vehicle for information about DB2 for z/OS, IMS,
QMF, and related tools. This information center enables you to search
across related product information in multiple languages for data
management solutions for the z/OS environment and print individual
topics or sets of related topics. You can also access, download, and print
PDFs of the publications that are associated with the information center
topics. Product technical information is provided in a format that offers
more options and tools for accessing, integrating, and customizing
information resources. The information center is based on Eclipse open
source technology.
The Information Management Software for z/OS Solutions Information
Center is viewable at the following Web site:
http://publib.boulder.ibm.com/infocenter/imzic
CD-ROMs and DVD
Books for DB2 are available on a CD-ROM that is included with your
product shipment:
v DB2 V9.1 for z/OS Licensed Library Collection, LK3T-7195, in English
The CD-ROM contains the collection of books for DB2 V9.1 for z/OS in
PDF and BookManager formats. Periodically, IBM refreshes the books on
subsequent editions of this CD-ROM.
© Copyright IBM Corp. 1983, 2009 507
The books for DB2 for z/OS are also available on the following CD-ROM
and DVD collection kits, which contain online books for many IBM
products:
v IBM z/OS Software Products Collection , SK3T-4270, in English
v IBM z/OS Software Products DVD Collection , SK3T–4271, in English
PDF format
Many of the DB2 books are available in PDF (Portable Document Format)
for viewing or printing from CD-ROM or the DB2 home page on the Web
or from the information center. Download the PDF books to your intranet
for distribution throughout your enterprise.
BookManager format
You can use online books on CD-ROM to read, search across books, print
portions of the text, and make notes in these BookManager books. Using
the IBM Softcopy Reader, appropriate IBM Library Readers, or the
BookManager Read product, you can view these books in the z/OS,
Windows, and VM environments. You can also view and search many of
the DB2 BookManager books on the Web.
DB2 education
IBM Education and Training offers a wide variety of classroom courses to help you
quickly and efficiently gain DB2 expertise. IBM schedules classes are in cities all
over the world. You can find class information, by country, at the IBM Learning
Services Web site:
www.ibm.com/services/learning
IBM also offers classes at your location, at a time that suits your needs. IBM can
customize courses to meet your exact requirements. For more information,
including the current local schedule, contact your IBM representative.
www.elink.ibmlink.ibm.com/public/applications/publications/cgibin/pbi.cgi
From the IBM Publication Center, you can go to the Publication Notification
System (PNS). PNS users receive electronic notifications of updated publications in
their profiles. You have the option of ordering the updates by using the
publications direct ordering application or any other IBM publication ordering
channel. The PNS application does not send automatic shipments of publications.
You will receive updated publications and a bill for them if you respond to the
electronic notification.
You can also order DB2 publications and CD-ROMs from your IBM representative
or the IBM branch office that serves your locality. If your location is within the
United States or Canada, you can place your order by calling one of the toll-free
numbers:
v In the U.S., call 1-800-879-2755.
v In Canada, call 1-800-426-4968.
| If you are new to DB2 for z/OS, Introduction to DB2 for z/OS provides a
| comprehensive introduction to DB2 Version 9.1 for z/OS. Topics included in this
| book explain the basic concepts that are associated with relational database
| management systems in general, and with DB2 for z/OS in particular.
The most rewarding task associated with a database management system is asking
questions of it and getting answers, the task called end use. Other tasks are also
necessary—defining the parameters of the system, putting the data in place, and so
on. The tasks that are associated with DB2 are grouped into the following major
categories.
Installation
If you are involved with installing DB2, you will need to use a variety of resources,
such as:
v DB2 Program Directory
v DB2 Installation Guide
v DB2 Administration Guide
v DB2 Application Programming Guide and Reference for Java
v DB2 Codes
v DB2 Internationalization Guide
v DB2 Messages
v DB2 Performance Monitoring and Tuning Guide
v DB2 RACF Access Control Module Guide
v DB2 Utility Guide and Reference
If you will be using data sharing capabilities you also need DB2 Data Sharing:
Planning and Administration, which describes installation considerations for data
sharing.
If you will be installing and configuring DB2 ODBC, you will need DB2 ODBC
Guide and Reference.
If you are installing IBM Spatial Support for DB2 for z/OS, you will need IBM
Spatial Support for DB2 for z/OS User’s Guide and Reference.
If you are installing IBM OmniFind® Text Search Server for DB2 for z/OS, you will
need IBM OmniFind Text Search Server for DB2 for z/OS Installation, Administration,
and Reference.
End users issue SQL statements to retrieve data. They can also insert, update, or
delete data, with SQL statements. They might need an introduction to SQL,
detailed instructions for using SPUFI, and an alphabetized reference to the types of
SQL statements. This information is found in DB2 Application Programming and SQL
Guide, and DB2 SQL Reference.
End users can also issue SQL statements through the DB2 Query Management
Facility (QMF) or some other program, and the library for that licensed program
might provide all the instruction or reference material they need. For a list of the
titles in the DB2 QMF library, see the bibliography at the end of this book.
Application programming
Some users access DB2 without knowing it, using programs that contain SQL
statements. DB2 application programmers write those programs. Because they
write SQL statements, they need the same resources that end users do.
The material needed for writing a host program containing SQL is in DB2
Application Programming and SQL Guide.
| The material needed for writing applications that use JDBC and SQLJ to access
| DB2 servers is in DB2 Application Programming Guide and Reference for Java. The
| material needed for writing applications that use DB2 CLI or ODBC to access DB2
| servers is in DB2 ODBC Guide and Reference. The material needed for working with
| XML data in DB2 is in DB2 XML Guide. For handling errors, see DB2 Messages and
| DB2 Codes.
If you are a software vendor implementing DRDA clients and servers, you will
need DB2 Reference for Remote DRDA Requesters and Servers.
DB2 Performance Monitoring and Tuning Guide explains how to monitor the
performance of the DB2 system and its parts. It also lists things that can be done to
make some parts run faster.
If you will be using the RACF access control module for DB2 authorization
checking, you will need DB2 RACF Access Control Module Guide.
If you are involved with DB2 only to design the database, or plan operational
procedures, you need DB2 Administration Guide. If you also want to carry out your
own plans by creating DB2 objects, granting privileges, running utility jobs, and so
on, you also need:
v DB2 SQL Reference, which describes the SQL statements you use to create, alter,
and drop objects and grant and revoke privileges
v DB2 Utility Guide and Reference, which explains how to run utilities
v DB2 Command Reference, which explains how to run commands
If you will be using data sharing, you need DB2 Data Sharing: Planning and
Administration, which describes how to plan for and implement data sharing.
Diagnosis
Diagnosticians detect and describe errors in the DB2 program. They might also
recommend or apply a remedy. The documentation for this task is in DB2 Diagnosis
Guide and Reference, DB2 Messages, and DB2 Codes.
IBM may not offer the products, services, or features discussed in this document in
other countries. Consult your local IBM representative for information on the
products and services currently available in your area. Any reference to an IBM
product, program, or service is not intended to state or imply that only that IBM
product, program, or service may be used. Any functionally equivalent product,
program, or service that does not infringe any IBM intellectual property right may
be used instead. However, it is the user’s responsibility to evaluate and verify the
operation of any non-IBM product, program, or service.
IBM may have patents or pending patent applications covering subject matter
described in this document. The furnishing of this document does not give you
any license to these patents. You can send license inquiries, in writing, to:
For license inquiries regarding double-byte (DBCS) information, contact the IBM
Intellectual Property Department in your country or send inquiries, in writing, to:
The following paragraph does not apply to the United Kingdom or any other
country where such provisions are inconsistent with local law:
INTERNATIONAL BUSINESS MACHINES CORPORATION PROVIDES THIS
PUBLICATION ″AS IS″ WITHOUT WARRANTY OF ANY KIND, EITHER
EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS
FOR A PARTICULAR PURPOSE. Some states do not allow disclaimer of express or
implied warranties in certain transactions, therefore, this statement may not apply
to you.
Any references in this information to non-IBM Web sites are provided for
convenience only and do not in any manner serve as an endorsement of those Web
sites. The materials at those Web sites are not part of the materials for this IBM
product and use of those Web sites is at your own risk.
Licensees of this program who wish to have information about it for the purpose
of enabling: (i) the exchange of information between independently created
programs and other programs (including this one) and (ii) the mutual use of the
information which has been exchanged, should contact:
IBM Corporation
J46A/G4
555 Bailey Avenue
San Jose, CA 95141-1003
U.S.A.
The licensed program described in this document and all licensed material
available for it are provided by IBM under terms of the IBM Customer Agreement,
IBM International Program License Agreement, or any equivalent agreement
between us.
This information contains examples of data and reports used in daily business
operations. To illustrate them as completely as possible, the examples include the
names of individuals, companies, brands, and products. All of these names are
fictitious and any similarity to the names and addresses used by an actual business
enterprise is entirely coincidental.
COPYRIGHT LICENSE:
If you are viewing this information softcopy, the photographs and color
illustrations may not appear.
Trademarks
IBM, the IBM logo, and ibm.com® are trademarks or registered marks of
International Business Machines Corp., registered in many jurisdictions worldwide.
Other product and service names might be trademarks of IBM or other companies.
A current list of IBM trademarks is available on the Web at http://www.ibm.com/
legal/copytrade.shtml.
Microsoft, Windows, Windows NT®, and the Windows logo are trademarks of
Microsoft Corporation in the United States, other countries, or both.
UNIX is a registered trademark of The Open Group in the United States and other
countries.
Java and all Java-based trademarks and logos are trademarks of Sun Microsystems,
Inc. in the United States, other countries, or both.
Notices 517
518 Command Reference
Glossary
abend See abnormal end of task. aggregate function
An operation that derives its result by
abend reason code
using values from one or more rows.
A 4-byte hexadecimal code that uniquely
Contrast with scalar function.
identifies a problem with DB2.
| alias An alternative name that can be used in
abnormal end of task (abend)
| SQL statements to refer to a table or view
Termination of a task, job, or subsystem
| in the same or a remote DB2 subsystem.
because of an error condition that
| An alias can be qualified with a schema
recovery facilities cannot resolve during
| qualifier and can thereby be referenced by
execution.
| other users. Contrast with synonym.
access method services
allied address space
| The facility that is used to define, alter,
An area of storage that is external to DB2
| delete, print, and reproduce VSAM
and that is connected to DB2. An allied
| key-sequenced data sets.
address space can request DB2 services.
access path See also address space.
The path that is used to locate data that is
allied agent
specified in SQL statements. An access
An agent that represents work requests
path can be indexed or sequential.
that originate in allied address spaces. See
active log also system agent.
The portion of the DB2 log to which log
allied thread
records are written as they are generated.
A thread that originates at the local DB2
The active log always contains the most
subsystem and that can access data at a
recent log records. See also archive log.
remote DB2 subsystem.
address space
allocated cursor
| A range of virtual storage pages that is
A cursor that is defined for a stored
| identified by a number (ASID) and a
procedure result set by using the SQL
| collection of segment and page tables that
ALLOCATE CURSOR statement.
| map the virtual pages to real pages of the
| computer’s memory. ambiguous cursor
A database cursor for which DB2 cannot
address space connection
determine whether it is used for update
The result of connecting an allied address
or read-only purposes.
space to DB2. See also allied address
space and task control block. APAR See authorized program analysis report.
address space identifier (ASID) APF See authorized program facility.
A unique system-assigned identifier for
API See application programming interface.
an address space.
APPL A VTAM network definition statement
| AFTER trigger
that is used to define DB2 to VTAM as an
| A trigger that is specified to be activated
application program that uses SNA LU
| after a defined trigger event (an insert,
6.2 protocols.
| update, or delete operation on the table
| that is specified in a trigger definition). application
| Contrast with BEFORE trigger and A program or set of programs that
| INSTEAD OF trigger. performs a task; for example, a payroll
application.
agent In DB2, the structure that associates all
processes that are involved in a DB2 unit application plan
of work. See also allied agent and system The control structure that is produced
agent. during the bind process. DB2 uses the
CLOB See character large object. coded character set identifier (CCSID)
A 16-bit number that uniquely identifies a
| clone object coded representation of graphic
| An object that is associated with a clone characters. It designates an encoding
| table, including the clone table itself and scheme identifier and one or more pairs
| check constraints, indexes, and BEFORE that consist of a character set identifier
| triggers on the clone table. and an associated code page identifier.
| clone table code page
| A table that is structurally identical to a A set of assignments of characters to code
| base table. The base and clone table each
subcomponent synonym
A group of closely related DB2 modules | In SQL, an alternative name for a table or
that work together to provide a general | view. Synonyms can be used to refer only
function. | to objects at the subsystem in which the
| synonym is defined. A synonym cannot
subject table | be qualified and can therefore not be used
The table for which a trigger is created. | by other users. Contrast with alias.
When the defined triggering event occurs
on this table, the trigger is activated. Sysplex
See Parallel Sysplex.
subquery
A SELECT statement within the WHERE Sysplex query parallelism
or HAVING clause of another SQL Parallel execution of a single query that is
statement; a nested SQL statement. accomplished by using multiple tasks on
more than one DB2 subsystem. See also
subselect query CP parallelism.
| That form of a query that includes only a
| SELECT clause, FROM clause, and system administrator
| optionally a WHERE clause, GROUP BY The person at a computer installation
| clause, HAVING clause, ORDER BY who designs, controls, and manages the
| clause, or FETCH FIRST clause. use of the computer system.
Index 565
DB2 commands (continued) DEGREE option (continued)
commands (continued) REBIND PACKAGE subcommand 93
SET SYSPARM 379 REBIND PLAN subcommand 93
START DATABASE 389 DELAY
START DB2 399 keyword of MODIFY irlmproc,DIAG command 317
START DDF 403 DELAY option of ALTER UTILITY command 63
START FUNCTION SPECIFIC 405 deleting, IMS units of recovery 135
START PROCEDURE 415 DELIMIT option of DSNH command 286
START PROFILE 419 DEPLOY option
START RLIMIT 421 BIND PACKAGE subcommand 93
START TRACE 423 deregistering IRLM 316
STOP DATABASE 443 DEST option
STOP DB2 451 DISPLAY TRACE command 244
STOP DDF 455 START TRACE command 427
STOP FUNCTION SPECIFIC 459 STOP TRACE command 477
STOP PROCEDURE 465 DESTINATION option of DSNC MODIFY command 269
STOP PROFILE 469 DETAIL option
STOP RLIMIT 471 DISPLAY BUFFERPOOL command 154
STOP TRACE 473 DISPLAY GROUP command 190
TERM UTILITY 483 DISPLAY LOCATION command 210
completion messages 10 DISPLAY THREAD command 230
description of 15 DISPLAY TRACE command 244
DISPLAY FUNCTION SPECIFIC 185 detail report of DISPLAY BUFFERPOOL command 157
entering from supported environments 10 DIAG keyword of MODIFY irlmproc,DIAG command 317
scope 21 DIAGNOSE utility, TERM command effects 485
separator 15 diagnostic dumps, IRLM 317
DB2 Information Center for z/OS solutions 507 disability x
DB2 precompiler 15 DISABLE option
DBM1 option of START DB2 command 401 BIND PACKAGE subcommand 100
DBPROTOCOL option BIND PLAN subcommand 100
BIND PACKAGE subcommand 91 DSNH command 295
BIND PLAN subcommand 91 REBIND PACKAGE subcommand 100
DSNH command 295 REBIND PLAN subcommand 100
REBIND PACKAGE subcommand 91 disabling a function permanently 461
REBIND PLAN subcommand 91 DISCONNECT option
DBRM (database request module) BIND PLAN subcommand 95
BIND PLAN subcommand 110 DSNH command 295
maximum number in plan 5 REBIND PLAN subcommand 95
DBRMLIB option of DSNH command 285 DISPLAY ARCHIVE command 151
DCLGEN subcommand of DSN 142 DISPLAY BUFFERPOOL command
declaring an indicator variable array 142 description 153
description 137 Option descriptions 154
example 144 Output 156
forming field names 141 DISPLAY command of IMS
option descriptions 138 description 147
DDF (distributed data facility), displaying 181 example 149
DEADLINE option of ALTER UTILITY command 62 Option descriptions 147
DEADLOK option of START irlmproc command 410 DISPLAY DATABASE command
DECARTH option of DSNH command 285 description 161
DECIMAL example 172
option of DSNH command 285 Option descriptions 164
DECOMPOSE XML DOCUMENT command DISPLAY DDF command
example 39, 41 description 181
DEFAULT option of SET ARCHIVE command 372 example 182
DEFER Option descriptions 181
option of BIND PLAN subcommand 92 Output 182
DEFER option DISPLAY FUNCTION SPECIFIC command
BIND PACKAGE subcommand 92 description 185
BIND PLAN subcommand 92 Examples 188
DSNH command 295 Output 187
REBIND PACKAGE subcommand 92 DISPLAY GROUP command
REBIND PLAN subcommand 92 description 189
degree of parallel processing 93 Examples 192
DEGREE option IRLM information 190
BIND PACKAGE subcommand 93 DISPLAY GROUPBUFFERPOOL command
BIND PLAN subcommand 93 description 195
DSNH command 295 option descriptions 196
Index 567
E GBPCHKPT option of ALTER GROUPBUFFERPOOL
command 59
EARLY GBPOOLT option of ALTER GROUPBUFFERPOOL
option of REFRESH DB2 command 360 command 59
EARLY option of START DB2 command 360 GDETAIL option of DISPLAY GROUPBUFFERPOOL
ENABLE option command 197
BIND PACKAGE subcommand 100 GLOBAL option of START irlmproc command 412
BIND PLAN subcommand 100 GRAPHIC option of DSNH command 286
DSNH command 295 group buffer pool RECOVER-pending (GRECP)
REBIND PACKAGE subcommand 100 status,removing using START DATABASE command 394
REBIND PLAN subcommand 100 group detail report of DISPLAY GROUPBUFFERPOOL
ENCODING option command 198
BIND PACKAGE subcommand 103 GROUP option
BIND PLAN subcommand 103 DSN command 258
REBIND PACKAGE subcommand 103 group, scope of command 21
REBIND PLAN subcommand 103 GTF option
END subcommand of DSN DISPLAY TRACE command 245
description 303 START TRACE command 427
Example 303 STOP TRACE command 477
ENTRY option of DSNH command 286
escape character
APOST option of DCLGEN subcommand 141
QUOTE option of DCLGEN subcommand 141 H
establishing connections between IMS and a subsystem 387 HOST option of DSNH command 287
EXPLAIN option
BIND PACKAGE subcommand 104
BIND PLAN subcommand 104 I
DSNH command 295, 298 I/O processing, parallel, DEGREE option of bind
REBIND PACKAGE subcommand 104 subcommands 93
REBIND PLAN subcommand 104 IBMCOB option of DCLGEN subcommand 140
REBIND TRIGGER PACKAGE subcommand 104 ID option
extended MCS consoles, DB2 support of 10 RECOVER INDOUBT command 352
START RLIMIT command 422
IFCID (instrumentation facility component identifier),
F identifiers by trace class 429
FLAG option IFCID option
BIND PACKAGE subcommand 105 MODIFY TRACE command 334
BIND PLAN subcommand 105 START TRACE command 433
DSNH command 286, 295 IFI
FREE PACKAGE subcommand 307 issuing commands 25
FREE PLAN subcommand 310 IMMEDWRITE option
REBIND PACKAGE subcommand 105 BIND PACKAGE subcommand 106
REBIND PLAN subcommand 105 BIND PLAN subcommand 106
REBIND TRIGGER PACKAGE subcommand 105 REBIND PACKAGE subcommand 106
FORCE option REBIND PLAN subcommand 106
DSNC STOP command 271 IMS
RESET INDOUBT command 364 commands
START DATABASE command 393 CHANGE 135
STOP DB2 command 452 DISPLAY 147
STOP DDF command 456 SSR 383
FORTLIB option of DSNH command 286 START 387
FORTLOAD option of DSNH command 286 STOP 441
FREE PACKAGE subcommand of DSN TRACE 487
description 305 facilities, events tracing 487
example 307 IMS commands 11
Option descriptions 306 IMSBMP option
FREE PLAN subcommand of DSN BIND and REBIND subcommands 101
description 309 DSNH command 295
Example 310 IMSMPP option
Option descriptions 310 BIND and REBIND subcommands 102
functions, displaying information about 185 DSNH command 296
IMSPRE option of DSNH command 287
INACTIVE option
G DISPLAY THREAD command 228
INCLUDE statement of DCLGEN subcommand output 142
GBPCACHE option of ALTER GROUPBUFFERPOOL indicator variable, array declaration in DCLGEN 142
command 58
Index 569
M MODE option (continued)
STOP DDF command 456
MACRO option of DSNH command 288 Mode option of ACCESS DATABASE command 49
MAINT option of MODIFY irlmproc,STATUS command of MODIFY admtproc
z/OS 326 shutdown 311
MAINT option of START DB2 command 400 Trace 313
MAXCSA option of START irlmproc command 411 MODIFY admtproc command of z/OS
MAXRO option of ALTER UTILITY command 63 Examples 313
MAXUSRS option of START irlmproc command 411 MODIFY admtproc,,APPL=SHUTDOWN command of z/OS
MCS consoles, scope of commands 21 description 311
MDETAIL option of DISPLAY GROUPBUFFERPOOL MODIFY admtproc,,APPL=TRACE command of z/OS
command 197 description 313
member detail report of DISPLAY GROUPBUFFERPOOL MODIFY admtproc,APPL=SHUTDOWN command of z/OS
command 199 Examples 311
MEMBER option MODIFY irlmproc,ABEND command of z/OS
BIND PACKAGE subcommand 110 description 315
BIND PLAN subcommand 110 Example 316
DISPLAY UTILITY command 252 MODIFY irlmproc,DIAG command of z/OS
member, scope of command 21 description 317
MERGECOPY utility, effects of TERM command 485 Example 318
message MODIFY irlmproc,PURGE command of z/OS
DB2 commands 10 description 319
DCLGEN subcommand 140 Example 320
DISPLAY UTILITY command 252 MODIFY irlmproc,SET command of z/OS
DSN command of TSO 259 description 321
DSNH command 286 example 323
FLAG option of bind subcommands 105 option descriptions 319, 322
FREE PACKAGE subcommand 307 MODIFY irlmproc,STATUS command of z/OS
FREE PLAN subcommand 310 description 325
MODIFY irlmproc,STATUS command 327 example 327
RUN subcommand 369 Option descriptions 325
message by identifier MODIFY RECOVERY utility, effects of TERM command 485
DSN7106I 190 MODIFY STATISTICS utility, effects of TERM command 485
DSN9022I 10 MODIFY TRACE command
DSN9023I 10 description 333
DSNB411I 157 Example 335
DSNB412I 158 MONITOR option
DSNB413I 158 DISPLAY TRACE command 244
DSNB414I 158 MODIFY TRACE command 334
DSNB415I 158 START TRACE command 427
DSNB420I 158 STOP TRACE command 477
DSNB421I 158 monitor trace
DSNI021I 396 class descriptions 431
DSNJ315I 68 displaying 241
DSNJ316I 68 starting 423
DSNJ317I 68 stopping 473
DSNJ318I 68 MSTR option of START DB2 command 401
DSNL440I to DSNL449I 365
DSNL448I 364
DSNL450I 131
DSNT392I 171 N
DSNT500I 172 NAMES option of DCLGEN subcommand 140
DSNT501I 172 NEWFUN option of DSNH command 288
DSNT736I 447 NID (network ID) option of RECOVER INDOUBT
DSNT753I 221 command 353
DSNU100I 252 NO LIMIT option of SET ARCHIVE command 372
DSNU105I 252 NO option
DSNU106I 252 START DB2 command 400
DSNV413I 232 START irlmproc command 412
DSNW133I 427 NOBACKOUT option of CANCEL THREAD command 130
DSNX943I 218 NODEFER option
DSNX950I 218 BIND PACKAGE subcommand 92
messages BIND PLAN subcommand 92
DISPLAY TRACE command 249, 250, 251 DSNH command 296
MLT option of MODIFY irlmproc,SET command of z/OS 322 REBIND PACKAGE subcommand 92
MODE option REBIND PLAN subcommand 92
ARCHIVE LOG command 66 NODISCON option of START irlmproc command 412
STOP DB2 command 451
Index 571
PLAN option (continued)
START TRACE command 429
R
STOP TRACE command 477 RATIO option of ALTER GROUPBUFFERPOOL command 58
PLANMGMT option RCTERM option of DSNH command 290
REBIND PACKAGE subcommand 119 REBIND PACKAGE subcommand of DSN
REBIND TRIGGER PACKAGE subcommand 119 description 337
PLANMGMTSCOPE option example 340
FREE PACKAGE subcommand 307 option descriptions 85
PLI option of DCLGEN subcommand 140 REBIND PLAN subcommand of DSN
PLI2LIB option of DSNH command 289 description 341
PLIB option of DSNH command 289 Example 344
PLILIB option of DSNH command 289 option descriptions 85
PLILOAD option of DSNH command 289 REBIND TRIGGER PACKAGE subcommand of DSN
PLIPLNK option of DSNH command 289 description 345
PLIPMSG option of DSNH command 289 example 347
PLOCK keyword of MODIFY irlmproc,DIAG command 318 option descriptions 85
PnLIB option of DSNH command 289 rebinding
PNODEFER option of DSNH command 298 initiating 337, 341
POPTHINT option of DSNH command 298 options for 85
POPTION option of DSNH command 289 REBUILD INDEX utility, TERM command effects 485
POSTPONED option recognition character 15
DISPLAY THREAD command 228 RECOVER BSDS command
postponed units of recovery, recovering 355 description 349
POWNER option of DSNH command 298 Example 350
PPATH option of DSNH command 298 RECOVER INDOUBT command
PQUALIFIER option of DSNH command 298 description 351
PRECOMP option of DSNH command 289 example 354
precompiler Option descriptions 352
DSNH command options 288 RECOVER POSTPONED command
invoking DSNH 275 description 355
producing members for 110 Example 356
PRELEASE option of DSNH command 298 RECOVER utility, TERM command effects 485
PRELINK option of DSNH command 289 recovery
PREOPT option of DSNH command 298 BSDS 349
PRINT option of DSNH command 290 indoubt threads 351
privilege set of a process 3 postponed units of recovery 355
PROC option REFRESH DB2 command
DISPLAY THREAD command 229 example 360
processing, parallel REFRESH DB2, EARLY DB2 command
VPPSEQT option of ALTER BUFFERPOOL command 53 description 359
product-sensitive programming information, described 517 REFRESH DB2,EARLY command
PROGRAM option of RUN subcommand 367 Option descriptions 360
programming interface information, described 517 REGISTER XMLSCHEMA command
PSECSPAC option of DSNH command 290 example 41
PSPACE option of DSNH command 290 REJECT option of STOP FUNCTION SPECIFIC 460, 461
PSPI symbols 517 RELEASE option
PVALIDATE option of DSNH command 299 BIND PACKAGE subcommand 120
PVT option of MODIFY irlmproc,SET command of z/OS 322 BIND PLAN subcommand
description 120
DSNH command 296
REBIND PACKAGE subcommand 120
Q REBIND PLAN subcommand 120
QUALIFIER option REBIND TRIGGER PACKAGE subcommand 120
BIND PACKAGE subcommand 118 RELOAD option of SET SYSPARM command 379
BIND PLAN subcommand 118 REMOTE option of DSNH command 298
DSNH command 296 REMOVE XMLSCHEMA command
REBIND PACKAGE subcommand 118 example 42
REBIND PLAN subcommand 118 REOPT option
QUEUE option of STOP FUNCTION SPECIFIC 460, 461 BIND PACKAGE subcommand 121, 123
QUIESCE option BIND PLAN subcommand 121, 123
DSNC STOP command 271 DSNH command 296
STOP DB2 command 452 REBIND PACKAGE subcommand 121, 123
STOP DDF command 456 REBIND PLAN subcommand 121, 123
QUIESCE utility, effects of TERM command 485 REORG INDEX utility, effects of TERM command 485
QUOTE option REORG TABLESPACE utility, effects of TERM command 485
DCLGEN subcommand 141 REPAIR utility, effects of TERM command 485
DSNH command 286 REPLACE option
DCLGEN subcommand 140
Index 573
START admtproc command of z/OS STOP DDF command
description 385 description 455
Examples 386 example 457
START command of IMS 387 STOP FUNCTION SPECIFIC command
START DATABASE command description 459
description 389 Examples 461
example 396 limitations of 461
Option descriptions 391 Option descriptions 460
recovering object in group buffer pool 394 STOP irlmproc command of z/OS 463
recovering pages on logical page list 394 STOP PROCEDURE command
START DB2 command description 465
description 399 example 467
example 402 Option descriptions 466
Option descriptions 400 STOP PROFILE command
START DDF command 403 example 469
START FUNCTION SPECIFIC command STOP RLIMIT command 471
description 405 STOP TRACE command
example 407 description 473
Option descriptions 406 example 482
START irlmproc command of z/OS Option descriptions 476
description 409 STOR option of MODIFY irlmproc,STATUS command of
Examples 413 z/OS 326
Option descriptions 410 stored procedure
START PROCEDURE command displaying status 215
description 415 starting 415
example 417 stopping 465
Option descriptions 416 STOSPACE utility, effects of TERM command 485
START PROFILE command string, delimiter
example 419 COBOL 141
START RLIMIT command SQL 141
description 421 STRUCTURE option of DCLGEN subcommand 140
Example 422 SUB option of TRACE CT command 490
START TRACE command SUBS option of TRACE command 487
description 423 SUBSYS option
example 437 CHANGE command 135
Option descriptions 426 DISPLAY command 147
STARTUP option of SET SYSPARM command 380 START command 387
STAT option STOP command 441
DISPLAY TRACE command 244 subsystem parameters
MODIFY TRACE command 334 list 495
START TRACE command 426 SUFFIX option of DSNH command 292
STOP TRACE command 476 summary report
STATISTICS option of DSNC DISPLAY command 266 DISPLAY BUFFERPOOL command 156
statistics trace DISPLAY GROUPBUFFERPOOL command 197, 203
stopping 473 SUSPEND option
statistics, trace SET LOG command 376
class descriptions 430 STOP DDF command 456
displaying 241 SWITCH option
starting 423 REBIND PACKAGE subcommand 125
status REBIND TRIGGER PACKAGE subcommand 125
checking, IRLM 325 syntax diagram
cross-system coupling facility (XCF), status of how to read xi
members 190 SYSTEM option
shown by DISPLAY DATABASE 171 DISPLAY THREAD command 229
shown by DISPLAY PROFILE 221 DSN command 258
STDSQL option of DSNH command 292 DSNH command 292
STOP admtproc command of z/OS
description 439
Examples 439
STOP command of IMS 441
T
TABLE option of DCLGEN subcommand 138
STOP DATABASE command
TDATA option of START TRACE command 434
description 443
TERM option of DSNH command 293
example 448
TERM UTILITY command
Option descriptions 445
description 483
STOP DB2 command
example 485
description 451
terminating
Example 452
connections between IMS and a subsystem 441
Index 575
XWRKSTN option
START TRACE command 247, 433, 479
Y
YES option
START DB2 command 400
START irlmproc command 413
Z
z/OS commands 311, 313
MODIFY irlmproc,ABEND 315
MODIFY irlmproc,DIAG 317
MODIFY irlmproc,PURGE 319
MODIFY irlmproc,SET 321
MODIFY irlmproc,STATUS 325
START admtproc 385
START irlmproc 409
STOP admtproc 439
STOP irlmproc 463
TRACE CT 489
Printed in USA
SC18-9844-04
Spine information: