IBM · PDF fileInformation resources for DB2 10 for z/OS and related products ... administration, database administration, and operation. It pr esents detailed

Embed Size (px)

Citation preview

  • DB2 10 for z/OS

    Command Reference

    SC19-2972-13

    IBM

  • DB2 10 for z/OS

    Command Reference

    SC19-2972-13

    IBM

  • NotesBefore using this information and the product it supports, be sure to read the general information under Notices at theend of this information.

    October 11, 2017 edition

    This edition applies to DB2 10 for z/OS (product number 5605-DB2), DB2 10 for z/OS Value Unit Edition (productnumber 5697-P31), and to any subsequent releases until otherwise indicated in new editions. Make sure you areusing the correct edition for the level of the product.

    Specific changes are indicated by a vertical bar to the left of a change. A vertical bar to the left of a figure captionindicates that the figure has changed. Editorial changes that have no technical significance are not noted.

    Copyright IBM Corporation 1983, 2017.US Government Users Restricted Rights Use, duplication or disclosure restricted by GSA ADP Schedule Contractwith IBM Corp.

  • Contents

    About this information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ixWho should read this information . . . . . . . . . . . . . . . . . . . . . . . . . . . . ixDB2 Utilities Suite for z/OS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ixTerminology and citations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xAccessibility features for DB2 10 for z/OS . . . . . . . . . . . . . . . . . . . . . . . . . xHow to send your comments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xiHow to read syntax diagrams . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xi

    Part 1. About DB2 and related commands . . . . . . . . . . . . . . . . . . . 1

    Chapter 1. Privileges and authorization IDs for DB2 commands. . . . . . . . . . . . 3

    Chapter 2. Types of commands. . . . . . . . . . . . . . . . . . . . . . . . . . 5The DSN command and its subcommands . . . . . . . . . . . . . . . . . . . . . . . . . 5DB2 commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7IMS commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8CICS attachment facility commands . . . . . . . . . . . . . . . . . . . . . . . . . . . 8Administrative task scheduler commands. . . . . . . . . . . . . . . . . . . . . . . . . . 9z/OS IRLM commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9TSO CLISTs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10

    Chapter 3. Syntax rules for DB2 commands . . . . . . . . . . . . . . . . . . . . 11

    Chapter 4. Syntax rules for DSN subcommands . . . . . . . . . . . . . . . . . . 15

    Chapter 5. Scope of commands in data sharing . . . . . . . . . . . . . . . . . . 17

    Chapter 6. Output from DB2 commands . . . . . . . . . . . . . . . . . . . . . 19

    Chapter 7. Command line processor . . . . . . . . . . . . . . . . . . . . . . . 21Tutorial: Using the command line processor . . . . . . . . . . . . . . . . . . . . . . . . 21Running the command line processor. . . . . . . . . . . . . . . . . . . . . . . . . . . 25Command line processor ADD XMLSCHEMA DOCUMENT command . . . . . . . . . . . . . . . 26Command line processor BIND command . . . . . . . . . . . . . . . . . . . . . . . . . 28Command line processor CHANGE ISOLATION command . . . . . . . . . . . . . . . . . . . 29Command line processor CHANGE MAXCOLUMNWIDTH command . . . . . . . . . . . . . . . 29Command line processor CHANGE MAXLINESFROMSELECT command . . . . . . . . . . . . . . 30Command line processor COMMIT command . . . . . . . . . . . . . . . . . . . . . . . . 30Command line processor COMPLETE XMLSCHEMA command . . . . . . . . . . . . . . . . . . 31Command line processor CONNECT command . . . . . . . . . . . . . . . . . . . . . . . 32Command line processor DESCRIBE CALL command . . . . . . . . . . . . . . . . . . . . . 33Command line processor DESCRIBE TABLE command . . . . . . . . . . . . . . . . . . . . . 35Command line processor DISCONNECT command . . . . . . . . . . . . . . . . . . . . . . 36Command line processor DISPLAY RESULT SETTINGS command . . . . . . . . . . . . . . . . . 36Command line processor ECHO command . . . . . . . . . . . . . . . . . . . . . . . . . 36Command line processor help command . . . . . . . . . . . . . . . . . . . . . . . . . 37Command line processor LIST COMMAND OPTIONS command . . . . . . . . . . . . . . . . . 38Command line processor LIST TABLES command . . . . . . . . . . . . . . . . . . . . . . 38Command line processor properties file . . . . . . . . . . . . . . . . . . . . . . . . . . 39Command line processor REGISTER XMLSCHEMA command . . . . . . . . . . . . . . . . . . 42Command line processor REMOVE XMLSCHEMA command . . . . . . . . . . . . . . . . . . 44Command line processor ROLLBACK command . . . . . . . . . . . . . . . . . . . . . . . 44Command line processor SQL statements . . . . . . . . . . . . . . . . . . . . . . . . . 45

    Copyright IBM Corp. 1983, 2017 iii

    ||||||||||||||||||||||||||||||||||||||||||||

  • Command line processor start command . . . . . . . . . . . . . . . . . . . . . . . . . 46Command line processor TERMINATE command . . . . . . . . . . . . . . . . . . . . . . 48Command line processor z/OS UNIX System Services command . . . . . . . . . . . . . . . . . 48Command line processor UPDATE COMMAND OPTIONS command . . . . . . . . . . . . . . . . 49

    Chapter 8. DB2 command text is recorded in the DB2 recovery log . . . . . . . . . 51

    Part 2. DB2 and related commands . . . . . . . . . . . . . . . . . . . . . . 53

    Chapter 9. ABEND (DSN) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55

    Chapter 10. -ACCESS DATABASE (DB2) . . . . . . . . . . . . . . . . . . . . . 57

    Chapter 11. -ALTER BUFFERPOOL (DB2) . . . . . . . . . . . . . . . . . . . . . 61

    Chapter 12. -ALTER GROUPBUFFERPOOL (DB2) . . . . . . . . . . . . . . . . . 67

    Chapter 13. -ALTER UTILITY (DB2) . . . . . . . . . . . . . . . . . . . . . . . . 71

    Chapter 14. -ARCHIVE LOG (DB2) . . . . . . . . . . . . . . . . . . . . . . . . 75

    Chapter 15. BIND PACKAGE (DSN). . . . . . . . . . . . . . . . . . . . . . . . 81

    Chapter 16. BIND PLAN (DSN). . . . . . . . . . . . . . . . . . . . . . . . . . 91

    Chapter 17. BIND QUERY (DSN) . . . . . . . . . . . . . . . . . . . . . . . . . 97

    Chapter 18. BIND and REBIND options for packages and plans . . . . . . . . . . . 101ACQUIRE bind option . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101ACTION bind option. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102APCOMPARE bind option . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103APRETAINDUP bind option . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104APREUSE bind option . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105CACHESIZE bind option . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106COLLID bind option . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107CONCURRENTACCESSRESOLUTION bind option . . . . . . . . . . . . . . . . . . . . . 107COPY bind option. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108CURRENTDATA bind option . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110CURRENTSERVER bind option . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111DBPROTOCOL bind option . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112DEFER and NODEFER bind options. . . . . . . . . . . . . . . . . . . . . . . . . . . 113DEGREE bind option . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114DEPLOY bind option . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115DISCONNECT bind option . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116DYNAMICRULES bind option . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116ENABLE and DISABLE bind options . . . . . . . . . . . . . . . . . . . . . . . . . . 122ENCODING bind option . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124EXPLAIN bind option . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125EXTENDEDINDICATOR bind option . . . . . . . . . . . . . . . . . . . . . . . . . . 127FILTER bind option . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128FLAG bind option . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128GENERIC bind option . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129GETACCELARCHIVE bind option . . . . . . . . . . . . . . . . . . . . . . . . . . . 130IMMEDWRITE bind option . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131ISOLATION bind option . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133KEEPDYNAMIC bind option . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134LIBRARY bind option . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135

    iv Command Reference

    ||||||||

    ||

    ||

    ||

    ||||||

    ||

    ||||

    ||

  • MEMBER bind option . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136OPTHINT bind option . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 137OPTIONS bind option . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 138OWNER bind option . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 138PACKAGE bind option . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139PATH bind option . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 141PATHDEFAULT bind option . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 142PKLIST and NOPKLIST bind options . . . . . . . . . . . . . . . . . . . . . . . . . . 143PLAN bind option. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144PLANMGMT bind option . . . . . . . . . . . . . . . . . . . . . . . . . . . .