This statement displays information on the logical availability of partitions in a partitioned table.
Scope of validity
DBH administration
See also
The administration statement REUSE-PARTITIONS on "REUSE-PARTITIONS"
Function
You use the SHOW-PARTITIONS statement to display the availability status of all partitions in an open partitioned table.
For each configured partition, one information line is displayed (in ascending order of the partition numbers) which contains the following:
Number of the partition
Space name
Status:
AVAILABLE (partition is logically available)
NOT AVAILABLE (partition is not logically available)
This status is also displayed if access to the partition is only possible conditionally, e.g. if the space is in the “copy pending” status.
Additional information:
Here, for example, the SQL state or the DMS error code is displayed if the partition is unavailable for reasons which are known.
SHOW-PARTITIONS | ||||||||||||||||||||||||
|
Operands
CATALOG-NAME = <filename 1..18 without-cat-user-gen-vers>
Logical name of the database.
SCHEMA-NAME = <c-string 1..31 with-lower-case>
Name of the schema in the base table.
TABLE-NAME = <c-string 1..31 with-lower-case>
Name of the base table.
STRUCTURE-OUTPUT = *NONE / *SYSINF / <structured-name 1..20>
(WRITE-MODE = *REPLACE / *EXTEND)
In S procedures, specifies whether the information is to be output in S variables (see section “Syntax for output in S variables”).
Output in S variables
Output information | Name of the S variable | T | Contents |
Number of the partition | var(*LIST).PARTITION | S | <integer 1..16> |
Space name | var(*LIST).SPACE | S | <filename 1..18> |
Status of the partition | var(*LIST).STATE | S | AVAILABLE / |
Additional information | var(*LIST).INFORMATION | S | SQL-STATE: xxxxx / |
Example
Output to the screen after entering the SHOW-PARTITIONS administration statement:
%SHOW-PARTITIONS CAT=CAT-1,SCHEMA='SCH-1',TABLE='TAB-1' --------------------------------------------------------------------------- NUMBER ! SPACE-NAME ! STATUS ! INFO --------------------------------------------------------------------------- 2 ! TABLESPACE ! AVAILABLE ! 3 ! TABLESP002 ! AVAILABLE ! 9 ! TABLESP003 ! NOT AVAILABLE ! SQL-State: 81SA6 % <date> <time> SES7215 END OF OUTPUT %//
Administration command in ISP format and at the CALL DML interface
The PARTITION,INF administration command corresponds to the SHOW-PARTITIONS administration statement here.
PARTITION,INF,C[ATALOG]=name,S[CHEMA]=name,T[ABLE]=name
The values defined beforehand for the relevant operands may be entered for name.