© Copyright IBM Corp. 2007. All rights reserved. xvii
Examples
2-1 Simple SQL statement demonstrating the new GROUP BY functionality. . . . . . . . . . . 12
2-2 SQL statement illustrating the new DISTINCT processing . . . . . . . . . . . . . . . . . . . . . . 13
2-3 Query example illustrating the new optimization. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
2-4 Correlated subquery . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
2-5 Base case SQL flow and program logic MERGE equivalent . . . . . . . . . . . . . . . . . . . . 20
2-6 MERGE case SQL flow. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
2-7 Base case program logic SELECT FROM MERGE equivalent . . . . . . . . . . . . . . . . . . 22
2-8 SELECT FROM MERGE flow. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
2-9 Base case - SQL for V9 conversion mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
2-10 New case - SQL for V9 new-function mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
2-11 SQL example for ORDER BY and FETCH FIRST n ROWS in subselect. . . . . . . . . . 27
2-12 Query example for sparse index - DEGREE ANY . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
2-13 Query example for sparse index - DEGREE 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
2-14 INSTEAD OF trigger SQL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
2-15 Relevant program logic (PL/I) for insertion of rows into the view . . . . . . . . . . . . . . . . 40
2-16 BIGINT examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
2-17 Restriction on DECFLOAT key column. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
2-18 Inserting into DECFLOAT data type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
2-19 Selecting with DECFLOAT conversion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
3-1 Fetching XML data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76
3-2 Statements for test cases . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
4-1 Storage monitor messages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97
4-2 SDSNMACS(DSNDQISE) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98
4-3 Statistics report sample. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98
4-4 z/OS DISPLAY VIRTSTOR,HVSHARE output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104
4-5 Virtual storage layout above the bar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105
4-6 DIS THREAD(*) TYPE(SYSTEM). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111
4-7 DIS THREAD(*) SERVICE(WAIT) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112
4-8 DIS THREAD(*) SERVICE(STORAGE) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112
4-9 Class 3 suspension report . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114
4-10 Latch classes report . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114
4-11 New resource unavailable information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125
4-12 Sample sequential processing program to access the data . . . . . . . . . . . . . . . . . . . 132
4-13 Simple testcase with single DECFLOAT(16) <-> DECFLOAT (34) casting . . . . . . . 136
4-14 Complex testcase with multiple DECFLOAT(16) <-> DECFLOAT (34) castings . . . 136
5-1 Sample DDL for the partition-by-range table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157
5-2 Sample DDL for a non-clustered partitioning index . . . . . . . . . . . . . . . . . . . . . . . . . . 158
5-3 Sample DDL for a non-partitioned index. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 158
5-4 Sample DDL for DPSI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 158
5-5 Finding existing package copies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 195
6-1 LOAD COPYDICTIONARY example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 233
7-1 Creating and invoking a SOAP UDF. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 247
9-1 DSNTIAUL - LOBFILE option . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 260
9-2 Query for shadow data sets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 271
B-1 Statement for the statistics report. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 302
B-2 Sample of the statistics report long layout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 302
B-3 Statement for the accounting report . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 318
B-4 Sample of the accounting report long layout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 318