10.12.2012 Views

Application Programming and SQL Guide - Kmlinux

Application Programming and SQL Guide - Kmlinux

Application Programming and SQL Guide - Kmlinux

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

|<br />

|<br />

|<br />

LOB lock <strong>and</strong> LOB table space lock duration . . . . . . . . . . . . 419<br />

Instances when LOB table space locks are not taken . . . . . . . . . 420<br />

The LOCK TABLE statement for LOBs . . . . . . . . . . . . . . . 420<br />

Chapter 19. Planning for recovery . . . . . . . . . . . . . . . . 421<br />

Unit of work in TSO batch <strong>and</strong> online . . . . . . . . . . . . . . . . 421<br />

Unit of work in CICS . . . . . . . . . . . . . . . . . . . . . . 422<br />

Unit of work in IMS online programs . . . . . . . . . . . . . . . . 423<br />

Planning ahead for program recovery: Checkpoint <strong>and</strong> restart . . . . . . 425<br />

When are checkpoints important? . . . . . . . . . . . . . . . . 426<br />

Checkpoints in MPPs <strong>and</strong> transaction-oriented BMPs . . . . . . . . . 426<br />

Checkpoints in batch-oriented BMPs . . . . . . . . . . . . . . . 427<br />

Specifying checkpoint frequency . . . . . . . . . . . . . . . . . 427<br />

Unit of work in DL/I <strong>and</strong> IMS batch programs . . . . . . . . . . . . . 428<br />

Commit <strong>and</strong> rollback coordination . . . . . . . . . . . . . . . . 428<br />

Restart <strong>and</strong> recovery in IMS batch . . . . . . . . . . . . . . . . 429<br />

Using savepoints to undo selected changes within a unit of work . . . . . . 429<br />

Chapter 20. Planning to access distributed data . . . . . . . . . . . 431<br />

Planning for DRDA <strong>and</strong> DB2 private protocol access . . . . . . . . . . 431<br />

Advantages of DRDA access . . . . . . . . . . . . . . . . . . 431<br />

Moving from DB2 private protocol access to DRDA access . . . . . . . 432<br />

Bind processes for DRDA <strong>and</strong> DB2 private protocol access . . . . . . . 434<br />

Precompiler <strong>and</strong> bind options for DRDA access . . . . . . . . . . . 435<br />

Coding methods for distributed data . . . . . . . . . . . . . . . . . 437<br />

Using three-part table names to access distributed data . . . . . . . . 438<br />

Using explicit CONNECT statements to access distributed data . . . . . 440<br />

Coordinating updates to two or more data sources . . . . . . . . . . . 442<br />

Working without two-phase commit . . . . . . . . . . . . . . . . 442<br />

Update restrictions on servers that do not support two-phase commit . . . 442<br />

Forcing update restrictions by using CONNECT (Type 1) . . . . . . . . 443<br />

Maximizing performance for distributed data . . . . . . . . . . . . . . 443<br />

Coding efficient queries . . . . . . . . . . . . . . . . . . . . 444<br />

Maximizing LOB performance in a distributed environment . . . . . . . 444<br />

Using bind options to improve performance for distributed applications 445<br />

Using block fetch in distributed applications . . . . . . . . . . . . . 448<br />

Limiting the number of DRDA network transmissions . . . . . . . . . 450<br />

Limiting the number of rows returned to DRDA clients . . . . . . . . . 454<br />

Working with distributed data . . . . . . . . . . . . . . . . . . . 455<br />

<strong>SQL</strong> limitations at dissimilar servers . . . . . . . . . . . . . . . . 455<br />

Executing long <strong>SQL</strong> statements in a distributed environment . . . . . . 456<br />

Retrieving data from ASCII or Unicode tables . . . . . . . . . . . . 456<br />

Accessing data with a scrollable cursor when the requester is down-level 457<br />

Accessing data with a rowset-positioned cursor when the requester is<br />

down-level . . . . . . . . . . . . . . . . . . . . . . . . 457<br />

Maintaining data currency by using cursors . . . . . . . . . . . . . 457<br />

Copying a table from a remote location . . . . . . . . . . . . . . 457<br />

Transmitting mixed data . . . . . . . . . . . . . . . . . . . . 457<br />

Part 5. Developing your application . . . . . . . . . . . . . . . . . . . . . 459<br />

Chapter 21. Preparing an application program to run . . . . . . . . . 461<br />

Steps in program preparation . . . . . . . . . . . . . . . . . . . 462<br />

Step 1: Process <strong>SQL</strong> statements . . . . . . . . . . . . . . . . . 462<br />

Step 2: Compile (or assemble) <strong>and</strong> link-edit the application . . . . . . . 479<br />

Step 3: Bind the application . . . . . . . . . . . . . . . . . . . 480<br />

Contents ix

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!