home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 29 Fixes_o / 29-Fixes_o.zip / us90_2.zip / README.TXT < prev    next >
Text File  |  1996-03-22  |  150KB  |  3,840 lines

  1. ***********************************************************************
  2. **                                                                   **
  3. **  (c) COPYRIGHT INTERNATIONAL BUSINESS MACHINES CORPORATION 1996.  **
  4. **                    ALL RIGHTS RESERVED.                           **
  5. **                                                                   **
  6. ***********************************************************************
  7.  
  8.                  Welcome to DB2* for OS/2* Version 2.1.1
  9.  
  10.  
  11. +--- NOTE! ----------------------------------------------------------+
  12. |                                                                    |
  13. | Set the font to monospace for better viewing of this README.       |
  14. |                                                                    |
  15. +--------------------------------------------------------------------+
  16.  
  17. This README file contains information for the following products and
  18. components:
  19.  
  20. OS/2-Specific
  21. -------------
  22.  IBM DB2 for OS/2 Server (DB2 for OS/2)
  23.  IBM DB2 for OS/2 Single-User (DB2 for OS/2)
  24.  IBM DB2 Software Developer's Kit for OS/2
  25.  IBM DB2 Client Application Enabler for OS/2
  26.  IBM DB2 Administrator's Toolkit for OS/2
  27.  
  28. DDCS for OS/2
  29. -------------
  30.  IBM Distributed Database Connection Services* Single-User for OS/2
  31.    (DDCS Single-User for OS/2)
  32.  IBM Distributed Database Connection Services Multi-User Gateway for OS/2
  33.    (DDCS Multi-User Gateway for OS/2)
  34.  
  35. For information, see also:
  36.  
  37.      Part Number   Publication
  38.      -----------   -----------------------------------------------------------
  39.      59H1095       IBM* DATABASE 2* for OS/2 Installation and Operation Guide
  40.      59H1097       IBM DATABASE 2 Installing and Using OS/2 Clients
  41.      20H4787       IBM DATABASE 2 Software Developer's Kit for OS/2
  42.                      Building Your Applications
  43.  
  44.      20H4793       IBM DATABASE 2 IBM Distributed Database Connection Services
  45.                      User's Guide for common servers
  46.      59H1094       IBM DATABASE 2 for OS/2 IBM Distributed Database
  47.                      Connection Services Installation and Configuration Guide
  48.  
  49.   ---------------------------------------------------------------------------
  50.  
  51.  
  52. 1.0  Contents
  53.  
  54. 2.  INSTALLATION NOTES
  55. 2.1  System Requirements
  56. 2.2  TZ Environment Variable
  57. 2.3  LAN Support Program and NetBIOS rc=0x18
  58.  
  59. 3.  MIGRATION CONSIDERATIONS FROM DB2 2.1.0 PRODUCTS OR DB2 2.1.1 BETA
  60.  DRIVERS
  61. 3.1  Coexistance with DB2 V2.1.0 and DDCS V2.3.0 products
  62. 3.2  Migrating from the DB2 2.1.0 GA or from the DB2 2.1.1 Beta
  63.   3.2.1  Database Considerations
  64.   3.2.2  Application Considerations
  65.  
  66. 4.  USAGE NOTES
  67. 4.1  Product Documentation
  68.   4.1.1  Ordering the Cross-Platform Printed Manuals
  69. 4.2  Database Directory Utility
  70.   4.2.1  Linking to Online Books from Database Director Online
  71.    Help
  72. 4.3  Roll Forward and Log File Size
  73. 4.4  DRDA Application Server Support Authentication
  74. 4.5  Replacement for SQLQMF Utility
  75. 4.6  Import/Load APIs
  76. 4.7  sqlestrd() API
  77.  
  78. 5.  ENVIRONMENT CONSIDERATIONS
  79. 5.1  TCPBEUI Users
  80. 5.2  HPFS/HPFS386 users
  81. 5.3  Back-Level Support
  82. 5.4  DBA Utilities
  83.   5.4.1  Userid and Password Validation on an AIX/UNIX Server
  84. 5.5  Backup/Restore to User Exit
  85. 5.6  Dealing with Container in Use Error Message -294
  86.  
  87. 6.  PROGRAMMING NOTES
  88. 6.1  Sample Applications
  89. 6.2  Considerations when Using Micro Focus COBOL
  90. 6.3  BINARY/COMP-4 COBOL Data Types in the DB2 Precompiler
  91. 6.4  Using REDEFINES in COBOL Group Data Items
  92. 6.5  VisualAge C Set ++ and DB2 for OS/2
  93. 6.6  Precompiler Customization
  94. 6.7  Considerations When Using REXX Stored Procedures
  95.  
  96. 7.  CHANGES TO THE DB2 DOCUMENTATION
  97. 7.1  For All Refreshed Books - "Changes for This Release" Section
  98. 7.2  Administration Guide
  99. 7.3  API Reference
  100.   7.3.1  Backup and Restore API's for Vendor Products Appendix
  101.    DB2-INFO Data Structure
  102.   7.3.2  QUIESCE TABLESPACES FOR TABLE
  103. 7.4  Command Reference
  104.   7.4.1  FORCE APPLICATION
  105.   7.4.2  ROLLFORWARD DATABASE
  106.   7.4.3  EXPORT
  107.   7.4.4  QUIESCE TABLESPACES FOR TABLE
  108.   7.4.5  RUNSTATS Enhancement
  109. 7.5  Call Level Interface Guide and Reference
  110.   7.5.1  SQLColAttributes - Get Column Attributes
  111.   7.5.2  New CLI/ODBC Configuration Keyword
  112. 7.6  Database System Monitor Guide and Reference
  113.   7.6.1  db_conn_time Data Element
  114.   7.6.2  Buffer Pool Data Pages Written to Disk
  115.   7.6.3  DBMON Element Formula
  116.   7.6.4  Buffer Pool Threshold Cleaners Triggered
  117.   7.6.5  Event Start Time
  118.   7.6.6  Package Cache Inserts/Package Cache Lookups
  119.   7.6.7  Status of Database and Status of DB2 Instance
  120. 7.7  Planning Guide
  121.   7.7.1  Segments Versus 4KB Pages
  122.   7.7.2  BUFFPAGE and SORTHEAP
  123. 7.8  Problem Determination Guide
  124.   7.8.1  First Failure Data Capture
  125. 7.9  Configuration Parameters
  126.   7.9.1  DIR_CACHE
  127.   7.9.2  MAXAPPLS
  128.   7.9.3  TP_MON_NAME
  129.   7.9.4  REC_HIS_RETENTN
  130.   7.9.5  Configuration Parameters (YES/NO and ON/OFF Values)
  131.   7.9.6  DFT_QUERYOPT
  132. 7.10  Building Your Applications
  133.   7.10.1  Building Your Embedded SQL Applications
  134.   7.10.2  Building FORTRAN Stored Procedures
  135.   7.10.3  Definition Files for UDFs and Stored Procedures
  136.   7.10.4  C++ Type Decoration Consideration
  137.   7.10.5  IBM COBOL Build Scripts
  138.   7.10.6  Miscellaneous
  139. 7.11  Installation and Operation Guides
  140. 7.12  Installing and Using OS/2 Clients
  141.   7.12.1  New CLI/ODBC Configuration Keywords
  142. 7.13  SQL Reference
  143.   7.13.1  ALTER TABLE Notes Addition
  144.   7.13.2  SQL Communications Area (SQLCA)
  145.   7.13.3  GROUP-BY and ORDER-BY Changes
  146.     7.13.3.1  Expressions Section
  147.     7.13.3.2  Queries Section
  148. 7.14  Application Programming Guide
  149. 7.15  References to CompuServe
  150. 7.16  Messages Reference
  151.   7.16.1  New Messages
  152.   7.16.2  Changed Messages
  153.  
  154. 8.  DDCS-SPECIFIC INFORMATION
  155. 8.1  Documentation Changes
  156.   8.1.1  Installation Requirements
  157.   8.1.2  National Language (Code Page and Conversion) Information
  158.    Changes
  159.   8.1.3  OS/2 and UNIX-Based Databases
  160.   8.1.4  SET CURRENT PACKAGESET Support
  161.   8.1.5  DB2 for OS/400 Column Types and Length
  162.   8.1.6  Binding DDCS Utilities to an OS/400 Database
  163.     8.1.6.1  Possible Solutions
  164.   8.1.7  Binding Utilities for Back-Level Clients
  165.   8.1.8  SPM Instance Name
  166. 8.2  Syncpoint Manager (SPM)
  167.   8.2.1  Prerequisite PTFs
  168.   8.2.2  IBM Communications Server for OS/2 Warp Version 4
  169. 8.3  Authentication Default
  170. 8.4  Performance Troubleshooting
  171. 8.5  DDCS 2.3 Gateway Connection to DB2/MVS
  172.   8.5.1  Summary of Steps
  173.   8.5.2  Products used in this example
  174.   8.5.3  Network Element Names
  175.   8.5.4  Configuring SNA Communications
  176.     8.5.4.1  Creating a Communications Manager Configuration
  177.     8.5.4.2  DLC Profile
  178.     8.5.4.3  SNA Local Node Characteristics
  179.     8.5.4.4  SNA Connections
  180.     8.5.4.5  SNA Features
  181.     8.5.4.6  Completing the CM Configuration
  182.     8.5.4.7  Sample NDF File created by the above procedure
  183.   8.5.5  Cataloging DB2 Directory Entries at the Workstation
  184.     8.5.5.1  Cataloging the Workstation
  185.     8.5.5.2  Cataloging the Database
  186.     8.5.5.3  Cataloging the DCS Database
  187.     8.5.5.4  Verify DCS Directory Information
  188.   8.5.6  Configuring VTAM
  189.   8.5.7  VTAM DB2 APPL Definition
  190.     8.5.7.1  VTAM DB2 PU and LU definitions
  191.     8.5.7.2  Sample Log Mode Definition
  192.   8.5.8  Configuring DB2/MVS
  193.     8.5.8.1  Updating the SYSIBM.SYSUSERNAMES Table
  194.     8.5.8.2  Update the SYSIBM.SYSLUNAMES Table
  195. 8.6  Connectivity Via DDCS (Thailand Users Only)
  196. 8.7  DDCS User's Guide BIND Information
  197. 8.8  OS/2 Coexistence Considerations
  198.  
  199. 9.  COMMUNICATIONS ISSUES
  200. 9.1  TCP/IP
  201.  
  202. 10.  SAMPLE TOOLS AND UTILITIES
  203.  
  204. 11.  LIMITATIONS IN DOCUMENTED FUNCTIONS
  205. 11.1  Transaction Manager Database Considerations
  206. 11.2  Command and API Limitations
  207. 11.3  WCHARTYPE CONVERT Precompile Option Limitation
  208. 11.4  Using DB2 with an XA-Compliant Transaction Manager
  209. 11.5  Database Director Limitations
  210.   11.5.1  Restriction for Visual Explain
  211.     11.5.1.1  Snapshot Monitor
  212.     11.5.1.2  Event Analyzer
  213. 11.6  Online Backup and Load with COPY NO option
  214.  
  215. 12.  USING THE DB2 ODBC DRIVER WITH ODBC APPLICATIONS
  216. 12.1  Common Application Problems and Work Arounds
  217.   12.1.1  Visigenic's ODBC Driver Manager
  218.   12.1.2  Intersolv's ODBC Driver Manager
  219. 12.2  Limitations of CLI/ODBC Administrator and Client Setup GUI
  220.  Tools
  221. 12.3  SQLDescribeParam()
  222. 12.4  New CLI/ODBC Configuration Keywords in db2cli.ini
  223.   12.4.1  CLI/ODBC Trace File
  224.   12.4.2  Specifying a Directory for Temporary Files
  225.   12.4.3  SQLDescribeParam() Enable/Disable
  226.   12.4.4  Asynchronous ODBC Enable/Disable
  227.  
  228. 13.  MISCELLANEOUS
  229. 13.1  DB2 Family Newsletter
  230.  
  231. =========================================================================
  232. 2.  Installation Notes
  233.  
  234. 2.1  System Requirements
  235.  
  236. The Planning Guide was not updated for this release and so the system
  237. requirements that are documented in the last version are not correct.
  238. The following are the minimum system requirements for DB2 V2.1.1 and
  239. DDCS V2.3.1:
  240.  
  241. o   26 MB to 64 MB hard disk space, depending on options chosen
  242. o   16 MB memory
  243. o   OS/2 V2.11 or later including OS/2 Warp
  244. For Communications, one of the following products for OS/2
  245. o   For APPC: IBM Communications Manager Version 1.1 or later.  The
  246.     Syncpoint Manager function of DDCS Multi-User Gateway V2.3.1
  247.     requires IBM Communication Server Version 4
  248. o   For IPX/SPX: Novell NetWare Requester, Version 2.10
  249. o   For TCP/IP: IBM TCP/IP Version 2.0 or later
  250. o   For NetBIOS: IBM NTS/2 Version 1.0, or IBM Communications Manager
  251.     V1.1, or IBM OS/2 LAN Requester
  252.  
  253.  
  254. 2.2  TZ Environment Variable
  255.  
  256. When connecting a client to the server which runs on an operating
  257. system that supports the concept of local time versus Universal
  258. Coordinated Time (UCT, also known as Greenwich Mean Time or GMT), the
  259. client machine should also set up timezone information that
  260. corresponds to the server machine.  If it is not set, the client may
  261. display certain timestamps (that are returned by the server)
  262. incorrectly (being off by the difference between the UCT and local
  263. time).
  264.  
  265. So for example, if a server is running under Pacific Standard Time
  266. (PST) and a client is running under Eastern Standard Time (EST),
  267. timestamps on the client will show PST unless the TZ variable is set.
  268.  
  269.  
  270. 2.3  LAN Support Program and NetBIOS rc=0x18
  271.  
  272. If you use IBM LAN Support Program to provide NetBIOS communications
  273. protocol support, and you load the LAN Support Program device drivers
  274. in DOS upper / high memory, you may encounter intermittent NetBIOS
  275. communications errors "SQL30081, rc=0x18".  To avoid these
  276. communications errors, load the LSP device drivers in conventional
  277. memory.
  278.  
  279.  
  280. 3.  Migration Considerations from DB2 2.1.0 Products or DB2 2.1.1 Beta
  281. Drivers
  282.  
  283. 3.1  Coexistance with DB2 V2.1.0 and DDCS V2.3.0 products
  284.  
  285. All DB2 V2.1.0 and DDCS V2.3.0 products on your workstation must be
  286. updated to V2.1.1 and V2.3.1 respectively to ensure coexistence.
  287.  
  288. The DATABASE 2 for OS/2 CD contains updated versions of all the
  289. products. If you are installing your new product from this CD, you can
  290. also update any other DB2 V2.1.0 or DDCS V2.3.0 products currently
  291. installed.
  292.  
  293. Alternatively, you can contact IBM Service to obtain the DB2 V2.1.1 or
  294. DDCS V2.3.1 service refresh for other products already installed.
  295.  
  296.  
  297. 3.2  Migrating from the DB2 2.1.0 GA or from the DB2 2.1.1 Beta
  298.  
  299.  
  300. 3.2.1  Database Considerations
  301.  
  302. The following points apply to the workstations that have either
  303. installed the 2.1.1 Beta driver or one of the following products:
  304.  
  305. IBM DB2 for OS/2 Server V2.1.0
  306. IBM DB2 for OS/2 Single-User V2.1.0
  307.  
  308. and they have created databases with these code levels.
  309.  
  310. o   It is strongly recommended that you perform an optional migration
  311.     on any of your databases that were created by the V2.1.0 database
  312.     manager, in order to give your applications access to the new
  313.     scalar functions that have been implemented in V2.1.1.
  314. o   DBADM authority is granted implicitly by DB2 when a SYSADM user
  315.     creates a view or package that requires DBADM authority.  However,
  316.     if such a user is later removed from the SYSADM group, their DBADM
  317.     authority will also be removed.  Therefore, any users with DBADM
  318.     authority who do not belong to the SYSADM group must have been
  319.     explicitly granted DBADM access.
  320. o   It is recommended that you use the runstats utility to update the
  321.     index statistics for your tables.
  322.  
  323.  
  324. 3.2.2  Application Considerations
  325.  
  326. The following point applies to systems that have installed the 2.1.1
  327. Beta driver and created applications:
  328.  
  329. o   If you are migrating from the V2.1.1 beta driver, you must rebind
  330.     your applications prior to running them. Use the db2rbind command
  331.     to rebind all packages on your databases.
  332.  
  333.  
  334. 4.  Usage Notes
  335.  
  336. 4.1  Product Documentation
  337.  
  338.  
  339. 4.1.1  Ordering the Cross-Platform Printed Manuals
  340.  
  341. You can order the cross-platform printed manuals.  The part number for
  342. this set of books is 41H2451.  The following books are included:
  343.  
  344.   Form Number   Part Number   Book
  345.   ------------  -----------   ---------------------------------------
  346.   S20H-4664-00  20H4664       Information and Concepts Guide
  347.   S20H-4580-01  59H1088       Administration Guide
  348.   S20H-4871-00  20H4871       Database System Monitor Guide and Reference
  349.   S20H-4984-01  59H1089       API Reference
  350.   S20H-4643-01  59H1090       Application Programming Guide
  351.   S20H-4644-01  59H1092       Call Level Interface Guide and Reference
  352.   S20H-4645-01  59H1093       Command Reference
  353.   S20H-4808-01  59H1100       Messages Reference
  354.   S20H-4665-01  59H1101       SQL Reference
  355.   S20H-4779-00  20H4779       Problem Determination Guide
  356.   S20H-4793-00  20H4793       DDCS User's Guide
  357.  
  358.  
  359. 4.2  Database Directory Utility
  360.  
  361.  
  362. 4.2.1  Linking to Online Books from Database Director Online Help
  363.  
  364. If you are using Database Director online help, and you try
  365. double-clicking on a hypertext link in order to open an online book
  366. but the book is not displayed (that is, you receive an error message),
  367. it is possible that the online book has not been installed.  You may
  368. need to install the English version of the book if it has not been
  369. translated or the BOOKSHELF environment variable has not been set.
  370.  
  371. If an online book is installed and a hypertext link to it still does
  372. not work, you can open the book by going to the DB2 information folder
  373. and double-clicking on the book title.
  374.  
  375.  
  376. 4.3  Roll Forward and Log File Size
  377.  
  378. If the log file size (LOGFILSIZ) was modified during the course of
  379. normal processing, then database level roll forward through these log
  380. files will behave as follows:
  381.  
  382. On any invocation of roll forward, only log files with the same log
  383. file size will be processed.  When roll forward encounters a log file
  384. of different size (excluding truncated log files), roll forward
  385. processing will stop and return error SQL1042N.  Diagnostic
  386. information will be logged.  You will then be required to re-issue the
  387. roll forward command to continue processing from the next log file.
  388.  
  389.  
  390. 4.4  DRDA Application Server Support Authentication
  391.  
  392. The DRDA AS support in DB2 for OS/2 supports both client and server
  393. authentication.  However, there can be restrictions imposed by the
  394. communications product that you are using along with DB2 for OS2 with
  395. regard to what authentication type you can use.
  396.  
  397. If you are using CM/2 1.11, then you cannot use server authentication
  398. because CM/2 does not expose the password to the DRDA AS.  You can
  399. only use client or DCS authentication.  With client authentication,
  400. DB2 for OS/2 will not authenticate the user for any incoming
  401. connection, whether or not it is via DRDA.  With DCS authentication,
  402. DB2 for OS/2 will not authenticate the user if the connection is via
  403. DRDA, but will authenticate the user the same way as with server
  404. authentication if the connection is non-DRDA.  Because of this
  405. limitation, the use of CM/2 1.11, along with the DRDA AS is not
  406. recommended.
  407.  
  408. The recommended approach is to use IBM Communications Server for OS/2
  409. Warp V4 (CS/2) instead of CM/2 1.11.  With CS/2, you can use both
  410. client and server authentication.  In order to use server
  411. authentication, you will need to do the following before issuing
  412. db2start:
  413.  
  414. 1.  Update the database manager configuration SPM_NAME value with the
  415.     local LU for the DRDA AS.
  416.  
  417. 2.  Modify the definition of the local LU which corresponds to the
  418.     database manager configuration SPM_NAME value by editing the CS/2
  419.     NDF file in the \CMLIB directory by adding the line
  420.  
  421.            EXTERNAL_SUPPORT(SYNCPT_PROVIDER,REMOTE_TP_PROVIDER)
  422.  
  423.     before the line
  424.  
  425.            NAU_ADDRESS(INDEPENDENT_LU);
  426.  
  427. The steps above are in addition to the regular setup required for the
  428. DRDA AS as documented in the DB2 for OS/2 Installation and Operation
  429. Guide.
  430.  
  431. NOTE:  Special Considerations for Using Client Authentication:
  432.  
  433. If the DRDA AR clients are coming from a secure system and you do not
  434. want to send the password to the DRDA AS to have it authenticated
  435. there, you could set up the DRDA AR and AS to use APPC Security=SAME
  436. connections using client authentication.  If you do this you should
  437. also enforce the use of APPC LU_LU Verification between the LU at the
  438. AR and the LU at the AS to ensure the AR is coming from where it
  439. claims it is from.  If Hopping is to be used from the DRDA AS system
  440. to another remote DB2 database, then the second system must be set up
  441. with client authentication also because no password will be available.
  442.  
  443.  
  444. 4.5  Replacement for SQLQMF Utility
  445.  
  446. The function of the SQLQMF utility has been replaced by the DDCS
  447. Import/Export functions.  The advantages are:
  448.  
  449. o   no need for QMF on the host
  450. o   no need to logon to the host (no TSO id required)
  451. o   supports AS/400 as well as SQL/DS and DB2/MVS
  452. o   good performance achieved by using compound SQL
  453. o   supports several file formats, in addition to ASCII
  454. o   can be run from a client machine with no SNA connectivity
  455.  
  456. See the DDCS User's Guide and the DB2 Command Reference for more
  457. information on using these commands.
  458.  
  459.  
  460. 4.6  Import/Load APIs
  461.  
  462. The following are changes to the import API:
  463.  
  464. o   Additional information is stored in IXF files to be used by import
  465.     with the CREATE option.  If you specify a select statement of the
  466.     format "SELECT * FROM tablename" on export, the following
  467.     information will also be retrieved and stored in the IXF file:
  468.  
  469.     -   the default value for each column
  470.     -   the original lob length even if the data is being truncated or
  471.         the lobs are stored in individual files as specified with the
  472.         LOBSINFILE option
  473.     -   the user defined type.
  474.  
  475.     When the IXF file is used to create a new table, this new
  476.     information will be used.
  477.  
  478. o   You can specify a target tablespace when issuing a import with the
  479.     CREATE option.  New syntax allowed for the tcolstrg is:
  480.  
  481.       CREATE INTO tablename [(column_list)]
  482.                [IN tablespace [INDEX IN indextblespace] [LONG IN longtblspace]]
  483.  
  484.     Note that to specify a tablespace for the indexes or long data,
  485.     you must specify a tablespace for the table.
  486.  
  487. o   If you explicitly do not specify a source column for one of the
  488.     target table columns, one of the following things will happen:
  489.  
  490.     -   if the column is defaultable, the default will be imported
  491.     -   if the column is nullable and not defaultable, a NULL will be
  492.         imported
  493.     -   if the column is not nullable and not defaultable, an error
  494.         will be returned and the utility will stop processing.
  495.  
  496.     Previously, if a source column was not provided, and if the column
  497.     was nullable, a NULL would have been imported, but if the column
  498.     was not nullable, an error would have been returned.  If the old
  499.     behavior is desired, specify the NODEFAULTS option in the
  500.     filetype-modifier.
  501.  
  502. The following is a change to both the import and load APIs:
  503.  
  504. o   A source column may be designated for a target table column but
  505.     may be omitted for any given row instance.  Examples of missing
  506.     data are:
  507.  
  508.     -   for DEL files, ",," is specified for the column
  509.     -   for DEL/ASC/WSF files, a row that does not have enough columns
  510.         or is not long enough for the original specification.
  511.  
  512.     In these cases, import/load was used to import/load a NULL if the
  513.     column was nullable, and reject the row if the column is not
  514.     nullable.  If the USEDEFAULTS option is specified in the
  515.     filetype-modifier, the following will be the new behavior:
  516.  
  517.     -   if the column is defaultable, the default will be
  518.         imported/loaded
  519.     -   if the column is nullable and not defaultable, a NULL will be
  520.         imported/loaded
  521.     -   if the column is not nullable and not defaultable, the row
  522.         will be rejected.
  523.  
  524.  
  525. 4.7  sqlestrd() API
  526.  
  527. Applications which use the sqlestrd() API to connect to databases must
  528. change this to EXEC SQL CONNECT syntax if the application needs to
  529. take advantage of using version 2 distributed unit of work features
  530. specified by precompiler options.
  531.  
  532.  
  533. 5.  Environment Considerations
  534.  
  535. 5.1  TCPBEUI Users
  536.  
  537. For multiple clients running TCPBEUI, where NETBIOS runs over TCP/IP,
  538. APAR IC10549 fix is required for LAN Transport.
  539.  
  540.  
  541. 5.2  HPFS/HPFS386 users
  542.  
  543. If you are storing database files on HPFS/HPFS386 drives, the
  544. following fix packs are required:
  545.  
  546. HPFS - Fix Pack 12 (or later) for OS/2 Warp
  547.      - Fix Pack 103 (or later) for OS/2 2.11
  548.  
  549. HPFS386 - CSD IP08178 (or later) for LAN Server 4.0
  550.           CSD IP07088 (or later) for LAN Server 3.0
  551.  
  552.  
  553. 5.3  Back-Level Support
  554.  
  555. 1.  SQLBIND.EXE and SQLPREP.EXE are provided to bind and precompile
  556.     Version 1 programs only.  New PREP and BIND options introduced in
  557.     Version 2 are not supported.
  558.  
  559. 2.  DB2 for OS/2 provides full binary compatibility for existing
  560.     applications written for previous versions of DB2 Common Server
  561.     programming interfaces.  This means that you can upgrade your
  562.     database server software to Version 2.1.1 and existing
  563.     applications will continue to function.
  564.  
  565. 3.  You can also continue to maintain source code for existing
  566.     applications without rewriting them to use newer APIs right away.
  567.     \sqllib\include subdirectory contains header and library files
  568.     (db2api.lib and sql_dyn.lib) that should be used to maintain
  569.     applications that use back-level APIs.
  570.  
  571.     NOTE:  You will need to use previous versions of DB2 programming
  572.     documentation as these older APIs are not described in the V2.1.1
  573.     programming documentation.
  574.  
  575.     It is highly recommended that applications be converted to use new
  576.     APIs when possible as these older APIs will not be supported in
  577.     future releases.
  578.  
  579. 4.  If you have applications that use Operational Status APIs such as
  580.     sqlestat, sqlefree, sqlenext, and sqleuser, modify them to use the
  581.     corresponding new Database Monitor APIs.
  582.  
  583. 5.  The Client Setup utility displays the Version 1 APPC/APPN node
  584.     directories with two asterisks around the protocol name (*APPC* OR
  585.     *APPN*). This is to indicate that the setting for that particular
  586.     node cannot be changed by the user. You need to uncatalog the
  587.     directory and re-catalog it again.
  588.  
  589.  
  590. 5.4  DBA Utilities
  591.  
  592.  
  593. 5.4.1  Userid and Password Validation on an AIX/UNIX Server
  594.  
  595. When an OS/2 client is communicating with an AIX server, a User
  596. Profile Management (UPM) node logon window may be displayed to provide
  597. a userid and password.  This password is folded to uppercase by UPM
  598. when it is sent to the server to be validated.  Therefore the password
  599. on AIX must be defined in uppercase for the validation to take place,
  600. otherwise the logon will fail.
  601.  
  602. LAN Server (UPM) APAR IC11643 fix is required to support mixed cases
  603. in UPM.
  604.  
  605.  
  606. 5.5  Backup/Restore to User Exit
  607.  
  608. Under certain conditions, Restore can be much slower than expected.
  609. The conditions are:
  610.  
  611. o   The Restore is using an 8mm tape drive for input.
  612. o   The database being restored contains multiple containers.
  613.  
  614. The first phase of Restore processing is to find the header file for
  615. each container.  Due to limitations in the Sytos device driver for 8mm
  616. tape, a scan of the entire set of input tapes is conducted for each
  617. container.  After these slow scans are complete, the actual restore of
  618. data is started.
  619.  
  620. For performance reasons the OS/2 userexit interface has been changed
  621. for the task of restoring a database. Beginning with V2.11, the
  622. database manager will directly call routines found in DB2USRXT rather
  623. than DB2UEXIT.  To maintain compatibility with userexits written to
  624. the original "DB2UEXIT" interface a REXX script "DB2USRXT.CMD" is
  625. provided in the \SQLLIB\BIN directory to map the new interface back to
  626. the original.
  627.  
  628. The original interface was designed to only restore one container at a
  629. time.  This proved to be inefficient and for some tape devices
  630. required that many passes be made on the tape. With V2.11, the restore
  631. portion of the userexit will be called twice. The userexit will be
  632. called once with Mode set to 1 to retrieve the "Media Headers" which
  633. describe the layout of the database to be restored. With this
  634. information the userexit will be called with Mode set to 2, and
  635. provided a list of all files to be restored. By providing all files to
  636. be restored in one call, devices can more efficiently retrieve the
  637. files.
  638.  
  639. Application writers familiar with the original "DB2UEXIT" interface
  640. will find the new interface very similar. The change is to parameter 4
  641. passed to RESTORE routine. Previously parameter 4 was a subdirectory
  642. which when combined with the drive supplied with parameter 1 specified
  643. where the retrieve files were to be placed. Now parameter 4 represents
  644. a file provided by the database manager at restore time, which user
  645. written applications use to determine where files should be restored
  646. to.
  647.  
  648. As an example:
  649.  
  650.   /*  DB2USRXT RESTORE C: BRNSDDB1 C:\SQLDBDIR\BRNSDDB1.RST C:\SQLDBDIR\BRNSDDB1.NEW 1 */
  651.     DB_DRIVE      = strip(PARM1)             /* ex.  C:                       */
  652.     DB_NAME       = strip(PARM2)             /* ex.  BRNSDDB1                 */
  653.     RESP_FILE     = strip(PARM3)             /* ex.  C:\SQLDBDIR\BRNSDDB1.RST */
  654.     REDIRECT_FILE = strip(PARM4)             /* ex.  C:\SQLDBDIR\BRNSDDB1.NEW */
  655.     MODE          = strip(PARM5)             /* ex.  1                        */
  656.  
  657.   C:\SQLDBDIR\BRNSDDB1.RST
  658.     Is a list of files to be restored (can include wildcards).
  659.      ex.
  660.        D:\SQL00001\*.*
  661.        D:\SQL00001\SQLT0000.0\*.*
  662.        D:\SQL00001\SQLT0001.0\*.*
  663.        D:\SQL00001\SQLT0002.0\*.*
  664.  
  665.   C:\SQLDBDIR\BRNSDDB1.NEW
  666.     Is a list of path pairs, with the first path denoting where the original files were
  667.   backed up from, second path were the files need to be restored to.
  668.      ex.
  669.        D:\SQL00001\*.*
  670.        F:\SQL00003\*.*
  671.        D:\SQL00001\SQLT0000.0\*.*
  672.        F:\SQL00003\SQLT0000.0\*.*
  673.        D:\SQL00001\SQLT0001.0\*.*
  674.        F:\SQL00003\SQLT0001.0\*.*
  675.        D:\SQL00001\SQLT0002.0\*.*
  676.        F:\SQL00003\SQLT0002.0\*.*
  677.  
  678. Performance example:
  679.  
  680. The default database contains 3 tablespaces (SYSCATSPACE, TEMPSPACE1
  681. and USERSPACE1). If the database was 4 Gigabytes in size, spanned 2
  682. tapes, the tape device retrieve data at approximately 1 Gig./hour, and
  683. the software running the tape device required the user to scan all the
  684. files transferring those the user wanted. Version 2.10 would make 4
  685. calls to the userexit, (one for the "Media header", and then three
  686. separate calls to retrieve each tablespace). Total time would be 16
  687. hours (4 * 4 hours), and require 7 tape changes.
  688.  
  689. Batching the three separate calls into one saves 8 hours of tape
  690. reading and 4 tape changes.  Time saved increases as the number of
  691. containers increase.
  692.  
  693. NOTE:  If your database backup image spans across multiple tapes,
  694. Sytos Premium V2.1 is required if you use Sytos tape device.
  695.  
  696.  
  697. 5.6  Dealing with Container in Use Error Message -294
  698.  
  699. -294 sqlcodes can be returned from create database or create/alter
  700. tablespace operations.  Normally, this situation indicates a
  701. specification error on the OS resource name, since apparently the
  702. container is already in use by another tablespace.  Note that the text
  703. of the error message explanation indicates that SMS containers can be
  704. shared.  This is no longer true.  A container can be in use by only
  705. one tablespace at any time.
  706.  
  707. A system administrator or database administrator who finds that the
  708. database which had last used the container has been deleted, yet
  709. somehow the container's tag was not removed, can use the db2untag
  710. tool.  This tool will display a container tag's information so that
  711. the sysadm can check the "owning" database.  If the sysadm decides to
  712. release the container, the following steps should also be taken:
  713.  
  714. o   For SMS containers: Remove the directory and contents using the
  715.     usual OS file delete command.
  716.  
  717. o   For DMS containers: Either delete the file/device or let db2untag
  718.     remove the container tag.  db2untag will leave such a DMS
  719.     container otherwise unmodified.
  720.  
  721.  
  722. 6.  Programming Notes
  723.  
  724. 6.1  Sample Applications
  725.  
  726. The following files contain information about the sample applications
  727. which are used in the DB2 publications.  The sample applications will
  728. only be useful to you if you have the DB2 Software Developer's Kit or
  729. DB2 Single-User package for your platform installed.
  730.  
  731.     samples\c\README
  732.  
  733.         README file for the c sample applications.
  734.  
  735.     samples\cobol\README
  736.  
  737.         README file for the COBOL sample applications.
  738.  
  739.     samples\fortran\README
  740.  
  741.         README file for the FORTRAN sample applications.
  742.  
  743.     samples\rexx\README
  744.  
  745.         README file for the REXX sample applications.
  746.  
  747.     samples\cli\README
  748.  
  749.         README file for the Call Level Interface sample applications.
  750.  
  751.     samples\cli\INTCLI.DOC
  752.  
  753.         Documentation for the Interactive Call Level Interface applet.
  754.  
  755.     samples\clp\README
  756.  
  757.         README file for the Command Line Processor examples.
  758.  
  759.  
  760. 6.2  Considerations when Using Micro Focus COBOL
  761.  
  762. DB2 V2.1.1 has been modified to correctly handle abnormal termination
  763. of Micro Focus COBOL applications compiled with the DB2 PREP command.
  764. This ensures that partial transactions are rolled back in the event of
  765. an error.
  766.  
  767. It is recommended that any existing DB2 applications precompiled with
  768. DB2 PREP and compiled with Micro Focus COBOL be re-precompiled with
  769. the updated DB2 V2.1.1 precompiler, and then recompiled with Micro
  770. Focus COBOL.  If applications built with Micro Focus COBOL and the IBM
  771. precompiler from previous releases or versions are not rebuilt, there
  772. is a danger of database corruption if abnormal termination occurs.
  773.  
  774. This support requires Micro Focus COBOL V3.2.46 plus the following
  775. patch, available on CompuServe:
  776.  
  777. Forum:  MICROFOCUS
  778. Library: ICD Product Updates (Library 4)
  779. Filename:  DB2211UP.ZIP
  780.  
  781. This patch may also be available directly from Micro Focus.  Obtain
  782. the patch and apply it to your 3.2.46 compiler.
  783.  
  784. This patch will be integrated with the Micro Focus 16-bit COBOL
  785. product following V3.2.46, so it will not be required once subsequent
  786. versions of the compiler are available.
  787.  
  788. Once the necessary version of the Micro Focus compiler is available,
  789. use commands like the following to build your applications:
  790.  
  791. cobol app.cbl /notrunc;
  792. link /st:32000 /pm:vio /noi
  793. app.obj,,,coblib+os2286+sqldyn16+db2gmf16;
  794.  
  795. and for stored procedures, the link command should be like the
  796. following:
  797.  
  798. link /st:32000 /pm:vio /noi /nod app.obj,app.dll,,
  799.    1cobol+os2286+sqldyn16+db2gmf16,app.def;
  800.  
  801.  
  802. 6.3  BINARY/COMP-4 COBOL Data Types in the DB2 Precompiler
  803.  
  804. The DB2 Precompiler supports use of BINARY, COMP-4 and COMP COBOL data
  805. types wherever integer host variables and indicators are permitted, as
  806. long as the target COBOL compiler views (or can be made to view)
  807. BINARY/COMP-4/COMP as equivalent to COMP-5.  In the DB2 Application
  808. Programming Guide, such host variables and indicators are shown with
  809. type COMP-5.  Target compilers supported by DB2 which treat
  810. BINARY/COMP-4/COMP and COMP-5 as equivalent are:
  811.  
  812.   IBM COBOL Set for AIX
  813.   Micro Focus COBOL for AIX
  814.   IBM COBOL Visual Set for OS/2 (with the -qbinary(native)
  815.     option set)
  816.  
  817.  
  818. 6.4  Using REDEFINES in COBOL Group Data Items
  819.  
  820. The REDEFINES clause may be used when declaring host variables with
  821. the DB2 COBOL precompiler.  If a member of a group data item is
  822. declared with the REDEFINES clause, and that group data item is
  823. referred to as a whole in an SQL statement, any subordinate items
  824. containing the REDEFINES clause will not be expanded.  For example:
  825.  
  826.   01 foo.
  827.       10 a pic s9(4) comp-5.
  828.       10 a1 redefines a pic x(2).
  829.       10 b pic x(10).
  830.  
  831. Referring to foo in an SQL statement like so:
  832.  
  833.       ... INTO :foo ...
  834.  
  835. is equivalent to
  836.  
  837.       ... INTO :foo.a, :foo.b ...
  838.  
  839. That is, the subordinate item a1 with the REDEFINES is not
  840. automatically expanded out in such situations.  A subordinate with a
  841. REDEFINES may be referred to in an SQL statement explicitly, as in
  842.  
  843.       ... INTO :foo.a1 ...
  844. or
  845.       ... INTO :a1 ...
  846.  
  847. if a1 is unambiguous.
  848.  
  849.  
  850. 6.5  VisualAge C Set ++ and DB2 for OS/2
  851.  
  852. VisualAge* C Set ++* Version 3 provides a database application
  853. development assist tool called the Data Access Builder.
  854.  
  855. VisualAge C ++ Version 3 corrective service (CSD) contains Data Access
  856. Builder enhancements to access DB2 for OS/2 Version 2.1 databases.
  857. This service is included in a CTV30x.ZIP file (where x is a numeric
  858. identifier of the particular CSD).  To find out if the enhancement is
  859. in a particular CTV30x.ZIP file, look in the CTV30x.LST file that can
  860. be found in the same place as the CTV30x.ZIP file.
  861.  
  862. These files will be available in the following places:
  863.  
  864. COMPUSERVE**
  865.  
  866. o   GO OS2DF1
  867. o   Look in library 4
  868.  
  869. INTERNET
  870.  
  871. o   Use anonymous ftp to get to the software.watson.ibm.com site.
  872. o   The files will be in the pub/os2/cset++ directory.
  873.  
  874. THE DEVELOPER'S CONNECTION FOR OS/2 CD-ROM (DEVCON)
  875.  
  876. The latest fixes for VisualAge C++ Version 3 will also be put on
  877. DEVCONs that ship after the CSDs are available.  The actual volume
  878. these fixes will be on has not been determined at this time.
  879.  
  880. For building your applications with the VisualAge C++ linker, use the
  881. following command in place of the link386 command as documented for
  882. the bldcspp2 command file on page 32 of the DB2 for OS/2 "Building
  883. Your Applications" book (Part #20H4787):
  884.  
  885.   link /NOFREE /NOI /DEBUG /ST:32000 %1.obj,%1.dll,,db2api,%1.def;
  886.  
  887. The sample command files for building your applications provided in
  888. the ".../sqllib/samples/c/..." directory contain this command, but it
  889. is commented out.  Replace the link386 command with this link command
  890. to use the VisualAge C++ linker instead of the OS/2 Linear Executable
  891. Linker.
  892.  
  893.  
  894. 6.6  Precompiler Customization
  895.  
  896. If you are writing your own precompiler interface to DB2 Precompiler
  897. Services, you should be aware that the program_id parameter to
  898. sqlainit() must indicate static storage.  This storage is referred to
  899. by the Precompiler Services functions sqlaalhv() and sqlacmpl() during
  900. precompilation.  The program_id storage must remain accessible and
  901. undisturbed until Precompiler Services has been terminated with a call
  902. to sqlafini().
  903.  
  904.  
  905. 6.7  Considerations When Using REXX Stored Procedures
  906.  
  907. ON THE CLIENT SIDE (WHEN CLIENT IS WRITTEN IN REXX):When using host
  908. variables in the CALL statement, each host variable must be
  909. initialized to a value compatible in type with the data that is
  910. returned into it from the server procedure (if any). It should be done
  911. even if the corresponding indicator is negative.  When using
  912. descriptors, SQLDATA must be initialized and contain data compatible
  913. in type with the data that is returned from the server procedure (if
  914. any). It should be done even if the SQLIND field contains a negative
  915. value.  (See also OUTCLI.CMD example in the Application Programming
  916. Guide for common servers).
  917.  
  918. ON THE SERVER SIDE:
  919.  
  920. Make sure that all the SQLDATA (and if it is a nullable type, SQLIND)
  921. fields of the predefined output sqlda SQLRODA are initialized.  For
  922. example, if SQLRODA.SQLD is 2, the following fields must contain some
  923. data (even if the corresponding indicators are negative and the data
  924. is not being passed back to the client):
  925.  
  926. SQLRODA.1.SQLDATA
  927. SQLRODA.2.SQLDATA
  928.  
  929.  
  930. 7.  Changes to the DB2 Documentation
  931.  
  932. 7.1  For All Refreshed Books - "Changes for This Release" Section
  933.  
  934. The following changes apply to the "Changes for This Release" sections
  935. of the refreshed books.
  936.  
  937. o   In the DB2 CLI and ODBC Enhancements section, under 'New ODBC
  938.     Scalar Functions', the new function which calculates the number of
  939.     seconds since midnight is incorrectly named as MIDNIGHT_SECONDS.
  940.     This is the correct name for the SYSFUN function, but in ODBC this
  941.     name is mapped to SECONDS_SINCE_MIDNIGHT instead.
  942. o   In the section entitled "DB2 CLI and ODBC Enhancements", under
  943.     "New ODBC Scalar Functions", JULIAN_DAY(day_expr) should be
  944.     JULIAN_DAY(date_expr).
  945. o   In the section entitled "DRDA Two-Phase Commit", the following
  946.     sentence should be clarified as follows, "See the DDCS
  947.     Installation and Configuration Guide for your platform for
  948.     instructions on how to install the SPM component and
  949.     considerations for migrating from Encina Monitor PPC gateway."
  950. o   In the section entitled "Graphical Tools", the last sentence in
  951.     the section is augmented to read,
  952.  
  953.     For more information on the keywords for the DB2 CLI
  954.     initialization file (db2cli.ini), see the "Call Level Interface
  955.     Guide and Reference" or the appendix on "Configuring the Client
  956.     Workstation" in the "Installing and Using DB2 Clients for Windows"
  957.     manual.
  958.  
  959.     Also, the DB2 Performance Monitor is not available from a Windows
  960.     client.
  961.  
  962.  
  963. 7.2  Administration Guide
  964.  
  965. In chapter 5, "Utilities for Moving Data", there is a section "Using
  966. the EXPORT Utility" which requires a change to the first note.  In the
  967. note, the extensions are listed as being from 000 to 999.  This is not
  968. correct:  the first file extension begins with 001.
  969.  
  970. In chapter 6, Recovering a Database, there is a section
  971. "Considerations for Managing Log Files" which requires two changes:
  972.  
  973. o   The second bullet should have the following change made: The
  974.     sentence in the middle of the bullet beginning "At this time..."
  975.     should now read "At this time, if there are no more logs available
  976.     and you are rolling forward the entire database, you can use the
  977.     ROLLFORWARD command to stop processing."
  978. o   The sixth bullet should have the following changes made: The
  979.     sentence at the beginning of the third paragraph beginning "If you
  980.     terminate..." should now read "If you are rolling forward the
  981.     entire database and you terminate the roll-forward recovery (by
  982.     specifying the STOP option on the ROLLFORWARD command) and the log
  983.     containing the completion of a transaction has not been applied to
  984.     the database, then the incomplete transaction will be rolled back
  985.     to ensure that the database is left in a consistent state."
  986.  
  987. In chapter 6, "Recovering a Database", it is explained that
  988. tablespaces can be restored online.  However, restoring the tablespace
  989. containing the system catalogs requires an exclusive connection, so it
  990. must be restored offline.
  991.  
  992.  
  993. 7.3  API Reference
  994.  
  995.  
  996. 7.3.1  Backup and Restore API's for Vendor Products Appendix DB2-INFO
  997. Data Structure
  998.  
  999. The following ADSM information has been added to the DB2-INFO data
  1000. structure.
  1001.  
  1002.   Field Name    Data Type    Description
  1003.  
  1004.   nodename      char         The current value of ADSM_NODENAME from
  1005.                              the database manager configuration
  1006.                              parameters.
  1007.   password      char         The current value of ADSM_PASSWORD from
  1008.                              the database manager configuration
  1009.                              parameters.
  1010.   owner         char         The current value of ADSM_OWNER from
  1011.                              the database manager configuration
  1012.                              parameters.
  1013.  
  1014. Nodename, password, and owner can be utilized to enable the restore of
  1015. a backup taken on one node, to a different node (for example, during
  1016. disaster recovery).  By setting these values in the database manager
  1017. configuration, they will be passed to the vendor device support
  1018. routines on the sqluvint call. Then they can be used in the retrieval
  1019. of the correct backup.  Owner can be used to specify the name (id) of
  1020. the individual who performed the backup.
  1021.  
  1022. These values will only be passed in the DB2_INFO structure on a
  1023. sqluvint call for a restore.  They will be set to null on a backup.
  1024.  
  1025. Added to C structure
  1026.  
  1027.      char     *nodename    /* name of node at which the backup          */
  1028.                            /* was generated                             */
  1029.      char     *password    /* password for the node at which the backup */
  1030.                            /* was generated                             */
  1031.      char     *owner       /* backup originator id                      */
  1032.  
  1033.  
  1034. 7.3.2  QUIESCE TABLESPACES FOR TABLE
  1035.  
  1036. The following is a correction to the Usage notes:
  1037.  
  1038. When a quiesce request is received, the transaction requests a quiesce
  1039. mode of SHARE, UPDATE, or EXCLUSIVE for the tablespaces of the table.
  1040. The quiesce mode is granted only if there are no conflicting quiesce
  1041. modes held by other applications.
  1042.  
  1043. A quiescer can upgrade their quiesce mode of a tablespace from a less
  1044. restrictive mode to a more restrictive one (for example, from S to U
  1045. or X, or U to X).  Quiesce modes can not be downgraded.  If a quiescer
  1046. requests a mode lower than one that is already held, the original
  1047. quiesce mode is maintained.
  1048.  
  1049. The quiesce mode, authorization ID, and the database agent ID of the
  1050. quiescer is recorded in the tablespace table so that the quiesce is
  1051. persistent.  When the transaction commits or rolls back, the
  1052. tablespaces for the table remain quiesced until the quiesce is
  1053. explicitly reset.
  1054.  
  1055. No tables can be changed while any tablespace for the table is
  1056. quiesced in SHARE or UPDATE mode.  An application that has the
  1057. tablespaces for a table quiesced in EXCLUSIVE mode has full
  1058. (exclusive) access to the table and the tablespaces.
  1059.  
  1060. There is a limit of five quiescers on a tablespace at any given time.
  1061. Since EXCLUSIVE is incompatible with any other mode, and UPDATE is
  1062. incompatible with another UPDATE, the five quiescer limit, if reached,
  1063. would consist of at least four SHARE modes and a maximum of one UPDATE
  1064. mode.
  1065.  
  1066. The tablename parameter in the QUIESCE TABLESPACES FOR TABLE command
  1067. should be described as follows:
  1068.  
  1069.     Specifies the unqualified table name.  The table cannot be a
  1070.     system catalog table.
  1071.  
  1072.     schema.tablename - Specifies the qualified table name.  If schema
  1073.     is not provided, the authorization ID used for the database
  1074.     connection will be used as the schema.  The table cannot be a
  1075.     system catalog table.
  1076.  
  1077.  
  1078. 7.4  Command Reference
  1079.  
  1080.  
  1081. 7.4.1  FORCE APPLICATION
  1082.  
  1083. The following corrects the parameter description for the FORCE
  1084. APPLICATION command:
  1085.  
  1086. The ALL parameter disconnects all users connected to any database
  1087. defined in the instance.
  1088.  
  1089.  
  1090. 7.4.2  ROLLFORWARD DATABASE
  1091.  
  1092. The ROLLFORWARD DATABASE command AND STOP, and the STOP parameters are
  1093. not required for table space roll-forward.
  1094.  
  1095.  
  1096. 7.4.3  EXPORT
  1097.  
  1098. The following corrects the parameter description for the EXPORT
  1099. command:
  1100.  
  1101. The MODIFIED BY parameter accepts LOBSINFILE for IXF filetypes.
  1102.  
  1103.  
  1104. 7.4.4  QUIESCE TABLESPACES FOR TABLE
  1105.  
  1106. The following is a correction to the Usage notes:
  1107.  
  1108. When a quiesce request is received, the transaction requests a quiesce
  1109. mode of SHARE, UPDATE, or EXCLUSIVE for the tablespaces of the table.
  1110. The quiesce mode is granted only if there are no conflicting quiesce
  1111. modes held by other applications.
  1112.  
  1113. A quiescer can upgrade their quiesce mode of a tablespace from a less
  1114. restrictive mode to a more restrictive one (for example, from S to U
  1115. or X, or U to X).  Quiesce modes can not be downgraded.  If a quiescer
  1116. requests a mode lower than one that is already held, the original
  1117. quiesce mode is maintained.
  1118.  
  1119. The quiesce mode, authorization ID, and the database agent ID of the
  1120. quiescer is recorded in the tablespace table so that the quiesce is
  1121. persistent.  When the transaction commits or rolls back, the
  1122. tablespaces for the table remain quiesced until the quiesce is
  1123. explicitly reset.
  1124.  
  1125. No tables can be changed while any tablespace for the table is
  1126. quiesced in SHARE or UPDATE mode.  An application that has the
  1127. tablespaces for a table quiesced in EXCLUSIVE mode has full
  1128. (exclusive) access to the table and the tablespaces.
  1129.  
  1130. There is a limit of five quiescers on a tablespace at any given time.
  1131. Since EXCLUSIVE is incompatible with any other mode, and UPDATE is
  1132. incompatible with another UPDATE, the five quiescer limit, if reached,
  1133. would consist of at least four SHARE modes and a maximum of one UPDATE
  1134. mode.
  1135.  
  1136. The tablename parameter in the QUIESCE TABLESPACES FOR TABLE command
  1137. should be described as follows:
  1138.  
  1139.     Specifies the unqualified table name.  The table cannot be a
  1140.     system catalog table.
  1141.  
  1142.     schema.tablename - Specifies the qualified table name.  If schema
  1143.     is not provided, the authorization ID used for the database
  1144.     connection will be used as the schema.  The table cannot be a
  1145.     system catalog table.
  1146.  
  1147.  
  1148. 7.4.5  RUNSTATS Enhancement
  1149.  
  1150. The new RUNSTATS enhancement allows the user to specify a specific
  1151. index for which the statistics should be collected as an alternative
  1152. to INDEXES ALL.  The following information will be added to the
  1153. Command Reference manual:
  1154.  
  1155. Wherever ---INDEXES ALL--- appears now in the syntax diagram it should
  1156. be replaced with:
  1157.  
  1158.       --------INDEXES ALL-----------
  1159.         |                        |
  1160.          -----INDEX index-name---
  1161.  
  1162. The following explains the new parameter:
  1163.  
  1164. AND INDEX INDEX-NAME Update statistics on both the table and its
  1165.           specified index "index-name", where index-name is a fully
  1166.           qualified name in the form:  schema.index-name.
  1167.  
  1168. FOR INDEX INDEX-NAME Update statistics for index index-name only. If
  1169.           statistics on the table have never been generated, the
  1170.           database manager calculates statistics on the table as well
  1171.           as on the index. The index-name is a fully qualified name in
  1172.           the form: schema.index-name.
  1173.  
  1174. This is an example of the new parameter: Collect distribution
  1175. statistics on index INDEX1 only:
  1176.  
  1177.   db2 runstats on table smith.table1 with distribution for index smith.index1
  1178.  
  1179.  
  1180. 7.5  Call Level Interface Guide and Reference
  1181.  
  1182.  
  1183. 7.5.1  SQLColAttributes - Get Column Attributes
  1184.  
  1185. In the "Function Arguments" section, the Data Type for the rgbDesc
  1186. argument is listed as 'SQLCHAR *'.  This is incorrect; the correct
  1187. type for the argument rgbDesc is 'SQLPOINTER'.
  1188.  
  1189.  
  1190. 7.5.2  New CLI/ODBC Configuration Keyword
  1191.  
  1192. See section 12.4, "New CLI/ODBC Configuration Keywords in db2cli.ini"
  1193. for the new CLI/ODBC configuration keywords that are not listed in the
  1194. CLI Guide and Reference.
  1195.  
  1196.  
  1197. 7.6  Database System Monitor Guide and Reference
  1198.  
  1199.  
  1200. 7.6.1  db_conn_time Data Element
  1201.  
  1202. The "first database connect timestamp" (db_conn_time) element is
  1203. incorrectly described as being part of the Buffer Pool monitor group.
  1204. This element is only part of the Buffer Pool monitor group for table
  1205. space snapshots.  For Database and Table snapshots, this data element
  1206. is part of the Basic monitor group.
  1207.  
  1208.  
  1209. 7.6.2  Buffer Pool Data Pages Written to Disk
  1210.  
  1211. In Chapter 5, "Database System Monitor Data Elements", in the sections
  1212. entitled "Buffer Pool Asynchronous Data Writes" and "Buffer Pool
  1213. Asynchronous Index Writes" which describe 'pool_async_data_writes' and
  1214. 'pool_async_index_writes', the following phrase:
  1215.  
  1216.     The number of times a buffer pool data page was physically written
  1217.     to disk, by an asynchronous page cleaner
  1218.  
  1219. should read as follows in order to indicate that the write could also
  1220. have been performed by a prefetcher:
  1221.  
  1222.     The number of times a buffer pool data page was physically written
  1223.     to disk, either by an asynchronous page cleaner or by a
  1224.     prefetcher, which may have had to write dirty pages to disk in
  1225.     order to make space for the pages to prefetch
  1226.  
  1227.  
  1228. 7.6.3  DBMON Element Formula
  1229.  
  1230. The formula associated with the Buffer Pool Victim Page Cleaners
  1231. Triggered (pool_drty_pg_steal_clns) data element is incorrect.  The
  1232. formula should be:
  1233.  
  1234.         buffer pool victim page cleaners triggered
  1235.       / ( buffer pool victim page cleaners triggered
  1236.         + buffer pool threshold cleaners triggered
  1237.         + buffer pool log space cleaners triggered)
  1238.  
  1239.  
  1240. 7.6.4  Buffer Pool Threshold Cleaners Triggered
  1241.  
  1242. If this value is set too low, pages might be written out too early,
  1243. requiring them to be read back in.  If set too high, then too many
  1244. pages may accumulate, requiring users to write out pages
  1245. synchronously.
  1246.  
  1247.  
  1248. 7.6.5  Event Start Time
  1249.  
  1250. The following sentence has been added to the description for the Event
  1251. Start Time:
  1252.  
  1253. This element, in the sqlm_evmon_start_event API structure indicates
  1254. the start of the event monitor.
  1255.  
  1256.  
  1257. 7.6.6  Package Cache Inserts/Package Cache Lookups
  1258.  
  1259. The formula in the Usage sections for calculating the package cache
  1260. hit ratio must be updated as follows:
  1261.  
  1262.      1 - ( Package Cache Inserts / Package Cache Lookups )
  1263.  
  1264. If the hit ratio is high (more than 0.8), the cache is performing
  1265. well.  A smaller ratio may indicate that the package cache should be
  1266. increased.
  1267.  
  1268.  
  1269. 7.6.7  Status of Database and Status of DB2 Instance
  1270.  
  1271. In the Usage section for Status of Database Instance, the following is
  1272. a correction:  "SQLM_DB2_ACTIVE is the only valid value for this
  1273. field."
  1274.  
  1275. In the Usage section for Status of Database, the following is a
  1276. correction:  "SQLM_DB_ACTIVE is the only valid value for this field."
  1277.  
  1278.  
  1279. 7.7  Planning Guide
  1280.  
  1281.  
  1282. 7.7.1  Segments Versus 4KB Pages
  1283.  
  1284. This section applies to the SQL Reference manual as well.
  1285.  
  1286. In the chapter entitled "Incompatibilities Between Releases", in the
  1287. "Configuration Parameters" section, under the heading "Segments Versus
  1288. 4KB Pages", the following statement exists:
  1289.  
  1290.     All configuration parameters in OS/2 that were expressed in
  1291.     segments in Version 1 are now expressed in 4KB pages.
  1292.  
  1293. The following text expands on the previous sentence:
  1294.  
  1295.     For an application which makes a call to a configuration API that
  1296.     involves one of the following tokens names, the points listed
  1297.     below apply:
  1298.  
  1299.       SQLF_DBTN_DBHEAP
  1300.       SQLF_DBTN_APPLHEAPSZ
  1301.       SQLF_DBTN_STMTHEAP
  1302.       SQLF_DBTN_SORTHEAP
  1303.  
  1304.     1.  If the application was compiled against Version 1, then if the
  1305.         binary is run against either Version 1 or Version 2, the value
  1306.         specified will be treated as being specified in segments.
  1307.  
  1308.     2.  If the application is re-compiled against Version 2, the
  1309.         values specified will be treated by the Version 2 product as
  1310.         being specified in 4K pages.
  1311.  
  1312.     3.  If, however, the token names were not coded in the
  1313.         application, and instead the actual Version 1 token values
  1314.         were coded (for example, instead of coding with the token name
  1315.         SQLF_DBTN_DBHEAP, the Version 1 token value of 8 is used),
  1316.         then if compiled against either Version 1 or Version 2, these
  1317.         parameters will be treated as being specified in segments.
  1318.         (The token values for these tokens have changed since Version
  1319.         1).
  1320.  
  1321. In Version 2, in addition to being specified now in 4K pages, the
  1322. database configuration parameter sortheap on OS/2 has also changed
  1323. from being specified as a two-byte integer to being specified as a
  1324. four-byte integer.  If an application written in Version 1 code using
  1325. the token SQLF_DBTN_SORTHEAP is recompiled against Version 2, it is
  1326. treated as a two-byte integer as in Version 1 (although the units will
  1327. change from segments to 4KB pages).  However, the full range of values
  1328. will not be accessible to a two-byte integer.  Therefore, it is
  1329. recommended that the Version 2 token SQLF_DBTN_SORT_HEAP be used, and
  1330. the application code changed to reflect that the API will treat the
  1331. token SQLF_DBTN_SORT_HEAP as indicating a four-byte integer, in order
  1332. to migrate the application code from Version 1 to Version 2,
  1333.  
  1334. NOTE:  In Version 2, all code using the Version 2 token names (see the
  1335. API Reference) will be treated the same on UNIX and OS/2 platforms
  1336. with respect to the data type and the units.  (The ranges however may
  1337. differ).
  1338.  
  1339.  
  1340. 7.7.2  BUFFPAGE and SORTHEAP
  1341.  
  1342. In the chapter entitled "Incompatibilities Between Releases", in the
  1343. "Configuration Parameters" section, under the heading "BUFFPAGE and
  1344. SORTHEAP", the following clarification should be added.  Also, please
  1345. note that the word "byte" should be "bit" in this section in the
  1346. Planning Guide.
  1347.  
  1348. Symptom:
  1349.  
  1350.     OS/2 - If an application was compiled against DB2 for OS/2 Version
  1351.     1 using the old tokens, the binary will run as expected against
  1352.     Version 2 as well.
  1353.  
  1354.     However, since the old tokens indicate that the parameter is to be
  1355.     treated as being specified as a 16 bit unsigned integer, the full
  1356.     Version 2 range of values for BUFFPAGE (up to 524288) will not be
  1357.     available.  Thus, if BUFFPAGE is updated (by a Version 2
  1358.     application or by a Version 2 CLP) to a value such as 100,000, and
  1359.     the Version 1 application is attempting to GET that value, it will
  1360.     not be able to reflect the true value.
  1361.  
  1362.     (Note that with the range in Version 2 for sortheap being 524288 4
  1363.     KB pages, and with SORTHEAP in DB2 for OS/2 Version 1 being
  1364.     specified in segments, this translates to a new range of up to
  1365.     32768 segments.  This value is in the range of an unsigned 16 bit
  1366.     integer, and hence the DB2 for OS/2 Version 1 binary should not
  1367.     have the same range restrictions for SORTHEAP as it does for
  1368.     BUFFPAGE.)
  1369.  
  1370. Response:
  1371.  
  1372.     For a Version 1 binary complied under DB2 for OS/2 Version 1, the
  1373.     values used for BUFFPAGE should be restricted to that which can be
  1374.     stored in an unsigned 16 bit integer.  For most situations this
  1375.     should be sufficient.
  1376.  
  1377.     When recompiling the application against Version 2 on any
  1378.     platform, use the new tokens for these parameters.
  1379.  
  1380.  
  1381. 7.8  Problem Determination Guide
  1382.  
  1383.  
  1384. 7.8.1  First Failure Data Capture
  1385.  
  1386. In Chapter 2, "Logging and Tracing", in the section entitled
  1387. "Configuration Parameters" under "First Failure Data Capture", the
  1388. fourth bullet currently reads:
  1389.  
  1390.   DB2 "UPDATE DATABASE MANAGER CONFIGURATION USING /tmp/errors"
  1391.  
  1392. It is not correct.  It should read as follows:
  1393.  
  1394.   DB2 "UPDATE DATABASE MANAGER CONFIGURATION USING DIAGPATH X: \tmp\errors"
  1395.  
  1396.  
  1397. 7.9  Configuration Parameters
  1398.  
  1399.  
  1400. 7.9.1  DIR_CACHE
  1401.  
  1402. The DDCS User's Guide incorrectly refers to the DIR_CACHE
  1403. configuration parameter as DIRCACHE.
  1404.  
  1405. Please refer to the directory cache documentation in the Installing
  1406. and Using OS/2 Clients manual,  Appendix D, "Configuring the Client
  1407. Workstation", before attempting to catalog databases.
  1408.  
  1409.  
  1410. 7.9.2  MAXAPPLS
  1411.  
  1412. The maximum value of MAXAPPLS is 5000 on UNIX** systems and 1500 on
  1413. OS/2 systems.  The prior value was 1000.  The following manuals
  1414. incorrectly show the prior maximum value of 1000:
  1415.  
  1416. o   DB2 for OS/2 Planning Guide
  1417. o   DB2 for AIX Planning Guide
  1418.  
  1419.  
  1420. 7.9.3  TP_MON_NAME
  1421.  
  1422. The current DB2 documentation for this parameter applies to UNIX
  1423. environments only.  For OS/2 environments, this parameter should
  1424. contain the path and name of the DLL in an external transaction
  1425. manager product containing functions ax_reg and ax_unreg if an XA
  1426. Distributed Transaction Processing environment is being used.
  1427.  
  1428. The following manuals described this configuration parameter
  1429. incorrectly:
  1430.  
  1431. o   Installing and Using DB2 Clients for Windows
  1432. o   Planning Guide
  1433.  
  1434.  
  1435. 7.9.4  REC_HIS_RETENTN
  1436.  
  1437. The Planning Guide (Appendix C) and Installation and Operation Guides
  1438. (Appendix D) indicate that the maximum value for the database
  1439. configuration parameter rec_his_retentn is 32767.  This is incorrect.
  1440. The correct value is 30000.
  1441.  
  1442.  
  1443. 7.9.5  Configuration Parameters (YES/NO and ON/OFF Values)
  1444.  
  1445. A number of database configuration parameters (including logretain and
  1446. userexit) are described as having acceptable values of either
  1447. "Yes"/"No" or "On"/"Off" in the Online Help, and Planning Guide.  In
  1448. some cases, these do not correspond to what the Command Line Processor
  1449. (CLP) displays.
  1450.  
  1451. For example, the Planning Guide indicates that the acceptable value
  1452. for the database configuration parameter autorestart is either Yes or
  1453. No, whereas CLP displays it as being either ON or OFF.  In this
  1454. context "Yes" is to be considered synonymous with "On", and "No" with
  1455. "Off".
  1456.  
  1457.  
  1458. 7.9.6  DFT_QUERYOPT
  1459.  
  1460. CONFIGURATION TYPE  Database
  1461.  
  1462. PARAMETER TYPE      Configurable
  1463.  
  1464. DEFAULT [RANGE]     5 [ 0-9 ]
  1465.  
  1466. UNIT OF MEASUREMENT Query optimization class (see below)
  1467.  
  1468. RELATED PARAMETERS  None
  1469.  
  1470. The query optimization class is used to direct the optimizer to use
  1471. different degrees of optimization in compiling SQL queries.
  1472. DFT_QUERYOPT has been added as a database configuration parameter to
  1473. provide additional flexibility in setting the default query
  1474. optimization class used when neither the SET CURRENT QUERY
  1475. OPTIMIZATION statement nor the QUERYOPT bind option are used
  1476. explicitly.
  1477.  
  1478. The query optimization classes currently defined are:
  1479.  
  1480. 0         minimal query optimization
  1481.  
  1482. 1         roughly comparable to DB2 Version 1
  1483.  
  1484. 3         moderate query optimization
  1485.  
  1486. 5         significant query optimization with heuristics to limit the
  1487.           effort expended on selecting an access plan.  This is the
  1488.           default.
  1489.  
  1490. 7         significant query optimization
  1491.  
  1492. 9         maximal query optimization
  1493.  
  1494. For additional information and guidance for selecting a suitable query
  1495. optimization class see the Administration Guide.
  1496.  
  1497. The API reference describes how a program can retrieve and modify
  1498. database configuration parameters.  Table 39 provides a list
  1499. describing each parameter.  The additional information for the default
  1500. query optimization class is:
  1501.  
  1502. PARAMETER NAME      dft_queryopt
  1503.  
  1504. TOKEN               SQLF_DBTN_DFT_QUERYOPT
  1505.  
  1506. TOKEN VALUE         57
  1507.  
  1508. DATA TYPE           SINT32
  1509.  
  1510. The Database Director does not support the update or the display of
  1511. this parameter.
  1512.  
  1513.  
  1514. 7.10  Building Your Applications
  1515.  
  1516.  
  1517. 7.10.1  Building Your Embedded SQL Applications
  1518.  
  1519. In this chapter, some build commands files use the backslash (\)
  1520. character for continuation of the command (for example, the "bldibmcb"
  1521. command file on page 35).  This is incorrect and should be ignored
  1522. throughout.
  1523.  
  1524.  
  1525. 7.10.2  Building FORTRAN Stored Procedures
  1526.  
  1527. In the "Building FORTRAN Stored Procedures" section on page 46, you
  1528. require the following statement in your stored procedure:
  1529.  
  1530.   c$pragma aux (_syscall) <sp_nm> parm ( data_reference, data_reference, \
  1531.   c                                      data_reference, data_reference )
  1532.  
  1533. In addition, the compile statement for the "bldforsr" command file
  1534. should be:
  1535.  
  1536.   wfc386 /noref %1.for
  1537.  
  1538. and the link statement should be:
  1539.  
  1540.   wlink sys os2v2 dll export %1 file %1.obj library db2api.lib library
  1541.   os2386.lib option stack=32000
  1542.  
  1543. The build scripts and makefile in directory "...\sqllib\samples\
  1544. fortran\..." have been updated accordingly.
  1545.  
  1546.  
  1547. 7.10.3  Definition Files for UDFs and Stored Procedures
  1548.  
  1549. The example definition file as documented in the "Building Your
  1550. Applications book, on page 28, should be:
  1551.  
  1552.   LIBRARY UDF INITINSTANCE TERMINSTANCE
  1553.   DESCRIPTION 'Library for DB2 User Defined Functions'
  1554.   PROTMODE
  1555.   DATA
  1556.       MULTIPLE
  1557.       NONSHARED
  1558.   CODE
  1559.       LOADONCALL
  1560.       SHARED
  1561.   EXPORTS
  1562.       INCREASE      = increase     @1
  1563.       RAISE         = raise        @2
  1564.       WORDCOUNT     = wordcount    @3
  1565.       FINDVWL       = findvwl      @4
  1566.       CTR           = ctr          @5
  1567.       ILOB          = ilob         @6
  1568.       LENI          = leni         @7
  1569.       PROMOTE       = promote      @8
  1570.  
  1571. The example definition as originally documented:
  1572.  
  1573. o   May fail in a re-entrant environment
  1574. o   May not free up memory allocated by OS/2 and/or C-RUNTIME during
  1575.     loading or unloading the DLL.
  1576.  
  1577. The "DATA MULTIPLE NONSHARE" addresses the first problem.  The
  1578. "INITINSTANCE" and "TERMINSTANCE" addresses the second.  All the
  1579. sample ".def" files for stored procedures and UDFs have been updated
  1580. accordingly in directory "...\sqllib\samples..." for C and COBOL.
  1581.  
  1582.  
  1583. 7.10.4  C++ Type Decoration Consideration
  1584.  
  1585. When writing a stored procedure of a UDF using C++, you may want to
  1586. consider declaring the procedure of UDF as:
  1587.  
  1588.   extern "C" ...procedure or function declaration...
  1589.  
  1590. The extern "C" prevents type decoration or mangling of the function
  1591. name by the C++ compiler.  Without this declaration, you have to
  1592. include all the type decoration for the function name when you call
  1593. the stored procedure, or issue the CREATE FUNCTION statement.
  1594.  
  1595.  
  1596. 7.10.5  IBM COBOL Build Scripts
  1597.  
  1598. In the section "IBM COBOL VisualSet for OS/2" beginning on page 35,
  1599. observe the following changes:
  1600.  
  1601. o   All references to the "IBM COBOL VisualSet for OS/2" compiler,
  1602.     should be "IBM VisualAge for COBOL for OS/2" in this section.
  1603.  
  1604. o   The link step, as documented for the "bldibmcb" and "bldicobs"
  1605.     command files now utilizes the "IBM Linker for OS/2" linker.  For
  1606.     bldibmcb.cmd, the link step should be:
  1607.  
  1608.            ilink %1.obj checkerr.obj db2api.lib /ST:32000 /PM:VIO /NOI /DEBUG
  1609.  
  1610.     For bldicobs.cmd, (for building stored procedures) the link step
  1611.     should be:
  1612.  
  1613.             ilink %1.obj checkerr.obj %1.def db2api.lib /ST:32000 /PM:VIO /NOI /DEBUG
  1614.  
  1615.     Both of these build command files have been updated in the
  1616.     "...\sqllib\samples\cobol\..." directory.
  1617.  
  1618.  
  1619. 7.10.6  Miscellaneous
  1620.  
  1621. Compound SQL statements containing user-defined SQLDAs are not
  1622. permitted in a 16-bit application on OS/2.
  1623.  
  1624. All the command files to build applications using Micro Focus COBOL
  1625. now require the addition of the db2gmf16 library (see the section
  1626. "Considerations when Using Micro Focus Cobol" in this README file for
  1627. more information) in the link step.  In addition, use the "os2286"
  1628. library in place of the "doscalls" library in the link step as
  1629. documented.  The updated build command files are provided in
  1630. "...\sqllib\samples\cobol\...".
  1631.  
  1632.  
  1633. 7.11  Installation and Operation Guides
  1634.  
  1635. In Appendix J
  1636.  
  1637. o   Under Datetime Values:
  1638.     -   In the table "Formats for String Representations of Dates",
  1639.         change the Site-defined (Local) description of Date Format
  1640.         from "Depends on database country code" to "Depends on
  1641.         application country code".
  1642.     -   In the table "Formats for String Representations of Times",
  1643.         change the Site-defined (Local) description of Time Format
  1644.         from "Depends on database country code" to "Depends on
  1645.         application country code".
  1646. o   Under Date and Time Formats change the fourth list item (Output
  1647.     Date Format) preceding the table "Date and Time Formats by Country
  1648.     Code", from "The default output date format is equal to the local
  1649.     date format."  to "The default output date format is described in
  1650.     Table nn. Date and Time Formats by Country Code, under column
  1651.     Default Output Date Format"
  1652.  
  1653. In the English version of the DB2 for OS/2 Installation and Operation
  1654. manual:
  1655.  
  1656. o   The screen capture on page 13 should appear as the lower screen
  1657.     capture on page 14.
  1658.  
  1659. o   The terms Communication Manager and Communications Server both
  1660.     appear on page 45. At the time of this writing, most users will
  1661.     have Communications Manager.  Use this name in place of
  1662.     Communications Server.
  1663.  
  1664.  
  1665. 7.12  Installing and Using OS/2 Clients
  1666.  
  1667.  
  1668. 7.12.1  New CLI/ODBC Configuration Keywords
  1669.  
  1670. See section 12.4, "New CLI/ODBC Configuration Keywords in db2cli.ini"
  1671. for the new CLI/ODBC configuration keywords that are not listed in the
  1672. CLI Guide and Reference.
  1673.  
  1674.  
  1675. 7.13  SQL Reference
  1676.  
  1677.  
  1678. 7.13.1  ALTER TABLE Notes Addition
  1679.  
  1680. The following bullet should be included with the "Notes" found in the
  1681. section on "ALTER TABLE":
  1682.  
  1683. o   Adding a column with a default value that involves an explicit
  1684.     value or an implicit or explicit datetime special register, will
  1685.     cause all packages with an insert usage on the object table to be
  1686.     invalidated.
  1687.  
  1688.  
  1689. 7.13.2  SQL Communications Area (SQLCA)
  1690.  
  1691. Replace the existing text for the "Field values" column for the
  1692. SQLWARN1 entry in the "Fields of SQLCA" table, with the following:
  1693.  
  1694. Contains X or W if the value of a string column was truncated when
  1695. assigned to a host variable.  Contains N if the null terminator was
  1696. truncated.
  1697.  
  1698. The value of X is returned when all of the following conditions are
  1699. met:
  1700.  
  1701. o   a mixed code page connection exists where conversion of character
  1702.     string data from the database codepage to the application codepage
  1703.     may involve a change in the length of the data,
  1704.  
  1705. o   the cursor is blocked
  1706.  
  1707. o   an indicator variable was provided by the application.
  1708.  
  1709. The value returned in the indicator variable will be the length of the
  1710. resultant character string in the application's code page.
  1711.  
  1712. In all other cases involving data truncation, versus null terminator
  1713. truncation, W will be returned.  The value returned in the indicator
  1714. variable in this case will be the length of the resultant character
  1715. string in the code page of the select list item (either the
  1716. application's, the database's or none).
  1717.  
  1718.  
  1719. 7.13.3  GROUP-BY and ORDER-BY Changes
  1720.  
  1721.  
  1722. 7.13.3.1  Expressions Section
  1723.  
  1724. The following changes should be applied to the "Expressions" section
  1725. of the "SQL Reference Changes" section, for CASE Expressions.  Replace
  1726. the second paragraph with the following:
  1727.  
  1728. If the CASE expression is in a select list, a VALUES clause, an IN
  1729. predicate, a GROUP BY clause, or an ORDER BY clause, the
  1730. search-condition in a searched-when-clause cannot be a quantified
  1731. predicate, IN predicate using a fullselect, or an EXISTS predicate
  1732. (SQLSTATE: 42625).
  1733.  
  1734.  
  1735. 7.13.3.2  Queries Section
  1736.  
  1737. In the select-clause section of the "Queries" section, replace the
  1738. first bullet in the "If GROUP BY or HAVING is used:" list with:
  1739.  
  1740. o   An expression X (not a column function) used in the select list
  1741.     must have a GROUP BY clause with:
  1742.  
  1743.     -   a grouping-expression that matches the portion of the X
  1744.         referencing columns of R (see group-by clause) or
  1745.  
  1746.     -   each column of R referenced in X as a separate
  1747.         grouping-expression.
  1748.  
  1749. GROUP-BY-CLAUSE:  Replace the text of the group-by-clause section of
  1750. the "Queries" section with the following:
  1751.  
  1752. +--------------------------------------------------------------------+
  1753. |                                                                    |
  1754. |              ┌─,───────────────────┐                               |
  1755. | ─ GROUP BY ─ grouping-expression ┴───────────────────────────── |
  1756. |                                                                    |
  1757. +--------------------------------------------------------------------+
  1758.  
  1759. The GROUP BY clause specifies an intermediate result table that
  1760. consists of a grouping of the rows of R.  R is the result of the
  1761. previous clause of the subselect.
  1762.  
  1763. A grouping-expression is an expression used in defining the grouping
  1764. of R.  Each column-name included in grouping-expression must
  1765. unambiguously identify a column of R (SQLSTATE 42702 or 42703).  The
  1766. length attribute of each grouping-expression must not be more than 254
  1767. bytes (SQLSTATE 42907).  An grouping-expression cannot include a
  1768. scalar-fullselect (SQLSTATE 42822) or any function that is variant or
  1769. has an external action (SQLSTATE 42845).
  1770.  
  1771. The result of GROUP BY is a set of groups of rows.  In each group of
  1772. more than one row, all values of each grouping-expression are equal;
  1773. and all rows with the same set of values of the grouping-expressions
  1774. are in the same group.  For grouping, all null values from a
  1775. grouping-expression are considered equal.
  1776.  
  1777. A grouping-expression can be used(1) in a search condition in a HAVING
  1778. clause, in an expression in a SELECT clause or in a
  1779. sort-key-expression of an ORDER BY clause (see order-by clause for
  1780. details).  In each case, the reference specifies only one value for
  1781. each group.  For example, if the grouping-expression is col1+col2 then
  1782. an allowed expression in the select list would be col1+col2+3.
  1783. Associativity rules for expressions would disallow the similar
  1784. expression, 3+col1+col2, unless parentheses are used to ensure that
  1785. the corresponding expression is evaluated in the same order.  Thus,
  1786. 3+(col1+col2) would also be allowed in the select list.
  1787.  
  1788. If the grouping-expression contains varying-length strings with
  1789. trailing blanks, the values in the group can differ in the number of
  1790. trailing blanks and may not all have the same length.  In that case, a
  1791. reference to the grouping-expression still specifies only one value
  1792. for each group, but the value for a group is chosen arbitrarily from
  1793. the available set of values.  Thus, the actual length of the result
  1794. value is unpredictable.
  1795.  
  1796. As noted, there are some cases where the GROUP BY clause cannot refer
  1797. directly to a column that is specified in the SELECT clause as an
  1798. expression (scalar-fullselect, variant or external action functions).
  1799. To group using such an expression, use a nested table expression or a
  1800. common table expression to first provide a result table with the
  1801. expression as a column of the result.  For an example using nested
  1802. table expressions, see Example 9.
  1803.  
  1804. The following example is to be added at the end of the examples
  1805. section.
  1806.  
  1807. Example 9:  Display the average education level and salary for 5
  1808. random groups of employees.
  1809.  
  1810. This query requires the use of a nested table expression to first set
  1811. a random value for each employee so that it can subsequently be used
  1812. in the GROUP BY clause.
  1813.  
  1814.     SELECT RANDID , AVG(EDLEVEL), AVG(SALARY)
  1815.       FROM (
  1816.             SELECT EDLEVEL, SALARY,
  1817.                    INTEGER(RAND()*5) AS RANDID
  1818.               FROM EMPLOYEE
  1819.            ) AS EMPRAND
  1820.       GROUP BY RANDID
  1821.  
  1822. ORDER-BY-CLAUSE:  Replace the text of the order-by-clause section of
  1823. the "Queries" section with the following:
  1824.  
  1825. +--------------------------------------------------------------------+
  1826. |                                                                    |
  1827. |              ┌─,───────────────────┐                               |
  1828. |              │            ┌─ASC──┐ │                               |
  1829. | ─ ORDER BY ── sort-key ─┼──────┼─┴───────────────────────────── |
  1830. |                          └─DESC─┘                                  |
  1831. |                                                                    |
  1832. | SORT-KEY:                                                          |
  1833. | ├──┬─simple-column-name ─┬───────────────────────────────────────┤ |
  1834. |    ├─simple-integer──────┤                                         |
  1835. |    └─sort-key-expression─┘                                         |
  1836. |                                                                    |
  1837. +--------------------------------------------------------------------+
  1838.  
  1839. The ORDER BY clause specifies an ordering of the rows of the result
  1840. table.  If a single sort specification (one sort-key with associated
  1841. direction) is identified, the rows are ordered by the values of that
  1842. sort specification.  If more than one sort specification is
  1843. identified, the rows are ordered by the values of the first identified
  1844. sort specification, then by the values of the second identified sort
  1845. specification, and so on.  The length attribute of each sort-key must
  1846. not be more than 254 characters for a character column or 127
  1847. characters for a graphic column (SQLSTATE 42907).
  1848.  
  1849. A named column in the select list may be identified by a sort-key that
  1850. is a simple-integer or a simple-column-name.  An unnamed column in the
  1851. select list must be identified by an simple-integer or, in some cases,
  1852. by a sort-key-expression that matches the expression in the select
  1853. list (see details of sort-key-expression).  A column is unnamed if the
  1854. AS clause is not specified and it is derived from a constant, an
  1855. expression with operators, or a function.(2)
  1856.  
  1857. Ordering is performed in accordance with the comparison rules
  1858. described in Chapter 3.  The null value is higher than all other
  1859. values.  If the ORDER BY clause does not completely order the rows,
  1860. rows with duplicate values of all identified columns are displayed in
  1861. an arbitrary order.
  1862.  
  1863. For the purposes of the descriptions that follow, consider an ordering
  1864. subselect to be the fullselect of a select-statement that is a
  1865. subselect.
  1866.  
  1867. simple-column-name
  1868.     Usually identifies a column of the result table.  In this case,
  1869.     simple-column-name must be the column name of a named column in
  1870.     the select list.
  1871.  
  1872.     The simple-column-name may also identify a column name of a table,
  1873.     view or nested table identified in the FROM clause of an ordering
  1874.     subselect.  An error occurs if the ordering subselect:
  1875.  
  1876.     o   specifies DISTINCT in the select-clause (SQLSTATE 42822)
  1877.     o   produces a grouped result and the simple-column-name is not a
  1878.         grouping-expression (SQLSTATE 42803).
  1879.  
  1880.     Determining which column is used for ordering the result is
  1881.     described under "Column name in sort keys" (see "Notes").
  1882.  
  1883. simple-integer
  1884.     Must be greater than 0 and not greater than the number of columns
  1885.     in the result table (SQLSTATE 42805).  The integer n identifies
  1886.     the nth column of the result table.
  1887.  
  1888. sort-key-expression
  1889.     An expression that is not simply a column name or an unsigned
  1890.     integer constant.  The fullselect of the select-statement must be
  1891.     a subselect to use this form of sort-key.  The sort-key-expression
  1892.     cannot include a correlated scalar-fullselect (SQLSTATE 42703) or
  1893.     a function with an external action (SQLSTATE 42845).
  1894.  
  1895.     Any column-name within a sort-key-expression must conform to the
  1896.     rules described under "Column names in sort keys" (see "Notes").
  1897.  
  1898.     There are a number of special cases that further restrict the
  1899.     expressions that can be specified.
  1900.  
  1901.     o   DISTINCT is specified in the SELECT clause of the ordering
  1902.         subselect (SQLSTATE 42822).
  1903.  
  1904.         The sort-key-expression must match exactly with an expression
  1905.         in the select list of the ordering subselect
  1906.         (scalar-fullselects are never matched).
  1907.  
  1908.     o   The ordering subselect is grouped (SQLSTATE 42803).
  1909.  
  1910.         The sort-key-expression can:
  1911.  
  1912.         -   be an expression in the select list of the ordering
  1913.             subselect,
  1914.         -   include a grouping-expression from the GROUP BY clause of
  1915.             the ordering subselect
  1916.         -   include a column function, constant or host variable.
  1917.  
  1918. ASC
  1919.     Uses the values of the column in ascending order.  This is the
  1920.     default.
  1921.  
  1922. DESC
  1923.     Uses the values of the column in descending order.
  1924.  
  1925. NOTES
  1926.  
  1927. o   COLUMN NAMES IN SORT KEYS:
  1928.  
  1929.     -   The column name is qualified.
  1930.  
  1931.         The fullselect in the select-statement must be a subselect
  1932.         (SQLSTATE 42877).  The column name must unambiguously identify
  1933.         a column of some table, view or nested table in the FROM
  1934.         clause of the ordering subselect (SQLSTATE 42702).  The value
  1935.         of the column is used to compute the value of the sort
  1936.         specification.
  1937.  
  1938.     -   The column name is unqualified.
  1939.  
  1940.         --  The fullselect of the select-statement is a subselect.
  1941.  
  1942.             If the column name is identical to the name of more than
  1943.             one column of the result table, the column name must
  1944.             unambiguously identify a column of some table, view or
  1945.             nested table in the FROM clause of the ordering subselect
  1946.             (SQLSTATE 42702).  If the column name is identical to one
  1947.             column, that column is used to compute the value of the
  1948.             sort specification.  If the column name is not identical
  1949.             to a column of the result table, then it must
  1950.             unambiguously identify a column of some table, view or
  1951.             nested table in the FROM clause of the fullselect in the
  1952.             select-statement (SQLSTATE 42702).
  1953.  
  1954.         --  The fullselect of the select-statement is not a subselect
  1955.             (simple-column-name only).
  1956.  
  1957.             The column name must not be identical to the name of more
  1958.             than one column of the result table (SQLSTATE 42702).  The
  1959.             column name must be identical to exactly one column of the
  1960.             result table (SQLSTATE 42707) and this column is used to
  1961.             compute the value of the sort specification.
  1962.  
  1963. o   LIMITS:  The use of a sort-key-expression or a simple-column-name
  1964.     where the column is not in the select list may result in the
  1965.     addition of the column or expression to the temporary table used
  1966.     for sorting.  This may result in reaching the limit of the number
  1967.     of columns in a table or the limit on the size of a row in a
  1968.     table.  Exceeding these limits will result in an error if a
  1969.     temporary table is required to perform the sorting operation.
  1970.  
  1971. NOTES:
  1972. (1) In general, the grouping-expression must match part of the
  1973.     expression where it is used.  If the concatenation operator is
  1974.     used, the grouping-expression must be used exactly as the
  1975.     expression where it is used.
  1976.  
  1977. (2) The rules for determining the name of result columns for a
  1978.     fullselect that involves set operators (UNION, INTERSECT, or
  1979.     EXCEPT) can be found in 'fullselect' in the same chapter.
  1980.  
  1981.  
  1982. 7.14  Application Programming Guide
  1983.  
  1984. The following information on the bottom of page 24, reads:
  1985.  
  1986. The host-language linker creates an executable application.  For
  1987. example,
  1988.  
  1989. o   With OS/2, the application can be an executable file or a dynamic
  1990.     link library.
  1991. o   With Windows applications, the application is an executable file.
  1992. o   With UNIX-based systems, the application can be an executable load
  1993.     module or a shared library.
  1994.  
  1995. It should read as follows:
  1996.  
  1997. The host-language linker creates an executable application.  For
  1998. example,
  1999.  
  2000. o   On OS/2 or Windows platforms, the application can be an executable
  2001.     file or a dynamic link library (DLL).
  2002. o   On UNIX-based systems, the application can be an executable load
  2003.     module or a shared library.
  2004.  
  2005. Note that although applications can be DLLs on Windows platforms, for
  2006. Windows 3.1 or Windows 95, the DLLs are loaded directly by the
  2007. application and not by the DB2 database manager.  On Windows NT, DLLs
  2008. can be loaded by the database manager.  Stored procedures, which are
  2009. normally built as DLLs (on OS/2 and Windows NT) or shared libraries
  2010. (on UNIX-based platforms) are unsupported on the Windows 3.1 and
  2011. Windows 95 platforms as they are client-only.  For information on
  2012. using stored procedures, refer to Chapter 5 in the DB2 Application
  2013. Programming Guide.
  2014.  
  2015.  
  2016. 7.15  References to CompuServe
  2017.  
  2018. In the CompuServe section found in the introductions of the DB2
  2019. manuals, and at the end of the manuals in the section on contacting
  2020. IBM, please note the following corrections:
  2021.  
  2022. o   "Compuserve" should be "CompuServe".
  2023. o   "IBMDB2 Family Forum" should be the "IBM DB2 Family Forum".
  2024.  
  2025.  
  2026. 7.16  Messages Reference
  2027.  
  2028.  
  2029. 7.16.1  New Messages
  2030.  
  2031. The following messages are to be added to the Messages Reference book.
  2032.  
  2033.  
  2034. SQL2548N  DATABASE CODEPAGE INDICATED IN BACKUP IMAGE DIFFERS FROM
  2035.           THAT OF THE CURRENT ON-DISK DATABASE.  THE RESTORE OPERATION
  2036.           HAS FAILED.
  2037.  
  2038. EXPLANATION:  The database contained in the backup image contains data
  2039. stored ina codepage different from that of the database into which the
  2040. data is being restored.
  2041.  
  2042. This problem can be caused in three ways:
  2043.  
  2044. 1.  The database you are restoring into has a different codepage than
  2045.     that of the database in the backup image.
  2046.  
  2047. 2.  The user is restoring into a new database from a session with a
  2048.     different codepage than the backup.
  2049.  
  2050. 3.  The backup, image is corrupt, and contains invalid character set
  2051.     information.
  2052.  
  2053. USER RESPONSE:
  2054.  
  2055. 1.  If restoring over an existing database, make sure that the
  2056.     codepage of the existing database matches that of the backup
  2057.     image.
  2058.  
  2059. 2.  If restoring to a new database, make sure that the codepage of the
  2060.     session from which the restore command was issued is the same as
  2061.     that of the backup image.
  2062.  
  2063. 3.  Contact IBM Service.
  2064.  
  2065. SQL0214N  AN EXPRESSION STARTING WITH "<EXPRESSION-START>" IN THE
  2066.           "<CLAUSE-TYPE>" CLAUSE IS NOT VALID.  REASON CODE =
  2067.           "<REASON-CODE>".
  2068.  
  2069. EXPLANATION:  The expression identified by the first part of the
  2070. expression "<expression-start>" in the "<clause-type>" clause is not
  2071. valid for the reason specified by the "<reason-code>" as follows:
  2072.  
  2073. 1   The fullselect of the select-statement is not a subselect.
  2074.     Expressions are not allowed in the ORDER BY clause for this type
  2075.     of select-statement.  This reason code occurs only when
  2076.     "<clause-type>" is ORDER BY.
  2077.  
  2078. 2   DISTINCT is specified in the select clause and the expression
  2079.     cannot be matched exactly with an expression in the select list.
  2080.     This reason code occurs only when "<clause-type>" is ORDER BY.
  2081.  
  2082. 3   Grouping is caused by the presence of a column function in the
  2083.     ORDER BY clause.  This reason code occurs only when
  2084.     "<clause-type>" is ORDER BY.
  2085.  
  2086. 4   Expression in a GROUP BY clause cannot be a scalar-fullselect.
  2087.     This reason code occurs only when "<clause-type>" is GROUP BY.
  2088.  
  2089. The statement cannot be processed.
  2090.  
  2091. USER RESPONSE:  Modify the select-statement based on the reason
  2092. specified by the "<reason-code>" as follows:
  2093.  
  2094. 1   Remove the expression from the ORDER BY clause.  If attempting to
  2095.     reference a column of the result, change the sort key to the
  2096.     simple-integer or simple-column-name form.
  2097.  
  2098. 2   Remove DISTINCT from the select clause or change the sort key to
  2099.     the simple-integer or simple-column-name form.
  2100.  
  2101. 3   Add a GROUP BY clause or remove the column function from the ORDER
  2102.     BY clause.
  2103.  
  2104. 4   Remove any scalar-fullselect from the GROUP BY clause.  If
  2105.     grouping is desired on a column of the result that is based on a
  2106.     scalar-fullselect use a nested table expression or a common table
  2107.     expression to first provide a result table with the expression as
  2108.     a column of the result.
  2109.  
  2110. SQLCODE:  -214
  2111.  
  2112. SQLSTATE:  42822
  2113.  
  2114.  
  2115. 7.16.2  Changed Messages
  2116.  
  2117. The following is additional information for message SQL1419N:
  2118.  
  2119. EXPLANATION: The package "<pkgname>" can not be executed.  The package
  2120. was bound on a database manager level which lacks EUC (Extended Unix
  2121. Code) and non-SBCS character conversion support.  An attempt to
  2122. execute the package from one of these environments was detected.
  2123.  
  2124. USER RESPONSE: To execute the package in the current environment,
  2125. explicitly rebind the named package using either the REBIND or the
  2126. BIND command.  Otherwise, execute the package from the original
  2127. binding environment.
  2128.  
  2129. The following messages are changed as follows:
  2130.  
  2131.  
  2132. SQL0119N  AN EXPRESSION STARTING WITH "<EXPRESSION-START>" IS
  2133.           SPECIFIED IN A SELECT CLAUSE, HAVING CLAUSE, OR ORDER BY
  2134.           CLAUSE IS NOT SPECIFIED IN THE GROUP BY CLAUSE OR IT IS IN A
  2135.           SELECT CLAUSE, HAVING CLAUSE, OR ORDER BY CLAUSE WITH A
  2136.           COLUMN FUNCTION AND NO GROUP BY CLAUSE IS SPECIFIED.
  2137.  
  2138. EXPLANATION:  The SELECT statement has one of the following errors:
  2139.  
  2140. o   The identified expression and a column function are contained in
  2141.     the SELECT clause, HAVING clause, or ORDER BY clause but there is
  2142.     no GROUP BY clause
  2143. o   The identified expression is contained in the SELECT clause,
  2144.     HAVING CLAUSE, or ORDER BY clause but is not in the GROUP BY
  2145.     clause.
  2146.  
  2147. The identified expression is an expression that starts with
  2148. "<expression-start>".  The expression may be a single column name.
  2149.  
  2150. The statement cannot be processed.
  2151.  
  2152. USER RESPONSE:  Correct the statement by including the expression in
  2153. the GROUP BY clause that are in the SELECT clause, HAVING clause or
  2154. ORDER BY clause or by removing the column function from the SELECT
  2155. statement.
  2156.  
  2157. SQLCODE:  -119
  2158.  
  2159. SQLSTATE:  42803
  2160.  
  2161. SQL0120N  A WHERE CLAUSE, GROUP BY CLAUSE, SET CLAUSE, OR SET
  2162.           TRANSITION-VARIABLE STATEMENT CONTAINS A COLUMN FUNCTION.
  2163.  
  2164. EXPLANATION:  A WHERE clause can contain a column function only if
  2165. that clause appears within a subquery of a HAVING clause and the
  2166. argument of the column function is a correlated reference to a group.
  2167. A GROUP BY clause can contain a column function only if the argument
  2168. of the column function is a correlated reference to a column in a
  2169. different subselect than the one containing the GROUP BY clause.  A
  2170. SET clause of an UPDATE statement or a SET transition-variable
  2171. statement can only include a column function within a fullselect on
  2172. the right hand side of an assignment.
  2173.  
  2174. The statement cannot be processed.
  2175.  
  2176. USER RESPONSE:  Change the statement so that the column function is
  2177. not used or used only where it is supported.
  2178.  
  2179. SQLCODE:  -120
  2180.  
  2181. SQLSTATE:  42903
  2182.  
  2183. SQL0206N  "<NAME>" IS NOT A COLUMN IN AN INSERTED TABLE, UPDATED
  2184.           TABLE, OR ANY TABLE IDENTIFIED IN A FROM CLAUSE OR IS NOT A
  2185.           VALID TRANSITION VARIABLE FOR THE SUBJECT TABLE OF A
  2186.           TRIGGER.
  2187.  
  2188. EXPLANATION:  This error can occur in the following cases:
  2189.  
  2190. o   For an INSERT or UPDATE statement, the specified column is not a
  2191.     column of the table, or view that was specified as the object of
  2192.     the insert or update.
  2193. o   For a SELECT or DELETE statement, the specified column is not a
  2194.     column of any of the tables or views identified in a FROM clause
  2195.     in the statement.
  2196. o   For an ORDER BY clause, the specified column is a correlated
  2197.     column reference in a subselect, which is not allowed.
  2198. o   For a CREATE TRIGGER statement:
  2199.     -   A reference is made to a column of the subject table without
  2200.         using an OLD or NEW correlation name.
  2201.     -   The left hand side of an assignment in the SET
  2202.         transition-variable statement in the triggered action
  2203.         specifies an old transition variable where only a new
  2204.         transition variable is supported.
  2205.  
  2206. The statement cannot be processed.
  2207.  
  2208. USER RESPONSE:  Verify that the column and table names are specified
  2209. correctly in the SQL statement.  For a SELECT statement, ensure that
  2210. all the required tables are named in the FROM clause.  For a subselect
  2211. in an ORDER BY clause, ensure that there are no correlated column
  2212. references.  If a correlation name is used for a table, verify that
  2213. subsequent references use the correlation name and not the table name.
  2214.  
  2215. For a CREATE TRIGGER statement, ensure that only new transition
  2216. variables are specified on the left hand side of assignments in the
  2217. SET transition-variable statement and that any reference to columns of
  2218. the subject table have a correlation name specified.
  2219.  
  2220. SQLCODE:  -206
  2221.  
  2222. SQLSTATE:  42703
  2223.  
  2224. SQL0208N  THE ORDER BY CLAUSE IS NOT VALID BECAUSE COLUMN "<NAME>" IS
  2225.           NOT PART OF THE RESULT TABLE.
  2226.  
  2227. EXPLANATION:  The statement is not valid because a column "<name>"
  2228. specified in the ORDER BY list is not specified in the SELECT list and
  2229. is not in the result table.  Only columns in the result table can be
  2230. used to order that result when the fullselect of the select-statement
  2231. is not a subselect.
  2232.  
  2233. The statement cannot be processed.
  2234.  
  2235. USER RESPONSE:  To correct the syntax of the statement, either add the
  2236. specified column to the result table or delete it from the ORDER BY
  2237. clause.
  2238.  
  2239. SQLCODE:  -208
  2240.  
  2241. SQLSTATE:  42707
  2242.  
  2243. SQL0582N  A CASE EXPRESSION IN A SELECT LIST, VALUES CLAUSE, IN
  2244.           PREDICATE, OR ORDER BY CLAUSE CANNOT INCLUDE A QUANTIFIED
  2245.           PREDICATE, AN IN PREDICATE USING A FULLSELECT OR AN EXISTS
  2246.           PREDICATE.
  2247.  
  2248. EXPLANATION:  A search condition of a CASE expression is:
  2249.  
  2250. o   a quantified predicate (one using SOME, ANY, or ALL),
  2251. o   an IN predicate using a fullselect or
  2252. o   an EXISTS predicate
  2253.  
  2254. and the CASE expression is part of:
  2255.  
  2256. o   a select list
  2257. o   a VALUES clause
  2258. o   an IN predicate
  2259. o   an GROUP BY clause or
  2260. o   an ORDER BY clause.
  2261.  
  2262. Such CASE expressions are not supported.
  2263.  
  2264. The statement cannot be processed.
  2265.  
  2266. USER RESPONSE:  Remove the use of the quantified predicate, IN
  2267. predicate, or EXISTS predicate from the CASE expression.  In some
  2268. cases, it may be possible to write the query so that the CASE
  2269. expression is not part of the select list or an IN predicate.
  2270.  
  2271. SQLCODE:  -582
  2272.  
  2273. SQLSTATE:  42625
  2274.  
  2275. SQL0583N  THE USE OF FUNCTION "<FUNCTION.NAME>" IS INVALID BECAUSE IT
  2276.           IS VARIANT OR HAS AN EXTERNAL ACTION.
  2277.  
  2278. EXPLANATION:  The function "<function-name>" is defined as a variant
  2279. function or a function with an external action.  This type of function
  2280. is not supported in the context in which it is used.  The contexts in
  2281. which these are not valid are:
  2282.  
  2283. o   as the first operand of a BETWEEN predicate
  2284.  
  2285. o   in the expression prior to the first WHEN keyword in a
  2286.     simple-case-expression.
  2287.  
  2288. o   in an expression of a GROUP BY clause
  2289.  
  2290. o   in an expression of an ORDER BY clause (external action only)
  2291.  
  2292. The statement cannot be processed.
  2293.  
  2294. USER RESPONSE:  If the use of a variant or external action function
  2295. was not intended, substitute a function without these characteristics.
  2296. If the behaviour associated with the variant or external action
  2297. function is intentional, use the alternate form of the statements that
  2298. make that intent explicit.
  2299.  
  2300. o   Instead of the BETWEEN predicate, use the corresponding statement
  2301.     using the equivalent combination of comparison predicates (a>=b
  2302.     and a<=c instead of a between b and c).
  2303.  
  2304. o   Instead of a simple-when-clause, use the corresponding
  2305.     searched-when-clause where the function would get specified in
  2306.     each search-condition.
  2307.  
  2308. o   Remove the variant or external action function from the GROUP BY
  2309.     clause.  If grouping is desired on a column of the result that is
  2310.     based on a variant or external action function use a nested table
  2311.     expression or a common table expression to first provide a result
  2312.     table with the expression as a column of the result.
  2313.  
  2314. o   Remove the external action function from the ORDER BY clause.  If
  2315.     the column is part of the result set of the query, change the
  2316.     expression in the ORDER BY clause to the simple-integer or
  2317.     simple-column-name form of the sort key.
  2318.  
  2319. SQLCODE:  -583
  2320.  
  2321. SQLSTATE:  42845
  2322.  
  2323.  
  2324. 8.  DDCS-Specific Information
  2325.  
  2326. 8.1  Documentation Changes
  2327.  
  2328.  
  2329. 8.1.1  Installation Requirements
  2330.  
  2331. The DB2 Planning Guides for OS/2 and AIX contain out of date
  2332. information for memory and hard disk space requirements for DDCS
  2333. V2.3.1. Please refer to the information in Chapter 1 of the updated
  2334. DDCS Installation and Configuration Guides.
  2335.  
  2336.  
  2337. 8.1.2  National Language (Code Page and Conversion) Information
  2338. Changes
  2339.  
  2340. Some of the information contained in the V2.1.0 DDCS User's Guide has
  2341. been superseded by updated versions of tables and other information
  2342. relating to National Language, and related considerations such as
  2343. character set conversion rules.  Please refer to updated information
  2344. in the DDCS Installation and Configuration Guide (S20H-4795-01).
  2345.  
  2346.  
  2347. 8.1.3  OS/2 and UNIX-Based Databases
  2348.  
  2349. Throughout the DDCS manuals, references to OS/2 and UNIX-based
  2350. databases should be references to the DB2 Common Server Family of
  2351. Products instead.
  2352.  
  2353.  
  2354. 8.1.4  SET CURRENT PACKAGESET Support
  2355.  
  2356. In the DDCS User's Guide in Chapter 7, "Programming in a DRDA
  2357. Environment", the following sentence should be included:
  2358.  
  2359. The DDCS support for the SET CURRENT PACKAGESET command is now
  2360. available for DB2 for MVS/ESA and DB2 for Common Servers.
  2361.  
  2362.  
  2363. 8.1.5  DB2 for OS/400 Column Types and Length
  2364.  
  2365. In the DDCS User's Guide in Chapter 7, "Programming in a DRDA
  2366. Environment", in the section that describes DB2 for OS/400 Column
  2367. Types and Length, the following text should exist:
  2368.  
  2369. DB2 for OS/400 Version 3.1 supports the column types GRAPHIC and
  2370. VARGRAPHIC.  Please refer to your DRDA AS documentation for the most
  2371. up-to-date features supported by your DRDA Server.
  2372.  
  2373.  
  2374. 8.1.6  Binding DDCS Utilities to an OS/400 Database
  2375.  
  2376. The following step is documented in the DDCS User's Guide in Chapter 4
  2377. to allow you to bind all the DDCS utilities to the DRDA server
  2378. database; however, an error occurs.  The error is a result of using
  2379. the GRANT bind option when binding a list of bind files.  The bind
  2380. receives a -901 sqlcode from the OS/400 database on the third bind
  2381. file in the list.
  2382.  
  2383.     db2 bind @ddcs400.lst blocking all sqlerror continue grant public
  2384.         messages ddcs400.msg
  2385.  
  2386.  
  2387. 8.1.6.1  Possible Solutions
  2388.  
  2389. 1.  PTF SF23634 is available for the OS/400 V3.1 database to fix this
  2390.     problem.
  2391.  
  2392. 2.  Alternatively, use either of the following two methods:
  2393.  
  2394.     a.  Issue separate bind requests for each bind file in
  2395.         ddcs400.lst, (19 bind files resulting in 19 bind requests),
  2396.         for example:
  2397.  
  2398.              ===> connect step
  2399.                 db2 connect to DBALIAS user USERID using PASSWORD
  2400.              ===> bind step
  2401.                 db2 bind db2ajgrt.bnd blocking all sqlerror continue grant public
  2402.                     messages db2ajgrt.msg
  2403.                 db2 bind db2clics.bnd blocking all sqlerror continue grant public
  2404.                     messages db2clics.msg
  2405.                     ...
  2406.                 db2 bind db2uimpm.bnd blocking all sqlerror continue grant public
  2407.                     messages db2uimpm.msg
  2408.              ===> drop connection
  2409.                 db2 connect reset
  2410.  
  2411.     b.  Issue the bind request against ddcs400.lst but omit the GRANT
  2412.         PUBLIC bind option.  As a separate step, grant execute
  2413.         permission to public on each of the packages.  Use the
  2414.         ddcspkgn utility to determine the package names of the bind
  2415.         files in ddcs400.lst.  An example is provided below.  Refer to
  2416.         Chapter 4 of the DDCS User's Guide for more details on this
  2417.         option.
  2418.  
  2419.              ===> connect step
  2420.                 db2 connect to DBALIAS user USERID using PASSWORD
  2421.              ===> bind step
  2422.                 db2 bind @ddcs400.lst blocking all sqlerror continue
  2423.                     messages ddcs400.msg
  2424.              ===> determine the package names of bind files in ddcs400.lst
  2425.                 ddcspkgn @ddcs400.lst
  2426.              ===> grant step
  2427.                 db2 grant execute on package SQLAB4C0 to public
  2428.                 db2 grant execute on package SQLL14C0 to public
  2429.                     ...
  2430.                 db2 grant execute on package SQLUF4C0 to public
  2431.              ===> drop connection
  2432.                 db2 connect reset
  2433.  
  2434.  
  2435. 8.1.7  Binding Utilities for Back-Level Clients
  2436.  
  2437. In the DDCS User's Guide, in Appendix D, "Binding Utilities for Back
  2438. Level Clients", the command to find out the package names for bind
  2439. files should read ddcspkgn @bindfile.lst, NOT ddcspkgn bindfile.lst.
  2440.  
  2441.  
  2442. 8.1.8  SPM Instance Name
  2443.  
  2444. In Appendix D. "LU6.2 Sync Point Manager Considerations", in the
  2445. section "Installing the SPM", the DDCS Installation and Configuration
  2446. Guides for OS/2 and AIX both refer to the "SPM database".  This should
  2447. read "SPM instance", as referred to in the DB2 Command Reference:
  2448.  
  2449.     Before issuing LIST DRDA INDOUBT TRANSACTIONS, the application
  2450.     must be connected to the Sync Point Manager (SPM) instance. Use
  2451.     the SPM_NAME database manager configuration parameter as the
  2452.     dbalias on the CONNECT statement.
  2453.  
  2454. Throughout the "Installing SPM" section in Appendix D, wherever the
  2455. words "SPM database" appear alone without the word "alias" immediately
  2456. following them, please replace the word "database" with the word
  2457. "instance".
  2458.  
  2459. The documentation will be changed in the next update of these
  2460. publications.
  2461.  
  2462.  
  2463. 8.2  Syncpoint Manager (SPM)
  2464.  
  2465.  
  2466. 8.2.1  Prerequisite PTFs
  2467.  
  2468. All DB2/MVS V3.1 systems
  2469.   PTFs UN73393 and UN76673  (fixes APARs PN67179 and PN70102)
  2470.  
  2471. All DB2/MVS V4.1 systems
  2472.   PTF UN76674 (fixes APAR PN70102 )
  2473.  
  2474. All DB2/400 V3.1 systems
  2475.   PTF SF26564 (fixes APAR SA46917)
  2476.   APAR SA48935 (no PTF available at time of printing README)
  2477.   PTF SF26804 (fixes for OS/400 V3R1M0, product 5763SS1)
  2478.  
  2479.  
  2480. 8.2.2  IBM Communications Server for OS/2 Warp Version 4
  2481.  
  2482. Terminating IBM Communications Server for OS/2 Warp Version 4 while
  2483. the SPM is active causes the SPM to stop.  Once IBM Communications
  2484. Server for OS/2 Warp Version 4 is restarted, you must issue a db2stop
  2485. and db2start on the DDCS Multi-User Gateway in order to allow the SPM
  2486. to reinitialize.
  2487.  
  2488.  
  2489. 8.3  Authentication Default
  2490.  
  2491. For any system database directory entry that DDCS uses for
  2492. establishing a connection, if the authentication parameter is not
  2493. specified, DDCS will use a default authentication of SERVER.
  2494.  
  2495. This default applies to the system database directory entry on the
  2496. DDCS machine.  In addition, this default applies to the system
  2497. database directory entry at the remote client in a multi-user gateway
  2498. DDCS environment.
  2499.  
  2500.  
  2501. 8.4  Performance Troubleshooting
  2502.  
  2503. If DDCS for OS/2 Multi-User Gateway or DDCS for OS/2 Single-User users
  2504. are experiencing a long response time during large queries from DRDA
  2505. AS hosts (that is, DB2 for MVS, SQL/DS, or DRDA AS for DB2 for OS/2),
  2506. the following areas should be examined for the possible cause of the
  2507. performance problem:
  2508.  
  2509. 1.  For queries which result in returning large data blocks from the
  2510.     DRDA host (usually 32K of data and above), ensure that the
  2511.     database manager configuration parameter RQRIOBLK is set to 32767.
  2512.     This can be done using the Command Line Processor (CLP) as
  2513.     follows:
  2514.  
  2515.          db2 update database manager configuration using RQRIOBLK 32767
  2516.  
  2517. 2.  If VTAM is used in the connection to DRDA AS, look under "switched
  2518.     major node" configuration for the value of the PACING parameter.
  2519.     On the DDCS workstation, examine the communication setup of the
  2520.     "LU 6.2 Mode Profile" for IBMRDB mode definition.  In this
  2521.     definition, ensure the value for the "Receive pacing window"
  2522.     parameter is less than or equal to the PACING value defined on
  2523.     VTAM.  A common value for "Receive pacing window" on the DDCS
  2524.     workstation and "PACING" on VTAM is 8.
  2525.  
  2526. 3.  Ensure the maximum RU size defined in the IBMRDB mode definition
  2527.     is not less than 4K.
  2528.  
  2529. 4.  Consult with the VTAM administrator in your environment to ensure
  2530.     that VTAM is using "adaptive pacing" in LU-LU sessions with your
  2531.     DDCS workstation.
  2532.  
  2533.  
  2534. 8.5  DDCS 2.3 Gateway Connection to DB2/MVS
  2535.  
  2536. This section documents important additional information about setting
  2537. up a working DDCS Gateway connection to DB2/MVS:
  2538.  
  2539. o   VTAM definitions required at your MVS host.
  2540. o   DB2/MVS configuration steps.
  2541.  
  2542. This information is not presently provided in "DDCS Installation and
  2543. Configuration" manuals.  The sample presented here illustrates a DDCS
  2544. for OS/2 scenario, but it can readily be used as a model to help you
  2545. connect other variants of DDCS to DB2 for MVS.
  2546.  
  2547. For example, if you are knowledgeable about IBM SNA Server for AIX,
  2548. and you follow the instructions for setting up SNA Server profiles
  2549. provided in "DDCS for AIX Installation and Customization Guide", the
  2550. documentation in this section will help you complete a working
  2551. connection between DDCS for AIX and DB2/MVS.
  2552.  
  2553. You must use your own values for elements such as network name, LU
  2554. name, etc., and we recommend that you use the planning worksheets
  2555. provided in Appendix A of the "DDCS Installation and Configuration
  2556. Guide" for your system.
  2557.  
  2558. For further information about DRDA Connectivity, we recommend that you
  2559. refer to "DRDA Connectivity Guide", SC26-4783.
  2560.  
  2561. Also, if you will use the LU6.2 Syncpoint Manager (SPM) function of
  2562. the DDCS Multi-User Gateway programs for OS/2 or AIX, it is
  2563. particularly important to refer to the SPM appendix in your "DDCS
  2564. Installation and Configuration Guide".  The examples documented in
  2565. this section do not include detailed steps required for SPM.
  2566.  
  2567.  
  2568. 8.5.1  Summary of Steps
  2569.  
  2570. In order to setup the connection, you must complete the following
  2571. steps:
  2572.  
  2573. 1.  At your DDCS Gateway:
  2574.     a.  Configure APPC.
  2575.     b.  Configure Database Manager - see 8.5.5, "Cataloging DB2
  2576.         Directory Entries at the Workstation."
  2577.     These steps are more completely documented in "Chapter 3:
  2578.     Configuring Your Network" of the "DDCS Installation and
  2579.     Configuration Guide" for your system.
  2580. 2.  At your DB2/MVS host:
  2581.     a.  Configure VTAM - see 8.5.6, "Configuring VTAM"
  2582.     b.  Configure DB2/MVS - see 8.5.8, "Configuring DB2/MVS."
  2583.  
  2584.  
  2585. 8.5.2  Products used in this example
  2586.  
  2587. The following products were used:
  2588.  
  2589. o   IBM PS/2 with Token-ring adapter
  2590. o   DB2 for OS/2 2.1
  2591. o   DDCS for OS/2 2.3
  2592. o   DB2/MVS 2.3
  2593. o   OS/2 Warp 3.0
  2594. o   IBM LAN Server 4.0
  2595. o   IBM Communications Manager/2 Version 1.11 (check your "DDCS
  2596.     Installation and Configuration Guide" for the right level if you
  2597.     will work with SPM).
  2598.  
  2599.  
  2600. 8.5.3  Network Element Names
  2601.  
  2602. This example uses the following names:
  2603.  
  2604.   DDCS Gateway:
  2605.           - Network ID              : CAIBMOML
  2606.           - Local Node Name         : OMXRSA      (PU name)
  2607.           - Local Node ID           : 05D 30376
  2608.  
  2609.           - LU Name                 : OMXRSA0A
  2610.           - LU Alias                : OMXRSA0A
  2611.  
  2612.   HOST:
  2613.           - Network ID              : CAIBMOML
  2614.           - Node Name               : HOSTDB
  2615.  
  2616.           - LU Name                 : SFLU
  2617.           - LU Alias                : SFLU
  2618.           - LAN Destination Address : 400011528905 (Tic Address in NCP-NTRI)
  2619.  
  2620.   MODE DEFINITION:
  2621.           - Mode Name               : IBMRDB
  2622.  
  2623.   DB2/MVS:
  2624.           - Location                : SAN_FRANCISCO
  2625.  
  2626.   SECURITY:
  2627.           - Security Type           : Program
  2628.           - Authentication Type     : DCS
  2629.  
  2630.  
  2631. NOTE:  In this scenario, both USERID and password were only checked on
  2632. the Host.  If you use Authentication SERVER, which is the default,
  2633. then authentication will also take place at the Gateway.
  2634.  
  2635.  
  2636. 8.5.4  Configuring SNA Communications
  2637.  
  2638. Regardless of which variant of DDCS you are working with, at this
  2639. point you should refer to "Chapter 3 Configuring your Network" and
  2640. "Appendix A Worksheets", in your "DDCS Installation and Configuration
  2641. Guide".
  2642.  
  2643. When you have completed SNA communications configuration tasks,
  2644. proceed to 8.5.5, "Cataloging DB2 Directory Entries at the
  2645. Workstation."
  2646.  
  2647. The following section documents the steps required to configure
  2648. Communications Manager/2 Version 1.11, in order for the DDCS Gateway
  2649. machine to communicate to the DB2 DRDA Application Server (AS).  This
  2650. example does not support SPM.
  2651.  
  2652.  
  2653. 8.5.4.1  Creating a Communications Manager Configuration
  2654.  
  2655. 1.  From the OS/2 Desktop double click on the CM/2 icon.
  2656. 2.  From the CM/2 - Icon View, double click on the CM Setup.
  2657. 3.  When you see the IBM CM/2 INSTALLATION & SETUP screen click on OK.
  2658. 4.  When the CM Setup panel appear click on Setup.
  2659. 5.  Type in the name of the configuration and its description then
  2660.     select OK.
  2661. 6.  From the Communications Manager Configuration Definition panel:
  2662.     a.  Click on Commonly used definitions.
  2663.     b.  Select APPC APIs over Token-ring.
  2664.     c.  Click on Configure.
  2665. 7.  From the APPC APIs over Token-ring panel, enter the following:
  2666.     a.  Network ID : CAIBMOML
  2667.     b.  Local Node name: OMXRSA
  2668. 8.  If you want an End Node to Network Node connection from your DB2/2
  2669.     clients to this particular gateway, select Local Node Type as
  2670.     Network Node.  Otherwise select End Node - no network node server.
  2671.     The sample configuration uses Network Node.
  2672. 9.  Click on Advanced to continue.
  2673.  
  2674.  
  2675. 8.5.4.2  DLC Profile
  2676.  
  2677. 1.  From the Communications Manager Profile List panel, select 'DLC -
  2678.     Token-ring or other LAN types', then select Configure.
  2679. 2.  Verify the information (see "DDCS Installation and
  2680.     Configuration"), and then click on OK.
  2681.  
  2682.  
  2683. 8.5.4.3  SNA Local Node Characteristics
  2684.  
  2685. 1.  From the Communications Manager Profile List Sheet panel, select
  2686.     'SNA local node characteristics', then select Configure.
  2687. 2.  Verify the appropriate information and define Local node ID
  2688.     X'05D30376', then click on OK.
  2689.  
  2690. NOTE:  The Local Node ID has to match the IDBLK/IDNUM specification
  2691. for the DDCS workstation, as defined for the VTAM PU.
  2692.  
  2693.  
  2694. 8.5.4.4  SNA Connections
  2695.  
  2696. 1.  From the Communications Manager Profile List Sheet panel select
  2697.     'SNA connections', then select Configure.
  2698. 2.  Select 'To host' for Partner type.
  2699.  
  2700.     NOTE:   If you wish to connect to multiple DB2s that are in
  2701.     different subarea networks, select the first host as To Host.
  2702.     Select the other host(s) as 'To peer node'.  The VTAM SSCP name of
  2703.     this host must be specified as the Partner node name in the
  2704.     'Creating a Connection to a Peer Node' menu.
  2705. 3.  To create a new definition, click on Create.  To change an
  2706.     existing definition, select a link from the Link Name list and
  2707.     click on Change.  The Adapter List appears.
  2708. 4.  Select 'Token-ring or other LAN types' from the Adapter List.  The
  2709.     'Configured' field indicates whether the adapter is configured,
  2710.     and whether the selections available in the 'Adapter number' field
  2711.     change to match the adapter type you selected.  Please make sure
  2712.     that the appropriate information is selected, then click on
  2713.     Continue.
  2714. 5.  From the 'Create a Connection to a Host' panel, enter the
  2715.     following:
  2716.     o   Link name: HOST0001 (or name of your choice, such as LINK0001)
  2717.     o   LAN destination address: 400011528905
  2718.     o   Partner network ID: CAIBMOML
  2719.     o   Partner node name: HOSTDB.
  2720. 6.  Click on Define Partner LUs, then enter the following from the
  2721.     Partner LUs panel:
  2722.     o   Network ID: CAIBMOML
  2723.     o   LU Name: SFLU
  2724.     o   Alias: SFLU.
  2725. 7.  Click on Add.  After the Add operation has completed successfully,
  2726.     you will now see the box on the right populated with the fully
  2727.     qualified LU name and the alias.
  2728. 8.  When you have finished, continue selecting OK until you reach the
  2729.     'Connections List' panel.
  2730. 9.  Select Close.
  2731.  
  2732.  
  2733. 8.5.4.5  SNA Features
  2734.  
  2735. 1.  From the Communications Manager Profile List Sheet panel select
  2736.     'SNA features', then select 'Configure'.
  2737. 2.  Select 'Local LUs', then click on 'Create'.
  2738. 3.  From the 'Create a Local LU' panel, enter the following:
  2739.     a.  LU name: OMXRSA0A
  2740.     b.  Alias: OMXRSA0A.
  2741. 4.  Select Independent LU for NAU address, check off the box that says
  2742.     "Use this local LU as your default local LU alias", then click on
  2743.     OK.
  2744.  
  2745.     NOTE:  When you are using DDCS/2 version 2.3, the default local LU
  2746.     name is normally used.  Please refer to "DDCS for OS/2
  2747.     Installation Configuration Guide" regarding optional use of the
  2748.     APPCLLU environment variable.
  2749. 5.  Select 'Modes', then click on Create.
  2750. 6.  From the 'Mode Definition' panel, enter mode name IBMRDB.
  2751.  
  2752.     Verify additional parameters, especially Mode-session-limit, and
  2753.     Minimum contention winners.  Refer to your "DDCS Installation and
  2754.     Configuration Guide".
  2755. 7.  Click on OK.
  2756. 8.  Select 'CPI Communications side info', then click on Create.
  2757. 9.  From the 'CPI Communications Side Information' panel, enter the
  2758.     following:
  2759.     a.  Symbolic destination name: SFLUNODE.  The Symbolic Destination
  2760.         name can be any name, but it must match the
  2761.         symbolic-destination-name of your CATALOG APPC NODE.  Note
  2762.         that this parameter is case sensitive when used with the DB2
  2763.         CATALOG NODE command.
  2764.     b.  Partner LU's Alias: SFLU, or enter fully qualified name:
  2765.         CAIBMOML.SFLU.
  2766.     c.  Check off the box that says "Service TP".
  2767.     d.  TP name: X'07'6DB
  2768.     e.  Select 'Program' for Security type.  Note that what is
  2769.         specified here does not have to be the same as what is
  2770.         specified in the Node catalog.  Whatever is specified in the
  2771.         Node Directory will override this value.
  2772.     f.  Set mode name to IBMRDB, then click on Continue.
  2773.     g.  From the 'CPI Communications Program Security' panel, enter
  2774.         the USERID and Password that will be used, then click on OK.
  2775.  
  2776.  
  2777. 8.5.4.6  Completing the CM Configuration
  2778.  
  2779. 1.  After completing the above steps, select Close twice.  CM/2 will
  2780.     automatically verify your configuration.
  2781. 2.  If your CM/2 is already started then you will see the pop-up
  2782.     prompt "Would you like to dynamically update your SNA resources?".
  2783.     Select No.  Close CM Setup, then stop and restart Communications
  2784.     Manager.
  2785. 3.  If CM/2 is not started, you will see the pop-up screen that says:
  2786.     "Communications Manager installation is complete.  You can start
  2787.     Communication Manager immediately."
  2788. 4.  Click on OK.
  2789. 5.  Close the CM Setup screen then restart Communications Manager.
  2790.  
  2791. NOTE:  If you will use SPM, additional parameters are required.  You
  2792. must manually edit the NDF file, as described in the SPM appendix to
  2793. "DDCS for OS/2 Installation Configuration Guide".
  2794.  
  2795.  
  2796. 8.5.4.7  Sample NDF File created by the above procedure
  2797.  
  2798. Sample NDF file:
  2799.  
  2800.  
  2801.     DEFINE_LOCAL_CP  FQ_CP_NAME(CAIBMOML.OMXRSA  )
  2802.                      CP_ALIAS(OMXRSA  )
  2803.                      NAU_ADDRESS(INDEPENDENT_LU)
  2804.                      NODE_TYPE(NN)
  2805.                      NODE_ID(X'05D30376')
  2806.                      NW_FP_SUPPORT(NONE)
  2807.                      HOST_FP_SUPPORT(YES)
  2808.                      HOST_FP_LINK_NAME(HOST0001)
  2809.                      MAX_COMP_LEVEL(NONE)
  2810.                      MAX_COMP_TOKENS(0);
  2811.  
  2812.     DEFINE_LOGICAL_LINK  LINK_NAME(HOST0001)
  2813.                          FQ_ADJACENT_CP_NAME(CAIBMOML.HOSTDB  )
  2814.                          ADJACENT_NODE_TYPE(LEN)
  2815.                          DLC_NAME(IBMTRNET)
  2816.                          ADAPTER_NUMBER(0)
  2817.                          DESTINATION_ADDRESS(X'400011528905')
  2818.                          ETHERNET_FORMAT(NO)
  2819.                          CP_CP_SESSION_SUPPORT(NO)
  2820.                          SOLICIT_SSCP_SESSION(YES)
  2821.                          NODE_ID(X'05D30376')
  2822.                          ACTIVATE_AT_STARTUP(YES)
  2823.                          USE_PUNAME_AS_CPNAME(NO)
  2824.                          LIMITED_RESOURCE(USE_ADAPTER_DEFINITION)
  2825.                          LINK_STATION_ROLE(USE_ADAPTER_DEFINITION)
  2826.                          MAX_ACTIVATION_ATTEMPTS(USE_ADAPTER_DEFINITION)
  2827.                          EFFECTIVE_CAPACITY(USE_ADAPTER_DEFINITION)
  2828.                          COST_PER_CONNECT_TIME(USE_ADAPTER_DEFINITION)
  2829.                          COST_PER_BYTE(USE_ADAPTER_DEFINITION)
  2830.                          SECURITY(USE_ADAPTER_DEFINITION)
  2831.                          PROPAGATION_DELAY(USE_ADAPTER_DEFINITION)
  2832.                          USER_DEFINED_1(USE_ADAPTER_DEFINITION)
  2833.                          USER_DEFINED_2(USE_ADAPTER_DEFINITION)
  2834.                          USER_DEFINED_3(USE_ADAPTER_DEFINITION);
  2835.  
  2836.     DEFINE_LOCAL_LU  LU_NAME(OMXRSA0A)
  2837.                      LU_ALIAS(OMXRSA0A)
  2838.                      NAU_ADDRESS(INDEPENDENT_LU);
  2839.  
  2840.     DEFINE_PARTNER_LU  FQ_PARTNER_LU_NAME(CAIBMOML.SFLU    )
  2841.                        PARTNER_LU_ALIAS(SFLU)
  2842.                        PARTNER_LU_UNINTERPRETED_NAME(SFLU    )
  2843.                        MAX_MC_LL_SEND_SIZE(32767)
  2844.                        CONV_SECURITY_VERIFICATION(NO)
  2845.                        PARALLEL_SESSION_SUPPORT(YES);
  2846.  
  2847.     DEFINE_PARTNER_LU_LOCATION  FQ_PARTNER_LU_NAME(CAIBMOML.SFLU    )
  2848.                                 WILDCARD_ENTRY(NO)
  2849.                                 FQ_OWNING_CP_NAME(CAIBMOML.HOSTDB  )
  2850.                                 LOCAL_NODE_NN_SERVER(YES);
  2851.  
  2852.     DEFINE_MODE  MODE_NAME(IBMRDB  )
  2853.                  COS_NAME(#CONNECT)
  2854.                  DEFAULT_RU_SIZE(YES)
  2855.                  RECEIVE_PACING_WINDOW(4)
  2856.                  MAX_NEGOTIABLE_SESSION_LIMIT(32767)
  2857.                  PLU_MODE_SESSION_LIMIT(8)
  2858.                  MIN_CONWINNERS_SOURCE(2)
  2859.                  COMPRESSION_NEED(PROHIBITED)
  2860.                  PLU_SLU_COMPRESSION(NONE)
  2861.                  SLU_PLU_COMPRESSION(NONE);
  2862.  
  2863.     DEFINE_DEFAULTS  IMPLICIT_INBOUND_PLU_SUPPORT(YES)
  2864.                      DEFAULT_MODE_NAME(BLANK)
  2865.                      MAX_MC_LL_SEND_SIZE(32767)
  2866.                      DIRECTORY_FOR_INBOUND_ATTACHES(*)
  2867.                      DEFAULT_TP_OPERATION(NONQUEUED_AM_STARTED)
  2868.                      DEFAULT_TP_PROGRAM_TYPE(BACKGROUND)
  2869.                      DEFAULT_TP_CONV_SECURITY_RQD(NO)
  2870.                      MAX_HELD_ALERTS(10);
  2871.  
  2872.     DEFINE_CPIC_SIDE_INFO   SYMBOLIC_DESTINATION_NAME(SFLUNODE)
  2873.                                   PARTNER_LU_ALIAS(SFLU              )
  2874.                                   MODE_NAME(IBMRDB)
  2875.                                   SNA_SERVICE_TP_NAME(X'07'6DB);
  2876.  
  2877.     START_ATTACH_MANAGER;
  2878.  
  2879.  
  2880. 8.5.5  Cataloging DB2 Directory Entries at the Workstation
  2881.  
  2882. When you have configured your SNA subsystem, before you can to use the
  2883. DDCS connection, you may also need to catalog the database, the
  2884. workstation (node), and the DCS database at the DDCS workstation.
  2885.  
  2886.  
  2887. 8.5.5.1  Cataloging the Workstation
  2888.  
  2889. 1.  From an OS/2 prompt, issue the following command:
  2890.  
  2891.        DB2 CATALOG APPC NODE HOSTMVS REMOTE SFLUNODE SECURITY PROGRAM
  2892.  
  2893.     The node name (HOSTMVS) can be any name, but it must match the
  2894.     entry in the system database directory.
  2895. 2.  If you have not previously logged on, you will be prompted for
  2896.     your USERID and Password.
  2897.  
  2898.     NOTES:
  2899.  
  2900.     a.  The Node Name must be unique in the Node Directory
  2901.  
  2902.     b.  The Node Name in the System Database Directory maps to the
  2903.         Node in the Node Directory.
  2904.  
  2905.  
  2906. You can verify the Node directory information using the following
  2907. command:
  2908.  
  2909.      DB2 LIST NODE DIRECTORY
  2910.  
  2911. The output will look like this:
  2912.  
  2913.  
  2914.    Node Directory
  2915.  
  2916.    Number of entries in the directory = 1
  2917.  
  2918.   Node 1 entry:
  2919.  
  2920.    Node name                      = HOSTMVS
  2921.    Comment                        =
  2922.    Protocol                       = APPC
  2923.    Symbolic destination name      = SFLUNODE
  2924.    Security type                  = PROGRAM
  2925.  
  2926.  
  2927. 8.5.5.2  Cataloging the Database
  2928.  
  2929. 1.  Use the following command:
  2930.  
  2931.        DB2 CATALOG DATABASE SFLUDB AS HOSTDB AT NODE HOSTMVS
  2932.        AUTHENTICATION DCS
  2933.  
  2934.     NOTES:
  2935.  
  2936.     a.  The Database name in the System Database Directory maps to the
  2937.         Local Database Name in the DCS Directory.
  2938.  
  2939.     b.  The Node Name in the System Database Directory maps to the
  2940.         Node Name in the Node Directory.
  2941.  
  2942.     c.  The Alias is the name used with the CONNECT statement.
  2943.  
  2944.  
  2945. You can verify the Database directory information using the following
  2946. command:
  2947.  
  2948.     DB2 LIST DATABASE DIRECTORY
  2949.  
  2950. The output will look like this:
  2951.  
  2952.  
  2953.    System Database Directory
  2954.  
  2955.    Number of entries in the directory = 1
  2956.  
  2957.   Database 1 entry:
  2958.  
  2959.    Database alias                  = HOSTDB
  2960.    Database name                   = SFLUDB
  2961.    Node name                       = HOSTMVS
  2962.    Database release level          = 6.00
  2963.    Comment                         =
  2964.    Directory entry type            = Remote
  2965.    Authentication                  = DCS
  2966.  
  2967.  
  2968. 8.5.5.3  Cataloging the DCS Database
  2969.  
  2970. 1.  Use the following DCS Database Catalog command:
  2971.  
  2972.        DB2 CATALOG DCS DATABASE SFLUDB AS SAN_FRANCISCO
  2973.  
  2974.     NOTES:
  2975.  
  2976.     a.  The local database name must be unique in the DCS directory.
  2977.  
  2978.     b.  The database name in the System Database Directory maps to the
  2979.         Local database name in the DCS Directory.
  2980.  
  2981.     c.  The target database name in the DCS directory maps to the DRDA
  2982.         AS location name (RDB_NAME).
  2983.  
  2984.  
  2985. 8.5.5.4  Verify DCS Directory Information
  2986.  
  2987. You can verify your DCS directory information using the following
  2988. command:
  2989.  
  2990.      DB2 LIST DCS DIRECTORY
  2991.  
  2992. The output will look like this:
  2993.  
  2994.  
  2995.    Database Connection Services (DCS) Directory
  2996.  
  2997.    Number of entries in the directory = 1
  2998.  
  2999.   DCS 1 entry:
  3000.  
  3001.    Local database name                = SFLUDB
  3002.    Target database name               = SAN_FRANCISCO
  3003.    Application requestor name         =
  3004.    DCS parameters                     =
  3005.    Comment                            =
  3006.    DCS directory release level        = 0x0100
  3007.  
  3008.  
  3009. 8.5.6  Configuring VTAM
  3010.  
  3011. To configure the VTAM host, you must prepare the necessary
  3012. definitions:
  3013.  
  3014. 1.  The APPL name for the DB2 subsystem (SFLU in these examples).
  3015. 2.  PU and LU definitions for the DDCS workstation (OMXRSA and
  3016.     OMXRSA0A respectively in these examples).
  3017. 3.  The log mode entry to be used for the connection (IBMRDB in these
  3018.     examples).
  3019.  
  3020. Work with your VATM Administrator to determine the options to be used
  3021. on your system.  The following VTAM definitions correlate to
  3022. parameters used elsewhere in this sample scenario.
  3023.  
  3024.  
  3025. 8.5.7  VTAM DB2 APPL Definition
  3026.  
  3027. Sample VTAM definition for the DB2 Application:
  3028.  
  3029.   ----+----1----+----2----+----3----+----4----+----5----+----6----+----7--
  3030.  
  3031.   DB2APPLS VBUILD TYPE=APPL
  3032.  
  3033.   SFLU     APPL  APPC=YES,                                               X
  3034.                  AUTH=(ACQ),                                             X
  3035.                  AUTOSES=1,                                              X
  3036.                  DLOGMOD=IBMRDB,                                         X
  3037.                  DMINWNL=512,                                            X
  3038.                  DMINWNR=512,                                            X
  3039.                  DSESSLIM=2048,                                          X
  3040.                  EAS=6000,                                               X
  3041.                  MODETAB=RDBMODES,                                       X
  3042.                  PARSESS=YES,                                            X
  3043.                  PRTCT=SFLU,                                             X
  3044.                  MODETAB=RDBMODES,                                       X
  3045.                  SECACPT=ALREADYV,                                       X
  3046.                  SRBEXIT=YES,                                            X
  3047.                  VERIFY=NONE,                                            X
  3048.                  VPACING=8
  3049.  
  3050. NOTES:
  3051.  
  3052. 1.  Continuations must begin in column 16.
  3053.  
  3054. 2.  If you will use SPM, you must also include:
  3055.  
  3056.        SYNCLVL=SYNCPT
  3057.  
  3058.  
  3059. 8.5.7.1  VTAM DB2 PU and LU definitions
  3060.  
  3061. Sample Switched Major Node Definition:
  3062.  
  3063.   ----+----1----+----2----+----3----+----4----+----5----+----6----+----7--
  3064.  
  3065.           SWITCHED MAJOR NODE DEFINITION FOR PU OMXRSA and
  3066.           INDEPENDENT LU OMXRSA0A
  3067.  
  3068.   LOC300    VBUILD TYPE=LOCAL
  3069.  
  3070.   OMXRSA         ADDR=01, IDBLK=05D, IDNUM=30376, ANS=CONT, DISCNT=NO,   X
  3071.                  IRETRY=YES, ISTATUS=ACTIVE, MAXDATA=4302,MAXOUT=7,      X
  3072.                  MAXPATH=1,PUTYPE=2,SECNET=NO,MODETAB=RDBMODES           X
  3073.                  SSCPFM=USSSCS,PACING=0,VPACING=2
  3074.  
  3075.   OMXRSA0A  LOCADDR=000, MODETAB=RDBMODES, DLOGMODE=IBMRDB
  3076.  
  3077.   OTHERLU   LOCADDR=002
  3078.  
  3079.  
  3080. 8.5.7.2  Sample Log Mode Definition
  3081.  
  3082. Sample Log Mode:
  3083.  
  3084.  
  3085.   ----+----1----+----2----+----3----+----4----+----5----+----6----+----7---
  3086.  
  3087.   RDBMODES MODTAB
  3088.  
  3089.   IBMRDB   MODEENT LOGMODE=IBMRDB,   DRDA DEFAULT MODE                   *
  3090.                  TYPE=0,             NEGOTIABLE BIND                     *
  3091.                  PSNDPAC=X'01',      PRIMARY SEND PACING COUNT           *
  3092.                  SSNDPAC=X'01',      SECONDARY SEND PACING COUNT         *
  3093.                  SRCVPAC=X'00',      SECONDARY RECEIVE PACING COUNT      *
  3094.                  RUSIZES=X'8989',    RUSIZES IN-4K    OUT-4K             *
  3095.                  FMPROF=X'13',       LU6.2 FM PROFILE                    *
  3096.                  TSPROF=X'07',       LU6.2 TS PROFILE                    *
  3097.                  PRIPROT=X'B0',      LU6.2 PRIMARY PROTOCOLS             *
  3098.                  SECPROT=X'B0',      LU6.2 SECONDARY PROTOCOLS           *
  3099.                  COMPROT=X'D0B1',    LU6.2 COMMON PROTOCOLS              *
  3100.                  PSERVIC=X'060200000000000000122F00'    LU6.2 LU TYPE
  3101.  
  3102.   SNASVCMG MODEENT LOGMODE=SNASVCMG, DRDA DEFAULT MODE                   *
  3103.                  PSNDPAC=X'00',      PRIMARY SEND PACING COUNT           *
  3104.                  SSNDPAC=X'02',      SECONDARY SEND PACING COUNT         *
  3105.                  SRCVPAC=X'00',      SECONDARY RECEIVE PACING COUNT      *
  3106.                  RUSIZES=X'8585',    RUSIZES IN-1K    OUT-1K             *
  3107.                  FMPROF=X'13',       LU6.2 FM PROFILE                    *
  3108.                  TSPROF=X'07',       LU6.2 TS PROFILE                    *
  3109.                  PRIPROT=X'B0',      LU6.2 PRIMARY PROTOCOLS             *
  3110.                  SECPROT=X'B0',      LU6.2 SECONDARY PROTOCOLS           *
  3111.                  COMPROT=X'D0B1',    LU6.2 COMMON PROTOCOLS              *
  3112.                  PSERVIC=X'060200000000000000000300'    LU6.2 LU TYPE
  3113.  
  3114. NOTE:  You must define SNASVCMG when using APPC.
  3115.  
  3116.  
  3117. 8.5.8  Configuring DB2/MVS
  3118.  
  3119. Before you can use the DDCS connection, you need to configure DB2/MVS
  3120. to allow connections remote requests.  The example below suggests a
  3121. simple configuration.  Work with your DB2 Administrator to determine
  3122. the options to be used on your DB2/MVS system.
  3123.  
  3124.  
  3125. 8.5.8.1  Updating the SYSIBM.SYSUSERNAMES Table
  3126.  
  3127.  
  3128.   COLUMN               EXAMPLE              REMARK
  3129.   ======               =======              ======
  3130.   Type                    I
  3131.   Authid               (blank)
  3132.   LU Name              OMXRSA0A             Must match the DDCS/2 g/w's LU name
  3133.   NewAuthID            (blank)
  3134.   Password             (blank)
  3135.  
  3136.   USERNAMES types are: O (outbound translation), I (inbound translation),
  3137.   B (both inbound and outbound) and blank (no authorization ids are
  3138.   translated, and no password is sent to the server).
  3139.  
  3140.  
  3141. You can use a DB2/MVS command such as the following to update this
  3142. table:
  3143.  
  3144.     INSERT INTO SYSIBM.SYSUSERNAMES VALUES('I','JASI','OMXRSA0A',' ',' ');
  3145.  
  3146.  
  3147. 8.5.8.2  Update the SYSIBM.SYSLUNAMES Table
  3148.  
  3149.  
  3150.   COLUMN               EXAMPLE              REMARK
  3151.   ======               =======              ======
  3152.   LUNAME               OMXRSA0A             Must match the DDCS Gateway LU name
  3153.   SYSMODENAME           IBMRDB
  3154.   USERSECURITY            A
  3155.   ENCRYPTPSWDS            N
  3156.   MODESELECT              N
  3157.   USERNAMES               I
  3158.  
  3159.  
  3160. You can use a DB2/MVS command such as the following to update this
  3161. table:
  3162.  
  3163.     INSERT INTO SYSIBM.SYSLUNAMES VALUES('OMXRSA0A',' ','A','N',' ','I');
  3164.  
  3165.  
  3166. 8.6  Connectivity Via DDCS (Thailand Users Only)
  3167.  
  3168. Please note that currently only connectivity between DB2 for OS/2 and
  3169. DB2 for AIX is supported.
  3170.  
  3171. Connectivity between the following is not supported due to the Thai
  3172. CCSID, 838, not being supported on the host:
  3173.  
  3174.     DB2 for OS/2 and DB2 for MVS via DDCS
  3175.     DB2 for OS/2 and DB2 for OS/400 via DDCS
  3176.     DB2 for OS/2 and DB2 for VM and VSE via DDCS
  3177.  
  3178.     DB2 for AIX and DB2 for MVS via DDCS
  3179.     DB2 for AIX and DB2 for OS/400 via DDCS
  3180.     DB2 for AIX and DB2 for VM and VSE via DDCS
  3181.  
  3182.  
  3183. 8.7  DDCS User's Guide BIND Information
  3184.  
  3185. On Page 20 of "DDCS User's Guide", S20H-4793-00, Figure 4 "Bind Files
  3186. and Packages" contains information that has been superseded for DDCS
  3187. Version 2.3.1.  The respective "xxx" values for DB2 Version 2.1.1 and
  3188. DDCS Version 2.3.1 are as follows:
  3189.  
  3190. 5W0       DB2 Client Application Enabler for Windows Version 2.1.1
  3191. 5D0       DB2 Client Application Enabler for OS/2 Version 2.1.1
  3192. 5C0       DB2 Client Application Enabler for AIX Version 2.1.1, also
  3193.           for HP-UX and Solaris.
  3194.  
  3195. For the complete updated text of this table please refer to the
  3196. appropriate "Installing and Using Clients" manual for your system.
  3197.  
  3198.  
  3199. 8.8  OS/2 Coexistence Considerations
  3200.  
  3201. With reference to Page 72 of S20H-4795-01 "DDCS for OS/2 Installation
  3202. and Configuration Guide", and the two paragraphs under this heading,
  3203. there are no additional considerations which apply to OS/2.
  3204.  
  3205.  
  3206. 9.  Communications Issues
  3207.  
  3208. 9.1  TCP/IP
  3209.  
  3210. If an application attempting a CONNECT to the server using the TCP/IP
  3211. protocol receives a -30081 error message with the first error token
  3212. containing a value of ETIMEDOUT (10060, 78, 145, 238) or EADDRINUSE
  3213. (10048, 67, 125, 226), or ECONNREFUSED (10061, 79, 146, 239); these
  3214. errors indicate that the server is handling too many incoming
  3215. connection requests or that the network is very busy.  The application
  3216. should pause for a short time then attempt the connection again.
  3217.  
  3218. Also, in the case where ECONNREFUSED is received, check that TCP/IP
  3219. support at the database server has been successfully started.
  3220.  
  3221.  
  3222. 10.  Sample Tools and Utilities
  3223.  
  3224. A number of sample tools and utilities have been provided with this
  3225. product for your convenience. These samples are provided "as-is"
  3226. without any warranty of any kind.  However, if you encounter an error,
  3227. let us know.
  3228.  
  3229. The sample tools and utilities can be found in the X:\sqllib\misc
  3230. directory, where X: is the drive where the product was installed.  The
  3231. db2cli utility can be found in the sqllib\samples\cli directory.
  3232.  
  3233. The following is a list of the sample tools and utilities provided:
  3234.  
  3235. Name          Description
  3236. ----          -----------
  3237.  
  3238. db2batch      DB2 Dynamic SQL Statement Processor
  3239.               (Described in the Administration Guide)
  3240.  
  3241. db2bfd        DB2 Bind file description tool
  3242.               (Described in the Application Programming Guide)
  3243.  
  3244. db2cli        DB2 Interactive CLI (executable) for design and prototyping in CLI
  3245.               (Described in INTCLI.DOC in sqllib\samples\cli)
  3246.  
  3247. db2evmon      Formats event monitor file and named pipe output,
  3248.               and writes it to standard out.
  3249.               (Described in the Performance Monitor Guide)
  3250.  
  3251. db2exfmt      Formats the contents of the Explain tables.
  3252.               Given a database name and other qualifying information,
  3253.               this tool will, query the Explain tables for information
  3254.               and format the results.
  3255.               (Located in sqllib/misc)
  3256.               Information about this utility is available by typing
  3257.               "db2exfmt -help" on a command line.
  3258.  
  3259. db2expln      DB2 SQL Explain Tool
  3260.               (Described in the Administration Guide)
  3261.  
  3262. db2ico        Run this REXX program from sqllib\misc to recreate
  3263.               the IBM DATABASE 2 folder and icons.  No parameters
  3264.               are necessary if DB2 for OS/2 is installed.
  3265.  
  3266. db2ipxad      Returns the server's IPX/SPX** internetwork address for use by the
  3267.               user on a remote client machine who is cataloging an IPX/SPX node
  3268.               using direct addressing mode.
  3269.               (Mentioned in the Installing and Using OS/2 Clients and
  3270.               Installing and Using DB2 Clients for Windows manual)
  3271.  
  3272. db2look       DB2 statistics extraction tool
  3273.               (Described in the Administration Guide)
  3274.  
  3275. db2resdb      An executable to support the restoring of back-level database
  3276.               backups taken from DB2 for OS/2 Version 1.x as well as Extended Services 1.0.
  3277.               The syntax is as follows:
  3278.  
  3279.               db2resdb <dbname> <source drive> <target drive>
  3280.  
  3281. db2tbst       Takes a hexadecimal state value (as given from the
  3282.               "list tablespaces" command) and interprets the state.
  3283.  
  3284.               When you execute a DB2 command that leaves a tablespace in
  3285.               anything other than the normal state, using that
  3286.               tablespace may not be possible, but the cause of the
  3287.               problem is not always clear.  The "list tablespaces"
  3288.               command indicates the state in the form of a hexadecimal
  3289.               string which must be interpreted based on a combination
  3290.               of state values found in sqlutil.h.  Rather than perform
  3291.               this interpretation manually, the db2tbst applet may be
  3292.               used.  For example, if you enter db2tbst 0x000c,
  3293.               the following output is generated (in English only):
  3294.  
  3295.               State = Quiesced Exclusive
  3296.               + Load Pending
  3297.  
  3298. db2untag      Displays a container tag's information so that the sysadm can
  3299.               check the "owning" database.
  3300.               (Described in this README file in the section entitled
  3301.               Dealing with Container in Use Error Message -294)
  3302.  
  3303. dynexpln      Example of how to explain dynamic SQL using db2expln
  3304.               (Described in the Administration Guide)
  3305.  
  3306. explain.ddl   Sample DDL to create Explain tables
  3307.               (Described in the Administration Guide)
  3308.  
  3309. isql          Creates dummy tables to allow access from DB2 for VM using ISQL.
  3310.               (Described in the Installation and Operation Guide)
  3311.  
  3312. lstaltsm      Sample DDL to retrieve alerts for Snapshot Monitor
  3313.               (Located in sqllib/samples/mon)
  3314.               (Described in the Database Director Getting Started)
  3315.  
  3316. sample.pv     Sample performance variable profile for Snapshot Monitor
  3317.               (Located in sqllib/samples/mon)
  3318.               (Described in the Database Director Getting Started)
  3319.  
  3320. sqldbsu       Creates dummy tables to allow access from DB2 for VM using SQLDBSU.
  3321.               (Described in the Installation and Operation Guide)
  3322.  
  3323. storproc.ddl  Sample DDL to create stored procedures
  3324.               pseudo_catalog DB2CLI.PROCEDURES
  3325.               (Described in the Call Level Interface Guide and Reference)
  3326.  
  3327. storproc.dml  Sample DML to insert entries into stored procedure
  3328.               pseudo_catalog DB2CLI.PROCEDURES
  3329.               (Described in the Call Level Interface Guide and Reference)
  3330.  
  3331. vesampl.ddl   Sample DDL to export snapshots for Visual Explain
  3332.               (Located in sqllib/samples/ve)
  3333.               (Described in the Database Director Getting Started)
  3334.  
  3335.  
  3336. 11.  Limitations in Documented Functions
  3337.  
  3338. This section identifies limitations that exist in the current release.
  3339.  
  3340.  
  3341. 11.1  Transaction Manager Database Considerations
  3342.  
  3343. When Distributed Unit of Work (DUOW) is used, DB2 for OS/2 and DDCS
  3344. for OS/2 need to have a Transaction Manager (TM) database created.
  3345. While this database is very much like any other DB2 database, there
  3346. are certain restrictions and considerations that should be taken into
  3347. account:
  3348.  
  3349. o   This is a system database for use by DB2.  It is recommended that
  3350.     it not be used for storing any other data.
  3351. o   The name of this database should not be made known to the general
  3352.     user population.
  3353. o   This database should not be accessed by DRDA client systems.
  3354. o   This database should not be catalogued in the DCS directory.
  3355. o   When the DDCS for OS/2 product is installed without DB2 for OS/2,
  3356.     DDCS License Terms prohibit the use of this database for storing
  3357.     user data.
  3358.  
  3359.  
  3360. 11.2  Command and API Limitations
  3361.  
  3362. The following limitation exists for version 2.1.1:
  3363.  
  3364. o   The precompiler OPTLEVEL option indicates whether the precompiler
  3365.     is to optimize initialization of internal SQLDAs when host
  3366.     variables are used in SQL statements. The use of OPTLEVEL 1 to
  3367.     turn on SQLDA optimization has been disabled due to potential
  3368.     problems it may cause.  This is done at the runtime level, so that
  3369.     existing applications precompiled with OPTLEVEL 1 do not have to
  3370.     be reprecompiled. However, no SQLDA optimization will take place.
  3371.     This is OPTLEVEL 0 behaviour.
  3372.  
  3373.  
  3374. 11.3  WCHARTYPE CONVERT Precompile Option Limitation
  3375.  
  3376. In the Application Programming Guide, in Chapter 10, "Programming in C
  3377. and C++", under the heading "The WCHARTYPE Precompiler Option", the
  3378. WCHARTYPE CONVERT precompile option is described.
  3379.  
  3380. The WCHARTYPE CONVERT precompile option is not currently supported in
  3381. programs executing from the DB2 V2.1 Windows client.  In these cases
  3382. the default (WCHARTYPE NOCONVERT) should be used.
  3383.  
  3384. When using WCHARTYPE CONVERT on DB2 for OS/2 with the C/Set++
  3385. compiler, the /Sn compile option must be used to enable the compiler
  3386. to support L-literals.
  3387.  
  3388.  
  3389. 11.4  Using DB2 with an XA-Compliant Transaction Manager
  3390.  
  3391. In the Administration Guide, in Appendix D, "X/Open Distributed
  3392. Transaction Processing Model", in the section entitled "Application
  3393. Program (AP)", under the item "Global Transactions", loosely coupled
  3394. global transactions and tightly coupled global transactions are
  3395. described.
  3396.  
  3397. The X/OPEN xa.h file has been modified to support the _System linkage
  3398. convention on OS/2 and is provided under the \sqllib\include
  3399. directory.  The modified version should be used for DB2 XA-interface.
  3400.  
  3401.  
  3402. 11.5  Database Director Limitations
  3403.  
  3404. The Database Director cannot be used to manage DRDA servers.
  3405.  
  3406. The following 4 configuration parameters are not supported by the
  3407. Database Director:
  3408.  
  3409. adsm_password
  3410. adsm_nodename
  3411. adsm_owner
  3412. dft_queryopt
  3413.  
  3414.  
  3415. 11.5.1  Restriction for Visual Explain
  3416.  
  3417. The following restrictions apply to Visual Explain:
  3418.  
  3419. o   Connectivity between AIX clients and OS/2 servers and OS/2 clients
  3420.     and AIX servers is not supported.  You will not be able to invoke
  3421.     the access plan graph.
  3422.  
  3423. o   The client used to display an access plan graph must use the same
  3424.     code page as the database to which it is connected.
  3425.  
  3426. o   If you have created a snapshot in one code page, and are viewing
  3427.     the Access Plan graph for that snapshot in another code page, you
  3428.     will see unreadable characters for the names of database objects
  3429.     such as tables, columns, indices.
  3430.  
  3431. o   You can only display the Access Plan graph overview window once
  3432.     for every Access plan graph.  The overview menu item is grayed out
  3433.     and the overview icon is disabled once the overview window is
  3434.     opened the first time.
  3435.  
  3436.  
  3437. 11.5.1.1  Snapshot Monitor
  3438.  
  3439. o   There is no limit to the number of performance variables that can
  3440.     be displayed on performance graphs on AIX and OS/2. However, the
  3441.     AIX graph can differentiate between 63 performance variables
  3442.     before it starts reusing the same combinations of line colors and
  3443.     point markers.  The limit for the OS/2 graph is 56 performance
  3444.     variables.  However, if you plan to change either the scale or
  3445.     threshold of a displayed performance variable on a graph on either
  3446.     platform, limit the number of displayed performance variables to
  3447.     20.  This limit becomes evident when using the "Change" menu
  3448.     action from the "Performance variable" pull down.
  3449.  
  3450. o   If you monitor in a code page that differs from the code page of
  3451.     the database, no performance data will be returned for monitored
  3452.     tables and table spaces, unless their names have the same
  3453.     representation in both code pages.
  3454.  
  3455. If you are using a DBCS version of the DB2 server, you will not be
  3456. able to put DBCS labels and performance variable names (including the
  3457. name, group name and description) in the variable profile of the
  3458. Performance Monitor.
  3459.  
  3460. Also, the IBM-supplied labels on the Performance Graph View will be
  3461. displayed in English.
  3462.  
  3463. The 2 labels are:
  3464.  
  3465.     x axis ... "Local time"
  3466.     y axis ... "Percent of SCALE"
  3467.  
  3468.  
  3469. 11.5.1.2  Event Analyzer
  3470.  
  3471. When analyzing a trace and connecting to a remote AIX database, to
  3472. obtain static text using the -conn and -db options, you need to set
  3473. the database manager authentication parameter to 'client'.
  3474.  
  3475. If you have created an event monitor trace in one code page and
  3476. analyze it in a different code page, you may see unreadable characters
  3477. for the names of database objects such as packages, tables, and table
  3478. spaces.
  3479.  
  3480.  
  3481. 11.6  Online Backup and Load with COPY NO option
  3482.  
  3483. At the end of a LOAD with the COPY NO option, the tablespace(s) are
  3484. put into Backup Pending state. Before backing up the loaded
  3485. tablespaces, all connections to the database must be terminated.  This
  3486. can be performed by issuing FORCE APPLICATION ALL and/or DEACTIVATE
  3487. DATABASE.
  3488.  
  3489. If an online backup is in progress, do not start a LOAD with the COPY
  3490. NO option.
  3491.  
  3492.  
  3493. 12.  Using the DB2 ODBC Driver with ODBC Applications
  3494.  
  3495. Please pay particular attention to the chapters titled 'Setting up
  3496. Communications for the Client', and 'Using the Client' in the manual
  3497. called "Installing and Using DB2 Clients for OS/2 Version 2". There
  3498. will be no separate DB2ODBC.TXT file. All the information related to
  3499. ODBC usage is provided in the "Installing and Using DB2 Clients for
  3500. OS/2 Version 2" manual and the rest of this section.
  3501.  
  3502.  
  3503. 12.1  Common Application Problems and Work Arounds
  3504.  
  3505. The Patch1 keyword (specified in the DB2CLI.INI file) is used to
  3506. specify work arounds for specific application problems.  There are
  3507. currently no work arounds that apply to OS/2 applications.
  3508.  
  3509. NOTE:  Most ODBC applications do not support LOB data types, and thus
  3510. require the LONGDATACOMPAT keyword to be set to 1.
  3511.  
  3512. There are currently two supported ODBC Driver Managers for ...  OS/2:
  3513.  
  3514. o   Visigenic's ODBC Driver Manager (shipped with all DB2 for OS/2 V
  3515.     2.1.1 products).
  3516.  
  3517. o   Intersolv's ODBC Driver Manager (contains its own DB2 ODBC ...
  3518.     Driver).
  3519.  
  3520.  
  3521. 12.1.1  Visigenic's ODBC Driver Manager
  3522.  
  3523. This Driver Manager is shipped with DB2 for OS2, and is installed or
  3524. updated when the ODBC Installer is ran from the DB2 folder
  3525. (DB2ODBC.EXE in -sqllib-bin).  The steps for using the ODBC installer
  3526. and adding data sources is described in the "Installing and using DB2
  3527. Clients for OS/2".
  3528.  
  3529. Visigenic uses the ODBC_PATH environment variable to indicate where
  3530. the Driver Manager is installed.
  3531.  
  3532. Note, the Visigenic ODBC Driver Manager copies the DB2CLI.DLL to its
  3533. own directory, and adds this path to the system LIB path.  If any DB2
  3534. service upgrades are applied, you must rerun the ODBC installer to
  3535. copy the new DB2CLI.DLL.
  3536.  
  3537.  
  3538. 12.1.2  Intersolv's ODBC Driver Manager
  3539.  
  3540. In the OS/2 environment, if you wish to use IBM's DB2 ODBC Driver
  3541. instead of the DB2 ODBC driver provided in the Intersolv DataDirect
  3542. ODBC Driver Pack for OS/2, you need to run the "DB2ODBC" executable
  3543. (DB2ODBC.EXE in SQLLIB\BIN) from an OS/2 command line. Running this
  3544. executable registers IBM's DB2 ODBC Driver in the Intersolv ODBC
  3545. installation file.
  3546.  
  3547. If the DB2ODBC executable completed successfully, you will be returned
  3548. to the OS/2 command prompt. Otherwise, an error message will be
  3549. printed before returning you to the command prompt.
  3550.  
  3551. After running DB2ODBC.EXE successfully, you can now use the Intersolv
  3552. ODBC Administrator to add, configure DB2 data sources.
  3553.  
  3554. To configure your DB2 ODBC Driver for OS/2 with DB2 specific features,
  3555. you need to use the DB2CLI.INI file. Refer to the book titled
  3556. "Installing and Using DB2 Clients for OS/2 Version 2".
  3557.  
  3558.  
  3559. 12.2  Limitations of CLI/ODBC Administrator and Client Setup GUI Tools
  3560.  
  3561. The CLI/ODBC Administrator and Client Setup GUI utilities do not
  3562. support the use of data source names that are different than the
  3563. catalogued database alias
  3564.  
  3565. You can manually edit the ODBC.INI and DB2CLI.INI files to specify a
  3566. data source name that is longer than the 8 character database alias
  3567. catalogued in the database directory.  The DBALIAS keyword must then
  3568. be used within the data source section of the DB2CLI.INI file to map
  3569. the new data source name to the catalogued database alias.  You must
  3570. edit the data source name (within square brackets) in the DB2CLI.INI
  3571. file to match the value in the ODBC.INI file.
  3572.  
  3573. If you change the data source names, the CLI/ODBC Administrator and
  3574. Client Setup utilities will not be able to recognize the cataloged
  3575. database as being a valid ODBC data source.
  3576.  
  3577. The following configuration keywords cannot yet be modified using the
  3578. CLI/ODBC Administrator:
  3579.  
  3580. o   CURRENTFUNCTIONPATH
  3581. o   MULTICONNECT
  3582. o   OPTIMIZEFORNROWS
  3583.  
  3584. See either the "Installing and Using DB2 Clients for OS/2 Version 2"
  3585. manual or the "Call Level Interface" manual for more information on
  3586. these configuration keywords.
  3587.  
  3588.  
  3589. 12.3  SQLDescribeParam()
  3590.  
  3591. With this release of DB2 v2.1.1, the DB2 CLI/ODBC function call
  3592. SQLDescribeParam() is now supported. This function returns the
  3593. description of a parameter marker associated with a prepared SQL
  3594. statement. You will receive an SQLSTATE of S1C00 - 'Driver not
  3595. capable' if you attempt to run this command against any DB2 common
  3596. server before this release of 2.1.1, or against a DRDA data source.
  3597.  
  3598. One output of the SQLDescribeParam() function indicates whether the
  3599. parameter allows NULL values. Currently the DB2 CLI/ODBC driver always
  3600. returns SQL_NULLABLE_UNKNOWN.
  3601.  
  3602. SQLGetFunctions() will not correctly indicate whether
  3603. SQLDescribeParam() is available.  Until you run either SQLPrepare() or
  3604. SQLExecDirect(), SQLGetFunctions() will always return TRUE (always
  3605. indicating that SQLDescribeParam() is available). Once you run either
  3606. of these two functions, SQLGetFunctions() will correctly indicate
  3607. whether SQLDescribeParam() is supported, based on the version of your
  3608. DB2 server.
  3609.  
  3610. See the new db2cli.ini keyword 'DescribeParam' for details on enabling
  3611. or disabling this new CLI/ODBC function when connecting to DB2 v2.1.1
  3612. servers.
  3613.  
  3614.  
  3615. 12.4  New CLI/ODBC Configuration Keywords in db2cli.ini
  3616.  
  3617. The following ODBC configuration keywords were not described in the
  3618. book:
  3619.  
  3620. CURRENTFUNCTIONPATH = CURRENT_FUNCTION_PATH
  3621.     This keyword defines the path used to resolve function references
  3622.     and data type references that are used in dynamic SQL statements.
  3623.     It contains a list of one or more schema-names, where schema-names
  3624.     are enclosed in double quotes and separated by commas.
  3625.  
  3626.     The default value is "SYSIBM","SYSFUN",X where X is the value of
  3627.     the USER special register delimited by double quotes.  The schema
  3628.     SYSIBM does not need to be specified.  If it is not included in
  3629.     the function path then it is implicitly assumed as the first
  3630.     schema.
  3631.  
  3632.     This keyword is used as part of the process for resolving
  3633.     unqualified function references that may have been defined in a
  3634.     schema name other than the current users' schema.  The order of
  3635.     the schema names determines the order in which the function names
  3636.     will be resolved.  For more information on function resolution,
  3637.     refer to the SQL Reference guide.
  3638.  
  3639. MULTICONNECT = 0 | 1
  3640.     This keyword is used to specify how "SQLConnect()" requests are
  3641.     mapped to physical database connections.
  3642.  
  3643.         0 = false
  3644.  
  3645.         Each "SQLConnect()" request by the application will result in
  3646.         a physical database connection.
  3647.  
  3648.         1 = true
  3649.  
  3650.         All connections for the application are mapped to one physical
  3651.         connection.
  3652.  
  3653.         This may be used if the ODBC application runs out of file
  3654.         handles because it uses so many connections.
  3655.  
  3656.     NOTE:  If MULTICONNECT is set to true then all statements are
  3657.     executed on the same connection and therefore in the same
  3658.     transaction.  This means that a rollback will rollback ALL
  3659.     statements on all connections.  Be sure that the application is
  3660.     designed to work with MULTICONNECT set to true before doing so or
  3661.     the application may not operate correctly.
  3662.  
  3663. OPTIMIZEFORNROWS = INTEGER
  3664.     This keyword will append the "OPTIMIZE FOR n ROWS" clause to every
  3665.     select statement, where n is an integer larger than 0.  The
  3666.     default action is not to append this clause.
  3667.  
  3668.     For more information on the effect of the OPTIMIZE FOR n ROWS
  3669.     clause, refer to the SQL Reference guide.
  3670.  
  3671. IGNOREWARNINGS = 0 | 1
  3672.  
  3673.         0 = Warnings reported as usual (default).
  3674.  
  3675.         1 = All warnings are ignored, SQL_SUCCESS is returned.
  3676.  
  3677.     Use this keyword if an application does not handle warnings
  3678.     properly.
  3679.  
  3680.  
  3681. 12.4.1  CLI/ODBC Trace File
  3682.  
  3683. The DB2 CLI/ODBC driver can now write the details of all function
  3684. calls to a trace file which can be sent to IBM support to help resolve
  3685. problems. A programmer familiar with the workings of CLI/ODBC could
  3686. also look at this file to gain a better understanding of program
  3687. execution.
  3688.  
  3689. Three additional keywords in the db2cli.ini have been added to
  3690. facilitate this function. They are located in the [COMMON] section in
  3691. the initialization file:
  3692.  
  3693. o   Trace = 1 (on) or 0 (off) - defaults to 0
  3694.  
  3695. o   TraceFileName = <full file name>
  3696.  
  3697.     If the file does not exist then it will be created, otherwise the
  3698.     new trace information will be appended to the end of the file.
  3699.  
  3700.     No trace will occur, and no error message will be returned, if the
  3701.     filename given is invalid or if the file cannot be created or
  3702.     written to.
  3703.  
  3704. o   TraceFlush = 1 (on) or 0 (off) - defaults to 0
  3705.  
  3706.     Set this keyword to 1 to force a write to disk after each Trace
  3707.     entry.  This will slow down the trace process, but will ensure
  3708.     that each entry is written to disk before the program continues to
  3709.     the next statement.
  3710.  
  3711. For example, the following settings in the db2cli.ini file will write
  3712. all details of DB2 CLI/ODBC function calls to a file called
  3713. C:\TRACE\MONDAY.TRC after each is executed.
  3714.  
  3715.   [COMMON]
  3716.   ...
  3717.   Trace=1
  3718.   TraceFileName=C:\TRACE\MONDAY.TRC
  3719.   TraceFlush=1
  3720.  
  3721.  
  3722. 12.4.2  Specifying a Directory for Temporary Files
  3723.  
  3724. When working with Large Objects (CLOBS, BLOBS, etc...), a temporary
  3725. file is often created on the client machine to store the information.
  3726. It is possible that in some cases the system temporary directory
  3727. setting will not be used. The db2cli.ini keyword 'TempDir' has been
  3728. created to ensure that the DB2 CLI/ODBC driver manager selects an
  3729. appropriate path.
  3730.  
  3731. The keyword is placed in the datasource specific section of the
  3732. db2cli.ini file, and has the following syntax:
  3733.  
  3734. o   TempDir=<full path name>
  3735.  
  3736.     When a Large Object is accessed, an SQLSTATE of S1507 will be
  3737.     returned if the path name is invalid, or if the temporary files
  3738.     cannot be created in the directory specified.
  3739.  
  3740.  
  3741. 12.4.3  SQLDescribeParam() Enable/Disable
  3742.  
  3743. The keyword 'DescribeParam' has been added to allow you to enable or
  3744. disable the new SQLDescribeParam() function. The keyword is placed in
  3745. the datasource specific section of the db2cli.ini file, and has the
  3746. following syntax:
  3747.  
  3748. o   DescribeParam = 0 or 1 (defaults to 0)
  3749.  
  3750.     0 = Disable SQLDescribeParam() - default
  3751.  
  3752.     1 = Enable SQLDescribeParam()
  3753.  
  3754. This keyword has the following effect based on the version of the DB2
  3755. server you are connecting to:
  3756.  
  3757. o   DB2 server before 2.1.1
  3758.  
  3759.     Keyword has no effect
  3760.  
  3761.     -   SQLGetFunctions() will indicate that SQLDescribeParam() is not
  3762.         supported
  3763.     -   if you call SQLDescribeParam() it will return SQLSTATE S1C00 -
  3764.         'Driver not capable'
  3765.  
  3766. o   DB2 server version 2.1.1, up to but not including this National Language
  3767.     version.
  3768.  
  3769.     Set DescribeParam = 0 to avoid errors if your application does
  3770.     call SQLDescribeParam(). This will:
  3771.  
  3772.     -   disable the SQLDescribeParam() function (if you call
  3773.         SQLDescribeParam() it will return SQLSTATE S1C00 - 'Driver not
  3774.         capable')
  3775.     -   have SQLGetFunctions() indicate that SQLDescribeParam() is not
  3776.         available
  3777.  
  3778. o   This current National Language version of the DB2 server version 2.1.1
  3779.  
  3780.     Setting DescribeParam to 1 will:
  3781.  
  3782.     -   enable the SQLDescribeParam() function
  3783.     -   have SQLGetFunctions() indicate that SQLDescribeParam() is
  3784.         available
  3785.  
  3786.     Setting DescribeParam to 0 will:
  3787.  
  3788.     -   disable the SQLDescribeParam() function (if you call
  3789.         SQLDescribeParam() it will return SQLSTATE S1C00 - 'Driver not
  3790.         capable')
  3791.     -   have SQLGetFunctions() indicate that SQLDescribeParam() is not
  3792.         available
  3793.  
  3794.  
  3795. 12.4.4  Asynchronous ODBC Enable/Disable
  3796.  
  3797. The keyword 'AsyncEnable' has been added to allow you to enable or
  3798. disable the new asynchronous features. The keyword is placed in the
  3799. datasource specific section of the db2cli.ini file, and has the
  3800. following syntax:
  3801.  
  3802. AsyncEnable = 0 or 1
  3803.  
  3804. o   0 = Disable the new asynchronous features. The DB2 CLI/ODBC driver
  3805.     will act as it did with previous versions that did not support
  3806.     asynchronous
  3807.  
  3808. o   1 = Enable the new asynchronous features as described above.
  3809.  
  3810.  
  3811. 13.  Miscellaneous
  3812.  
  3813. 13.1  DB2 Family Newsletter
  3814.  
  3815. For the latest information about the DB2 family of products, you may
  3816. subscribe to the "DB2 Family Newsletter" (English only).  Simply send
  3817. your request in a FAX to 1-905-316-4733, and include the following
  3818. information:
  3819.  
  3820.     Name
  3821.     Company name
  3822.     Full mailing address
  3823.     Telephone number
  3824.     DB2 products you currently use
  3825.  
  3826. -------------------------------------------------------------------
  3827.  
  3828. *  are trademarks or registered trademarks of IBM Corporation.
  3829.  
  3830. ** are trademarks or registered trademarks of their respective owners.
  3831.  
  3832. -------------------------------------------------------------------
  3833.  
  3834. ***********************************************************************
  3835. **                                                                   **
  3836. **  (c) COPYRIGHT INTERNATIONAL BUSINESS MACHINES CORPORATION 1996.  **
  3837. **                    ALL RIGHTS RESERVED.                           **
  3838. **                                                                   **
  3839. ***********************************************************************
  3840.