DEC DB Integrator Gateway for_DB2[TM]_Server____________________________ Installation and Configuration Guide Part Number: AA-MI29D-TE November 1994 This guide describes how to prepare for, install, and maintain DEC DB Integrator Gateway for DB2 Server on an IBM system. This product was formerly known as DEC RdbAccess Server for DB2, and as VIDA Server for DB2. Revision/Update Information: This guide supersedes the guide for Version 2.0 of DEC DB Integrator Gateway for DB2 Server Software Version: DEC DB Integrator Gateway for DB2 Server Version 3.1 Digital Equipment Corporation Maynard, Massachusetts __________________________________________________________ Digital Equipment Corporation makes no representations that the use of its products in the manner described in this publication will not infringe on existing or future patent rights, nor do the descriptions contained in this publication imply the granting of licenses to make, use, or sell equipment or software in accordance with the description. Possession, use, or copying of the software described in this publication is authorized only pursuant to a valid written license from Digital or an authorized sublicensor. © Digital Equipment Corporation 1994. All rights reserved. The following are trademarks of Digital Equipment Corporation: ACMS, ALL-IN-1, AlphaGeneration, AXP, Bookreader, CDD/Plus, CDD/Repository, CI, DEC, DEC Rdb, DEC TCP/IP, DECdecision, DECdtm, DECforms, DECintact, DECnet, DECnet-DOS, DECplan, DECpresent, DECtp, DECtrace, DECwindows, Digital, HSC, MASSBUS, MicroVAX, OpenVMS, PATHWORKS, RA, Rdb Language Translator, Rdb/VMS, SPM, ULTRIX, UNIBUS, VAX, VAX Ada, VAX BASIC, VAX C, VAX CDD, VAX COBOL, VAX DATATRIEVE, VAX DBMS, VAX DOCUMENT, VAX FMS, VAX FORTRAN, VAX MACRO, VAX Pascal, VAX Performance Advisor, VAX RALLY, VAX Rdb/ELN, VAX RMS, VAX SCAN, VAX 6000, VAX TEAMDATA, VAX Xway, VAXcluster, VAXELN, VAXset, VAXstation, VIDA, VMS, VMScluster, and the DIGITAL logo. The following are third-party trademarks: PostScript is a registered trademark of Adobe Systems Incorporated. Apple is a registered trademark of Apple Computer, Inc. CA-ACF2 is a trademark of Computer Associates International, Inc. Interbase is a registered trademark of Borland International, Inc. Cincom is a registered trademark of Cincom Systems, Inc. SequeLink is a trademark and is licensed by Digital Equipment Corporation, Maynard, Massachusetts, from GnOsIs NV 1990, and TechGnosis Incorporated 1991. TechGnosis is a registered trademark of GnOsIs NV. All rights reserved. HP and HP-UX are registered trademarks of Hewlett-Packard Company. API/SQL, EDA/Link, EDA/SQL, Enterprise Data Access, and Enterprise Data Access/SQL are trademarks of Information Builders, Inc. INFORMIX is a registered trademark of Informix Software, Inc. INGRES is a registered trademark of Ingres Corporation. IBM is a registered trademark of International Business Machines Corporation. DB2, CICS, CICS/ESA, CICS/MVS, MVS/ESA, MVS/XA, RACF, and VTAM are trademarks of International Business Machines Corporation. ACCESS, Microsoft, MS, and MS-DOS are registered trademarks of Microsoft Corporation. Windows is a trademark of Microsoft Corporation. OSF and OSF/1 are registered trademarks of the Open Software Foundation, Inc. ORACLE, SQL*Net, and SQL*Plus are registered trademarks of the Oracle Corporation. Pro*C is a trademark of Oracle Corporation. Powersoft is a registered trademark of Powersoft Corporation. PowerBuilder is a trademark of Powersoft Corporation. PROGRESS is a registered trademark of Progress Software Corp. GemBase is a registered trademark of Ross Systems. SmartStar is a registered trademark of SmartStar Corporation. ADABAS is a registered trademark of Software AG of North America, Inc. SYBASE is a registered trademark of Sybase, Inc. DB-Library, Open Client, SYBASE Open Server, and SYBASE SQL Server are trademarks of Sybase, Inc. UNIX is a registered trademark in the United States and other countries licensed exclusively through X/Open Company Ltd. All other trademarks and registered trademarks are the property of their respective holders. This document is available on CD-ROM. This document was prepared using VAX DOCUMENT Version 2.1. ________________________________________________________________ Contents Send Us Your Comments.................................... xi Preface.................................................. xv 1 Planning for the Gateway for DB2 Server 1.1 Gateway for DB2 Server Software.............. 1-1 1.2 Required IBM Software........................ 1-2 1.3 Tasks Performed by the IBM System Administrator................................ 1-3 1.4 Exchanging Information for Gateway Administration............................... 1-4 1.4.1 Getting Information from the Client Gateway Coordinator...................... 1-4 1.4.2 Supplying Information to the Client Gateway Coordinator...................... 1-5 1.4.3 Supplying Information to the DEC SNA Gateway Administrator.................... 1-5 1.5 Upgrading to a New Version of Gateway for DB2 Server....................................... 1-6 1.5.1 Client and Server Software Version Compatibility............................ 1-6 1.5.2 Using Different Client Versions on the Network.................................. 1-6 1.5.3 Considerations for Upgrading the Server................................... 1-7 1.5.4 Steps for Upgrading the Server........... 1-8 iii 2 Installing the Gateway for DB2 Server Software 2.1 Preparing to Install Gateway for DB2 Server Software..................................... 2-2 2.1.1 STEP1A-Verify Prerequisite Software...... 2-2 2.1.2 STEP1B-Check the VTAM Logon Mode Table Entry.................................... 2-3 2.1.3 STEP1C-Check VTAM and NCP Entries for Your Gateway............................. 2-5 2.1.4 STEP1D-Check the CICS Definitions for LU 6.2 Sessions............................. 2-6 2.1.5 STEP1E-Check the Gateway for DB2 Server Installation Tape........................ 2-6 2.1.6 STEP1F-Plan Space Allocation for Data Sets..................................... 2-6 2.1.6.1 SMP/E Data Sets (Conditional).......... 2-7 2.1.6.2 Target Libraries....................... 2-8 2.1.6.3 Distribution Libraries................. 2-9 2.1.7 STEP1G-Determine the Data Set Names for Your CICS and DB2 System Libraries....... 2-10 2.1.8 STEP1H-Determine Security for Gateway for DB2 Server............................... 2-10 2.1.9 STEP1I-Plan for DB2 Resources............ 2-11 2.2 Installing the Gateway for DB2 Server........ 2-11 2.2.1 STEP2A-Create the Installation Data Set...................................... 2-12 2.2.2 STEP2B-Review the Program Directory...... 2-14 2.2.3 STEP2C-Allocate Gateway for DB2 Server Target and Distribution Libraries........ 2-15 2.2.4 STEP2D-Allocate SMP/E Data Sets and Define SMP/E Environment (Conditional)... 2-15 2.2.5 STEP2E-Create the SMP PROC (Conditional)............................ 2-15 2.2.6 STEP2F-Initialize the SMP/E Environment with Gateway for DB2 Server SMP/E DDDEF Statements (Conditional)................. 2-16 2.2.7 STEP2G-Perform SMP/E RECEIVE Processing............................... 2-17 2.2.8 STEP2H-Create Dummy Load Module.......... 2-17 2.2.9 STEP2I-Perform SMP/E APPLY Processing.... 2-17 2.2.10 STEP2J-Perform SMP/E ACCEPT Processing... 2-17 2.3 Customizing the Gateway for DB2 Server Environment ................................. 2-18 iv 2.3.1 STEP3A-Create DB2 Metadata Views, Synonyms, and Grant SELECT Privilege on Views.................................... 2-19 2.3.2 STEP3B-Modify Metadata View Names (Conditional)............................ 2-21 2.3.3 STEP3C-Changing Server System Names and Run-Time Options (Conditional)........... 2-22 2.3.3.1 DB2INFO System Name.................... 2-23 2.3.3.2 VIDAJOUR System Name................... 2-24 2.3.3.3 WRITEFLG System Name................... 2-24 2.3.3.4 READCS, READRR, WRITECS, WRITERR System Names.................................. 2-24 2.3.4 STEP3D-Run Gateway for DB2 Server Link-Edit Job (Conditional).............. 2-25 2.3.5 STEP3E-Making the Load Module Available to CICS.................................. 2-25 2.3.6 STEP3F-Bind Gateway for DB2 Server Plan and Packages............................. 2-26 2.3.7 STEP3G-Bind Write Packages (Conditional)............................ 2-28 2.3.8 STEP3H-Grant Execute Authority to Gateway for DB2 Server Application Plan and Packages................................. 2-29 2.3.9 STEP3IA-Modify CICS Table Entries........ 2-30 2.3.9.1 Modifying the Program Properties Table.................................. 2-30 2.3.9.2 Modifying the Program Control Table.... 2-31 2.3.9.3 Modifying the Terminal Control Table... 2-32 2.3.9.4 Defining the Gateway for DB2 Server Logging Facility to the Journal Control Table.................................. 2-34 2.3.10 STEP3IB-Modify CICS Resource Definition Entries.................................. 2-34 2.3.10.1 Defining Gateway for DB2 Server Load Modules to CICS........................ 2-35 2.3.10.2 Defining Gateway for DB2 Server Transactions to CICS................... 2-35 2.3.10.3 Defining Terminals to CICS............. 2-36 2.3.11 STEP3J-Modify Resource Control Table Entries.................................. 2-39 2.3.12 STEP3K-Define and Initialize CICS Journal Used by the Gateway for DB2 Server Logging Facility (Conditional)........... 2-40 v 2.4 Building the PERSONNL Sample Database........ 2-41 2.4.1 STEP4A-Copy PERSONNL Sequential Files from Tape to Disk........................ 2-42 2.4.2 STEP4B-Create the DB2 Environment for the PERSONNL Database........................ 2-43 2.4.3 STEP4C-Create the PERSONNL Tables........ 2-43 2.4.4 STEP4D-Grant Select Privilege on PERSONNL Tables................................... 2-43 2.4.5 STEP4E-Create Synonyms for PERSONNL Tables (Optional)........................ 2-43 2.4.6 STEP4F-Load PERSONNL Tables.............. 2-44 2.4.7 STEP4G-Remove the PERSONNL Database Environment (Optional)................... 2-44 3 Customizing the Gateway for DB2 Server Views 3.1 Gateway for DB2 Server Views................. 3-2 3.2 Customizing a View........................... 3-5 3.2.1 Modifying View Names..................... 3-6 3.2.1.1 Modify Installation Data Set Member (STEP3A)............................... 3-6 3.2.1.2 Modify Installation Data Set Member (STEP3B)............................... 3-6 3.2.1.3 Run Link-Edit and Make Load Modules Available to CICS (STEP3D and STEP3E)................................ 3-7 3.2.1.4 Bind Gateway for DB2 Server Packages and Plans (STEP3F and STEP3G).......... 3-7 3.2.2 Replacing DB2 Catalog Table Names........ 3-8 4 Gateway for DB2 Server Operations 4.1 Changing View Definition..................... 4-1 4.2 Changing Server Run-Time Options............. 4-1 4.3 Authorizing New Users........................ 4-2 4.3.1 User IDs and Passwords................... 4-2 4.3.2 Access to Transactions, Packages, and Plans.................................... 4-2 4.3.3 Access to DB2 Tables..................... 4-2 4.4 Maintaining Gateway for DB2 Server Packages..................................... 4-3 4.4.1 DBRMs Supplied with the Gateway for DB2 Server................................... 4-3 vi 4.4.2 How Gateway for DB2 Server Selects a Package Name............................. 4-4 4.4.3 How Gateway for DB2 Server Uses Collection-id Names...................... 4-7 4.4.4 How Gateway for DB2 Client Controls Collection-id Name Selection............. 4-7 5 Security with the Gateway for DB2 Server 5.1 Security Within the CICS Intercommunication Environment.................................. 5-1 5.1.1 Bind-Time Security....................... 5-1 5.1.2 Attach-Time Security..................... 5-2 5.2 CICS Security................................ 5-3 5.2.1 Using CICS Default Security.............. 5-3 5.2.2 Using RACF with CICS..................... 5-4 5.2.3 Using ACF2 with CICS..................... 5-4 5.2.3.1 Using ACF2 with ATTACHSEC.............. 5-4 5.2.3.2 Using ATTACHSEC(VERIFY) or ATTACHSEC(IDENTIFY).................... 5-5 5.3 DB2 Security................................. 5-5 5.3.1 Limiting the Capabilities of gateway for DB2 Server............................... 5-6 5.3.2 Limiting EXECUTE Access to Gateway for DB2 Server Packages...................... 5-7 5.3.3 Limiting Access to DB2 Objects........... 5-8 A Gateway for DB2 Server Installation Tape B Fully Qualified Data Set Names Worksheet for Gateway for DB2 Server C JCL Strings Worksheet for Gateway for DB2 Server vii D Copy of Gateway for DB2 Server Install STEP2C Through STEP2J E Copy of Gateway for DB2 Server Install STEP3A Through STEP3K F Copy of Gateway for DB2 Server Install STEP4A Through STEP4G G How to Order Additional Documentation Index Examples 2-1 Minimal Entry for a VTAM Logon Mode Table.................................... 2-4 2-2 Sample VTAM Logon Mode Entry for ATTACHSEC(IDENTIFY)...................... 2-5 2-3 JCL for Unloading the Installation Data Set and the Program Directory............ 2-12 2-4 SQL Authorization Statement in STEP3A.... 2-20 2-5 Sample Program Properties Table Entry for DBISERV Load Module...................... 2-30 2-6 Sample Program Control Table Entry to Define DEC2 Transaction.................. 2-32 2-7 Sample Terminal Control Table Entry for LU 6.2 Terminals......................... 2-33 2-8 Sample JCT Entry Defining a CICS Journal.................................. 2-34 2-9 RDO Control Statements to Define Load Modules.................................. 2-35 2-10 RDO Control Statement to Define DEC2 Transaction.............................. 2-35 2-11 Optional RDO Profile to Set RTIMOUT to NO....................................... 2-36 2-12 Sample RDO DEFINE TERMINAL Statement for LU 6.2 Terminals......................... 2-38 viii 2-13 Sample Resource Control Table Entry...... 2-40 3-1 Views Supplied on the Gateway for DB2 Server Installation Tape................. 3-3 3-2 Sample Customized Views.................. 3-10 A-1 Installation Tape Format for Gateway for DB2 Server............................... A-2 D-1 JCL Used in Gateway for DB2 Server Install Job STEP2C....................... D-2 D-2 JCL Used in Gateway for DB2 Server Install Job STEP2D....................... D-6 D-3 JCL Used in Gateway for DB2 Server Install Job STEP2E....................... D-18 D-4 JCL Used in Gateway for DB2 Server Install Job STEP2F....................... D-20 D-5 JCL Used in Gateway for DB2 Server Install Job STEP2G....................... D-22 D-6 JCL Used in Gateway for DB2 Server Install Job STEP2H....................... D-24 D-7 JCL Used in Gateway for DB2 Server Install Job STEP2I....................... D-26 D-8 JCL Used in Gateway for DB2 Server Install Job STEP2J....................... D-27 D-9 JCL Used in Gateway for DB2 Server Install Job KWIKSTP2..................... D-28 D-10 JCL Used in Gateway for DB2 Server Install Job ZLASTSTP..................... D-34 E-1 JCL Used in Gateway for DB2 Server Install Job STEP3A....................... E-2 E-2 JCL Used in Gateway for DB2 Server Install Job STEP3B....................... E-7 E-3 JCL Used in Gateway for DB2 Server Install Job STEP3C....................... E-10 E-4 JCL Used in Gateway for DB2 Server Install Job STEP3D....................... E-12 E-5 JCL Used in Gateway for DB2 Server Install Job STEP3F....................... E-15 E-6 JCL Used in Gateway for DB2 Server Install Job STEP3G....................... E-18 ix E-7 JCL Used in Gateway for DB2 Server Install Job STEP3H....................... E-21 E-8 JCL Used in Gateway for DB2 Server Install Job STEP3IA...................... E-22 E-9 JCL Used in Gateway for DB2 Server Install Job STEP3IB...................... E-23 E-10 JCL Used in Gateway for DB2 Server Install Job STEP3J....................... E-25 E-11 JCL Used in Gateway for DB2 Server Install Job STEP3K....................... E-26 F-1 JCL Used in Gateway for DB2 Server Install Job STEP4A....................... F-2 F-2 SQL Command Stream Used in Gateway for DB2 Server Install Job STEP4B............ F-6 F-3 SQL Command Stream Used in Gateway for DB2 Server Install Job STEP4C............ F-8 F-4 SQL Command Stream Used in Gateway for DB2 Server Install Job STEP4D............ F-14 F-5 SQL Command Stream Used in Gateway for DB2 Server Install Job STEP4E............ F-15 F-6 JCL Used in Gateway for DB2 Server Install Job STEP4F....................... F-16 F-7 SQL Command Stream Used in Gateway for DB2 Server Install Job STEP4G............ F-21 Figures 2-1 Steps to Installing the Gateway for DB2 Server................................... 2-1 2-2 Installing the Gateway for DB2 Server on Your System, SMP/E Steps (STEP2A Through STEP2J).................................. 2-12 2-3 Customizing the Gateway for DB2 Server (STEP3A Through STEP3K).................. 2-19 2-4 Building the PERSONNL Database (STEP4A Through STEP4G).......................... 2-42 x Tables 2-1 Allocation Parameters for SMP/E Data Sets..................................... 2-7 2-2 Target Libraries......................... 2-8 2-3 Allocation Parameters for Target Libraries................................ 2-9 2-4 Distribution Libraries................... 2-9 2-5 Allocation Parameters for Distribution Libraries................................ 2-9 2-6 Gateway for DB2 Server System Names That Can Be Modified.......................... 2-23 2-7 Options to Use When Binding Gateway for DB2 Server Plans......................... 2-27 3-1 Bind Requirements........................ 3-8 4-1 DBRMs Supplied with Gateway for DB2 Server................................... 4-4 4-2 Gateway for DB2 Server Packages That Control Access to DB2.................... 4-6 4-3 How the Gateway for DB2 Client Transaction Parameters Control the Gateway for DB2 Server Collection-id Selection................................ 4-8 B-1 Fully Qualified Data Set Names Worksheet for the Gateway for DB2 Server........... B-2 C-1 JCL Strings Worksheet for the Gateway for DB2 Server............................... C-2 xi ________________________________________________________________ Send Us Your Comments We welcome your comments on this manual or any DEC DB Integrator product manual. If you have suggestions for improvement or find any errors, please indicate the chapter, section, and page number (if available). Your input is valuable in improving future releases of our documentation. You can send comments to us in the following ways: o Electronic mail - DATABASE_DOC@WEORG.ENET.DEC.COM o FAX - 603-881-0120 Attn: DBI Documentation o Postal service Digital Equipment Corporation DEC DB Integrator Products Documentation 110 Spit Brook Road, ZKO2-1/R34 Nashua, NH 03062-2698 USA You can use the following questionnaire to give us information. xi Name _____________________________Title_______________________ Company __________________________Department ________________ Mailing Address __________________Telephone_Number __________ ________________________________________________________________________ Book Title _______________________Version_Number ____________ xii 1. How does the DBI documentation compare to documentation from other vendors that you have used? What do you like about other vendors' documentation that you would like the DBI documentation to implement? 2. What other topics or examples would you like to see included in this documentation set? 3. Do you use the online help for the DBI products? Are there other topics you would like to see included in the online help? 4. Interviews, telephone surveys, user observation, questionnaires, and other similar activities help us to improve our documentation. May we contact you about participating in future efforts? 5. If you have suggestions for improving particular sections or find any errors, please indicate the title of the manual and include the section number. 6. Please include any other comments or suggestions you have. xiii ________________________________________________________________ Preface DEC DB Integrator Gateway for DB2 Server, formerly known as DEC RdbAccess Server for DB2 and as VIDA Server for DB2, is a software facility that lets Digital users write to and retrieve data from IBM Database 2 (DB2) data tables on an IBM system. DEC DB Integrator Gateway for DB2 is composed of two software products: o DEC DB Integrator Gateway for DB2 Client-hereafter known as the gateway for DB2 client o DEC DB Integrator Gateway for DB2 Server-hereafter known as the gateway for DB2 server These two component products are installed on two different hardware systems. The gateway for DB2 client resides on a Digital computer system and uses SNA Gateway software to communicate with the gateway for DB2 server which resides on an IBM mainframe. This guide discusses the planning, installation, and administration of the gateway for DB2 server software facility. Who Should Use This Guide This guide is designed for the IBM DB2 system adminis- trator, system planner, or systems programmer. The person who prepares for the gateway for DB2 server installation should be familiar with the following IBM products: o Advanced Communications Facility/Virtual Telecommunications Access Method (ACF/VTAM) o Customer Information Control System (CICS) o Database 2 (DB2) xv o Multiple Virtual Storage (MVS/XA or MVS/ESA) o System Modification Program/Extended (SMP/E) Operating System Information Your IBM system must be running one of the following: o MVS/XA Version 2 Release 2 o MVS/ESA Version 4 Release 3 or Release 4 Other Software Requirements The gateway for DB2 server must be installed or have access to the following software: o CICS/MVS Version 2 Release 1, CICS/ESA Version 3 Release 2, or CICS/ESA Version 3 Release 3 o ACT/VTAM Version 3 Release 4, 4.1, or 4.2 o IBM database software: DB2 Version 2 Release 3 or Version 3 Release 1 with the CICS Attachment Facility In addition, for your gateway for DB2 server system to be complete, one of the following products must be installed on your OpenVMS or OSF/1 system: o The gateway for DB2 client Version 3.1 o The gateway for DB2 client Version 3.0 o RdbAccess Client for DB2 Version 2.0 For more information on gateway for DB2 client software requirements, see the DEC DB Integrator Product Family User's Guide and the DEC DB Integrator Gateway for DB2[TM] Client for OpenVMS Installation and Configuration Guide. Structure of This Guide This guide has the following chapters and appendixes: Chapter 1 Provides information that you need when planning for the gateway for DB2 server. xvi Chapter 2 Presents the gateway for DB2 server pre-installation, installation, and post-installation procedures. Chapter 3 Contains information on customizing DB2 views used by the gateway for DB2 server. Chapter 4 Explains operations procedures for the gateway for DB2 server. Chapter 5 Discusses security considerations for the gateway for DB2 server and tells you how to implement security to work with gateway for DB2 server. Appendix A Describes the contents of the gateway for DB2 server installation tape. Appendix B Contains a copy of the fully qualified data set names worksheet. Appendix C Contains a copy of the JCL strings worksheet. Appendix D Contains a copy of the gateway for DB2 server install steps STEP2C through STEP2J. Appendix E Contains a copy of the gateway for DB2 server install steps STEP3A through STEP3K. Appendix F Contains a copy of the gateway for DB2 server install steps STEP4A through STEP4G. Appendix G Describes how to order additional documentation from Digital Equipment Corporation. Conventions In examples, an implied carriage return occurs at the end of each line, unless otherwise noted. You must press the Return key at the end of each input line. xvii Often in examples, the prompts are not shown. Generally, they are shown where it is important to depict an interactive sequence exactly; otherwise, they are omitted in order to focus full attention on the statements or commands themselves. This section explains the conventions used in this guide: . . . Horizontal ellipsis points in statements or commands mean that parts of the statement or command not directly related to the example have been omitted. . Vertical ellipsis points in an example mean . that information not directly related to the . example has been omitted. italic Italic text indicates emphasis and complete text manual titles. boldface Boldface text indicates the first instance of text terms defined in the text. In online versions, bold is used to show user input. UPPERCASE Uppercase text indicates the name of an SQL TEXT statement or an SQL logical name. lowercase Lowercase text indicates an operating system text command or the name of a file. input entered by the user. DBADM References to DBADM, unless specifically qualified, refer to that database privilege having been granted or received either with or without the WITH GRANT OPTION clause. monospaced Monospaced text indicates example programs and text examples of user interfaces. The OpenVMS icon denotes the beginning of information specific to the OpenVMS VAX and OpenVMS AXP operating systems. The DEC OSF/1 icon denotes the beginning of information specific to the DEC OSF/1 AXP operating system. The diamond symbol (<>) denotes the end of information specific to an operating system. xviii For More Information This section describes where to find information about the DEC DB Integrator product family, RdbAccess products, and SQL. For each of the products listed in the section, the following information is available: o Before You Install Lists hardware and software required to install the product. o Software Product Description (SPD) Provides information on the compatibility of other software products. Use the SPD to verify which versions of your operating system are compatible with which versions of the DEC DB Integrator (DBI) product family software. o Release Notes Provide information about a specific release of the product. Available in online format only. DEC DB Integrator Product Family Information Information about the DEC DB Integrator product family is available in the following manuals: o DEC DB Integrator Product Family User's Guide Describes how to use the DBI Gateway software and DEC DB Integrator software to access and integrate data stored in relational and nonrelational databases. o DEC DB Integrator Handbook Describes how to use DEC DB Integrator to set up and maintain a multidatabase management system. The system provides the capability to access and update data stored in multiple databases, in distributed locations, and with multiple data formats. xix SQL Information Information about SQL is available in the following manuals: o DEC Rdb SQL Reference Manual Provides reference material and a complete description of the statements, the interactive, dynamic, and module language interfaces, and the syntax for SQL. o DEC Rdb Introduction to SQL Introduces the interactive and programming components of ANSI/ISO SQL and presents a tutorial of the SQL language elements for designing, creating, modifying, and retrieving data through interactive SQL. o DEC Rdb Guide to SQL Programming Describes how to write database application programs that use ANSI/ISO SQL. o DEC Rdb Guide to Distributed Transactions Describes the two-phase commit protocol and distributed transactions, and explains how to use DEC Rdb with distributed transactions. IBM Parameters for Gateway Products For detailed information about IBM parameters for the various types of gateways, consult the following manuals: o DEC SNA Domain Gateway Guide to IBM Resource Definition o DEC SNA Peer Server Guide to IBM Resource Definition o DECnet/SNA Gateway-CT Guide to IBM Parameters o DECnet/SNA Gateway-ST Guide to IBM Parameters o DECnet/SNA VMS Gateway Management xx References to Products The DBI documentation set often refers to the following Digital products by their abbreviated names: o The CDD/Repository for OpenVMS AXP and CDD/Repository for OpenVMS VAX products are referred to as CDD/Repository, the data dictionary, dictionary, or, more commonly, repository. o The DEC Data Distributor for OpenVMS AXP and DEC Data Distributor for OpenVMS VAX products are referred to as Data Distributor. o The DEC DATATRIEVE for OpenVMS AXP and DEC DATATRIEVE for OpenVMS VAX products are referred to as DATATRIEVE. o The DEC DB Integrator product is referred to as DBI. It is available on the OpenVMS AXP, OpenVMS VAX, and DEC OSF/1 AXP systems. o The DEC DB Integrator Gateway for DB2, DEC DB Integrator Gateway for EDA/SQL, DEC DB Integrator Gateway for ORACLE, DEC DB Integrator Gateway for SequeLink, and DEC DB Integrator Gateway for SYBASE, products are referred to as the relational gateways. o The DEC DB Integrator Gateway for Custom Drivers, DEC DB Integrator Gateway for DBMS, DEC DB Integrator Gateway for DSM, and DEC DB Integrator Gateway for RMS products are referred to as the nonrelational gateways. o The DEC DB Integrator Gateway family of data access products is often referred to as DBI Gateway. The DEC DB Integrator Gateway family is made up of the following products. Each product is often referred to as the gateway for [identifying product name]. For example, the DEC DB Integrator Gateway for Custom Drivers is often referred to as the gateway for Custom Drivers. - DEC DB Integrator Gateway for Custom Drivers[1] ___________________ [1]This product is available on the OpenVMS AXP and OpenVMS VAX systems. xxi - DEC DB Integrator Gateway for DB2 Client[1], [2] - DEC DB Integrator Gateway for DB2 Server[3] - DEC DB Integrator Gateway for DBMS[1] - DEC DB Integrator Gateway for DSM[1] - DEC DB Integrator Gateway for EDA/SQL[1], [2] - DEC DB Integrator Gateway for ORACLE[1], [2] - DEC DB Integrator Gateway for RMS[1] - DEC DB Integrator Gateway for SequeLink[1], [2] - DEC DB Integrator Gateway for SYBASE[1], [2] o The DEC RdbExpert for OpenVMS AXP and DEC RdbExpert for OpenVMS VAX products are referred to as RdbExpert. o The Digital gateways to SNA networks are referred to as the DEC SNA gateway products. These products include: - OpenVMS SNA - DECnet SNA Gateway for Channel Transport - DECnet SNA Gateway for Synchronous Transport - DEC SNA Domain Gateway - DEC SNA Peer Server o The DECnet/SNA Data Transfer Facility product is referred to as DTF. o The DECtrace for OpenVMS AXP and DECtrace for OpenVMS VAX products are referred to as DECtrace. o The DEC Rdb for OpenVMS AXP and DEC Rdb for OpenVMS VAX products are both referred to as DEC Rdb. Prior to DEC Rdb Version 5.0, this product was called VAX Rdb/VMS. o The OpenVMS RMS (Record Management Services) product is referred to as RMS. ___________________ [2]This product is available on the DEC OSF/1 AXP system. [3]This product is only available on the IBM system. xxii o SQL refers to the SQL interface to DEC Rdb and to the DBI family of products. SQL is Digital Equipment Corporation's implementation of the SQL standard ANSI X3.135-1992, ISO 9075:1992, commonly referred to as ANSI/ISO SQL. References to IBM Products This guide often refers to IBM products by the following abbreviated names: o Advanced Communications Facility/Virtual Telecommunications Access Method is referred to as ACF/VTAM or VTAM. o Customer Information Control System is referred to as CICS. o Database 2 is referred to as DB2. o Multiple Virtual Storage/Extended Architecture is referred to as MVS. o Resource Access Control Facility is referred to as RACF. o System Modification Program/Extended is referred to as SMP/E. o Time-Sharing Option is referred to as TSO. References to Other Third-Party Products This guide often refers to Computer Associates' Access Control Facility, a third-party product, by its abbrevi- ated name, ACF2. xxiii 1 ________________________________________________________________ Planning for the Gateway for DB2 Server This chapter contains information that you need to prepare for the gateway for DB2 server on your IBM system. DEC DB Integrator Gateway for DB2 allows Digital users to retrieve data from the IBM DB2 database system. DEC DB Integrator Gateway for DB2 consists of two subproducts: o The gateway for DB2 client software running on a Digital OpenVMS or OSF/1 system o The gateway for DB2 server software running on an IBM system This guide describes how to install, customize, and maintain the gateway for DB2 server software. It focuses on adjustments that you can make to customize the product to fit your site's needs. 1.1 Gateway for DB2 Server Software The gateway for DB2 server software runs as a CICS application program that accesses DB2. The gateway for DB2 client software communicates with the gateway for DB2 server software using a proprietary protocol layered upon CICS/SNA APPC communication protocols. There is no direct user interface to the gateway for DB2 server. The gateway for DB2 server software is initiated when the gateway for DB2 client software on the Digital system makes a connection to the CICS system and requests the transaction code associated with the gateway for DB2 server software. Digital users can choose from several Digital user interface products to access data contained on a DB2 database system. These user interfaces include: o DEC Data Distributor o DEC ODBC Driver for Microsoft Windows Planning for the Gateway for DB2 Server 1-1 o SQL interface to DEC Rdb o SQL/Services For information about DEC DB Integrator product user interfaces, see the DEC DB Integrator Product Family User's Guide. The gateway for DB2 server consists of a single CICS transaction which is conversational in nature. 1.2 Required IBM Software To install the gateway for DB2 server and make it available to gateway for DB2 client users, you must have the following IBM components: o ACF/VTAM Software that controls communication across an SNA network. o Assembler H A compiler for the IBM assembly language. o CICS/MVS or CICS/ESA An application subsystem that performs task and resource scheduling and controls sessions between application programs and devices associated with an application program. o CICS Attachment Facility A DB2 component installed under CICS that allows CICS to access DB2 resources. o DB2 A component of the IBM relational database software. o MVS/XA or MVS/ESA An operating system environment. o SMP/E An installation program facility that tracks product installations, updates libraries, and submits a record of all actions it performs. o TSO 1-2 Planning for the Gateway for DB2 Server An IBM time-sharing system. TSO allows users to log on to an IBM system and perform interactive functions, such as creating files, copying files, editing files, and running jobs. See Section 2.1.1 for the specific versions required for the IBM software. 1.3 Tasks Performed by the IBM System Administrator In order for gateway for DB2 client users to access DB2 tables, the IBM system administrator must perform the following tasks: o Coordinate the administration of the IBM system with its companion systems: - Gateway for DB2 client system - DEC SNA gateway systems Section 1.4 lists the information that the IBM system administrator must supply to and get from the administrator of each of these systems. o Prepare the IBM environment to install the gateway for DB2 server. Section 2.1 tells how to prepare your IBM environment for the gateway for DB2 server installation. o Install and customize the gateway for DB2 server. Chapter 2 describes the gateway for DB2 server installation procedures. Chapter 3 provides further information on your customization options. o Build the sample database PERSONNL. Section 2.4 explains how to build the PERSONNL sample database. o Perform operations tasks as needed. These tasks include: - Authorizing access to transactions, plans, and tables - Assigning user names and passwords to gateway for DB2 client users Planning for the Gateway for DB2 Server 1-3 Chapter 4 has information on gateway for DB2 server operations. o Determine security procedures. Chapter 5 discusses various security options. 1.4 Exchanging Information for Gateway Administration Users of various Digital interface products utilize the gateway for DB2 server through its companion product, the gateway for DB2 client software. The system administrator for the gateway for DB2 server, the system administrator for the gateway for DB2 client, and the DEC SNA gateway administrator must exchange certain information in order to set up a data access path from the gateway for DB2 client, through the gateway for DB2 server, to DB2 tables. This section describes the information that must be exchanged. 1.4.1 Getting Information from the Client Gateway Coordinator The gateway for DB2 server system administrator must obtain the following information from the gateway for DB2 client coordinator: o Names of gateway for DB2 client users The gateway for DB2 server system administrator needs this information to assign CICS user identifiers (IDs). o Data required by gateway for DB2 client users The gateway for DB2 server system administrator must know what DB2 tables the gateway for DB2 client users want to access in order to authorize access for those users to the DB2 tables. 1-4 Planning for the Gateway for DB2 Server 1.4.2 Supplying Information to the Client Gateway Coordinator The gateway for DB2 server system administrator must supply the following information to the gateway for DB2 client coordinator: o CICS user IDs and passwords for gateway for DB2 client users Gateway for DB2 client users need to know their CICS user IDs and passwords so they can access DB2. o Names of the DB2 tables The gateway for DB2 server system administrator must supply the gateway coordinator with the names of the DB2 tables that gateway for DB2 client users will access. These table names can be provided either as synonyms or as fully qualified names that specify the table name and the table creator name. Chapter 4 contains more information on supplying DB2 table names. o Transaction ID of a gateway for DB2 server transaction o The server password required to validate connections from remote systems to CICS, if applicable 1.4.3 Supplying Information to the DEC SNA Gateway Administrator The gateway for DB2 server system administrator must supply certain information to the DEC SNA gateway administrator. In some cases, the DEC SNA gateway administrator can be the gateway for DB2 coordinator. The information that the gateway for DB2 server system administrator must supply includes: o VTAM application ID of the CICS region where the gateway for DB2 server software is running o Name of the LOGON MODE entry suitable for LU 6.2 communications o Number of LU sessions available for gateway for DB2 client use Planning for the Gateway for DB2 Server 1-5 1.5 Upgrading to a New Version of Gateway for DB2 Server This section discusses the compatibility of the different versions of the gateway for DB2 client and server software. It also recommends an approach for migrating from previous server versions to the gateway for DB2 server Version 3.1 software. If you do not have a previous server version currently installed on your IBM system, you can ignore this section and go directly to Chapter 2. 1.5.1 Client and Server Software Version Compatibility When you upgrade to a new version of the gateway for DB2 server, you might encounter either of the following situations: o Different versions of the gateway for DB2 client running on the network o Different versions of the gateway for DB2 server running on the same system The gateway for DB2 server Version 3.1 supports the gateway for DB2 client Version 3.0 or Version 3.1, or RdbAccess Client for DB2 Version 2.0. The gateway for DB2 server Version 3.1 does not support the VIDA Client Version 1.0 software. The gateway for DB2 client Version 3.1 requires the gateway for DB2 server Version 3.1 or RdbAccess Server for DB2 Version 2.0. The gateway for DB2 client Version 3.1 does not support the VIDA Server Version 1.0 software. The following sections provide more information about these situations. 1.5.2 Using Different Client Versions on the Network If you mix different versions of client and server software on your network, the software component with the lowest version number determines the features that the gateways for DB2 client and DB2 server provide. For example, the gateway for DB2 server Version 3.1 used with RdbAccess Client for DB2 Version 2.0 provides the same features as RdbAccess Server for DB2 Version 2.0. 1-6 Planning for the Gateway for DB2 Server The gateway for DB2 client Version 3.1 does not support the VIDA Server Version 1.0 software. If VIDA Server Version 1.0 is installed on your system and you want to use the gateway for DB2 client Version 3.1, you must upgrade your gateway for DB2 server software, as described in this guide. The gateway for DB2 server Version 3.1 does not support the VIDA Client Version 1.0 software. If you must support VIDA Client Version 1.0, you must maintain your previous server until the client can be upgraded. See Section 1.5.3 and Section 1.5.4 for information on how two versions of the server can be maintained during during upgrade operations. 1.5.3 Considerations for Upgrading the Server If you plan to upgrade your server, Digital recommends that you keep the existing server until the gateway for DB2 server Version 3.1 is tested. Keeping the earlier version allows for a safer, staged upgrade. See Section 1.5.4 for the recommended method for upgrading to a new version of the server. The following list provides additional information about installing the gateway for DB2 server Version 3.1 on the same system as a previous server version: o Install the new server in new SMP/E zones The gateway for DB2 server Version 3.1 is a replacement for all previous server versions. Although you can install the gateway for DB2 server Version 3.1 in the same set of SMP/E zones where you installed the previous server, doing so will delete the earlier version. For this reason, Digital recommends that you install the gateway for DB2 server Version 3.1 in a new set of SMP/E zones. o The load module has a new name for Version 3.1 The gateway for DB2 server Version 3.1 uses different names for its load module and DB2 plan from those of previous server versions. This allows you to create new CICS transaction identifiers so that the gateway for Planning for the Gateway for DB2 Server 1-7 DB2 server Version 3.1 and previous server versions can coexist. o DB2 metadata views and synonyms remain the same The gateway for DB2 server Version 3.1 uses the same DB2 metadata views and synonyms as previous server versions. o Sample PERSONNL database remains the same The gateway for DB2 server Version 3.1 uses the same sample PERSONNL database as previous server versions. 1.5.4 Steps for Upgrading the Server If you want to keep running a previous server version as well as the gateway for DB2 server Version 3.1 on your IBM system, Digital recommends that you follow these steps: 1. Install the gateway for DB2 server Version 3.1 in a new set of SMP/E libraries. 2. Create new CICS definitions to support the gateway for DB2 client Version 3.1. See STEP3I in Chapter 2 for more information. Although the gateway for DB2 server Version 3.1 is compatible with previous versions of the gateway for DB2 client, Digital recommends that you upgrade the client to Version 3.1. 3. Test the gateway for DB2 server Version 3.1. Make sure your production systems work properly with the new server. 4. Modify all versions of the client to use the new gateway for DB2 server transaction name or the new gateway for DB2 client attach specification qualifier. 5. When the previous server version is no longer needed, use an SMP/E zone merge to replace the previous server version with the gateway for DB2 server Version 3.1. For an example of an SMP/E zone merge, see installation data set member ZLASTSTP in Appendix D. ________________________Note ________________________ The SMP/E zone merge should not be done until all clients have been upgraded to the gateway for DB2 1-8 Planning for the Gateway for DB2 Server client Version 3.1 software and configured to access the gateway for DB2 server Version 3.1. _____________________________________________________ Planning for the Gateway for DB2 Server 1-9 2 ________________________________________________________________ Installing the Gateway for DB2 Server Software The process of installing the gateway for DB2 server soft- ware consists of three parts: preparation, installation, and customization. In addition, users have the option of building the PERSONNL sample database. This chapter covers the following topics: o Preparing to install the gateway for DB2 server o Installing the gateway for DB2 server on your system o Customizing the gateway for DB2 server environment and creating the executable system o Building the PERSONNL sample database Figure 2-1 shows the four main installation steps for the gateway for DB2 server. Each of the steps is described in a section of this chapter. Figure 2-1 Steps to Installing the Gateway for DB2 Server Each step in Figure 2-1 contains several substeps. The substeps require the execution of sample job streams or SQL statements supplied on the installation tape. The descriptions of the subsets indicate if they are optional (Optional) or if they are performed depending on decisions made by the installer (Conditional). Installing the Gateway for DB2 Server Software 2-1 2.1 Preparing to Install Gateway for DB2 Server Software This section describes the procedures in Step 1 that you must follow to prepare for the gateway for DB2 server installation. Step 1 consists of the following substeps: o STEP1A-Verify Prerequisite Software o STEP1B-Check the VTAM Logon Mode Table Entry o STEP1C-Check VTAM and NCP Entries for Your Gateway o STEP1D-Check the CICS Definitions for LU 6.2 Sessions o STEP1E-Check the Gateway for DB2 Server Installation Tape o STEP1F-Plan Space Allocation for Data Sets o STEP1G-Determine the Data Set Names for Your CICS and DB2 System Libraries o STEP1H-Determine Security for Gateway for DB2 Server The following recommendations can facilitate your gateway for DB2 server installation: o Create a user ID of VIDA and use it in all installation steps. Alternatively, use one consistent user ID for all installation and customization steps, including the SMP/E, DB2, and CICS steps. o Remove earlier versions of this product from the SMP/E environment, if no longer in use. The gateway for DB2 server is packaged under a new FMID for each version, release, and modification. The element names in the FMID are the same. 2.1.1 STEP1A-Verify Prerequisite Software Before starting the gateway for DB2 server installation: o You must have one of the following operating systems installed on your IBM system: - MVS/XA Version 2 Release 2 - MVS/ESA Version 4 Release 3 or Release 4 2-2 Installing the Gateway for DB2 Server Software o You must have the following software installed on your IBM system: - ACF/VTAM Version 3 Release 4 or 4.1 - CICS/MVS Version 2 Release 1, CICS/ESA Version 3 Release 2, or CICS/ESA Version 3 Release 3 - Assembler H Version 2 - SMP/E Version 1 Release 7 or SMP/E Version 1 Release 8 - DB2 Version 2 Release 3 or Version 3 Release 1 with the CICS Attachment Facility 2.1.2 STEP1B-Check the VTAM Logon Mode Table Entry Check the VTAM Logon Mode Table entry that is used for the gateway for DB2 server and client communications. The VTAM Logon Mode Table entry defines the session characteristics (such as request unit (RU) sizes) of sessions between two logical units (LUs). The VTAM Logon Mode Table entry should: o Be appropriate for LU 6.2 communications o Specify an RU size of 2048 or greater (to enhance performance) o Contain the appropriate security settings in the PSERVIC field Your site may already have a suitable entry in the VTAM tables. If your site does not have a suitable entry, see Example 2-1 for an appropriate VTAM Logon Mode Table entry for the ATTACHSEC(VERIFY) parameter. Digital recommends that the VTAM Logon Table Mode entry have the "conversation-level security accepted" bit turned on. This bit is set using the PSERVIC setting in the MODEENT macro. It corresponds to the X '10' bit being set in the 23rd byte of the SNA BIND. If your site uses CICS auto install, see Example 2-1 and Example 2-2 for recommended VTAM Logon Mode Table entries for the ATTACHSEC(VERIFY) and ATTACHSEC(IDENTIFY) parameters. Installing the Gateway for DB2 Server Software 2-3 Example 2-1 Minimal Entry for a VTAM Logon Mode Table XL622048 MODEENT LOGMODE=XL622048, X TYPE=0, X FMPROF=X'13', X TSPROF=X'07', X PRIPROT=X'B0', X SECPROT=X'B0', X COMPROT=X'50B1', X RUSIZES=X'8888', INBOUND=2048,OUTBOUND=2048 X PSNDPAC=X'08', X SRCVPAC=X'04', X SSNDPAC=X'00', X PSERVIC=X'060200000000000000102C00' * 1 1 1 1 1 1 2 2 2 2 2 2 * 4 5 6 7 8 9 0 1 2 3 4 5 An RDO DEFINE TERMINAL statement or an entry in the Terminal Control Table will override the default logon mode entry specified in the VTAM Logon Mode Table. 2-4 Installing the Gateway for DB2 Server Software Example 2-2 Sample VTAM Logon Mode Entry for ATTACHSEC(IDENTIFY) [label] MODEENT LOGMODE=name, X TYPE=0, X FMPROF=X'13', X TSPROF=X'07', X PRIPROT=X'B0', X SECPROT=X'B0', X COMPROT=X'50B1', X RUSIZES=X'8989', INBOUND=4096,OUTBOUND=4096 X PSNDPAC=X'08', X SRCVPAC=X'04', X SSNDPAC=X'00', X PSERVIC=X'060200000000000000122C00' * 1 1 1 1 1 1 2 2 2 2 2 2 * 4 5 6 7 8 9 0 1 2 3 4 5 When CICS security is configured for the ATTACHSEC(IDENTIFY) parameter, Digital recommends that the VTAM Logon Table Mode entry have the "already verified indicator accepted" and the "conversation-level security accepted" bits turned on. These bits are set using the PSERVIC setting in the MODEENT macro. This corresponds to the X '02' bit and the X '10' bit being set in the 23rd byte of the SNA BIND. See Chapter 5 for more information about using the ATTACHSEC(VERIFY) and ATTACHSEC(IDENTIFY) parameters with CICS. 2.1.3 STEP1C-Check VTAM and NCP Entries for Your Gateway Make sure that the VTAM and Network Control Program (NCP) entries for your gateway are correct. See the appropriate DEC SNA documentation listed in the Preface for the latest information about gateway requirements for the following software components: o ACF/NCP, if necessary o ACF/VTAM o APPC/LU 6.2 o CICS Installing the Gateway for DB2 Server Software 2-5 2.1.4 STEP1D-Check the CICS Definitions for LU 6.2 Sessions Verify that terminals that support LU 6.2 sessions are defined to CICS. Your site may already have a suitable entry. STEP3IA in Section 2.3.9 and STEP3IB in Section 2.3.10 contain more information on CICS definitions for LU 6.2 sessions. 2.1.5 STEP1E-Check the Gateway for DB2 Server Installation Tape The gateway for DB2 server software is distributed on a single tape. The tape contains all the programs and data required to install the gateway for DB2 server on an IBM system running MVS. The distribution media for the gateway for DB2 server consists of a 9-track standard label tape with a density of 6250 bits per inch in the SMP/E RELFILE format. Verify that the installation tape has the label VI3100. The SMP/E function modification identifier on the tape is FMID PVI3100-DBI Gateway Server for DB2 (base function). See Appendix A for a list of the contents of the gateway for DB2 server installation tape. 2.1.6 STEP1F-Plan Space Allocation for Data Sets To install and execute the gateway for DB2 server, you must plan space allocation for the following groups of data sets: o SMP/E data sets that are required if you are installing the gateway for DB2 server in its own SMP/E environ- ment. o Target libraries (TLIBs) that are required for program execution. These target libraries are loaded during SMP/E APPLY processing and during the link-edit step that is run after customization. o Distribution libraries (DLIBs), which contain master copies of program elements. The distribution libraries are loaded during SMP/E ACCEPT processing. 2-6 Installing the Gateway for DB2 Server Software Table 2-1 to Table 2-5 contain information on the contents and space requirements of target libraries and distribution libraries. This information is for planning purposes. Check the program directory provided with the gateway for DB2 server for any new information. Table 2-1, Table 2-3, and Table 2-5 use column names that have the following meanings: o DDNAME-Data definition name o DSORG-Data set organization o RECFM-Record format o LRECL-Logical record length o DIR. BLKS-Number of directory blocks required o BLKSIZE-Block size o TRK-Number of 3380 tracks required 2.1.6.1 SMP/E Data Sets (Conditional) If you are installing the gateway for DB2 server in its own SMP/E environment, you must allocate space for SMP /E data sets during installation. Table 2-1 shows the allocation parameters for these data sets. Table_2-1_Allocation_Parameters_for_SMP/E_Data_Sets_______ DIR. DDNAME____DSORG__RECFM__LRECL__BLKS_____BLKSIZETRK________ SCDS PO FB 80 50 3120 15 MTS PO FB 80 20 3120 15 PTS PO FB 80 5 3120 5 STS PO FB 80 5 3120 1 GLOG PS - - - - 5 TLOG PS - - - - 5 DLOG______PS_____-______-______-________-_______5_________ Installing the Gateway for DB2 Server Software 2-7 2.1.6.2 Target Libraries During installation, SMP/E APPLY processing loads the target libraries shown in Table 2-2. VIDTLOAD is the load module library for the gateway for DB2 server programs. Table_2-2_Target_Libraries________________________________ DDNAME________Description______Loading_Mechanisms_________ VIDTDBRM Library SMP/E APPLY processing containing the DBRMs VIDTSRCE Library SMP/E APPLY processing containing user modifiable sources and system parameters VIDTLOAD Library SMP/E APPLY processing containing load modules for gateway for DB2 server programs VIDTOBJ Library Install Jobs containing modules changed ______________for_your_site_______________________________ 2-8 Installing the Gateway for DB2 Server Software Table 2-3 lists the allocation parameters for target libraries. Table_2-3_Allocation_Parameters_for_Target_Libraries______ DIR. DDNAME______DSORG__RECFM__LRECL__BLKS___BLKSIZE__TRK______ VIDTDBRM PO FB 80 2 3120 5 VIDTSRCE PO FB 80 1 3120 5 VIDTLOAD PO U - 2 6160 15 VIDTOBJ_____PO_____U______-______5______6160_____10_______ 2.1.6.3 Distribution Libraries During software installation, SMP/E ACCEPT processing loads the distribution libraries (DLIBs) shown in Table 2-4. Table_2-4_Distribution_Libraries__________________________ DDNAME______Description___________________________________ VIDDDBRM Master copies of DBRMs for METQUERY, DB2, ASCR VIDDOBJ Master copies of object modules VIDDSRCE____Master_copies_of_source_modules_______________ Table 2-5 lists the allocation parameters for distribution libraries. Table 2-5 Allocation Parameters for Distribution __________Libraries_______________________________________ DIR. DDNAME______DSORG__RECFM__LRECL__BLKS___BLKSIZE__TRKS_____ VIDDDBRM PO FB 80 2 3120 5 VIDDOBJ PO FB 80 5 3120 10 VIDDSRCE____PO_____FB_____80______1_____3120______5_______ Installing the Gateway for DB2 Server Software 2-9 2.1.7 STEP1G-Determine the Data Set Names for Your CICS and DB2 System Libraries Determine the fully qualified data set names for your CICS and DB2 system libraries before you proceed to the actual installation of the gateway for DB2 server. Having the names ready saves time during the installation process because you use them in several installation steps. To assist you in the planning process, Appendix B contains the Fully Qualified Data Set Names worksheet. This worksheet can assist you in recalling the data set names during the installation process. Specifically, you must determine the following data set names: o DB2 load library, for example, SYS1.DSN230.DSNLOAD o DB2 macro library, for example, SYS1.DSN230.DSNMACS o CICS load library, for example, CICS330.LOADLIB o CICS macro library, for example, CICS330.MACLIB o System macro library, for example, SYS1.MACLIB o VOLUME name and VCAT name 2.1.8 STEP1H-Determine Security for Gateway for DB2 Server To plan for gateway for DB2 server security, you must make the following decisions: o Decide whether or not you want to install the gateway for DB2 server as a read-only or as a read/write server. o Decide the type of attach-time security you want to implement for the gateway for DB2 server. o In cooperation with the DB2 database administrator, decide which DB2 tables or views a gateway for DB2 client user can access. Chapter 5 provides the necessary information for making these decisions. 2-10 Installing the Gateway for DB2 Server Software 2.1.9 STEP1I-Plan for DB2 Resources To plan for the DB2 resources that the gateway for DB2 server will use, you should understand the functions of the packages that the gateway for DB2 server uses. These packages control the type of access (read-only or read/write) and the isolation level (cursor stability or repeatable read) that is used by gateway for DB2 client users when accessing DB2. Chapter 4 discusses packages and how they are used with the gateway for DB2 server. 2.2 Installing the Gateway for DB2 Server The gateway for DB2 server software includes sample installation job streams and command streams to help you install the product. The installation job streams are packaged as File 6 on the tape. This section describes the gateway for DB2 server installation materials and explains the procedures you must perform in Step 2 of the installation process. Step 2 contains the substeps for the installation of the gateway for DB2 server software. Step 2 consists of the following substeps: o STEP2A-Create the Installation Data Set o STEP2B-Review the Program Directory o STEP2C-Allocate Gateway for DB2 Server Target and Distribution Libraries o STEP2D-Allocate SMP/E Data Sets and Define SMP/E Environment (Conditional) o STEP2E-Create the SMP PROC (Conditional) o STEP2F-Initialize the SMP/E Environment with Gateway for DB2 Server SMP/E DDDEF Statements (Conditional) o STEP2G-Perform SMP/E RECEIVE Processing o STEP2H-Create Dummy Load Module o STEP2I-Perform SMP/E APPLY Processing Installing the Gateway for DB2 Server Software 2-11 o STEP2J-Perform SMP/E ACCEPT Processing The executable system is created later in a link-edit step, which is separate from the APPLY processing step. Refer to Figure 2-2 for a flowchart that you can use with installation STEP2A through STEP2J. See Appendix D for copies of the JCL, SQL command streams, and CICS table entries that are in STEP2C through STEP2J. Use these as you proceed through the Step 2 substeps. Figure 2-2 Installing the Gateway for DB2 Server on Your System, SMP/E Steps (STEP2A Through STEP2J) The following sections describe each Step 2 substep. 2.2.1 STEP2A-Create the Installation Data Set You must type in JCL to unload the installation data set and the program directory. See Example 2-3 for sample JCL that creates an installation data set called VIDA.INSTLIB. Example 2-3 JCL for Unloading the Installation Data Set and the Program Directory (continued on next page) 2-12 Installing the Gateway for DB2 Server Software Example 2-3 (Cont.) JCL for Unloading the Installation Data Set and the Program Directory //INSTALL JOB ,'VIDA INSTALL',CLASS=A,MSGCLASS=A //***** //***** INSTALLATION MATERIAL //***** //STEP1 EXEC PGM=IEBCOPY //SYSUT3 DD UNIT=VIO,SPACE=(80,(100,50)) //SYSUT4 DD UNIT=VIO,SPACE=(256,(100,50)) //SYSPRINT DD SYSOUT=* //INFILE DD DSN=INSTLIB,DISP=(OLD,PASS),UNIT=TAPE, // VOL=(,RETAIN,SER=VI3100), // LABEL=(6,SL) //OUTFILE DD DISP=(NEW,CATLG,DELETE),DSN=VIDA.INSTLIB,UNIT=DISK, // DCB=(RECFM=FB,LRECL=80,BLKSIZE=3120), // SPACE=(TRK,(10,1,5)) //SYSIN DD * COPY OUTDD=OUTFILE INDD=INFILE /* //***** //***** PRINT PROGRAM DIRECTORY //***** //STEP2 EXEC PGM=IEBGENER //SYSUT1 DD DSN=VIDAPD,DISP=OLD,UNIT=TAPE, // VOL=(,RETAIN,REF=*.STEP1.INFILE),LABEL=(15,SL) //SYSUT2 DD SYSOUT=* //SYSIN DD DUMMY //SYSPRINT DD SYSOUT=* // Steps STEP2C through STEP2J require modifications to the installation data set members. Create the installation data set by unloading the installation job streams. After you unload the installation job streams, you must modify individual installation data set members for your site. Installing the Gateway for DB2 Server Software 2-13 To assist you in keeping track of changes to the installation data set, a JCL Strings worksheet is available in Appendix C. Make a copy of this worksheet for use when you modify the JCL from the installation materials. Fill in the values of the changed strings so you can refer to the new values in later jobs. ________________________Note ________________________ If you are installing the gateway for DB2 server for testing purposes only and you do not want to incur the overhead of using SMP/E to install the server, you have the option of ignoring the remaining steps in STEP2. Digital recommends this method of installation for testing purposes only. Before you ignore the remaining steps in STEP2, read the program directory for any supplemental instructions for installing the server. Installation data set member KWIKSTP2 is a self- documented JCL job that provides you with a procedure for installing the server without using SMP/E. The KWIKSTP2 job gives you the equivalent functions as the substeps in STEP2 but does not use SMP/E. You must edit the KWIKSTP2 job for your site-specific values. After you complete the edit of KWIKSTP2, go directly to Section 2.3. _____________________________________________________ 2.2.2 STEP2B-Review the Program Directory The gateway for DB2 server program directory contains information that is important to the gateway for DB2 server installation. This information includes any late changes to the installation procedure and the required preventive service requirements. Review the program directory before you continue with the installation. 2-14 Installing the Gateway for DB2 Server Software 2.2.3 STEP2C-Allocate Gateway for DB2 Server Target and Distribution Libraries The installation data set member STEP2C contains sample JCL to allocate the gateway for DB2 server target and distribution libraries. Modify the JCL in installation data set member STEP2C for your installation and submit the job. 2.2.4 STEP2D-Allocate SMP/E Data Sets and Define SMP/E Environment (Conditional) This step is conditional. You should not run this step if your site plans to use an existing SMP/E environment. You can install the gateway for DB2 server in an existing SMP/E environment or you can install it in its own environment. Installation data set member STEP2D shows the minimum requirements of an SMP/E environment. If you are installing the gateway for DB2 server in its own environment, modify the JCL in data set member STEP2D for your installation and submit the job. 2.2.5 STEP2E-Create the SMP PROC (Conditional) This step is conditional. If you are using an existing SMP/E environment, you can use an existing JCL PROC to install the gateway for DB2 server. In this case, do not change installation data set member STEP2E. Instead, modify the sample JCL in subsequent SMP jobs to refer to the existing PROC name. STEP2F, STEP2G, STEP2I, and STEP2J use the SMP PROC named SMPVIDA. Installation data set member STEP2E contains the definition of the SMPVIDA PROC. To create SMPVIDA, use one of the following methods: o Modify the SMPVIDA PROC and copy it to one of your system PROC libraries. o Modify the SMPVIDA PROC and copy it into the sample JCL provided for running SMP jobs. SMPVIDA becomes an inline PROC. If you use this method, you must add a PEND statement at the end of the PROC. Installation member STEP2E supplies you with a commented-out PEND statement. Installing the Gateway for DB2 Server Software 2-15 2.2.6 STEP2F-Initialize the SMP/E Environment with Gateway for DB2 Server SMP/E DDDEF Statements (Conditional) This step is conditional. The SMP/E zones can be either the ones you defined in STEP2D or that already exist. _____________Migration Notes for STEP2F _____________ You may not need to run STEP2F if you are installing the gateway for DB2 server in the same SMP/E zone as a previous server version, because the DDDEF entries remain the same. _____________________________________________________ Initialize the SMP/E zones with SMP/E DDDEF statements that are specific to the gateway for DB2 server. If you are installing the gateway for DB2 server in existing SMP/E zones, STEP2F is a convenient time to check the values for SREL and FMID in the GLOBALZONE data set entry. If the values for SREL and FMID are not set as follows: SREL (C150) and FMID (PVI3100), then you must update the GLOBALZONE data set entry. The following is an example of batch SMP/E control statements for changing an existing GLOBALZONE data set entry: SET BDY (GLOBAL). UCLIN. ADD GLOBALZONE SREL (C150) FMID (PVI3100). END UCLIN. Modify the JCL in installation data set member STEP2F for your installation and submit the job. 2-16 Installing the Gateway for DB2 Server Software 2.2.7 STEP2G-Perform SMP/E RECEIVE Processing Use the SMP/E RECEIVE command to move function PVI3100 into the SMPPTS data set and to place the associated elements into the SMPTLIB data set for subsequent processing. See installation data set member STEP2G for sample JCL. Modify the JCL installation data set member STEP2G for your installation and submit the job. 2.2.8 STEP2H-Create Dummy Load Module This step creates a dummy load module prior to the SMP/E APPLY processing step. This dummy module allows SMP/E to relink the load module DBISERV. Only the CICS and DB2 stub programs that SMP/E cannot include during APPLY processing are contained in these modules. Because these load modules are not executable by themselves, they cannot be used until the next step, STEP 2I, is completed. Modify the JCL in installation data set member STEP2H for your installation and submit the job. 2.2.9 STEP2I-Perform SMP/E APPLY Processing The JCL for SMP/E APPLY processing loads the target libraries listed in Table 2-2. Use the SMP/E APPLY command to apply the relevant function to these target libraries. Installation data set member STEP2I contains a sample APPLY job. Modify the JCL in installation data set member STEP2I for your installation and submit the job. 2.2.10 STEP2J-Perform SMP/E ACCEPT Processing The JCL for SMP/E ACCEPT processing loads the distribution libraries listed in Table 2-4. Installation data set member STEP2J contains a sample ACCEPT job. Modify the JCL in installation data set member STEP2J for your installation and submit the job. Installing the Gateway for DB2 Server Software 2-17 2.3 Customizing the Gateway for DB2 Server Environment This section describes the procedures you must perform after you have installed the gateway for DB2 server. Subsets STEP3A through STEP3K include the JCL to customize the environment in which the gateway for DB2 server operates. See Chapter 3 for information on customizing server view definitions for your site. Step 3 consists of the following substeps: o STEP3A-Create DB2 Metadata Views, Synonyms, and Grant SELECT Privilege on Views o STEP3B-Modify Metadata View Names (Conditional) o STEP3C-Changing Server System Names and Run-Time Options (Conditional) o STEP3D-Run Gateway for DB2 Server Link-Edit Job (Conditional) o STEP3E-Making the Load Module Available to CICS o STEP3F-Bind Gateway for DB2 Server Plan and Packages o STEP3G-Bind Write Packages (Conditional) o STEP3H-Grant Execute Authority to Gateway for DB2 Server Application Plan and Packages o STEP3IA-Modify CICS Table Entries o STEP3IB-Modify CICS Resource Definition Entries o STEP3J-Modify Resource Control Table Entries o STEP3K-Define and Initialize CICS Journal Used by the Gateway for DB2 Server Logging Facility (Conditional) Figure 2-3 is a flowchart that you can use with installa- tion substeps STEP3A through STEP3K. See Appendix E for a copy of the JCL, SQL command streams, and CICS table entries that are contained in STEP3A through STEP3K. Use these as you proceed through the Step 3 substeps. In the following sections you are required to make modifications to installation data set members. Use your JCL Strings worksheet in Appendix C to track these changes. 2-18 Installing the Gateway for DB2 Server Software Figure 2-3 Customizing the Gateway for DB2 Server (STEP3A Through STEP3K) 2.3.1 STEP3A-Create DB2 Metadata Views, Synonyms, and Grant SELECT Privilege on Views Create the DB2 views required by the gateway for DB2 server transaction. You may have to customize your views to meet your site-specific security and/or naming conventions. Chapter 3 describes options that you have when creating metadata views. _____________Migration Notes for STEP3A _____________ If you are migrating from a previous server version to the gateway for DB2 server Version 3.1, you can ignore STEP3A. The views created by STEP3A remain the same. However, you should check the name of the owner of the views. If your site intends to support DB2 gateway clients running Version 3.0, you must not change the DB2 metadata view names. The DB2 client Version 3.0 requires the default view names in order to support certain metadata query operations. _____________________________________________________ To avoid authorization errors, the owner of the metadata views created in STEP3A must be the same as the owner of the plan and packages bound in STEP3F and STEP3G. If the owners are not kept consistent, then authorization errors can be encountered during the bind operation. Installation Installing the Gateway for DB2 Server Software 2-19 data set member STEP3A is supplied in a format to help keep the owners consistent. The first two SQL statements of data set member STEP3A grant DB2 authorizations to VIDA before creating the views. Example 2-4 shows these SQL statements. Example 2-4 SQL Authorization Statement in STEP3A GRANT BINDADD TO VIDA; GRANT EXECUTE ON PACKAGE DBIRR.* TO VIDA; GRANT EXECUTE ON PACKAGE DBICS.* TO VIDA; GRANT EXECUTE ON PACKAGE DBISECRR.* TO VIDA; GRANT EXECUTE ON PACKAGE DBISECCS.* TO VIDA; SET CURRENT SQLID = 'VIDA'; The GRANT BINDADD SQL statement is not a necessary part of STEP3A. This task occurs here because it is the most convenient place to deal with a later requirement for the following reasons. o STEP3A is the point where a consistent user identifier, USERID, is selected to own both the metadata views and the plan and packages to be bound in a later step. Data set member STEP3A is the best location for disseminating this change to all SQL statements that must use this user identifier. o STEP3A assumes that tasks are run from a privileged account that has the authority to perform the GRANT BINDADD operation. There are no other SQL statements that must be run from such a privileged account. The SET CURRENT SQLID statement is an effective way to control the owner of the metadata views and to allow SQL to be issued from an account that has the authority to grant the BINDADD privilege. You may use any user identifier with the SQL statements in STEP3A. The name VIDA itself is not important. If you do use a different name, you must change all occurrences of VIDA in STEP3A, not just the two lines shown in Example 2-4. 2-20 Installing the Gateway for DB2 Server Software Make any changes to installation data set member STEP3A and execute the SQL statements. To avoid authorization errors, the owner who creates the metadata views must also be the owner who performs the bind operations. If different owners create the metadata views and do the bind operations, authorization errors can occur that will cause the bind operation to fail. If the bind operation fails, the owner who does these bind operations must be granted SELECT privileges on the metadata view and must create synonym names for these metadata views. 2.3.2 STEP3B-Modify Metadata View Names (Conditional) This step conditional. Complete STEP3B only if you changed the names of the DB2 metadata views in STEP3A. If you did not change the names, go directly to STEP3C. Modify the DB2 metadata view names used in METQUERY to be identical to the new DB2 metadata view names. Instructions are provided at the beginning of installation data set member STEP3B. Section 3.2.1 contains information on options for modifying DB2 metadata view names and system names. ________________________Note ________________________ If you choose to change DB2 metadata view names and/or system names, you must modify the METQUERY source in the VIDTSRCE target library. To locate the names to modify in this source, search the METQUERY file for the string *VIDA. After_making_your_changes_to_the_METQUERY_source_and___ customizing the JCL, execute STEP3B to reassemble the METQUERY program. _____________Migration Notes for STEP3B _____________ METQ was the name of the metadata retrieval source module in VIDA server Version 1.0. METQ had run-time options that you could set for the server. In the gateway for DB2 server Version 2.0 and Version 3.1, these run-time options were moved Installing the Gateway for DB2 Server Software 2-21 to a source module called OPTIONS to allow you to change the server run-time options without rebinding a DBRM. It is possible to maintain a VIDA server Version 1.0 METQ or a DB2 server Version 2.0 METQUERY and a gateway for DB2 server Version 3.1 METQUERY during the migration period. However, to do so means that you cannot share the DBRM or object libraries among the different versions. _____________________________________________________ 2.3.3 STEP3C-Changing Server System Names and Run-Time Options (Conditional) This step is conditional. You must perform this step if you previously modified the names of the DB2 metadata views. You can modify the gateway for DB2 server system names to comply with your site-specific standards. Table 2-6 shows the system names (default values) that you can modify. The gateway for DB2 server system names and run-time options are set within an assembler language program named OPTIONS which is found in the VIDTSRCE library. When making changes to this program it is essential that you change only the default values, not the names. Table 2-6 shows the gateway for DB2 server system names that you can modify. Reassemble the OPTIONS program after making changes to the OPTIONS source and customizing the JCL for STEP3C. 2-22 Installing the Gateway for DB2 Server Software Table 2-6 Gateway for DB2 Server System Names That Can Be __________Modified______________________________________________ Default Name________Value_______Description_____________________________ DB2INFO DSNHDECP Name of DB2 program that supplies DB2 version information METAPLN DBICS Name of metadata retrieval package READCS DBICS Collection-id portion of the package name for read-only access READRR DBIRR Collection-id portion of the package name for read-only access VIDAJOUR 02 CICS journal ID used during gateway for DB2 server logging WRITECS DBICS Collection-id portion of the package name for read/write access WRITEFLG Y Enables write operations to DB2 tables WRITERR DBIRR Collection-id portion of the package ________________________name_for_read/write_access______________ The following subsections provide more detail on some of the options in Table 2-6. For information on the packages that control read-only and read/write access to DB2, see Chapter 4. 2.3.3.1 DB2INFO System Name The DB2INFO system name identifies the entry point name of the routine that the gateway for DB2 server calls to acquire DB2 release information. The default value for DB2INFO is set to the IBM routine supplied for DB2 Version 2 and Version 3. This name identifies the only DB2 module that the gateway for DB2 server calls directly; the remainder of the interface with DB2 uses standard SQL statements. Installing the Gateway for DB2 Server Software 2-23 2.3.3.2 VIDAJOUR System Name The VIDAJOUR system name identifies the two-character value used to enable the logging facility in STEP3K. If you change the default VIDAJOUR value of "02", make sure you change this value in STEP3I and STEP3K also. 2.3.3.3 WRITEFLG System Name The WRITEFLG system name identifies the flag that controls whether or not the gateway for DB2 server accepts SQL statements that write to DB2 tables. These SQL statements include: INSERT, DELETE, UPDATE, CREATE, DROP, GRANT AND REVOKE. If you set the flag to a value other than "Y", the gateway for DB2 server sends error messages to users attempting to write to DB2 tables. In addition, if you set the flag to a value other than "Y", gateway for DB2 client users will not be able to modify DB2 tables. If you want to preserve your flexibility in allowing write access to DB2 tables, you should: o Set the WRITEFLG system name to "Y". o Control user access to the write packages identified by the system names WRITECS and WRITERR, or grant PUBLIC access to the write packages and then use privileges on the DB2 objects to control write access. See Chapter 5 for more information. 2.3.3.4 READCS, READRR, WRITECS, WRITERR System Names These names point to 18-character names used for the collection-id portion of a package name. If you change these names, you must use the same names when you bind the package in STEP3F and STEP3G, and when you grant execute authority in STEP3H. For more information on changing package names, see Chapter 4 and Chapter 5. 2-24 Installing the Gateway for DB2 Server Software _____________Migration Notes for STEP3C _____________ This step will not conflict with previous server installations. _____________________________________________________ 2.3.4 STEP3D-Run Gateway for DB2 Server Link-Edit Job (Conditional) This step is conditional. Run the Link-Edit job only if you modified the METQUERY or OPTIONS source modules in STEP3B or STEP3C. If you did not modify the METQUERY or OPTIONS source modules, the SMP/E APPLY process created the necessary load module in the VIDTLOAD library. Installation data set member STEP3D contains link-edit JCL for the gateway for the DB2 server load modules. To perform the link-edit job, modify the JCL in instal- lation data set member STEP3D for your installation and submit the job. _____________Migration Notes for STEP3D _____________ The gateway for DB2 server Version 3.1 uses different names for load modules than previous server versions. These different names allow the load modules to coexist in the same load library. _____________________________________________________ 2.3.5 STEP3E-Making the Load Module Available to CICS You must make the gateway for DB2 server load module accessible to the CICS region where the gateway for DB2 server runs. Select one of the following mechanisms or create your own: o Installation data set member, STEP3D, as supplied, writes the SYSLMOD output to the VIDTLOAD load module. Copy this load module to your CICS user load module library. Installing the Gateway for DB2 Server Software 2-25 o Add the VIDTLOAD load module to the DFHRPL startup JCL for concatenation in the JCL procedure used to start the CICS region. _____________Migration Notes for STEP3E _____________ The gateway for DB2 server Version 3.1 uses different load module names than previous server versions. These different names allow the load modules of both versions to be available in one CICS region during migration. _____________________________________________________ 2.3.6 STEP3F-Bind Gateway for DB2 Server Plan and Packages The gateway for DB2 server Version 3.1 uses packages to manage its DBRMs. In STEP3F, the DBRMs are bound into packages named DBICS and DBIRR. The packages are then bound into a single plan, called DEC2. The collection-id portions of the package names are supplied by the source module OPTIONS in STEP3C. If you changed the names of these collection-ids in STEP3C, be sure to use the same names in the JCL for this step. In addition, if you changed the plan name, the name change must be reflected in the Resource Control Table (RCT) described in Section 2.3.11. The authorization ID that performs the bind operations must have DB2 BINDADD authorization. Use one of the following methods to bind the gateway for DB2 server application plan and packages: o Modify and execute the JCL provided in installation data set member STEP3F. o Use the DB2 user interface DB2I to enter the plan and package parameters into the bind panel. Table 2-7 lists the DB2I subcommands and the options for binding the gateway for DB2 server DBRMs. 2-26 Installing the Gateway for DB2 Server Software Table 2-7 Options to Use When Binding Gateway for DB2 __________Server_Plans____________________________________ _______________Labels_in_OPTIONS_Module_______Plan________ __________READCS___READRR___WRITECS__WRITERR______________ CollectionDBICS DBIRR DBISECCS DBISECRR DEC2 id Portion of Package Name /Plan name [1] Retain N/A N/A N/A N/A Yes Execution Authority [2] Isolation CS RR CS RR CS Level ValidationBind Bind Bind Bind Bind Time Resource N/A N/A N/A N/A Use Acquisition Time [2] Resource Commit Commit Commit Commit Commit Release Time [1]If_the_plan_name_changed_in_STEP3C,_use_the_new_plan___ name. [2]Applies only to plan. __________________________________________________________ To avoid authorization errors, the owner of the metadata views in STEP3A and the owner who performs the bind operations in STEP3F should be the same. VIDA is the default owner of the metadata views in STEP3A as well as the owner who performs the bind operations in STEP3E. If you changed the owner of the metadata views in STEP3A, be sure to use the same owner in the JCL job for STEP3F. Installing the Gateway for DB2 Server Software 2-27 If different owners create the metadata views and perform the bind operations, DB2 authorization errors can occur that will cause the bind operation to fail. If the bind operation fails, the owner who performs the bind operations must be granted SELECT privileges on the metadata view and must create synonym names for these metadata views. _____________Migration Notes for STEP3F _____________ The gateway for DB2 server Version 3.1 uses different default names for plans and packages than the gateway for DB2 server Version 2.0. These different names allow the two versions of the server to coexist. However, the gateway for DB2 server Version 3.1 uses the same default name for the plan as the gateway for DB2 server Version 1.0 uses. If your site intends to allow the gateway for DB2 server Version 3.1 to coexist with a VIDA Server Version 1.0, you must change the plan name for one of the versions. If you change the names of the plan or packages for the gateway for DB2 server Version 3.1, be sure the names are different from the plan names for previous server versions. _____________________________________________________ 2.3.7 STEP3G-Bind Write Packages (Conditional) This step is conditional. Complete this step only if you want to limit the access of gateway for DB2 client users to the write packages. To limit access to the write packages, you must change the default names identified by the names WRITECS and WRITERR in the OPTIONS source module in STEP3C. The JCL job for STEP3G comes with placeholders for the collection-id portions of the package names. You must change these placeholders to be the same names used at both the WRITECS and WRITERR system names in the OPTIONS source module in STEP3C. 2-28 Installing the Gateway for DB2 Server Software The owner who performs the bind operations should also be the owner of the metadata views created in STEP3A. By default, STEP3A and STEP3G use VIDA as the owner. If you used a different name than VIDA for the owner of the metadata views created in STEP3A, use this same name in STEP3G for the authorization ID of the owner who performs the bind operation. If different owners create the metadata views and do the bind operations, authorization errors can occur that will cause the bind operation to fail. If the bind operation fails, the owner who performs the bind operation must be granted SELECT privileges on the metadata view and must create synonym names for these metadata views. _____________Migration Notes for STEP3G _____________ Verify that the plan names you used in STEP3G are different from the plan names used by previous server versions. _____________________________________________________ 2.3.8 STEP3H-Grant Execute Authority to Gateway for DB2 Server Application Plan and Packages If you changed the name of the plan or the collection-id portions of the package names, you must modify the SQL statements in STEP3H to reflect the new names. Execute authority can be public or it can be granted to specific users. By default, STEP3H grants execute authority to the public. If you created unique packages in STEP3G, you must add SQL GRANT statements for these new names at the end of STEP3H. The comments section of the installation data set member STEP3F supplies examples of the GRANT statements you must add. Modify the SQL statements in installation data set member STEP3H for your installation and submit the job. Installing the Gateway for DB2 Server Software 2-29 _____________Migration Notes for STEP3H _____________ STEP3H does not conflict with previous server versions. _____________________________________________________ 2.3.9 STEP3IA-Modify CICS Table Entries STEP3I has two different versions: STEP3IA and STEP3IB. You need to complete only one of these steps. The only difference between these two steps is the format of the CICS entries: o STEP3IA allows you to use CICS macros to define gateway for DB2 server programs, transactions, and other resources as CICS table entries. o STEP3IB allows you to use CICS Resource Definition Online (RDO) macros to define your CICS entries. After you complete either STEP3IA or STEP3IB, go directly to STEP3J. The remainder of this section provides instructions for completing STEP3IA. See Section 2.3.10 for instructions for completing STEP3IB. For STEP3IA, use installation data set member STEP3IA as a guideline for modifying the Program Properties Table (PPT), Program Control Table (PCT), and the Terminal Control Table (TCT). 2.3.9.1 Modifying the Program Properties Table Modify the Program Properties Table (PPT) by adding the names of the gateway for the DB2 server load module. The default name of the load module is DBISERV. If you previously assigned a different name, use the new name in the PPT entry. You must define a PPT entry for the program. Example 2-5 shows a sample PPT entry for the DBISERV program. Example 2-5 Sample Program Properties Table Entry for DBISERV Load Module (continued on next page) 2-30 Installing the Gateway for DB2 Server Software Example 2-5 (Cont.) Sample Program Properties Table Entry for DBISERV Load Module DBISERV DFHPPT TYPE=ENTRY, X PROGRAM=DBISERV, X PGMLANG=ASSEMBLER 2.3.9.2 Modifying the Program Control Table The gateway for DB2 server uses only one CICS transaction identifer, therefore only one Program Control Table (PCT) entry is required. The default name is DEC2. You can change this name to comply with your site-specific standards; however, you must inform the gateway for DB2 client of the new name. You can associate transaction names with the program DBISERV by modifying your PCT entry. Transaction security is defined by using the parameter: TRANSEC=n The TRANSEC value n can range from 1 to 64. A value of 1 allows public access to the transaction. When you modify your PCT entry, you must take installation security software into consideration. The gateway for DB2 server supports ACF2, RACF, and the CICS default security system. If you are using ACF2 as your security package, you must use 1 as the TRANSEC value; otherwise you can assign any value. Example 2-6 shows a sample PCT entry for DEC2. The TRANSEC value is 1. In most cases, it is adequate to use the standard RTIMOUT value for your site. Some software products that work with the gateway for DB2 might cause read timeouts. Installing the Gateway for DB2 Server Software 2-31 Example 2-6 Sample Program Control Table Entry to Define DEC2 Transaction DEC2 DFHPCT TYPE=ENTRY, X PROGRAM=DBISERV, X TRANSEC=1, X TRANSID=DEC2, X TWASIZE=0, X DTB=YES, X DTIMOUT=NO, X DUMP=YES, X DVSUPRT=VTAM, X EXTSEC=NO, X INBFMH=NO, X RTIMOUT=NO Read timeouts might occur when a transaction runs for a long time during which there are long periods of inactivity. For example, SQL/Services software, when used with the gateway for DB2, can cause read timeouts. To prevent read timeouts, you should set RTIMOUT to "NO" in your PCT entry. ____________ Migration Notes for STEP3IA ____________ All versions of the gateway for DB2 server use DEC2 as the default transaction identifier. If you are running multiple versions of the server for DB2, you must assign a unique PCT entry for each version. _____________________________________________________ 2.3.9.3 Modifying the Terminal Control Table The gateway for DB2 client uses LU 6.2 communications to communicate with the gateway for DB2 server. To define the terminals that support LU 6.2 communications to CICS, you must modify the Terminal Control Table (TCT). For a complete description of how to define LU 6.2 termi- nals to CICS, see the appropriate DEC SNA documentation listed in the Preface. 2-32 Installing the Gateway for DB2 Server Software Example 2-7 shows a sample TCT entry for a LU 6.2 terminal. This is a simple example of an acceptable macro definition. Example 2-7 Sample Terminal Control Table Entry for LU 6.2 Terminals [label] DFHTCT TYPE=SYSTEM, X ACCMETH=VTAM, X BINDPWD=value, X DATASTR=USER, X FEATURE=SINGLE, X MODENAM=lu62-modename, X RECFM=U, X SYSIDNT=value, X TRMTYPE=LUTYPE62, X USERSEC=LOCAL|VERIFY|IDENTIFY Consider the following DFHTCT macro options when creating your TCT entry: o BINDPWD If you specify the BINDPWD keyword, you must supply its value to those selected users who are allowed use of this terminal. See Chapter 5 for a discussion of bind security. o MODENAM The USERSEC=IDENTIFY or USERSEC=VERIFY keyword requires the proper logmode options. See Chapter 1 for sample VTAM Logon Mode Table entries. o TRMTYPE The value of this keyword must be LUTYPE62. o USERSEC The LOCAL, IDENTIFY, and VERIFY keywords can all be used depending on your site-specific standards. See Chapter 5 for a discussion of security options. This Installing the Gateway for DB2 Server Software 2-33 guide considers the RDO term of the ATTACHSEC keyword to be interchangeable with the USERSEC keyword. 2.3.9.4 Defining the Gateway for DB2 Server Logging Facility to the Journal Control Table Modify your Journal Control Table (JCT) entries by entering the JFILEID value of the gateway for DB2 server log file. The value for the file ID must be the same value that was defined for the field VIDAJOUR in STEP3C. Example 2-8 shows how the system administrator has defined a user journal using macro definitions. Example 2-8 Sample JCT Entry Defining a CICS Journal MVSLOG DFHJCT TYPE=ENTRY, X JFILEID=02, X BUFSIZE=256, X OPEN=INITIAL, X JTYPE=DISK1 2.3.10 STEP3IB-Modify CICS Resource Definition Entries If you have already completed STEP3IA, you do not need to complete STEP3IB. Go directly to STEP3J. STEP3IB allows you to use CICS RDO macros to define your CICS entries. The remainder of this section provides you with the information for completing STEP3IB using RDO control statements for defining your CICS entries. Modify installation data set member STEP3IB to comply with your site-specific standards and execute the job. 2-34 Installing the Gateway for DB2 Server Software 2.3.10.1 Defining Gateway for DB2 Server Load Modules to CICS Use CICS to define and install the RDO control statements in Example 2-9 that define the name of the DB2 server load module to CICS. The RDO control statements use the default program name DBISERV. In STEP3C you might have assigned a new name. Example 2-9 shows the sample RDO control statement for DBISERV. Example 2-9 RDO Control Statements to Define Load Modules DEFINE PROGRAM(DBISERV) GROUP(DBIGRP) DESCRIPTION(DBI SERVER MAIN MODULE) LANGUAGE(ASSEMBLER) CEDF(NO) DATALOCATION(BELOW) EXECKEY(USER) 2.3.10.2 Defining Gateway for DB2 Server Transactions to CICS Use CICS to define and install an RDO control statement in Example 2-10 to associate the transaction name with the DBISERV program. You must define one RDO control statement for each transaction name. Example 2-10 shows a sample RDO control statement that defines the DEC2 transaction to CICS. Example 2-10 RDO Control Statement to Define DEC2 Transaction DEFINE TRANSACTION(DEC2) GROUP(DBIGRP) DESCRIPTION(DBI SERVER) PROFILE(DBIPROF) PROGRAM(DBISERV) TWASIZE(0) TASKDATALOC(BELOW) TASKDATAKEY(USER) An optional way of controlling the RTIMOUT value with the RDO control statement in Example 2-10 is to use an RDO profile. Installing the Gateway for DB2 Server Software 2-35 In most cases, it is adequate to use the standard RTIMOUT value for your site, however, some software products that work with the gateway for DB2 might cause read timeouts. Read timeouts might occur when a transaction runs for a long time during which there are long periods of inactivity. For example, SQL/Services software used in conjunction with the gateway for DB2 can cause read timeouts. To prevent read timeouts, you should set the RTIMOUT value to "NO". See Example 2-11 for a definition of an optional RDO profile where the RTIMOUT value is set to "NO". Example 2-11 Optional RDO Profile to Set RTIMOUT to NO DEFINE PROFILE(DBIPROF) GROUP(DBIGRP) DESCRIPTION(DBI SERVER PROFILE) RTIMOUT(NO) ____________ Migration Notes for STEP3IB ____________ All versions of the gateway for DB2 server use DEC2 as the default transaction identifier. If you are running multiple versions of the server for DB2, you must assign a unique transaction identifier for each version. _____________________________________________________ 2.3.10.3 Defining Terminals to CICS The gateway for DB2 client uses LU 6.2 communications to communicate with the gateway for DB2 server. To define the terminals that support LU 6.2 communications to CICS, you must use the RDO DEFINE TERMINAL statement. There are many RDO options for defining LU 6.2 communi- cations that are beyond the scope of this guide. See the appropriate DEC SNA documentation listed in the Preface. 2-36 Installing the Gateway for DB2 Server Software Example 2-12 shows a sample RDO DEFINE TERMINAL statement for an LU 6.2 terminal. This is a simple example of an acceptable RDO definition. This sample definition provides the base definition values from which your site can generate acceptable RDO statements and values. Installing the Gateway for DB2 Server Software 2-37 Example 2-12 Sample RDO DEFINE TERMINAL Statement for LU 6.2 Terminals DEFINE TERMINAL(terminal-name) GROUP(group-name) TYPETERM(lu62-name) CONSOLE(NO) MODENAME(lu62-modename) PRINTERCOPY(NO) ALTPRINTCOPY(NO) INSERVICE(YES) ATTACHSEC(LOCAL|IDENTIFY|VERIFY) BINDSECURITY(YES|NO) BINDPASSWORD(value) Consider the following DEFINE TERMINAL options when creating your RDO entry: o ATTACHSEC The LOCAL, IDENTIFY, and VERIFY keywords can all be used depending on your site-specific standards. Some CICS systems may also support PERSISTENT, MIXIDPE or other settings; Digital does not recommend these settings. See Chapter 5 for a discussion of security options. o MODENAME See Chapter 1 for sample VTAM Logon Mode Table entries. For sites that use CICS auto install terminals, it may be necessary to define VTAM Logon Mode Table entries to control the setting of the ATTACHSEC keyword. o BINDPASSWORD If you specify the BINDPASSWORD keyword, you must supply its value to those selected users who are allowed use of this terminal. o BINDSECURITY The BINDSECURITY keyword is optional. See Chapter 5 for a discussion of bind security. 2-38 Installing the Gateway for DB2 Server Software o TYPETERM This site-specific name must be generated for LU 6.2 communications. 2.3.11 STEP3J-Modify Resource Control Table Entries The Resource Control Table (RCT) defines transactions that can access the DB2 system. Modify the RCT by entering the transaction name DEC2 or the name you defined to CICS in STEP3I. You can specify the authorization ID parameter AUTH in the RCT. The AUTH parameter identifies the ID that DB2 uses to do security checking. Choices for the AUTH parameter include: o A character string o USERID, up to an 8-byte sign-on ID o USER, up to a 3-byte sign-on operator ID o TERM, a 4-byte terminal ID o TXID, the transaction ID o SIGNID, CICS system authorization ID Use the following values in the RCT entry: o AUTH should be set to "USERID" as the authorization ID. o PLAN must be the plan initially bound in STEP3G. o ROLBI should be set to "NO". This allows gateway for DB2 client users the option of deciding when to issue the SQL ROLLBACK statement. o TXID should be set to "DEC2" or whatever transaction identifier you defined in STEP3I. Example 2-13 shows a sample RCT entry that associates the DEC2 transaction ID with the DEC2 plan name and specifies USERID as the authorization ID. Installing the Gateway for DB2 Server Software 2-39 Example 2-13 Sample Resource Control Table Entry DSNCRCT TYPE=ENTRY, X AUTH=USERID, X PLAN=DEC2, X ROLBI=NO, X THRDA=10, X THRDM=10, X TXID=DEC2 _____________Migration Notes for STEP3J _____________ The RCT entry for VIDA server Version 1.0 can be reused for DB2 server Version 3.1. However, the RCT entry for DB2 server Version 2.0 cannot be reused for DB2 server Version 3.1. _____________________________________________________ 2.3.12 STEP3K-Define and Initialize CICS Journal Used by the Gateway for DB2 Server Logging Facility (Conditional) This step is conditional and optional. If you decide not to complete this step during the installation of the gateway for DB2 server you can run it at any time in the future. STEP3K defines, initializes, and allocates a CICS journal file to be used by the gateway for DB2 server. You must have completed the JCT entries in STEP3IA before beginning this step. See Section 2.3.9.4 for information on completing the JCT entries. Digital support personnel use this CICS journal file to collect information for investigating problems with the gateway for DB2 server. The gateway for DB2 client controls whether or not the gateway for DB2 server writes to the CICS journal file. You should write to the CICS journal file only when the information is requested by Digital support personnel because CICS journaling significantly degrades performance. 2-40 Installing the Gateway for DB2 Server Software If users of the gateway for DB2 client Version 3.0 or higher need to write to the CICS journal file, they should use the SERVER_LOG qualifier in the attach specification when they attach to a DB2 database. If users of RdbAccess Client for DB2 Version 2.0 need to write to the CICS journal file, they should define the following OpenVMS logical name on the Digital system: VIDA2$SERVER_LOG Installation data set member STEP3K initializes a CICS journal for use by the gateway for DB2 server logging facility. The PRTJRNL job in the installation data set is available for printing the journal and is only intended for support purposes. Modify the JCL in installation set member STEP3K for your installation and submit the job. Add the data set name chosen for the CICS journal to the startup JCL of your CICS region. _____________Migration Notes for STEP3K _____________ There are no conflicts between the gateway for DB2 server Version 3.1 and previous server versions. _____________________________________________________ 2.4 Building the PERSONNL Sample Database This section describes the procedures for installing the PERSONNL sample database. These procedures have not changed for the gateway for DB2 server Version 3.1. The sample database helps you verify that the gateway for DB2 Digital-to-IBM connection is working properly. However, building the sample database is optional. Step 4 consists of substeps that build the sample database PERSONNL and one substep that deletes the sample database PERSONNL: o STEP4A-Copy PERSONNL Sequential Files from Tape to Disk o STEP4B-Create the DB2 Environment for the PERSONNL Database Installing the Gateway for DB2 Server Software 2-41 o STEP4C-Create the PERSONNL Tables o STEP4D-Grant Select Privilege on PERSONNL Tables o STEP4E-Create Synonyms for PERSONNL Tables (Optional) o STEP4F-Load PERSONNL Tables o STEP4G-Remove the PERSONNL Database Environment (Optional) Figure 2-4 shows installation substeps STEP4A through STEP4G in flowchart form. See Appendix F for a copy of the JCL, SQL command streams, and CICS table entries that are contained in STEP4A through STEP4G. Use these as you proceed through the Step 4 substeps. Figure 2-4 Building the PERSONNL Database (STEP4A Through STEP4G) 2.4.1 STEP4A-Copy PERSONNL Sequential Files from Tape to Disk Copy the PERSONNL sequential files from the distribution tape to disk files. You will use the PERSONNL sequential files as input to build the DB2 sample database PERSONNL. Customize the sample JCL in installation data set member STEP4A for your installation and submit the job. 2-42 Installing the Gateway for DB2 Server Software 2.4.2 STEP4B-Create the DB2 Environment for the PERSONNL Database Installation data set member STEP4B creates the DB2 environment necessary to load the gateway for DB2 server sample database PERSONNL. To execute STEP4B, you must have the proper DB2 privileges to create these areas. Execute this step through the Time-Sharing Option (TSO). ________________________Note ________________________ STEP4G contains DROP commands for all the elements in the PERSONNL database. Execute selected commands or all commands in STEP4G if you want to re-execute STEP4B after its initial execution, or when you no longer need the PERSONNL sample database. _____________________________________________________ 2.4.3 STEP4C-Create the PERSONNL Tables Create the eight tables that comprise the PERSONNL database and execute them through TSO. 2.4.4 STEP4D-Grant Select Privilege on PERSONNL Tables You must grant privileges to the PERSONNL tables. Modify the SQL statements to adhere to your site's naming conventions, if necessary, and execute them through TSO. 2.4.5 STEP4E-Create Synonyms for PERSONNL Tables (Optional) Create synonyms for the PERSONNL tables. Execute installation data set member STEP4E if you want users to supply synonyms rather than fully qualified table names when retrieving data. Synonyms must be created for new user IDs. Execute this step through TSO. Installing the Gateway for DB2 Server Software 2-43 2.4.6 STEP4F-Load PERSONNL Tables Execute the DB2 LOAD utility to populate the PERSONNL tables. The LOAD utility uses the sequential data files that were unloaded from the installation tape in STEP4A as input. Customize the sample JCL in installation data set member STEP4F for your installation and submit the job. ________________________Note ________________________ A condition code of 4 is generally returned from this step. You can ignore this return code. _____________________________________________________ 2.4.7 STEP4G-Remove the PERSONNL Database Environment (Optional) This step is optional. Use the DROP commands in STEP4G to remove the PERSONNL database environment. You can also execute this step if you plan to re-execute STEP4B or STEP4C. 2-44 Installing the Gateway for DB2 Server Software 3 ________________________________________________________________ Customizing the Gateway for DB2 Server Views This chapter discusses gateway for DB2 server views and the options you have for creating the views, and explains how to customize them. The gateway for DB2 server requires access to DB2 catalog tables in order to obtain information about the tables that gateway for DB2 client users want to access. The gateway for DB2 server retrieves the information through views of the catalog tables. By accessing catalog tables through views, the gateway for DB2 server provides sites with the flexibility to tailor the views according to installation-specific security requirements and naming conventions. The SQL statements that define the views are supplied on the gateway for DB2 server installation tape. These views are created in DB2 as part of the installation procedure in STEP3A. The gateway for DB2 client uses the metadata retrieved from these views to extract information about attributes of tables that the gateway for DB2 client will be accessing. The gateway for DB2 server uses the views VIDA.RELATION_ FIELDS, VIDA.INDEXES, and VIDA.SYNONYMS to retrieve metadata from the following DB2 catalog tables: o View 1-VIDA.RELATION_FIELDS SYSIBM.SYSTABLES SYSIBM.SYSCOLUMNS o View 2-VIDA.INDEXES SYSIBM.SYSINDEXES SYSIBM.SYSKEYS Customizing the Gateway for DB2 Server Views 3-1 o View 3-VIDA.SYNONYMS SYSIBM.SYSSYNONYMS 3.1 Gateway for DB2 Server Views The gateway for DB2 server installation tape supplies the SQL statements for three views: VIDA.RELATION_FIELDS, VIDA.INDEXES, and VIDA.SYNONYMS. These views are created during STEP3A. Example 3-1 contains the three view definitions: o The first definition consists of an SQL statement that creates the view VIDA.RELATION_FIELDS and defines the fields in that view. o The second definition contains the SQL statements that create the view VIDA.INDEXES. o The third definition consists of an SQL statement that creates the view VIDA.SYNONYMS. Some elements in these views can be customized. Words underscored with circumflexes ( ^ ) indicate the elements you can customize. The elements that you can customize are: o View 1-VIDA.RELATION_FIELDS VIDA.RELATION_FIELDS SYSIBM.SYSTABLES SYSIBM.SYSCOLUMNS o View 2-VIDA.INDEXES VIDA.INDEXES SYSIBM.SYSINDEXES SYSIBM.SYSKEYS o View 3-VIDA.SYNONYMS VIDA.SYNONYMS SYSIBM.SYSSYNONYMS 3-2 Customizing the Gateway for DB2 Server Views Example 3-1 Views Supplied on the Gateway for DB2 Server Installation Tape -- -- CREATE THE 1ST VIEW FOR RELATIONS METADATA RETRIEVAL -- CREATE VIEW VIDA.RELATION_FIELDS ^^^^^^^^^^^^^^^^^^^^ (TBNAME, TBCREATOR, TYPE, DBNAME, COLCOUNT, CARD, FLDNAME, COLNO, DTYPE, LENGTH, SCALE, NULLS) AS SELECT SYSIBM.SYSTABLES.NAME, ^^^^^^^^^^^^^^^^ CREATOR, TYPE, DBNAME, COLCOUNT, CARD, SYSIBM.SYSCOLUMNS.NAME, ^^^^^^^^^^^^^^^^^ COLNO, COLTYPE, LENGTH, SCALE, NULLS FROM SYSIBM.SYSTABLES, ^^^^^^^^^^^^^^^^ SYSIBM.SYSCOLUMNS ^^^^^^^^^^^^^^^^^ WHERE (continued on next page) Customizing the Gateway for DB2 Server Views 3-3 Example 3-1 (Cont.) Views Supplied on the Gateway for DB2 Server Installation Tape SYSIBM.SYSTABLES.NAME = SYSIBM.SYSCOLUMNS.TBNAME AND ^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^ SYSIBM.SYSTABLES.CREATOR = SYSIBM.SYSCOLUMNS.TBCREATOR; ^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^ -- -- CREATE THE 2ND VIEW FOR INDEX METADATA RETRIEVAL -- CREATE VIEW VIDA.INDEXES ^^^^^^^^^^^^ (IDXNAME, ITBNAME, ITBCREATOR, IDBNAME, UNIQUE, ICOLCOUNT, FIRSTKEYCARD, FULLKEYCARD, ICOLNAME, ICOLNO, COLSEQ, ORDERING) AS SELECT NAME, TBNAME, TBCREATOR, DBNAME, UNIQUERULE, COLCOUNT, FIRSTKEYCARD, FULLKEYCARD, COLNAME, COLNO, COLSEQ, ORDERING FROM SYSIBM.SYSINDEXES, ^^^^^^^^^^^^^^^^^ SYSIBM.SYSKEYS ^^^^^^^^^^^^^^ (continued on next page) 3-4 Customizing the Gateway for DB2 Server Views Example 3-1 (Cont.) Views Supplied on the Gateway for DB2 Server Installation Tape WHERE SYSIBM.SYSINDEXES.NAME = SYSIBM.SYSKEYS.IXNAME AND ^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^ SYSIBM.SYSINDEXES.CREATOR = SYSIBM.SYSKEYS.IXCREATOR; ^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^ -- -- CREATE THE 3RD VIEW FOR SYNONYM RETRIEVAL -- CREATE VIEW VIDA.SYNONYMS ^^^^^^^^^^^^^ (SYN_NAME, SYN_CREATOR, TABLE_NAME, TABLE_CREATOR) AS SELECT NAME, CREATOR, TBNAME, TBCREATOR FROM SYSIBM.SYSSYNONYMS; ^^^^^^^^^^^^^^^^^^ ________________________Note ________________________ In Example 3-1, the VIDA user ID is provided as an example. You can change the VIDA user ID to that of your database administrator or to one that you normally use to create DB2 objects. _____________________________________________________ 3.2 Customizing a View You must customize the views VIDA.RELATION_FIELDS, VIDA.INDEXES, and VIDA.SYNONYMS if their names conflict with the naming conventions at your site, or if you want to direct the view to different tables that contain an extract of the DB2 catalog data. The modifications you can perform include: Customizing the Gateway for DB2 Server Views 3-5 o Modifying view names to conform to your site's naming conventions o Replacing DB2 catalog table names with names of user tables that contain a copy of the catalog data ________________________Note ________________________ If your site intends to support DB2 clients running Version 3.0, you must not change the DB2 metadata view names. Version 3.0 requires the default view names in order to support certain metadata query operations. _____________________________________________________ 3.2.1 Modifying View Names Modifying view names involves making changes to the modules STEP3A through STEP3G in the installation data set. If you are modifying the view names after installing the gateway for DB2 server, these modules are stored in the gateway for DB2 server installation library, VIDA.INSTLIB, created in STEP2A. 3.2.1.1 Modify Installation Data Set Member (STEP3A) Edit STEP3A by replacing all occurrences of the view names RELATION_FIELDS, INDEXES, and SYNONYMS with the new view names. Replace all occurrences of SYNONYMS with the new view name. When you change the view names, be sure to grant user privileges to allow access to the new views. 3.2.1.2 Modify Installation Data Set Member (STEP3B) The target data set VIDTSRCE contains the program METQUERY. You must change all occurrences of the view names RELATION_FIELDS, INDEXES, and SYNONYMS to the new names. You can find all occurrences of the names RELATION_FIELDS, INDEXES, and SYNONYMS by performing a search on the five character string *VIDA. There are several occurrences each of the view names RELATION_FIELDS, INDEXES, and SYNONYMS. Replace each occurrence. 3-6 Customizing the Gateway for DB2 Server Views 3.2.1.3 Run Link-Edit and Make Load Modules Available to CICS (STEP3D and STEP3E) Modify the JCL in installation data set members STEP3D and STE3E for your installation and submit the jobs. For more information about these steps, see Section 2.3.4 and Section 2.3.5. 3.2.1.4 Bind Gateway for DB2 Server Packages and Plans (STEP3F and STEP3G) Bind the gateway for DB2 server plans and packages using one of the following methods: o Modify the JCL in installation data set members STEP3F and STEP3G and submit the jobs. o Use DB2I, the DB2 user interface to enter the plan and package parameters into the bind panel. Section 2.3.6 and Section 2.3.7 contain more information on binding gateway for DB2 server packages and plans. To avoid authorization errors, the owner of the metadata views in STEP3A and the owner who performs the bind operations in STEP3F and STEP3G should be the same. VIDA is the default owner of the metadata views in STEP3A as well as the owner who performs the bind operations in STEP3E and STEP3G. If you changed the owner of the metadata views in STEP3A, then be sure to use the same owner in the JCL job for STEP3F and STEP3G. If different owners create the metadata views and perform the bind operations, DB2 authorization errors can occur that will cause the bind operation to fail. If the bind operation fails, the owner who performs the bind operation must be granted SELECT privileges on the metadata view and must create synonym names for these metadata views. Use Table 3-1 to determine if either select privileges or synonyms are needed on the metadata views for the owner who performs the bind operations. Customizing the Gateway for DB2 Server Views 3-7 Table_3-1_Bind_Requirements_______________________________ Granting of Select Metadata Privileges View on Views Synonyms Names in Plan to Plan Required by METQUERY /Package /Package Plan/Package (STEP3B)____View_Owner__Owner____Owner_______Owner________ UNQUALIFIED DBA1 DBA1 N/A NO UNQUALIFIED DBA1 DBA2 YES YES QUALIFIED DBA1 DBA1 N/A NO QUALIFIED___DBA1________DBA2_____YES_________NO___________ 3.2.2 Replacing DB2 Catalog Table Names If your site uses duplicates of catalog tables, you must change occurrences of the DB2 catalog table names to redirect the queries to your site's duplicates. Installation data set member STEP3A contains the SQL statements to create the views. You must change the names of the following DB2 catalog tables to the names that correspond to your site's duplicate catalog table names: SYSIBM.SYSTABLES SYSIBM.SYSCOLUMNS SYSIBM.SYSINDEXES SYSIBM.SYSKEYS SYSIBM.SYSSYNONYMS Example 3-2 contains samples of customized DB2 views. Words underscored with circumflexes ( ^ ) have been customized. The views have been renamed to conform to site naming conventions. Additional customization was done because the site uses duplicates of the DB2 catalog tables. The gateway for DB2 server must access the duplicates rather than the system catalog tables. Example 3-2 assumes that whoever is creating the view has created tables that contain the catalog information. 3-8 Customizing the Gateway for DB2 Server Views Chapter 4 explains what to do if changes are made to view and/or synonym names after the gateway for DB2 server has been installed. Example 3-2 shows customized versions of the views presented in Example 3-1. In Example 3-2 the following names are customized: o View 1-VIDA.RELATION_FIELDS VIDA.RELATION_FIELDS to DEC_VIDA2_VIEW_1 SYSIBM.SYSTABLES to SYSTABLES_COPY SYSIBM.SYSCOLUMNS to SYSCOLUMNS_COPY o View 2-VIDA.INDEXES VIDA.INDEXES to DEC_VIDA2_VIEW_2 SYSIBM.SYSINDEXES to SYSINDEXES_COPY SYSIBM.SYSKEYS to SYSKEYS_COPY o View 3-VIDA.SYNONYMS VIDA.SYNONYMS to DEC_VIDA2_VIEW_3 SYSIBM.SYSSYNONYMS to DECVIDA2.SYSSYNONYMS Customizing the Gateway for DB2 Server Views 3-9 Example 3-2 Sample Customized Views -- -- CREATE THE 1ST VIEW FOR RELATIONS METADATA RETRIEVAL -- CREATE VIEW DEC_VIDA2_VIEW_1 ^^^^^^^^^^^^^^^^ (TBNAME, TBCREATOR, TYPE, DBNAME, COLCOUNT, CARD, FLDNAME, COLNO, DTYPE, LENGTH, SCALE, NULLS) AS SELECT SYSTABLES_COPY.NAME, ^^^^^^^^^^^^^^ CREATOR, TYPE, DBNAME, COLCOUNT, CARD, SYSCOLUMNS_COPY.NAME, ^^^^^^^^^^^^^^^ COLNO, COLTYPE, LENGTH, SCALE, NULLS FROM SYSTABLES_COPY, ^^^^^^^^^^^^^^ SYSCOLUMNS_COPY ^^^^^^^^^^^^^^^ WHERE SYSTABLES_COPY.NAME = SYSCOLUMNS_COPY.TBNAME AND (continued on next page) 3-10 Customizing the Gateway for DB2 Server Views Example 3-2 (Cont.) Sample Customized Views ^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^ SYSTABLES_COPY.CREATOR = SYSCOLUMNS_COPY.TBCREATOR; ^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^ -- -- CREATE THE 2ND VIEW FOR INDEX METADATA RETRIEVAL -- CREATE VIEW DEC_VIDA2_VIEW_2 ^^^^^^^^^^^^^^^^ (IDXNAME, ITBNAME, ITBCREATOR, IDBNAME, UNIQUE, ICOLCOUNT, FIRSTKEYCARD, FULLKEYCARD, ICOLNAME, ICOLNO, COLSEQ, ORDERING) AS SELECT NAME, TBNAME, TBCREATOR, DBNAME, UNIQUERULE, COLCOUNT, FIRSTKEYCARD, FULLKEYCARD, COLNAME, COLNO, COLSEQ, ORDERING FROM SYSINDEXES_COPY, ^^^^^^^^^^^^^^^ SYSKEYS_COPY ^^^^^^^^^^^^ WHERE SYSINDEXES_COPY.NAME = SYSKEYS_COPY.IXNAME AND (continued on next page) Customizing the Gateway for DB2 Server Views 3-11 Example 3-2 (Cont.) Sample Customized Views ^^^^^^^^^^^^^^^ ^^^^^^^^^^^^ SYSINDEXES_COPY.CREATOR = SYSKEYS_COPY.IXCREATOR; ^^^^^^^^^^^^^^^ ^^^^^^^^^^^^ -- -- CREATE THE 3RD VIEW FOR SYNONYM RETRIEVAL -- CREATE VIEW DEC_VIDA2_VIEW_3 ^^^^^^^^^^^^^^^^ (SYN_NAME, SYN_CREATOR, TABLE_NAME, TABLE_CREATOR) AS SELECT NAME, CREATOR, TBNAME, TBCREATOR FROM DECVIDA2.SYSSYNONYMS; ^^^^^^^^^^^^^^^^^^^^ 3-12 Customizing the Gateway for DB2 Server Views 4 ________________________________________________________________ Gateway for DB2 Server Operations The gateway for DB2 server operations involve performing the following tasks: o Changing view definitions o Changing server run-time options o Authorizing new users o Maintaining server plans 4.1 Changing View Definition You may want to customize the DB2 views if the Digital- supplied default view and synonym names do not conform to your site's naming conventions or if you want to redirect the views to duplicates of catalog tables. To change view definitions, see the appropriate sections in Chapter 3. 4.2 Changing Server Run-Time Options You can change the server run-time options at any time. For more details on the server run-time options, see Section 2.3.3. Follow these steps to change the server run-time options: 1. Customize the server run-time options, by following the instructions for installation data set member STEP3C. 2. Execute installation data set member STEP3D to relink the gateway for the DB2 server program. 3. Complete STEP3E to make the load module available to CICS. Gateway for DB2 Server Operations 4-1 4.3 Authorizing New Users When new gateway for DB2 client users require access to data stored in your DB2 tables, you must create new definitions for those users. Defining new users involves: o Defining user IDs and passwords to CICS (or security system) o Authorizing access to CICS transactions and DB2 plans o Authorizing access to DB2 tables that will be accessed by the users 4.3.1 User IDs and Passwords Define user IDs and passwords to security systems and supply user IDs and passwords to new users. 4.3.2 Access to Transactions, Packages, and Plans You must authorize the new users to execute the gateway for DB2 server transactions. You authorize access through CICS and possibly through your external security manager. Additionally, you must grant new users privileges to execute DB2 packages and plans. You grant privileges through DB2. For more information about granting access to plans and packages, see Chapter 5. 4.3.3 Access to DB2 Tables Users of the gateway for DB2 client identify the set of tables with which they want to work using attach specification qualifiers. The set of tables is the user's database. The following qualifiers can be used to identify the tables: o DATABASE-Identifies the database to which the user wants to attach. o TABLES-Identifies a table or tables to which the user wants to attach and can be a qualified table name, an unqualified table name, or a synonym. o USER-Identifies the user name on the DB2 system, and can also be used to identify the creator of a table. 4-2 Gateway for DB2 Server Operations Refer to the DEC DB Integrator Product Family User's Guide for detailed information about the interaction of the DATABASE, TABLES, and USER qualifiers and a description of qualified and unqualified table names. All gateway for DB2 client users require SELECT privileges for all tables within their database. In addition, those gateway for DB2 client users who will be updating DB2 data require the appropriate privileges on the tables they will be updating. The gateway for DB2 server system administrator should discuss which method should be used with the gateway for DB2 client coordinator. 4.4 Maintaining Gateway for DB2 Server Packages This section provides information to help the system administrator understand the function of the gateway for DB2 server packages and how other management tasks might affect the packages. The following management functions require that you understand the names and the functions of the gateway for DB2 server packages: o Controlling operations that gateway for DB2 client users can perform, see Chapter 5. o Creating a read-only gateway for DB2 server, see Section 2.3.3. o Changing metadata views, see Chapter 3. o Rebinding plans due to DB2 maintenance. o Creating new RCT entries, see Section 2.3.11. The references to package name in the next section refer to the collection-id portion of the package set name. 4.4.1 DBRMs Supplied with the Gateway for DB2 Server Two DBRMs are supplied with the gateway for DB2 server. Table 4-1 shows the DBRMs and the default package names used by the installation jobs. You can bind the DBRMs into different package names. Gateway for DB2 Server Operations 4-3 Table_4-1_DBRMs_Supplied_with_Gateway_for_DB2_Server______ Default Source Package DBRM_Name___Program_____Names_______Function______________ DBRMMETQ METQUERY DBICS Fetches metadata from DBIRR VIDA catalog views. DBRMDB2 Not DBICS Dynamically issues all supplied DBIRR gateway for DB2 client ____________________________________SQL_statements._______ You must change the DBRMMETQ name whenever your site changes the METQUERY program in STEP3B. For more information on METQUERY, see Chapter 3. Because there is no need to change the DBRMDB2 package, no source program is supplied with the gateway for DB2 server. The DBRMDB2 package is bound into two different packages (DBICS and DBIRR) to control the isolation level under which the gateway for DB2 client accesses DB2. Section 4.4.2 and Section 4.4.4 discuss how the gateway for DB2 server selects the package name and how the gateway for DB2 client controls the isolation level. If your site decides to use DB2 package authorizations to control write operations, you can bind the DBRMDB2 package into two additional packages. Chapter 5 discusses DB2 security and the reasons you might want to create additional packages. Section 4.4.2 discusses how these two additional package names are used and how the gateway for DB2 server selects them. 4.4.2 How Gateway for DB2 Server Selects a Package Name The gateway for DB2 server selects a package name based on the access mode and the isolation level that gateway for DB2 client users specify in their database transactions. How the access mode and isolation-level control packages are selected is discussed in Section 4.4.4. For now, it is enough to understand that it is the gateway for DB2 client user who controls the gateway for DB2 server. 4-4 Gateway for DB2 Server Operations After the gateway for DB2 server knows what access mode and isolation level to look for, it locates an address within the OPTIONS module and uses the characters at that address as the collection-id. During STEP3C of the installation process, you can change the default collection-id names in the OPTIONS module. The collection-ids are created during STEP3F and STEP3G. Assembler language labels identify the addresses of the collection-ids in the OPTIONS module. Table 4-2 lists the assembler language label and the function of each collection-id. Gateway for DB2 Server Operations 4-5 Table 4-2 Gateway for DB2 Server Packages That Control __________Access_to_DB2___________________________________ Default Value DBRM Assembler of Included Collectionin Isolation Label_____id_Name___Package___Level__Function_____________ READCS DBICS DBRMDB2 CS Used when gateway for DB2 client requests read-only access to data with an isolation level of cursor stability. READRR DBIRR DBRMDB2 RR Used when gateway for DB2 client requests read-only access to data with an isolation level of repeatable read. WRITECS DBICS DBRMDB2 CS Used when gateway for DB2 client requests read/write access to data with an isolation level of cursor stability. WRITERR DBIRR DBRMDB2 RR Used when gateway for DB2 client requests read/write access to data with an isolation level of _____________________________________repeatable_read._____ When you look at Table 4-2, you will notice that the access mode and the isolation level determine the function of a label. Also, notice the default values for the collection-id names. The gateway for DB2 server uses the same collection-id when the gateway for DB2 client user wants read-only or read/write access to DB2 data. The same DBRM is used because the DBRMDB2 package has all the DB2 SQL statements necessary to perform either the read-only 4-6 Gateway for DB2 Server Operations or the read/write operations. Although write operations are stored within a read-only plan, the gateway for DB2 server prevents gateway for DB2 client users from using them. Because the READCS and READRR collection-id names provide enough information for the gateway for DB2 server to select a package name, the WRITECS and WRITERR labels are not necessary. The WRITECS and WRITERR labels are provided as a convenience. They give a site the ability to control EXECUTE access to packages used for updating the DB2 database. In STEP3G, you can bind the DBRMDB2 package into two new packages that can control access to write operations. Granting EXECUTE access on those package names provides yet another layer of security. See Chapter 5 for more information on DB2 security. When you rebind packages or plans for maintenance or customization, it is essential that the collection-id that the assembler label points to is bound with the proper isolation level. If the package is not bound with the proper isolation level, you can introduce either excessive locking or the possibility of lost update information. 4.4.3 How Gateway for DB2 Server Uses Collection-id Names The DB2 server issues the SQL statement SET CURRENT PACKAGESET, supplying a host parameter with the value of the collection-id retrieved from the options module. The remainder of this section refers to all the DBRMs bound into a common collection as a package set. 4.4.4 How Gateway for DB2 Client Controls Collection-id Name Selection Gateway for DB2 client users control the selection of the collection-id name by specifying an access mode (read-only or read/write) and an isolation level (cursor stability or repeatable read) in their database transactions. Gateway for DB2 client users can use any one of a number of user interfaces to access DB2. The DEC DB Integrator Product Family User's Guide describes some of the more common user interfaces. Each user interface has its own Gateway for DB2 Server Operations 4-7 default access mode and isolation level for database transactions. It is beyond the scope of this guide to describe these user interfaces. In general, user interfaces that are used with the gateway for DB2 client are transaction oriented. The access mode and isolation level that control the selection of the collection-id name are specified at the beginning of the transaction, either explicitly or by implicit defaults. The SQL interface to DEC Rdb is perhaps the most commonly used user interface with the gateway for DB2 client. Table 4-3 shows the transaction parameters (access mode and isolation level) that control collection-id name selection. The SQL interface to DEC Rdb is compliant with the SQL-92 ANSI standard. Because DB2, as of Version 3.1, is not compliant with this standard there cannot be an exact correlation of the transaction parameters. Table 4-3 How the Gateway for DB2 Client Transaction Parameters Control the Gateway for DB2 Server __________Collection-id_Selection_________________________ Default Gateway Gateway for Gateway for DB2 Gateway for for DB2 DB2 Server Client DB2 Client Server Package Set Access_Mode______Isolation_Level__Label_______Name________ Read-only Read committed READCS DBICS Read-only Repeatable-read READRR DBIRR serializable Read/write Read committed WRITECS DBICS Read/write Repeatable-read WRITERR DBIRR _________________serializable_____________________________ 4-8 Gateway for DB2 Server Operations 5 ________________________________________________________________ Security with the Gateway for DB2 Server The gateway for DB2 server works with existing IBM security mechanisms in three areas: o Within the CICS intercommunication environment o Through your CICS security package o Through DB2 security mechanisms This chapter describes how to ensure security in each of these areas. 5.1 Security Within the CICS Intercommunication Environment There are two levels of security within the CICS intercommunication environment: o Bind-time o Attach-time 5.1.1 Bind-Time Security The first level of security that the CICS system can enforce for an LU 6.2 connection is bind-time security. Bind-time security prevents unauthorized remote systems from establishing an LU 6.2 session with the CICS system. To implement bind-time security, you must establish a bind password for LU 6.2 terminals. For information on how to specify a bind password, see the appropriate DEC SNA documentation listed in the Preface. If you establish a bind-time password, you must commu- nicate that information to the gateway for DB2 client coordinator. Security with the Gateway for DB2 Server 5-1 5.1.2 Attach-Time Security The second level of security is attach-time security. Attach-time security controls whether or not users are authorized to attach to gateway for DB2 server transactions. The type of security checking performed by CICS is dependent on: o Terminal definitions o Transaction definitions The security requirements of transactions are specified in the CICS transaction definition. A transaction can be defined with no security (public), or with a specific security value. The level of attach authentication required from the user is specified in either the LU 6.2 terminal or connection definition. There are three levels of security you can use with the gateway for DB2 server: LOCAL, IDENTIFY, and VERIFY. The one you use depends in part on the security procedures in place at your site. If you are considering using the ATTACHSEC(IDENTIFY) qualifier, you should know that ATTACHSEC(IDENTIFY) has an additional feature that ATTACHSEC(VERIFY) does not. This feature keeps passwords off the network. While many sites might consider this a desirable feature, the ATTACHSEC(IDENTIFY) qualifier might not be suitable for every site. The CICS ATTACHSEC(IDENTIFY) qualifier is based only on the presence of a valid account name within an external security manager (ESM) database. This means you do not need to make additional entries to an ESM database to enable the ATTACHSEC(IDENTIFY) qualifier. The following are some restrictions when using this new feature of the ATTACHSEC(IDENTIFY) qualifier: o Generally, the external security managers that control CICS do not accept a user identifier that is longer than 8 characters. However, a Digital OpenVMS process can own a user identifier that is 12 characters long. This means that the user identifier of the OpenVMS process owned by the gateway for DB2 client cannot be longer than 8 characters. 5-2 Security with the Gateway for DB2 Server o There is no capability for matching an OpenVMS account name with a different account name within CICS or the ESM database. Therefore, the user identifier for the OpenVMS process on the gateway for DB2 client system must also have an identical account entry in the ESM database that controls CICS. Sites that do not maintain common accounts across both Digital and IBM systems probably cannot use the ATTACHSEC(IDENTIFY) qualifier. o CICS has no concept of nodes in the DECnet context. The same user identifier belonging to two different people on two different DECnet nodes appear the same to CICS. If the user identifier of the OpenVMS process is not unique on the IBM network, then the ATTACHSEC(IDENTIFY) security level might not be secure. For information on how to implement attach-time security, see the appropriate DEC SNA documentation listed in the Preface. 5.2 CICS Security The gateway for DB2 server supports these security implementations: o CICS default security o External security manager (ESM) - RACF - ACF2 This section briefly outlines what you need to do based on how security is set up at your site. It also includes information on how to change your security setup after the gateway for DB2 server has been installed. 5.2.1 Using CICS Default Security With CICS default security, gateway for DB2 client users who plan to access gateway for DB2 server transactions need to have their user identifications and passwords specified in the CICS sign-on table, DFHSNT. You can define gateway for DB2 server transactions as public or Security with the Gateway for DB2 Server 5-3 protected. For maximum security, the recommended attach- time security value specified in the LU 6.2 terminal or connection definition should be VERIFY or IDENTIFY. 5.2.2 Using RACF with CICS With the RACF security package, gateway for DB2 client users who plan to access gateway for DB2 server trans- actions need to have their user identifications and passwords specified in an RACF profile. You can define the gateway for DB2 server transaction as public or protected. For maximum security, the attach-time security value specified in the LU 6.2 terminal or connection definition should be VERIFY. 5.2.3 Using ACF2 with CICS The attach-time security value specified in the LU 6.2 terminal or connection definition can be LOCAL, IDENTIFY, or VERIFY. When a user accesses CICS through an LU 6.2 connection, the user identification and the name of the transaction to be executed pass directly to CICS. 5.2.3.1 Using ACF2 with ATTACHSEC As with the RACF security package, users of the gateway for DB2 client who plan to access gateway for DB2 server transactions must have their user identifications and passwords defined to ACF2. Support for CICS attach security only became available in Version 5.2 of ACF2 at Generation Level 9104. Your site must be running this version of ACF2 to use attach security with the gateway for DB2 server. The next section describes how to use the different values of ATTACHSEC with the gateway for DB2 server. 5-4 Security with the Gateway for DB2 Server 5.2.3.2 Using ATTACHSEC(VERIFY) or ATTACHSEC(IDENTIFY) To use either the ATTACHSEC(VERIFY) or ATTACHSEC(IDENTIFY) qualifiers with ACF2 Version 5.2, ACF2 user modification UM87688 must be installed. ACF2 Version 6.0 already has UM87688 integrated. In addition, you must configure ACF2 and CICS to support the ATTACHSEC(VERIFY) or ATTACHSEC(IDENTIFY) qualifiers. The following information on configuring ACF2 and CICS to support the ATTACHSEC(VERIFY) or ATTACHSEC(IDENTIFY) qualifiers is a summary of the information found in the CA-ACF2 MVS Technical Updates Release 5.2 CICS Support Guide, April 1991, published by Computer Associates: 1. Code the INITIAL parameter with INTERCEPT=DIRECT in the ACF2/CICS startup parameter list. 2. If you have CICS Version 2.0, check the CICS DFHSNT sign-on table for a default entry. A default entry similar to the one shown in the following example must exist: [label] DFHSNT TYPE=(ENTRY,DEFAULT), OPIDENT=value-at-your-site, RSLKEY=value-at-your-site 3. Remove the CICS transaction identifiers from the ACF2 Safelist, unless you want them to be public. The default transaction identifier is DEC2. If DEC2 is in the ACF2 Safelist, processing will not occur. 4. Define the default transaction identifier (DEC2) to ACF2. In case of a conflict between this summary and the information in the ACF2 documentation, the information in the ACF2 documentation takes precedence. 5.3 DB2 Security DB2 security controls access to DB2 resources such as plans, tables, and views. Security checking within DB2 depends on the authorization ID specified for the transaction in the RCT entry. You should use the CICS user identification as the DB2 authorization ID. Section 2.3.11 explains how to modify your RCT entry. Security with the Gateway for DB2 Server 5-5 You can limit access to DB2 resources through the gateway for DB2 server by restricting access to: o The capabilities of the gateway for DB2 server: read- only, or read/write o Who can access the DB2 plans used by the gateway for DB2 server o DB2 objects: tables and views 5.3.1 Limiting the Capabilities of gateway for DB2 Server You should install the gateway for DB2 server as a read- only server if your site does not allow gateway for DB2 client users to write to DB2 tables. STEP3C describes the WRITEFLG setting that prevents all write operations (delete, update, and insert) on DB2 tables. Digital recommends using the WRITEFLG setting to prevent write access to DB2 tables for the following reasons: o The gateway for DB2 server identifies itself as a read- only server to gateway for DB2 client users. Users who attempt to update DB2 receive error messages stating that write operations are not supported by a read-only server. o The error messages gateway for DB2 client users receive are handled locally on the Digital system, resulting in less network traffic and less DB2 overhead. The WRITEFLG setting, however, does not permit any flexibility in allowing selected gateway for DB2 client users to write to DB2 tables. It prevents all gateway for DB2 client users from writing to DB2. If this is too restrictive, then your site might want to implement one of the following less restrictive DB2 security options: o Selectively grant the EXECUTE privilege on gateway for DB2 server packages. For more information on this option, see Section 5.3.2. o Selectively grant write privileges on DB2 specific tables. For more information on this option, see Section 5.3.3. 5-6 Security with the Gateway for DB2 Server You can change the WRITEFLG setting after initial installation by repeating STEP3C, STEP3D, and STEP3E. 5.3.2 Limiting EXECUTE Access to Gateway for DB2 Server Packages To control access to the DB2 packages used by the gateway for DB2 server, the DB2 database administrator can selectively grant EXECUTE authority to those packages. This option is less restrictive than limiting the capability of the gateway for DB2 server to read- only. Section 4.4.4 describes these packages and their functions. If your site plans to control access to DB2 by controlling access to gateway for DB2 server packages, then you should understand the information on packages and their function in Section 4.4.2 as well as the information in this section. If you install the gateway for DB2 server taking all the defaults, then the two packages are installed with PUBLIC being granted EXECUTE access on those packages. By taking the defaults during installation, you are not limiting EXECUTE access to the gateway for DB2 server packages. If you want to limit EXECUTE access to gateway for DB2 server packages, then you should be aware of the following information: o The metadata retrieval package (default name DBICS.DBRMMETQ) is used by all gateway for DB2 client users. There is less management overhead if you grant EXECUTE access to PUBLIC on this package. If this is unacceptable to your site, then consider customizing the views described in Chapter 3 as a way to limit the metadata available to gateway for DB2 client users. Limiting access to metadata might result in less overhead, yet still be secure. o By default, read-only and read/write access to DB2 tables is controlled by the same package. If your site prefers to control read-only and read/write access differently, then you must create unique read-only and read/write packages in STEP3G, as well as instructing Security with the Gateway for DB2 Server 5-7 the gateway for DB2 server to use them in STEP3C, STEP3D, and STEP3E. o If your site decides to control EXECUTE access to gateway for DB2 server packages, you need to carefully plan your migration from previous server versions to the gateway for DB2 server Version 3.1. Existing production applications might have transaction parameters set to read/write access, even though the applications perform read-only operations. This can occur through implicit transaction defaults, if a production job did not explicitly identify itself as read-only. If your site controls EXECUTE access to the read/write plan, these production jobs might fail. You must either change the production job to explicitly request read-only access or you must grant EXECUTE on the read/write plan. If your site thinks that controlling EXECUTE access to gateway for DB2 server plans involves too much overhead, then your site might decide that controlling access to DB2 objects is sufficient. 5.3.3 Limiting Access to DB2 Objects If your site uses CICS attach security, the gateway for DB2 server operates under the authorization identifier of the user. Therefore, all existing privileges granted on DB2 objects for that user continue to work as intended. Gateway for DB2 client users can be allowed to perform the following operations on DB2 tables and views: o Delete o Insert o Select o Update All these data manipulation language (DML) operations can be controlled using SQL GRANT statements. 5-8 Security with the Gateway for DB2 Server Because gateway for DB2 client users can perform data definition language (DDL) operations, they are able to create or delete tables and table indexes. They cannot delete or create tablespaces or databases. The gateway for DB2 server requires its own DB2 objects. Because these objects will have SELECT operations performed on them under the authorization ID of the user, it is imperative that users be granted SELECT privileges on these objects. See Chapter 3 for more information. It might be less overhead to grant the public SELECT privileges on these DB2 objects. If your site thinks granting SELECT privileges to the public is a security risk, then you should consider customizing the DB2 objects (see Chapter 3) to limit their scope. You might find this option offers a good trade off between manageability and security. Security with the Gateway for DB2 Server 5-9 A ________________________________________________________________ Gateway for DB2 Server Installation Tape This appendix describes the contents of the gateway for DB2 server installation tape. See Chapter 2 for information about installing the gateway for DB2 server. The installation tape is in SMP RELFILE format. This format is described in your IBM documentation. There are 15 files on the gateway for DB2 server installation tape: o File 1, called SMPMCS, is a sequential file containing the SMP/E modification control statements necessary to install the gateway for DB2 server. These statements define the elements on the gateway for DB2 server installation tape. Information includes how they are packaged on the installation tape and the names of the libraries in which they are to be installed. o Files 2 through 5 are RELFILE data sets containing the elements of the gateway for DB2 server: - File 2, RELFILE(1), contains JCLIN for SYSMOD PV31000 - File 3, RELFILE(2), contains all elements for the VIDDOBJ distribution library. - File 4, RELFILE(3), contains all elements for the VIDDDBRM distribution library and VIDTDBRM target library. - File 5, RELFILE(4), contains all elements for the VIDDSRCE distribution library and VIDTSRCE target library. o File 6, called INSTLIB, contains all the sample job streams that are copied to an installation data set in STEP2A. Gateway for DB2 Server Installation Tape A-1 o Files 7 through 14 on the installation tape are sequential files used to load the PERSONNL sample database: - File 7 contains the data set INPUT.COLLEGES. - File 8 contains the data set INPUT.DEGREES. - File 9 contains the data set INPUT.DEPTS. - File 10 contains the data set INPUT.EMPLOYEE. - File 11 contains the data set INPUT.JOBS. - File 12 contains the data set INPUT.JOBHIST. - File 13 contains the data set INPUT.SALHIST. - File 14 contains the data set INPUT.WORKSTAT. o File 15, called VIDAPD, is the gateway for DB2 server program directory. Example A-1 describes the format of the gateway for DB2 server installation tape. Example A-1 Installation Tape Format for Gateway for DB2 Server File 1 SMPMCS File 2 JCLIN PV31000 File 3 OBJECT MODULES MAINCICS $S CORE COMM DB2 MSGMGNT CSRMGNT METR METQ @MSGS VIDAILOG ACSR USEROPTS (continued on next page) A-2 Gateway for DB2 Server Installation Tape Example A-1 (Cont.) Installation Tape Format for Gateway for DB2 Server File 4 DBRMs DBRMDB2 DBRMMETQ File 5 SOURCE MODULES CREATEVIEW OPTIONS METQUERY SYSLIN File 6 INSTLIB (SAMPLE INSTALLATION JOBSTREAMS AND COMMAND STREAMS) KWIKSTP2 STEP2C STEP2D STEP2E STEP2F STEP2G STEP2H STEP2I STEP2J STEP3A STEP3B STEP3C STEP3D STEP3F STEP3G STEP3H STEP3IA STEP3IB STEP3J STEP3K STEP4A STEP4B STEP4C STEP4D STEP4E STEP4F (continued on next page) Gateway for DB2 Server Installation Tape A-3 Example A-1 (Cont.) Installation Tape Format for Gateway for DB2 Server STEP4G PRNTJRNL ZLASTSTP File 7 INPUT.COLLEGES File 8 INPUT.DEGREES File 9 INPUT.DEPTS File 10 INPUT.EMPLOYEE File 11 INPUT.JOBS File 12 INPUT.JOBHIST File 13 INPUT.SALHIST File 14 INPUT.WORKSTAT File 15 VIDAPD (the program directory) A-4 Gateway for DB2 Server Installation Tape B ________________________________________________________________ Fully Qualified Data Set Names Worksheet for Gateway for DB2 Server This appendix contains a copy of the fully qualified data set names worksheet. Determine the fully qualified data set names for your CICS and DB2 system libraries before you proceed with the installation of the gateway for DB2 server to save time during the installation process. You use these data set names in several installation steps. The worksheet in Table B-1 has three columns: Symbol, New Value, and Description. Symbol refers to the value you change in the installation job streams. New Value refers to the value that replaces the Symbol in the installation job streams. Description gives a description of the Symbol value. Make a copy of this worksheet and use it throughout the gateway for DB2 server installation. Fully Qualified Data Set Names Worksheet for Gateway for DB2 Server B-1 Table B-1 Fully Qualified Data Set Names Worksheet for __________the_Gateway_for_DB2_Server______________________ Symbol_____New_Value_____________Description______________ ?SMPMAC ---------- Fully qualified data set name of the system MACLIB, which contains the SMP/E macro GIMZPOOL ?SYSMAC ---------- Fully qualified data set name of the system MACLIB to be used in assemblies ?CICSLOA ---------- Fully qualified data set name for the CICS load library ?DB2LOAD ---------- Fully qualified data set name for the DB2 load library ?DB2MAC ---------- Fully qualified data set name for the DB2 macro library ?CICSMAC ---------- Fully qualified data set name for the CICS macro library __________________________________________________________ B-2 Fully Qualified Data Set Names Worksheet for Gateway for DB2 Server C ________________________________________________________________ JCL Strings Worksheet for Gateway for DB2 Server This appendix contains a copy of the JCL Strings Worksheet. The JCL Strings Worksheet can help you to keep track of the symbols you assign to the JCL strings in the installation materials jobs during the gateway for DB2 server installation and customization. The worksheet in Table C-1 has three columns: Symbol, New Value, and Description. Symbol refers to the value you change in the installation job streams. New Value refers to the value that replaces the Symbol in the installation job streams. Description gives a description of the Symbol value. Make a copy of this worksheet and use it throughout your gateway for DB2 server installation. JCL Strings Worksheet for Gateway for DB2 Server C-1 Table C-1 JCL Strings Worksheet for the Gateway for DB2 __________Server__________________________________________ Symbol_____New_Value_____________Description______________ ?UNITTYP ---------- Generic device type for distribution and target libraries ?DISTVOL ---------- Volume serial number for distribution libraries ?TARGVOL ---------- Volume serial number for target libraries ?EDATE ---------- Expiration date of data sets in the format YYDDD ?TINDEX ---------- High-level qualifier for target libraries ?DINDEX ---------- High-level qualifier for distribution libraries ?SMPUNIT ---------- Generic device type for SMP/E data sets, the VSAM target zone, the VSAM distribution libraries, and the VSAM global zone ?SMPVOL ---------- Volume serial number for SMP/E libraries (continued on next page) C-2 JCL Strings Worksheet for Gateway for DB2 Server Table C-1 (Cont.) JCL Strings Worksheet for the Gateway __________________for_DB2_Server__________________________ Symbol_____New_Value_____________Description______________ ?MTSVOL ---------- Volume serial number for the SMPMTS data set ?VIDATZN ---------- Name of the VSAM target zone ?TCSIVOL ---------- Volume serial number for the VSAM target zone ?VIDADZN ---------- Name of the VSAM distribution zone ?DCSIVOL ---------- Volume serial number for the VSAM distribution zone ?VIDAGZN ---------- Name of the VSAM global zone ?GLOBVOL ---------- Volume serial number for the VSAM global zone ?SINDEX ---------- High-level qualifier for SMP/E libraries ?TLIBPRE ---------- High-level qualifier for SMP/E temporary files used at RECEIVE time (continued on next page) JCL Strings Worksheet for Gateway for DB2 Server C-3 Table C-1 (Cont.) JCL Strings Worksheet for the Gateway __________________for_DB2_Server__________________________ Symbol_____New_Value_____________Description______________ ?WRKUNIT ---------- Generic device type for SMP/E work files ?TAPUNIT ---------- Generic device type for the tape unit ?DBRMDLI ---------- High-level qualifier for the distribution DBRM library ?DB2SYS ---------- DB2 system name for your site ?JRNLDSN ---------- Fully qualified data set name of the CICS journal ?JRNLDSK ---------- Generic device type for the CICS journal ?JRNLVOL ---------- Volume serial number for the CICS journal ?VIDPDSK ---------- Generic device type for PERSONNL sequential files ?VIDPVOL ---------- Volume serial number for PERSONNL sequential files ?DB2VOL ---------- DB2 storage group volume for the PERSONNL database (continued on next page) C-4 JCL Strings Worksheet for Gateway for DB2 Server Table C-1 (Cont.) JCL Strings Worksheet for the Gateway __________________for_DB2_Server__________________________ Symbol_____New_Value_____________Description______________ ?DB2VCAT ---------- DB2 storage group VCAT for the PERSONNL database ?USERID ---------- User ID with proper DB2 authority to load the PERSONNL tables ?LINDEX ---------- High-level qualifier for DB2 load-utility work data sets ?LWRKDSK ---------- Generic device type for DB2 load-utility work _________________________________data_sets________________ JCL Strings Worksheet for Gateway for DB2 Server C-5 D ________________________________________________________________ Copy of Gateway for DB2 Server Install STEP2C Through STEP2J This appendix contains a copy of the JCL, SQL command streams, and CICS table entries that are contained in STEP2C through STEP2J. These are shown in Example D-1 through Example D-8. Example D-1 JCL Used in Gateway for DB2 Server Install Job STEP2C Example D-2 JCL Used in Gateway for DB2 Server Install Job STEP2D Example D-3 JCL Used in Gateway for DB2 Server Install Job STEP2E Example D-4 JCL Used in Gateway for DB2 Server Install Job STEP2E Example D-5 JCL Used in Gateway for DB2 Server Install Job STEP2G Example D-6 JCL Used in Gateway for DB2 Server Install Job STEP2H Example D-7 JCL Used in Gateway for DB2 Server Install Job STEP2I Example D-8 JCL Used in Gateway for DB2 Server Install Job STEP2J KWIKSTP2 shown in Example D-9 allows you to install the gateway for DB2 server without using the SMP/E zone for testing purposes. This step replaces all the substeps in STEP2. ZLASTSTP shown in Example D-10 is an example of an SMP/E zone merge. Copy of Gateway for DB2 Server Install STEP2C Through STEP2J D-1 Example D-1 JCL Used in Gateway for DB2 Server Install Job STEP2C //DBISTP2C JOB ,'CREATE LIBRARIES',MSGCLASS=A,CLASS=A //* //********************************************************************** //* STEP2C ALLOCATES THE TARGET AND DISTRIBUTION LIBRARIES FOR THE //* INSTALLATION OF DBI SERVER FOR DB2 //* //* STEP2C IS COMPRISED OF THE DEFINITION AND EXECUTION OF DBISTP2C, //* AN INLINE PROC. STEP2C IS RERUNNABLE. DBISTP2C CONSISTS OF: //* //* STEP1 DELETE //* STEP2 ALLOCATE //* //* MAKE THE FOLLOWING GLOBAL CHARACTER STRING CHANGES FOR //* SITE-SPECIFIC STANDARDS: //* //* 1) ?UNITTYP //* THE GENERIC UNIT DEVICE TYPE FOR DIST AND TARG LIBS. //* EXAMPLE -- SYSDA //* //* 2) ?DISTVOL //* THE VOLUME USED FOR THE DIST LIBS. EX. -- DM0023 //* //* 3) ?TARGVOL //* THE VOLUME USED FOR THE TARG LIBS. EX. -- DM0023 //* //* 4) ?EDATE //* THE EXPIRATION DATE OF DATASETS -- YYDDD FORMAT. //* EXAMPLE -- 00000 //* //* 5) ?TINDEX //* THE HIGH LEVEL QUALIFIER FOR THE TARG LIBS. //* EXAMPLES -- YOUR USERID, OR VIDA //* //* 6) ?DINDEX //* THE HIGH LEVEL QUALIFIER FOR THE DIST LIBS. //* EXAMPLES -- YOUR USERID, OR VIDA //* //*********************************************************************** (continued on next page) D-2 Copy of Gateway for DB2 Server Install STEP2C Through STEP2J Example D-1 (Cont.) JCL Used in Gateway for DB2 Server Install Job STEP2C //DBISTP2C PROC UNITTYP='?UNITTYP', // DISTVOL=?DISTVOL, // TARGVOL=?TARGVOL, // EDATE=?EDATE, // TINDEX='?TINDEX', // DINDEX='?DINDEX' //******************************************************************* //* STEP1: REMOVE EXISTING DISTRIBUTION AND TARGET DATASETS * //* STEP2: ALLOCATE AND CATALOG NEW DIST AND TARG DATASETS * //******************************************************************* //STEP1 EXEC PGM=IDCAMS,REGION=512K //SYSPRINT DD SYSOUT=* //* //* DELETE TARGET AND DISTRIBUTION LIBRARIES //* //STEP2 EXEC PGM=IEFBR14 //******************************************************************* //* ALLOCATE AND CATALOG * //* DISTRIBUTION LIBRARIES * //******************************************************************* //* //VIDDOBJ DD DSN=&DINDEX..VIDDOBJ, // DISP=(,CATLG), // DCB=(RECFM=U,LRECL=0,BLKSIZE=6160), // LABEL=EXPDT=&EDATE, // UNIT=&UNITTYP,VOL=SER=&DISTVOL, // SPACE=(TRK,(10,10,5)) 3380 TRACKS //VIDDDBRM DD DSN=&DINDEX..VIDDDBRM, // DISP=(,CATLG), // DCB=(RECFM=FB,LRECL=80,BLKSIZE=3120), // LABEL=EXPDT=&EDATE, // UNIT=&UNITTYP,VOL=SER=&DISTVOL, // SPACE=(TRK,(5,2,2)) 3380 TRACKS //VIDDSRCE DD DSN=&DINDEX..VIDDSRCE, // DISP=(,CATLG), // DCB=(RECFM=FB,LRECL=80,BLKSIZE=3120), // LABEL=EXPDT=&EDATE, // UNIT=&UNITTYP,VOL=SER=&DISTVOL, (continued on next page) Copy of Gateway for DB2 Server Install STEP2C Through STEP2J D-3 Example D-1 (Cont.) JCL Used in Gateway for DB2 Server Install Job STEP2C // SPACE=(TRK,(5,2,2)) 3380 TRACKS //* //******************************************************************* //* ALLOCATE AND CATALOG * //* TARGET LIBRARIES * //******************************************************************* //* //VIDTDBRM DD DSN=&TINDEX..VIDTDBRM, // DISP=(,CATLG), // DCB=(RECFM=FB,LRECL=80,BLKSIZE=3120), // LABEL=EXPDT=&EDATE, // UNIT=&UNITTYP,VOL=SER=&TARGVOL, // SPACE=(TRK,(5,2,2)) 3380 TRACKS //VIDTSRCE DD DSN=&TINDEX..VIDTSRCE, // DISP=(,CATLG), // DCB=(RECFM=FB,LRECL=80,BLKSIZE=3120), // LABEL=EXPDT=&EDATE, // UNIT=&UNITTYP,VOL=SER=&TARGVOL, // SPACE=(TRK,(5,2,2)) 3380 TRACKS //VIDTLOAD DD DSN=&TINDEX..VIDTLOAD, // DISP=(,CATLG), // DCB=(RECFM=U,BLKSIZE=6160), // UNIT=&UNITTYP,VOL=SER=&TARGVOL, // LABEL=EXPDT=&EDATE, // SPACE=(TRK,(15,5,2)) 3380 TRACKS //* OK, THIS NEXT ONE IS NOT TECHNICALLY AN SMP/E MANAGED DATASET //* HOWEVER IT FUNCTIONS JUST LIKE ONE //VIDTOBJ DD DSN=&TINDEX..VIDTOBJ, // DISP=(,CATLG), // DCB=(RECFM=U,LRECL=0,BLKSIZE=6160), // LABEL=EXPDT=&EDATE, // UNIT=&UNITTYP,VOL=SER=&TARGVOL, // SPACE=(TRK,(10,10,5)) 3380 TRACKS // PEND //* //* //* //DBISTP2C EXEC DBISTP2C (continued on next page) D-4 Copy of Gateway for DB2 Server Install STEP2C Through STEP2J Example D-1 (Cont.) JCL Used in Gateway for DB2 Server Install Job STEP2C //STEP1.SYSIN DD * DELETE (?DINDEX.VIDDOBJ) SCRATCH DELETE (?DINDEX.VIDDDBRM) SCRATCH DELETE (?DINDEX.VIDDSRCE) SCRATCH DELETE (?TINDEX.VIDTLOAD) SCRATCH DELETE (?TINDEX.VIDTSRCE) SCRATCH DELETE (?TINDEX.VIDTDBRM) SCRATCH DELETE (?TINDEX.VIDTOBJ) SCRATCH /* AVOID RC = 8 IF NOT PREVIOUSLY DEFINED */ SET LASTCC=0 SET MAXCC=0 /* Copy of Gateway for DB2 Server Install STEP2C Through STEP2J D-5 Example D-2 JCL Used in Gateway for DB2 Server Install Job STEP2D //DBISTP2D JOB ,'ALLOCATE SMP/E',MSGCLASS=A,CLASS=A //* //******************************************************************* //* STEP2D ALLOCATES THE SMP/E DATASETS FOR DBI SERVER FOR DB2. //* THIS JOB ALSO ALLOCATES AND INITIALIZES THE GLOBAL, TARGET, AND //* DISTRIBUTION ZONES. //* //* ******************************************************** //* NOTE 1 SKIP THIS STEP IF YOU ARE USING AN EXISTING SMP/E ZONE. //* ------ ******************************************************** //* THIS JOB IS REQUIRED ONLY IF YOU ARE INSTALLING //* DBI SERVER FOR DB2 IN A ZONE BY ITSELF. //* //* NOTE 2 IF YOU ARE INSTALLING USING SMP/E VERSION 4 OR PRIOR //* ------ THEN YOU MUST CHANGE THE IDCAMS CONTROL CARDS WHICH //* DEFINE THE VSAM CLUSTERS. THERE ARE 3 OCCURANCES //* OF THE CONTROL CARDS WHICH MUST BE CHANGED TO BE: //* //* KEYS(23 0) - //* RECORDSIZE(23 142) - //* //* NOTE 3 IF YOU ARE INSTALLING USING SMP/E VERSION 3 YOU MUST //* ------ ADD A DISP OF SHR TO THE DDDEF FOR SMPTLIB. //* //************************************************************************* //* STEP2D //* STEP1: DELETE NEW SMP/E DATASETS //* STEP2: ALLOCATE NEW SMP/E DATASETS //* STEP3: DEFINE SMP/E VSAM FILES //* STEP4: INITIALIZE SMP/E VSAM FILES //* STEP5: INITIALIZE SMP/E ZONES //* //************************************************************************** //* MAKE THE FOLLOWING GLOBAL CHARACTER STRING CHANGES TO MEET YOUR //* SITE-SPECIFIC STANDARDS FOR SMP/E DATASETS AND SMP/E VSAM ZONES. //* //* NOTE 4 ** CAUTION ** BEGINNING WITH STEP4 IN THIS JOB, MANY OF (continued on next page) D-6 Copy of Gateway for DB2 Server Install STEP2C Through STEP2J Example D-2 (Cont.) JCL Used in Gateway for DB2 Server Install Job STEP2D //* ------ THESE CHARACTER STRINGS EXIST IN SYSIN OR SMPCNTL INPUT //* DATA. SOME ARE ALSO DEFINED IN THE SUBSTITUTION //* PARAMETERS DEFINED IN A PROC. A GLOBAL CHANGE IS REQUIRED. //* //* NOTE 5 RECOMMENDATION -- STEP2D REQUIRES MANY SUBSTITUTIONS -- MORE THAN //* ------ ANY JOB IN THIS INSTALL. IT IS ADVISABLE TO MAKE A COPY OF //* THIS STEP2D BEFORE YOU BEGIN THE GLOBAL CHANGES. //* //* 1) ?SMPUNIT //* THE GENERIC UNIT DEVICE TYPE FOR SMP/E DATASETS, //* THE VSAM TARGET ZONE, THE VSAM DISTRIBUTION ZONE, AND THE //* VSAM GLOBAL ZONE. SEE NOTE 4. EXAMPLE -- SYSDA //* //* 2) ?SMPVOL //* THE VOLUME USED FOR THE SMP/E DATASETS. //* SEE NOTE 4. EXAMPLE -- DM0023 //* //* 3) ?MTSVOL //* THE VOLUME USED FOR THE SMPMTS DATASET. EX. -- DM0023 //* //* 4) ?EDATE //* THE EXPIRATION DATE OF SMP/E DATASETS -- YYDDD FORMAT. //* EXAMPLE -- 00000 //* //* 5) ?VIDATZN //* THE NAME OF THE VSAM TARGET ZONE TO BE ALLOCATED. //* SEE NOTE 4. EXAMPLE -- USERID.TZN //* THE NAME IS QUALIFIED FURTHER SO THAT THE CLUSTER NAME WILL BE: //* ?VIDATZN.CSI //* AND THE INDEX AREA WILL BE: //* ?VIDATZN.INDEX //* AND THE DATA AREA WILL BE: //* ?VIDATZN.DATA //* //* 6) ?TCSIVOL //* THE VOLUME ON WHICH THE VSAM TARGET ZONE IS TO BE //* ALLOCATED. SEE NOTE 4. EXAMPLE -- DM0023 //* (continued on next page) Copy of Gateway for DB2 Server Install STEP2C Through STEP2J D-7 Example D-2 (Cont.) JCL Used in Gateway for DB2 Server Install Job STEP2D //* 7) ?VIDADZN //* THE NAME OF THE VSAM DISTRIBUTION ZONE TO BE ALLOCATED. //* SEE NOTE 4. EXAMPLE -- USERID.DZN //* THE NAME IS QUALIFIED FURTHER SO THE THE CLUSTER NAME WILL BE: //* ?VIDADZN.CSI //* AND THE INDEX AREA WILL BE: //* ?VIDADZN.INDEX //* AND THE DATA AREA WILL BE: //* ?VIDADZN.DATA //* //* 8) ?DCSIVOL //* THE NAME OF THE DISK VOLUME ON WHICH THE VSAM DISTRIBUTION ZONE //* IS TO BE ALLOCATED. SEE NOTE 4. EXAMPLE -- DM0023 //* //* 9) ?VIDAGZN //* THE NAME OF THE VSAM GLOBAL ZONE TO BE ALLOCATED. //* SEE NOTE 4. EXAMPLE -- USERID.GZN //* THE NAME IS QUALIFIED FURTHER SO THAT THE CLUSTER NAME WILL BE: //* ?VIDAGZN.CSI //* AND THE INDEX AREA WILL BE: //* ?VIDAGZN.INDEX //* AND THE DATA AREA WILL BE: //* ?VIDAGZN.DATA (continued on next page) D-8 Copy of Gateway for DB2 Server Install STEP2C Through STEP2J Example D-2 (Cont.) JCL Used in Gateway for DB2 Server Install Job STEP2D //* //* 10) ?GLOBVOL //* THE NAME OF THE DISK VOLUME ON WHICH THE VSAM GLOBAL ZONE //* IS TO BE ALLOCATED. SEE NOTE 4. EXAMPLE -- DM0024 //* //* 11) ?SINDEX //* THE HIGH LEVEL QUALIFIER FOR THE SMP/E DATASETS. SEE NOTE 4. //* EXAMPLES -- YOUR USERID OR VIDA //* //* 12) ?TLIBPRE //* THE HIGH LEVEL QUALIFIER FOR THE TEMPORARY RELFILES THAT ARE //* ALLOCATED AT RECEIVE TIME. SEE NOTE 4. //* EXAMPLES -- YOUR USERID OR VIDA //* //* 13) ?SMPMAC //* THE FULLY QUALIFIED NAME OF YOUR MACLIB WHICH //* CONTAINS THE SMP/E MACRO GIMZPOOL. EXAMPLE -- SYS1.MACLIB //* //* 14) ?SYSMAC //* THE FULLY QUALIFIED NAME OF YOUR MACLIB TO BE USED IN //* ASSEMBLIES. THIS MAY BE THE IDENTICAL MACLIB DEFINED //* IN REPLACEMENT 13) ABOVE. EXAMPLE -- SYS1.MACLIB //* //*********************************************************************** //ALLOCATE PROC SMPUNIT='?SMPUNIT', // SMPVOL=?SMPVOL, // MTSVOL=?MTSVOL, // EDATE=?EDATE, // SINDEX='?SINDEX' //* //STEP1 EXEC PGM=IDCAMS //SYSPRINT DD SYSOUT=* //* (continued on next page) Copy of Gateway for DB2 Server Install STEP2C Through STEP2J D-9 Example D-2 (Cont.) JCL Used in Gateway for DB2 Server Install Job STEP2D //STEP2 EXEC PGM=IEFBR14 //* //************************************************************ //* * //* STEP2 - ALLOCATE NEW SMP/E DATASETS (INCLUDING MTS) * //* * //************************************************************ //* //SCDS DD DSN=&SINDEX..SCDS, // DISP=(,CATLG), // UNIT=&SMPUNIT,VOL=SER=&SMPVOL, // DCB=(RECFM=FB,LRECL=80,BLKSIZE=3120), // LABEL=EXPDT=&EDATE, // SPACE=(TRK,(15,15,50)) 3380 TRACKS //MTS DD DSN=&SINDEX..MTS, // DISP=(,CATLG), // UNIT=&SMPUNIT,VOL=SER=&MTSVOL, // DCB=(RECFM=FB,LRECL=80,BLKSIZE=3120), // LABEL=EXPDT=00000, // SPACE=(TRK,(15,15,20)) 3380 TRACKS //PTS DD DSN=&SINDEX..PTS, // DISP=(,CATLG), // UNIT=&SMPUNIT,VOL=SER=&SMPVOL, // DCB=(RECFM=FB,LRECL=80,BLKSIZE=3120), // LABEL=EXPDT=&EDATE, // SPACE=(TRK,(5,1,5)) 3380 TRACKS //STS DD DSN=&SINDEX..STS, // DISP=(,CATLG), // UNIT=&SMPUNIT,VOL=SER=&SMPVOL, // DCB=(RECFM=FB,LRECL=80,BLKSIZE=3120), // LABEL=EXPDT=&EDATE, // SPACE=(TRK,(1,1,5)) 3380 TRACKS //GLOG DD DSN=&SINDEX..SMPLOGG, // DISP=(,CATLG), // UNIT=&SMPUNIT,VOL=SER=&SMPVOL, // SPACE=(TRK,(5,1)) 3380 TRACKS //TLOG DD DSN=&SINDEX..SMPLOGT, // DISP=(,CATLG), (continued on next page) D-10 Copy of Gateway for DB2 Server Install STEP2C Through STEP2J Example D-2 (Cont.) JCL Used in Gateway for DB2 Server Install Job STEP2D // UNIT=&SMPUNIT,VOL=SER=&SMPVOL, // SPACE=(TRK,(5,1)) 3380 TRACKS //DLOG DD DSN=&SINDEX..SMPLOGD, // DISP=(,CATLG), // UNIT=&SMPUNIT,VOL=SER=&SMPVOL, // SPACE=(TRK,(5,1)) 3380 TRACKS // PEND //* //ALLOCATE EXEC ALLOCATE //STEP1.SYSIN DD * /* DELETE THE SMP NON-VSAM FILES */ DELETE (?SINDEX.SCDS) SCRATCH DELETE (?SINDEX.MTS) SCRATCH DELETE (?SINDEX.PTS) SCRATCH DELETE (?SINDEX.STS) SCRATCH DELETE (?SINDEX.SMPLOGD) SCRATCH DELETE (?SINDEX.SMPLOGG) SCRATCH DELETE (?SINDEX.SMPLOGT) SCRATCH /* */ /* CLEAR THE CONDITION CODES */ /* */ SET LASTCC=0 SET MAXCC=0 /* //* //STEP3 EXEC PGM=IDCAMS,REGION=512K //* //************************************************************ //* * //* STEP3 -- DEFINE SMP/E VSAM FILES * //* * //************************************************************ //CSIDVOL DD VOL=SER=?DCSIVOL,UNIT=?SMPUNIT, // DISP=SHR //CSITVOL DD VOL=SER=?TCSIVOL,UNIT=?SMPUNIT, // DISP=SHR //CSIGVOL DD VOL=SER=?GLOBVOL,UNIT=?SMPUNIT, // DISP=SHR (continued on next page) Copy of Gateway for DB2 Server Install STEP2C Through STEP2J D-11 Example D-2 (Cont.) JCL Used in Gateway for DB2 Server Install Job STEP2D //SYSPRINT DD SYSOUT=* //SYSIN DD * /* DELETE THE GLOBAL ZONE CSI */ /* */ DELETE (?VIDAGZN.CSI) /* */ /* DELETE THE TZONE CSI */ /* */ DELETE (?VIDATZN.CSI) /* */ /* DELETE THE DZONE CSI */ /* */ DELETE (?VIDADZN.CSI) /* */ /* CLEAR THE CONDITION CODES */ /* */ SET LASTCC=0 SET MAXCC=0 /* */ /* DEFINE THE GLOBAL ZONE CSI */ /* */ DEFINE CLUSTER(NAME(?VIDAGZN.CSI) - CONTROLINTERVALSIZE(4096) - FREESPACE(10,5) - KEYS(24 0) - RECORDSIZE(24 143) - SHAREOPTIONS(2) - UNIQUE - VOLUMES(?GLOBVOL)) - DATA(NAME(?VIDAGZN.DATA) - CYLINDERS(3 1)) - INDEX(NAME(?VIDAGZN.INDEX) - CYLINDERS(1 1)) /* */ /* DEFINE THE TZONE CSI */ /* */ DEFINE CLUSTER(NAME(?VIDATZN.CSI) - CONTROLINTERVALSIZE(4096) - (continued on next page) D-12 Copy of Gateway for DB2 Server Install STEP2C Through STEP2J Example D-2 (Cont.) JCL Used in Gateway for DB2 Server Install Job STEP2D FREESPACE(10,5) - KEYS(24 0) - RECORDSIZE(24 143) - SHAREOPTIONS(2) - UNIQUE - VOLUMES(?TCSIVOL)) - DATA(NAME(?VIDATZN.DATA) - CYLINDERS(10 2)) - INDEX(NAME(?VIDATZN.INDEX) - CYLINDERS(1 1)) /* */ /* DEFINE THE DZONE CSI */ /* */ DEFINE CLUSTER(NAME(?VIDADZN.CSI) - CONTROLINTERVALSIZE(4096) - FREESPACE(10,5) - KEYS(24 0) - RECORDSIZE(24 143) - SHAREOPTIONS(2) - UNIQUE - VOLUMES(?DCSIVOL)) - DATA(NAME(?VIDADZN.DATA) - CYLINDERS(10 2)) - INDEX(NAME(?VIDADZN.INDEX) - CYLINDERS(1 1)) /* //* //STEP4 EXEC PGM=IDCAMS,REGION=512K //* //************************************************************ //* * //* STEP4 - INITIALIZE SMP/E VSAM FILES * //* * //************************************************************ //SYSPRINT DD SYSOUT=* //ZPOOL DD DSN=?SMPMAC(GIMZPOOL),DISP=SHR //SMPGCSI DD DSN=?VIDAGZN.CSI, // DISP=OLD (continued on next page) Copy of Gateway for DB2 Server Install STEP2C Through STEP2J D-13 Example D-2 (Cont.) JCL Used in Gateway for DB2 Server Install Job STEP2D //SMPTCSI DD DSN=?VIDATZN.CSI, // DISP=OLD //SMPDCSI DD DSN=?VIDADZN.CSI, // DISP=OLD //SYSIN DD * REPRO OUTFILE(SMPGCSI) INFILE(ZPOOL) REPRO OUTFILE(SMPTCSI) INFILE(ZPOOL) REPRO OUTFILE(SMPDCSI) INFILE(ZPOOL) /* //* //* INITIALIZE THE NEWLY CREATED SMP/E ZONES //* //STEP5 EXEC PGM=GIMSMP,REGION=4096K //* //* SMP/E DATA SETS //* //SMPCSI DD DSN=?VIDAGZN.CSI,DISP=SHR //SMPLOG DD DSN=?SINDEX.SMPLOGG,DISP=MOD //SMPPTS DD DSN=?SINDEX.PTS,DISP=OLD //SYSUT1 DD UNIT=?SMPUNIT,SPACE=(1700,(400,400)) //SYSUT2 DD UNIT=?SMPUNIT,SPACE=(1700,(400,400)) //SYSUT3 DD UNIT=?SMPUNIT,SPACE=(1700,(400,400)) //* //* SMP/E OUTPUT //* (continued on next page) D-14 Copy of Gateway for DB2 Server Install STEP2C Through STEP2J Example D-2 (Cont.) JCL Used in Gateway for DB2 Server Install Job STEP2D //SMPOUT DD SYSOUT=* //SYSPRINT DD SYSOUT=* //SMPRPT DD SYSOUT=* //* //* SMP/E INPUT //* //SMPCNTL DD * SET BDY(GLOBAL) . UCLIN . ADD GLOBALZONE SREL(C150) FMID (PVI1000) OPTIONS(VIDAOPT) ZONEINDEX( (VIDATZN,?VIDATZN.CSI,TARGET) (VIDADZN,?VIDADZN.CSI,DLIB) ) . ADD OPTIONS(VIDAOPT) ASM(IEV90) COMP(IEBCOPY) COPY(IEBCOPY) LKED(IEWL) DSPREFIX(?TLIBPRE) DSSPACE(20,10,50) NOREJECT PAGELEN(60) PEMAX(9999) RETRYDDN(ALL) . ADD UTILITY(IEV90) NAME(IEV90) PARM(OBJECT,NODECK,LIST,XREF(SHORT),ALIGN) . ADD UTILITY(IEBCOPY) NAME(IEBCOPY) . ADD UTILITY(IEWL) NAME(IEWL) PARM(LIST,XREF,LET,NCAL) . ADD DDDEF(SMPLOG) MOD DA(?SINDEX.SMPLOGG) . ADD DDDEF(SMPPTS) SHR DA(?SINDEX.PTS) . ADD DDDEF(SMPTLIB) UNIT(?SMPUNIT) (continued on next page) Copy of Gateway for DB2 Server Install STEP2C Through STEP2J D-15 Example D-2 (Cont.) JCL Used in Gateway for DB2 Server Install Job STEP2D VOLUME(?SMPVOL). ENDUCL . SET BDY(VIDATZN) . UCLIN . ADD TARGETZONE(VIDATZN) SREL(C150) RELATED(VIDADZN) OPTIONS(VIDAOPT) . ADD DDDEF(SYSLIB) CONCAT(SMPMTS,MACLIB) . ADD DDDEF(SMPLOG) MOD DA(?SINDEX.SMPLOGT) . ADD DDDEF(SMPSCDS) SHR DA(?SINDEX.SCDS) . ADD DDDEF(SMPPTS) SHR DA(?SINDEX.PTS) . ADD DDDEF(SMPMTS) SHR DA(?SINDEX.MTS) . ADD DDDEF(SMPSTS) SHR DA(?SINDEX.STS) . ADD DDDEF(MACLIB) SHR DA(?SYSMAC) . ADD DDDEF(SMPTLIB) UNIT(?SMPUNIT) VOLUME(?SMPVOL) . ENDUCL . SET BDY(VIDADZN) . UCLIN . ADD DLIBZONE(VIDADZN) SREL(C150) RELATED(VIDATZN) OPTIONS(VIDAOPT) . ADD DDDEF(SYSLIB) CONCAT(MACLIB) . ADD DDDEF(SMPLOG) MOD DA(?SINDEX.SMPLOGD) . ADD DDDEF(SMPSCDS) SHR DA(?SINDEX.SCDS) . ADD DDDEF(SMPPTS) SHR DA(?SINDEX.PTS) . (continued on next page) D-16 Copy of Gateway for DB2 Server Install STEP2C Through STEP2J Example D-2 (Cont.) JCL Used in Gateway for DB2 Server Install Job STEP2D ADD DDDEF(SMPMTS) SHR DA(?SINDEX.MTS) . ADD DDDEF(SMPSTS) SHR DA(?SINDEX.STS) . ADD DDDEF(SMPTLIB) UNIT(?SMPUNIT) VOLUME(?SMPVOL). ADD DDDEF(MACLIB) SHR DA(?SYSMAC) . ENDUCL . // Copy of Gateway for DB2 Server Install STEP2C Through STEP2J D-17 Example D-3 JCL Used in Gateway for DB2 Server Install Job STEP2E //******************************************************************** //* STEP2E IS THE DEFINITION OF AN SMP PROC EXECUTED BY THE REMAINING //* SMP/E STEPS, FOR THE INSTALLATION OF DBI SERVER FOR DB2. //* //* MAKE THESE GLOBAL CHARACTER STRING CHANGES FOR SITE-SPECIFIC //* STANDARDS: //* //* 1) ?VIDAGZN //* HIGH LEVEL QUALIFIER FOR THE SMP/E GLOBAL ZONE //* EXAMPLE -- USERID.GZN //* //* 2) ?WRKUNIT //* GENERIC UNIT DEVICE TYPE FOR THE ALLOCATION OF SMP/E WORK FILES. //* EXAMPLES -- VIO OR WHD OR 3380 //* //* NOTE -- THIS PROC OR YOUR ALTERNATE PROC MUST BE AVAILABLE TO //* SUBSEQUENT JOB STEPS BY ONE OF THE FOLLOWING METHODS: //* //* A) COPY THIS MEMBER TO A SYSTEM PROC LIBRARY, OR //* B) MODIFY THE REMAINING SMP/E JOBS TO CONTAIN A COPY OF //* THE PROC INLINE, REMEMBERING THAT YOU NEED A PEND //* STATEMENT AT THE END. A COMMENTED-OUT PEND IS SUPPLIED. //* //********************************************************************* //SMPVIDA PROC OUTC='*', // VIDAGZN='?VIDAGZN', // WRKUNIT='?WRKUNIT' //SMP EXEC PGM=GIMSMP,REGION=4096K //* //* SMP DATA SETS //* //SMPCSI DD DSN=&VIDAGZN..CSI,DISP=SHR //SYSUT1 DD UNIT=&WRKUNIT,SPACE=(1700,(400,400)) //SYSUT2 DD UNIT=&WRKUNIT,SPACE=(1700,(400,400)) //SYSUT3 DD UNIT=&WRKUNIT,SPACE=(1700,(400,400)) //SYSUT4 DD UNIT=&WRKUNIT,SPACE=(1700,(400,400)) //SYSUT5 DD UNIT=&WRKUNIT,SPACE=(1700,(400,400)) //* (continued on next page) D-18 Copy of Gateway for DB2 Server Install STEP2C Through STEP2J Example D-3 (Cont.) JCL Used in Gateway for DB2 Server Install Job STEP2E //SMPWRK1 DD UNIT=&WRKUNIT,SPACE=(TRK,(30,5)) //SMPWRK2 DD UNIT=&WRKUNIT,SPACE=(TRK,(30,5)) //SMPWRK3 DD UNIT=&WRKUNIT,SPACE=(TRK,(30,5)) //SMPWRK4 DD UNIT=&WRKUNIT,SPACE=(TRK,(30,5)) //SMPWRK5 DD UNIT=&WRKUNIT,SPACE=(TRK,(30,5)) //SMPWRK6 DD UNIT=&WRKUNIT,SPACE=(TRK,(30,5)) //* //* SMP OUTPUT //* //SMPOUT DD SYSOUT=&OUTC //SYSPRINT DD SYSOUT=&OUTC //SMPRPT DD SYSOUT=&OUTC //* //* THE FOLLOWING PEND STATEMENT IS COMMENTED OUT //* IF YOU COPY THIS PROC INLINE IN SUBSEQUENT STEPS, UNCOMMENT THE PEND //* PEND Copy of Gateway for DB2 Server Install STEP2C Through STEP2J D-19 Example D-4 JCL Used in Gateway for DB2 Server Install Job STEP2F //DBISTP2F JOB ,'INIT SMP/E LIBS',MSGCLASS=A,CLASS=A //* //****************************************************************** //* STEP2F INITIALIZES THE THE SMP/E TARGET AND DISTRIBUTION ZONES //* WITH DATASET (DDDEF) INFORMATION NEEDED BY DBI SERVER FOR DB2. //* //* NOTE 1: IF YOU ARE INSTALLING THIS SOFTWARE INTO AN EXISTING //* ------ GLOBAL ZONE (I.E. NOT THE ONE CREATED IN STEP2D) THEN //* THAT GLOBAL ZONE MUST HAVE SREL(C150) AND FMID(PVI3100) //* ON THE GLOBALZONE ENTRY. //* //* 1) THIS STEP REQUIRES YOUR ALTERNATE PROC, OR THE SMPVIDA //* PROC WHICH IS AVAILABLE BY ONE OF THESE METHODS: //* //* A) IF THE SMPVIDA PROC IN STEP2E WAS COPIED TO A SYSTEM //* PROC LIBRARY, THEN PROCEED TO 2) FOR THE GLOBAL //* CHARACTER STRING CHANGES. //* //* B) THE SMPVIDA PROC FROM STEP2E CAN BE COPIED INLINE //* TO THIS JCL. REMEMBER TO PLACE A PEND STATEMENT AT //* THE END OF THE PROC. A COMMENTED-OUT PEND IS SUPPLIED IN STEP2E. //* //* 2) MAKE THE FOLLOWING GLOBAL CHARACTER STRING CHANGES FOR //* SITE-SPECIFIC STANDARDS: //* //* A) ?TINDEX //* THE HIGH LEVEL QUALIFIER FOR THE TARGET LIBRARIES. //* EXAMPLES -- USERID, OR VIDA //* //* B) ?DINDEX //* THE HIGH LEVEL QUALIFIER FOR THE DISTRIBUTION LIBRARIES. //* EXAMPLES -- USERID, OR VIDA //* //****************************************************************** //* //DBISTP2F EXEC SMPVIDA //SMP.SMPCNTL DD * (continued on next page) D-20 Copy of Gateway for DB2 Server Install STEP2C Through STEP2J Example D-4 (Cont.) JCL Used in Gateway for DB2 Server Install Job STEP2F SET BDY(VIDATZN) . UCLIN . ADD DDDEF(VIDTDBRM) SHR DA(?TINDEX.VIDTDBRM) . ADD DDDEF(VIDTSRCE) SHR DA(?TINDEX.VIDTSRCE) . ADD DDDEF(VIDTLOAD) SHR DA(?TINDEX.VIDTLOAD) . ENDUCL . SET BDY(VIDADZN) . UCLIN . ADD DDDEF(VIDDOBJ) SHR DA(?DINDEX.VIDDOBJ) . ADD DDDEF(VIDDDBRM) SHR DA(?DINDEX.VIDDDBRM) . ADD DDDEF(VIDDSRCE) SHR DA(?DINDEX.VIDDSRCE) . ENDUCL . // Copy of Gateway for DB2 Server Install STEP2C Through STEP2J D-21 Example D-5 JCL Used in Gateway for DB2 Server Install Job STEP2G //DBISTP2G JOB ,'SMP RECEIVE SERVER',MSGCLASS=A,CLASS=A //* //****************************************************************** //* STEP2G IS THE SMP/E RECEIVE STEP FOR DBI SERVER FOR DB2. //* RECEIVE THE FUNCTION SYSMOD. CHECK THE SYSMOD ID AGAINST //* ANY INFORMATION IN YOUR PROGRAM DIRECTORY. //* //* 1) THIS STEP REQUIRES YOUR ALTERNATE PROC, OR THE SMPVIDA //* PROC WHICH IS AVAILABLE BY ONE OF THESE METHODS: //* //* A) IF THE SMPVIDA PROC IN STEP2E WAS COPIED TO A SYSTEM //* PROC LIBRARY, THEN PROCEED TO 2). //* //* B) THE SMPVIDA PROC FROM STEP2E CAN BE COPIED INLINE TO //* THIS STEP. REMEMBER YOU NEED A PEND STATEMENT AT THE //* END. A COMMENTED OUT PEND IS SUPPLIED IN SMPVIDA. //* //* 2) CHECK THE SMPPTFIN DD STATEMENT. MODIFY TO YOUR SITE- //* SPECIFIC STANDARDS, IF NECESSARY. //* //* A) ?TAPUNIT //* CHANGE TO YOUR SITE-STANDARD FOR THE SPECIFICATION OF //* A TAPE UNIT. //* //* B) CHECK THE VOLSER OF THE PROGRAM PRODUCT TAPE AGAINST //* THE VOL=SER= IN THIS JCL. //* //****************************************************************** //* //DBISTP2G EXEC SMPVIDA //* //* SMP INPUT //* //SMP.SMPCNTL DD * SET BDY(GLOBAL) . RECEIVE S(PVI3100) SYSMODS LIST . /* (continued on next page) D-22 Copy of Gateway for DB2 Server Install STEP2C Through STEP2J Example D-5 (Cont.) JCL Used in Gateway for DB2 Server Install Job STEP2G //* //* ** MODIFY UNIT FOR TAPE. DSN MUST BE SMPMCS. CHECK VOLSER. *** //* //SMPPTFIN DD UNIT=(?TAPUNIT,1),DSN=SMPMCS, // DISP=(OLD,PASS), // VOL=SER=(VI3000) // Copy of Gateway for DB2 Server Install STEP2C Through STEP2J D-23 Example D-6 JCL Used in Gateway for DB2 Server Install Job STEP2H //DBISTP2H JOB ,'DUMMY MODULES',MSGCLASS=A,CLASS=A //* //******************************************************************* //* THIS STEP CREATES DUMMY LOAD MODULES OF THE DBI ACCESS SERVER. //* THESE ARE SO THAT SMP/E CAN LINK THE SERVER DURING APPLY //* PROCESSING WITHOUT GETTING UNRESOLVED ERRORS ON ALL THE //* CICS AND DB2 STUBS. //* //* MAKE THE FOLLOWING GLOBAL CHARACTER STRING CHANGES FOR SITE- //* SPECIFIC STANDARDS: //* //* //* 1) ?DB2LOAD //* THE FULLY QUALIFIED DSN FOR THE DB2 LOAD LIBRARY, PART OF //* THE SYSLIB DD STATEMENT FOR THE LINK. //* EXAMPLE -- SYS1.DSN230.DSNLOAD //* //* 2) ?CICSLOA //* THE FULLY QUALIFIED DSN FOR THE CICS LOAD LIBRARY, PART OF //* THE SYSLIB DD STATEMENT FOR THE LINK. //* EXAMPLE -- CICS330.LOADLIB //* //* 3) ?TINDEX //* THE HIGH LEVEL QUALIFIER FOR THE TARGET LOAD LIBRARY, THE //* SYSLMOD FOR THE LINK. EXAMPLES -- YOUR USERID, OR VIDA. //* SEE NOTE 1 ABOVE. //* //* 4) ?WRKUNIT //* THE GENERIC UNIT TYPE DEVICE FOR WORK DATASETS //* //* 5) ?CICSMAC //* THE FULLY QUALIFIED DSN FOR THE CICS MACLIB WHICH CONTAINS //* DFHEILIA, LINKAGE EDITOR INPUT, PART OF THE SYSLIN DD STATEMENT //* FOR THE LINK. EXAMPLE -- CICS330.MACLIB //* //* //******************************************************************* //DBISTP2H PROC DB2LOAD='?DB2LOAD', (continued on next page) D-24 Copy of Gateway for DB2 Server Install STEP2C Through STEP2J Example D-6 (Cont.) JCL Used in Gateway for DB2 Server Install Job STEP2H // CICSLOA='?CICSLOA', // LOADTLI='?TINDEX', // WRKUNIT='?WRKUNIT' //LKED EXEC PGM=IEWL,PARM='XREF,LET,RENT,REFR,LIST,NCAL', // REGION=2048K //SYSLIB DD DSN=&DB2LOAD,DISP=SHR // DD DSN=&CICSLOA,DISP=SHR //SYSLMOD DD DSN=&LOADTLI..VIDTLOAD,DISP=SHR //SYSUT1 DD DSN=&&SYSUT1,UNIT=&WRKUNIT,SPACE=(1024,(50,20)) //SYSPRINT DD SYSOUT=*,DCB=(RECFM=FB,LRECL=121,BLKSIZE=1210) // PEND //* //* //* //SERVERL EXEC DBISTP2H //LKED.SYSLIN DD DSN=?CICSMAC(DFHEILIA),DISP=SHR, // DCB=BLKSIZE=400 // DD * INCLUDE SYSLIB(DFHEAI0) INCLUDE SYSLIB(DSNTIAR) INCLUDE SYSLIB(DSNCLI) MODE RMODE(ANY),AMODE(31) NAME DBISERV(R) // Copy of Gateway for DB2 Server Install STEP2C Through STEP2J D-25 Example D-7 JCL Used in Gateway for DB2 Server Install Job STEP2I //DBISTP2I JOB ,'SMP APPLY SERVER',MSGCLASS=A,CLASS=A //* //*********************************************************************** //* THIS IS THE SMP/E APPLY FOR DBI SERVER FOR DB2. //* APPLY THE FMID FOR THIS PRODUCT. //* //* 1) THIS STEP REQUIRES YOUR ALTERNATE PROC, OR THE SMPVIDA //* PROC WHICH IS AVAILABLE BY ONE OF THESE METHODS: //* //* A) IF THE SMPVIDA PROC IN STEP2E WAS COPIED TO A SYSTEM //* PROC LIBRARY THEN PROCEED TO 2). //* //* B) THE SMPVIDA PROC FROM STEP2E CAN BE COPIED INLINE TO THIS //* STEP. REMEMBER TO ADD A PEND STATEMENT AT THE END OF THE //* PROC. A COMMENTED-OUT PEND IS SUPPLIED IN STEP2E. //* //* 2) A RETURN CODE OF 0 IS EXPECTED. //* //* //*********************************************************************** //DBISTP2I EXEC SMPVIDA //* //* SMP INPUT //* //SMP.SMPCNTL DD * SET BDY(VIDATZN) . APPLY SELECT(PVI3100) . /* // D-26 Copy of Gateway for DB2 Server Install STEP2C Through STEP2J Example D-8 JCL Used in Gateway for DB2 Server Install Job STEP2J //DBISTP2J JOB ,'SMP ACCEPT SERVER',MSGCLASS=A,CLASS=A //************************************************************************ //* THIS IS THE SMP/E ACCEPT FOR DBI SERVER FOR DB2. //* ACCEPT THE FMID FOR THIS PRODUCT. //* //* THIS STEP REQUIRES YOUR ALTERNATE PROC, OR THE SMPVIDA PROC //* WHICH IS AVAILABLE BY ONE OF THESE METHODS: //* //* 1) IF THE SMPVIDA PROC IN STEP2E WAS COPIED TO A SYSTEM //* PROC LIBRARY THEN ONLY YOUR JOBCARD CHANGES ARE NEEDED. //* //* 2) THE SMPVIDA PROC FROM STEP2E CAN BE COPIED INLINE TO THIS STEP. //* REMEMBER TO ADD A PEND STATEMENT AT THE END OF THE PROC. //* A COMMENTED-OUT PEND STATEMENT IS SUPPLIED IN STEP2E. //* //************************************************************************ //* //DBISTP2J EXEC SMPVIDA //* //* SMP INPUT //* //SMP.SMPCNTL DD * SET BDY(VIDADZN) . ACCEPT SELECT(PVI3100) . /* // Copy of Gateway for DB2 Server Install STEP2C Through STEP2J D-27 Example D-9 JCL Used in Gateway for DB2 Server Install Job KWIKSTP2 //VIDKWIK2 JOB ,'NONSMP INSTALL',MSGCLASS=A,CLASS=A //DBIKWIK2 JOB ,'NONSMP INSTALL',MSGCLASS=A,CLASS=A //* //********************************************************************** //* THIS JCL REPLACES ALL THE STEP2X INSTALLATION LIBRARY MEMBERS //* BECAUSE IT DOES NOT USE SMP/E TO LOAD THE FILES. //* //* MAKE THE FOLLOWING GLOBAL CHARACTER STRING CHANGES FOR //* SITE-SPECIFIC STANDARDS: //* //* 1) ?UNITTYP //* THE GENERIC UNIT DEVICE TYPE FOR DIST AND TARG LIBS. //* ALSO, THE GENERIC UNIT TYPE DEVICE FOR WORK DATASETS //* EXAMPLE -- SYSDA //* //* 2) ?DISTVOL //* THE VOLUME USED FOR THE DIST LIBS. EX. -- DM0023 //* //* 3) ?TARGVOL //* THE VOLUME USED FOR THE TARG LIBS. EX. -- DM0023 //* //* 4) ?EDATE //* THE EXPIRATION DATE OF DATASETS -- YYDDD FORMAT. //* EXAMPLE -- 00000 //* //* 5) ?TINDEX //* THE HIGH LEVEL QUALIFIER FOR THE TARG LIBS. //* EXAMPLES -- YOUR USERID, OR VIDA //* //* 6) ?DINDEX //* THE HIGH LEVEL QUALIFIER FOR THE DIST LIBS. //* EXAMPLES -- YOUR USERID, OR VIDA //* //* 7) ?DB2LOAD //* THE FULLY QUALIFIED DSN FOR THE DB2 LOAD LIBRARY, PART OF //* THE SYSLIB DD STATEMENT FOR THE LINK. //* EXAMPLE -- SYS1.DSN230.DSNLOAD //* (continued on next page) D-28 Copy of Gateway for DB2 Server Install STEP2C Through STEP2J Example D-9 (Cont.) JCL Used in Gateway for DB2 Server Install Job KWIKSTP2 //* 8) ?CICSLOA //* THE FULLY QUALIFIED DSN FOR THE CICS LOAD LIBRARY, PART OF //* THE SYSLIB DD STATEMENT FOR THE LINK. //* EXAMPLE -- CICS330.LOADLIB //* //* 9) ?CICSMAC //* THE FULLY QUALIFIED DSN FOR THE CICS MACLIB WHICH CONTAINS //* DFHEILIA, LINKAGE EDITOR INPUT, PART OF THE SYSLIN DD STATEMENT //* FOR THE LINK. EXAMPLE -- CICS330.ADFHMAC //* //*********************************************************************** //DBISTP2C PROC UNITTYP='?UNITTYP', // DISTVOL=?DISTVOL, // TARGVOL=?TARGVOL, // EDATE=?EDATE, // TINDEX='?TINDEX', // DINDEX='?DINDEX' //******************************************************************* //* STEP1: REMOVE EXISTING DISTRIBUTION AND TARGET DATASETS * //* STEP2: ALLOCATE AND CATALOG NEW DIST AND TARG DATASETS * //******************************************************************* //STEP1 EXEC PGM=IDCAMS,REGION=512K //SYSPRINT DD SYSOUT=* //* //* DELETE TARGET AND DISTRIBUTION LIBRARIES //* //STEP2 EXEC PGM=IEFBR14 //******************************************************************* //* ALLOCATE AND CATALOG * //* DISTRIBUTION LIBRARIES * //******************************************************************* //* //VIDDOBJ DD DSN=&DINDEX..VIDDOBJ, // DISP=(,CATLG), // DCB=(RECFM=U,LRECL=0,BLKSIZE=6160), // LABEL=EXPDT=&EDATE, // UNIT=&UNITTYP,VOL=SER=&DISTVOL, // SPACE=(TRK,(10,10,5)) 3380 TRACKS (continued on next page) Copy of Gateway for DB2 Server Install STEP2C Through STEP2J D-29 Example D-9 (Cont.) JCL Used in Gateway for DB2 Server Install Job KWIKSTP2 //VIDDDBRM DD DSN=&DINDEX..VIDDDBRM, // DISP=(,CATLG), // DCB=(RECFM=FB,LRECL=80,BLKSIZE=3120), // LABEL=EXPDT=&EDATE, // UNIT=&UNITTYP,VOL=SER=&DISTVOL, // SPACE=(TRK,(5,2,2)) 3380 TRACKS //VIDDSRCE DD DSN=&DINDEX..VIDDSRCE, // DISP=(,CATLG), // DCB=(RECFM=FB,LRECL=80,BLKSIZE=3120), // LABEL=EXPDT=&EDATE, // UNIT=&UNITTYP,VOL=SER=&DISTVOL, // SPACE=(TRK,(5,2,2)) 3380 TRACKS //* //******************************************************************* //* ALLOCATE AND CATALOG * //* TARGET LIBRARIES * //******************************************************************* //* //VIDTDBRM DD DSN=&TINDEX..VIDTDBRM, // DISP=(,CATLG), // DCB=(RECFM=FB,LRECL=80,BLKSIZE=3120), // LABEL=EXPDT=&EDATE, // UNIT=&UNITTYP,VOL=SER=&TARGVOL, // SPACE=(TRK,(5,2,2)) 3380 TRACKS //VIDTSRCE DD DSN=&TINDEX..VIDTSRCE, // DISP=(,CATLG), // DCB=(RECFM=FB,LRECL=80,BLKSIZE=3120), // LABEL=EXPDT=&EDATE, // UNIT=&UNITTYP,VOL=SER=&TARGVOL, // SPACE=(TRK,(5,2,2)) 3380 TRACKS //VIDTLOAD DD DSN=&TINDEX..VIDTLOAD, // DISP=(,CATLG), // DCB=(RECFM=U,BLKSIZE=6160), // UNIT=&UNITTYP,VOL=SER=&TARGVOL, // LABEL=EXPDT=&EDATE, // SPACE=(TRK,(15,5,2)) 3380 TRACKS //* OK, THIS NEXT ONE IS NOT TECHNICALLY AN SMP/E MANAGED DATASET //* HOWEVER IT FUNCTIONS JUST LIKE ONE (continued on next page) D-30 Copy of Gateway for DB2 Server Install STEP2C Through STEP2J Example D-9 (Cont.) JCL Used in Gateway for DB2 Server Install Job KWIKSTP2 //VIDTOBJ DD DSN=&TINDEX..VIDTOBJ, // DISP=(,CATLG), // DCB=(RECFM=U,LRECL=0,BLKSIZE=6160), // LABEL=EXPDT=&EDATE, // UNIT=&UNITTYP,VOL=SER=&TARGVOL, // SPACE=(TRK,(10,10,5)) 3380 TRACKS // PEND //DBISTP3D PROC DB2LOAD='?DB2LOAD', // M=, // CICSLOA='?CICSLOA', // DINDEX='?DINDEX', // TINDEX='?TINDEX', // WRKUNIT='?UNITTYP', // CICSMAC='?CICSMAC' //LKED EXEC PGM=IEWL,PARM='XREF,LET,RENT,REFR,LIST,NCAL', // REGION=2048K //SYSLIB DD DSN=&DB2LOAD,DISP=SHR // DD DSN=&CICSLOA,DISP=SHR //VIDDOBJ DD DSN=&TINDEX..VIDTOBJ,DISP=SHR // DD DSN=&DINDEX..VIDDOBJ,DISP=SHR //SYSLMOD DD DSN=&TINDEX..VIDTLOAD,DISP=SHR //SYSUT1 DD DSN=&&SYSUT1,UNIT=&WRKUNIT,SPACE=(1024,(50,20)) //SYSPRINT DD SYSOUT=*,DCB=(RECFM=FB,LRECL=121,BLKSIZE=1210) //SYSLIN DD DSN=&CICSMAC(DFHEILIA),DISP=SHR, // DCB=BLKSIZE=400 // DD DSN=&TINDEX..VIDTSRCE(&M),DISP=SHR // PEND //* //* //* //DBISTP2C EXEC DBISTP2C //STEP1.SYSIN DD * DELETE (?DINDEX.VIDDOBJ) SCRATCH DELETE (?DINDEX.VIDDDBRM) SCRATCH DELETE (?DINDEX.VIDDSRCE) SCRATCH DELETE (?TINDEX.VIDTLOAD) SCRATCH DELETE (?TINDEX.VIDTSRCE) SCRATCH DELETE (?TINDEX.VIDTDBRM) SCRATCH (continued on next page) Copy of Gateway for DB2 Server Install STEP2C Through STEP2J D-31 Example D-9 (Cont.) JCL Used in Gateway for DB2 Server Install Job KWIKSTP2 DELETE (?TINDEX.VIDTOBJ) SCRATCH /* AVOID RC = 8 IF NOT PREVIOUSLY DEFINED */ SET LASTCC=0 SET MAXCC=0 /* //* //* UNLOAD THE RELFILE INSTALLATION TAPE //* //* DBI SERVER FOR DB2 //* //* FILE 1 - FUNCTION - SMPMCS - IEBGENER FORMAT //* FILE 2 - RELFILE 1 - JCLIN -- IEBCOPY FORMAT //* FILE 3 - RELFILE 2 - OBJLIB -- IEBCOPY FORMAT //* FILE 4 - RELFILE 3 - DBRMLIB - IEBCOPY FORMAT //* FILE 5 - RELFILE 4 - SOURCE -- IEBCOPY FORMAT //* //* //********************************************************************** //OBJSTP EXEC PGM=IEBCOPY //SYSUT3 DD UNIT=VIO,SPACE=(80,(100,50)) //SYSUT4 DD UNIT=VIO,SPACE=(256,(100,50)) //SYSPRINT DD SYSOUT=* //INFILE DD DSN=PVI3100.F2, // DISP=OLD,UNIT=TAPE, // VOL=(,RETAIN,SER=VI3100), // LABEL=(3,SL) //OUTFILE DD DISP=SHR,DSN=?DINDEX.VIDDOBJ //SYSIN DD * COPY OUTDD=OUTFILE INDD=INFILE /* //********************************************************************** //DBRMSTP EXEC PGM=IEBCOPY //SYSUT3 DD UNIT=VIO,SPACE=(80,(100,50)) //SYSUT4 DD UNIT=VIO,SPACE=(256,(100,50)) //SYSPRINT DD SYSOUT=* //INFILE DD DSN=PVI3100.F3, // DISP=OLD,UNIT=TAPE, (continued on next page) D-32 Copy of Gateway for DB2 Server Install STEP2C Through STEP2J Example D-9 (Cont.) JCL Used in Gateway for DB2 Server Install Job KWIKSTP2 // VOL=(,RETAIN,REF=*.OBJSTP.INFILE), // LABEL=(4,SL) //DIST DD DISP=SHR,DSN=?DINDEX.VIDDDBRM //TARG DD DISP=SHR,DSN=?TINDEX.VIDTDBRM //SYSIN DD * COPY OUTDD=DIST INDD=INFILE COPY OUTDD=TARG INDD=INFILE //* //********************************************************************** //SRCESTP EXEC PGM=IEBCOPY //SYSUT3 DD UNIT=VIO,SPACE=(80,(100,50)) //SYSUT4 DD UNIT=VIO,SPACE=(256,(100,50)) //SYSPRINT DD SYSOUT=* //INFILE DD DSN=PVI3100.F4, // DISP=SHR,UNIT=TAPE, // VOL=(,RETAIN,REF=*.OBJSTP.INFILE), // LABEL=(5,SL) //DIST DD DISP=SHR,DSN=?DINDEX.VIDDSRCE //TARG DD DISP=SHR,DSN=?TINDEX.VIDTSRCE //SYSIN DD * COPY OUTDD=DIST INDD=INFILE COPY OUTDD=TARG INDD=INFILE /* //******************************************************************* //DBISERV EXEC DBISTP3D,M=SYSLIN // // Copy of Gateway for DB2 Server Install STEP2C Through STEP2J D-33 Example D-10 JCL Used in Gateway for DB2 Server Install Job ZLASTSTP //DBILAST JOB ,'FINAL INSTALL',MSGCLASS=A,CLASS=A //* //****************************************************************** //* THIS JOB FINISHES THE INSTALLATION IN THE CASE WHERE V3.1 WAS //* INSTALLED IN A SEPARATE SET OF SMP/E ZONES SO THAT A PREVIOUS //* SERVER VERSION COULD BE RETAINED. //* //* DO NOT RUN THIS STEP UNTIL YOU ARE CERTAIN THAT THE PREVIOUS //* VERSION IS NO LONDER NEEDED. //* //* NOTE 1: USE CAUTION WITH THIS JOB. IT IS COMPLEX AND MAY NOT //* ------ BE SUITABLE FOR ALL SITES. IT USES TWO GLOBAL ZONES //* AND SO IT IS POSSIBLE TO CONFUSE THE NAMES CAUSING //* UNEXPECTED RESULTS. ALWAYS BACKUP YOUR SMP/E ZONES //* BEFORE RUNNING THIS JOB. //* //* YOU MUST REVIEW ALL STEPS AND CUSTOMIZE THEM FOR //* YOUR NEEDS. DUE TO THE COMPLEXITY OF THIS JOB, IT //* MAY PROVE EASIER TO CREATE THREE DIFFERENT JOBS FROM //* THIS JCL TO FACILITATE ERROR RECOVERY. //* //* NOTE 2: THIS JOB ASSUMES A NON-SHARED GLOBAL ZONE BETWEEN THE //* ------ PREVIOUS INSTALLATION AND THE V3.1 INSTALLATION. IF YOUR //* SITE USES JUST ONE GLOBAL ZONE THEN YOU CANNOT RUN THIS //* JOB ASIS BECAUSE IT ATTEMPTS TO CONNECT THE V3.1 ZONES TO //* THE PREVIOUS GLOBAL ZONE. //* //* NOTE 3: AFTER THIS JOB IS SUCCESSFULLY RUN YOU SHOULD DELETE //* ------ THE PREVIOUSLY USED VSAM CLUSTERS FOR ALL THE ZONES //* (GLOBAL, TARGET AND DISTRIBUTION) AND THE NON-VSAM FILES //* USED TO HOLD THE PREVIOUS TARGET AND DISTRIBUTION FILES. //* THIS JOB DOES NOT DELETE THE PHYSICAL FILES, ONLY THE //* SMP/E REFERENCES ARE REMOVED. //* //* //* 1) THIS STEP REQUIRES YOUR ALTERNATE PROC, OR THE SMPVIDA //* PROC WHICH IS AVAILABLE BY ONE OF THESE METHODS: //* (continued on next page) D-34 Copy of Gateway for DB2 Server Install STEP2C Through STEP2J Example D-10 (Cont.) JCL Used in Gateway for DB2 Server Install Job ZLASTSTP //* A) IF THE SMPVIDA PROC IN STEP2E WAS COPIED TO A SYSTEM //* PROC LIBRARY, THEN PROCEED TO 2) FOR THE GLOBAL //* CHARACTER STRING CHANGES. //* //* B) THE SMPVIDA PROC FROM STEP2E CAN BE COPIED INLINE //* TO THIS JCL. REMEMBER TO PLACE A PEND STATEMENT AT //* THE END OF THE PROC. A COMMENTED-OUT PEND IS SUPPLIED //* IN STEP2E. //* //* 2) MAKE THE FOLLOWING GLOBAL CHARACTER STRING CHANGES FOR //* SITE-SPECIFIC STANDARDS: //* //* A) ?PGZN //* THE HIGH LEVEL QUALIFIERS OF THE PREVIOUSLY USED VSAM //* CLUSTER OF THE GLOBAL ZONE. THIS NAME WILL BE FURTHER //* QUALIFIED TO: //* ?PGZN.CSI //* //* B) ?PTZN //* THE NAME OF THE TARGETZONE (NOT THE VSAM CLUSTER) //* BUT THE 1-7 CHARACTER NAME BY WHICH THE PREVIOUS //* GLOBALZONE KNOWS THE PREVIOUS TARGET ZONE. //* //* C) ?PDZN //* THE NAME OF THE DISTRIBUTIONZONE (NOT THE VSAM CLUSTER) //* BUT THE 1-7 CHARACTER NAME BY WHICH THE PREVIOUS //* GLOBALZONE KNOWS THE PREVIOUS DISTRIBUTION ZONE. //* //* D) ?VIDAGZN //* THE HIGH LEVEL QUALIFIERS OF THE V3.1 VSAM CLUSTER OF THE //* GLOBAL ZONE. THIS NAME WILL BE FURTHER QUALIFIED TO: //* ?VIDAGZN.CSI //* //* E) ?VIDATZN //* THE HIGH LEVEL QUALIFIERS OF THE V3.1 VSAM CLUSTER OF THE //* TARGET ZONE. THIS NAME WILL BE FURTHER QUALIFIED TO: //* ?VIDATZN.CSI //* (continued on next page) Copy of Gateway for DB2 Server Install STEP2C Through STEP2J D-35 Example D-10 (Cont.) JCL Used in Gateway for DB2 Server Install Job ZLASTSTP //* F) ?VIDADZN //* THE HIGH LEVEL QUALIFIERS OF THE V3.1 VSAM CLUSTER OF THE //* DLIB ZONE. THIS NAME WILL BE FURTHER QUALIFIED TO: //* ?VIDADZN.CSI //* //* //* //****************************************************************** //*** //*** STEP1: CLEANUP AND MAKE THE PREVIOUS ZONES READY //*** //*** 1) REMOVE V1 AND V2 FROM THE TARGET & DISTRIBUTION ZONES //*** BY A RECEIVE, APPLY AND ACCEPT OF A DUMMY SYSMOD //*** 2) DEFINE THE V3.1 ZONES TO THE PREVIOUS GLOBAL ZONE UNDER //*** TEMPORARY NAMES WHICH WILL BE DELETED LATER. //*** //STEP1 EXEC SMPVIDA, // VIDAGZN='?PGZN' //SMPHOLD DD DUMMY //SMPPTFIN DD * ++FUNCTION(VIDDEL2) . ++VER(C150) DELETE(PVI1000,PVI2000) . //SMP.SMPCNTL DD * SET BDY(GLOBAL) . RECEIVE . SET BDY(?PTZN) . APPLY S(VIDDEL2). SET BDY(?PDZN) . ACCEPT S(VIDDEL2). SET BDY(GLOBAL) . UCLIN . ADD GLOBALZONE FMID (PVI3100) ZONEINDEX( (VIDA3T,?VIDATZN.CSI,TARGET), (VIDA3D,?VIDADZN.CSI,DLIB) ) . ENDUCL. (continued on next page) D-36 Copy of Gateway for DB2 Server Install STEP2C Through STEP2J Example D-10 (Cont.) JCL Used in Gateway for DB2 Server Install Job ZLASTSTP //*** //*** STEP2: CLEANUP AND MAKE THE V3.1 ZONES READY //*** //*** 1) RENAME THE V3.1 TARGET AND DISTRIBUTION ZONES. THIS //*** MAY NOT BE NECESSARY, HOWEVER, BY DEFAULT THE PREVIOUS //*** ZONES WERE NAMED THE SAME AS THE V3.1 ZONES AND SO THEY //*** CANNOT BE CONNECTED TO THE SAME GLOBAL ZONE. //*** 2) REMOVE THE SMP/E DDDEFS FROM THE V3.1 ZONES AS THESE WILL //*** MOST LIKELY ALREADY EXIST IN THE DESTINATION ZONES. //*** //STEP2 EXEC SMPVIDA, // VIDAGZN='?VIDAGZN' //SMP.SMPCNTL DD * SET BDY(GLOBAL) . ZREN(VIDATZN) TO(VIDA3T) SAMEDATASET. ZREN(VIDADZN) TO(VIDA3D) SAMEDATASET. SET BDY(VIDA3T) . UCLIN. DEL DDDEF(SMPLOG) . DEL DDDEF(SMPSCDS). DEL DDDEF(SMPPTS) . DEL DDDEF(SMPMTS) . DEL DDDEF(SMPSTS) . DEL DDDEF(SMPTLIB). DEL DDDEF(MACLIB) . DEL DDDEF(SYSLIB) . ENDUCL. SET BDY(VIDA3D) . UCLIN. DEL DDDEF(SMPLOG) . DEL DDDEF(SMPSCDS). DEL DDDEF(SMPPTS) . DEL DDDEF(SMPMTS) . DEL DDDEF(SMPSTS) . DEL DDDEF(SMPTLIB). DEL DDDEF(MACLIB) . DEL DDDEF(SYSLIB) . ENDUCL. (continued on next page) Copy of Gateway for DB2 Server Install STEP2C Through STEP2J D-37 Example D-10 (Cont.) JCL Used in Gateway for DB2 Server Install Job ZLASTSTP //*** //*** STEP3: ZONEMERGE THE V3.1 ZONES INTO THE PREVIOUS ZONES. //*** //*** 1) ZONEMERGE THE TARGET AND DISTRIBUTION LIBRARIES //*** 2) ZONEDELETE THE V3.1 TEMPORARY LIBRARIES. //*** //STEP3 EXEC SMPVIDA, // VIDAGZN='?PGZN' //SMP.SMPLOG DD DUMMY //SMP.SMPCNTL DD * SET BDY(?PTZN) . ZONEMERGE (VIDA3T) CONTENT DEFINITION REPLACE INTO(?PTZN). SET BDY(?PDZN) . ZONEMERGE (VIDA3D) CONTENT DEFINITION REPLACE INTO(?PDZN). SET BDY(VIDA3T) . ZDEL TARGETZONE(VIDA3T). SET BDY(VIDA3D) . ZDEL DLIBZONE(VIDA3D). /* // D-38 Copy of Gateway for DB2 Server Install STEP2C Through STEP2J E ________________________________________________________________ Copy of Gateway for DB2 Server Install STEP3A Through STEP3K This appendix contains a copy of the JCL, SQL command streams, and CICS table entries that are contained in STEP3A through STEP3K. These are shown in Example E-1 through Example E-11. Example E-1 JCL Used in Gateway for DB2 Server Install Job STEP3A Example E-2 JCL Used in Gateway for DB2 Server Install Job STEP3B Example E-3 JCL Used in Gateway for DB2 Server Install Job STEP3C Example E-4 JCL Used in Gateway for DB2 Server Install Job STEP3D Example E-5 JCL Used in Gateway for DB2 Server Install Job STEP3F Example E-6 JCL Used in Gateway for DB2 Server Install Job STEP3G Example E-7 JCL Used in Gateway for DB2 Server Install Job STEP3H Example E-8 JCL Used in Gateway for DB2 Server Install Job STEP3IA Example E-9 JCL Used in Gateway for DB2 Server Install Job STEP3IB Example E-10 JCL Used in Gateway for DB2 Server Install Job STEP3J Example E-11 JCL Used in Gateway for DB2 Server Install Job STEP3K Copy of Gateway for DB2 Server Install STEP3A Through STEP3K E-1 Example E-1 JCL Used in Gateway for DB2 Server Install Job STEP3A -- STEP3A CREATES THE 3 VIEWS REQUIRED FOR DBI SERVER IN ORDER TO -- ACCESS DB2 METADATA. THESE ARE USED BY DBI SERVER TO GET -- INFORMATION TO COMPLETE QUERY RETRIEVAL, FORMATTING, AND DISPLAY. -- -- SINCE A CREATE VIEWS STEP MAY BE AN ON GOING PART OF DBI SERVER -- OPERATIONS, A DUPLICATE OF THIS STEP3A EXISTS IN YOUR -- VIDDSAMP LIBRARY, WITH MEMBER NAME CREAVIEW. -- -- NOTE1: THESE VIEWS CONTAIN THE SAME FIELDS AS ALL PREVIOUS VERSIONS -- ----- OF THE SERVER. THEREFORE IT YOUR ARE MIGRATING FROM A -- PREVIOUS VERSION OF THE SERVER, YOU MAY SKIP THIS STEP AND -- USE YOUR EXISTING VIEWS. SEE THE NEXT NOTE FOR AN EXCEPTION. -- -- NOTE2: IF YOUR SITE INTENDS TO SUPPORT DBI GATEWAY CLIENT V3.0 THEN -- ----- THESE VIEW NAMES MUST NOT BE CUSTOMIZED OR CERTAIN FUNCTIONS -- INVOLVING METADATA RETRIEVAL WILL NOT WORK. ONLY THE V3.0 -- CLIENT HAS THIS RESTRICTION. -- --****************************************************************** --* THE USERID CREATING THESE VIEWS NEEDS SELECT PRIVILEGE GRANTED --* AGAINST THE FOLLOWING DB2 CATALOG TABLES: --* --* SYSIBM.SYSTABLES --* SYSIBM.SYSCOLUMNS --* SYSIBM.SYSINDEXES --* SYSIBM.SYSKEYS --* SYSIBM.SYSSYNONYMS --* --* --* *** READ THE FOLLOWING INSTRUCTIONS CAREFULLY TO AVOID DB2 *** --* *** AUTHORIZATION ERRORS: *** --* --* IT IS HIGHLY RECOMMENDED THAT THE OWNER OF THESE VIEWS --* AND THE OWNER OF THE PLANS (INSTALLED IN A LATER STEP) --* BE THE SAME. THIS SQL FILE SETS THE CURRENT SQLID TO BE --* 'VIDA', THE SAME NAME AS SPECFIED AS THE OWNER OF THE PLANS --* IN THE BIND STEP. IF YOU CHANGE THE NAME THEN BE SURE TO DO IT IN --* BOTH PLACES AND TO BE CONSISTANT. (continued on next page) E-2 Copy of Gateway for DB2 Server Install STEP3A Through STEP3K Example E-1 (Cont.) JCL Used in Gateway for DB2 Server Install Job STEP3A --* --* IF IT IS NECESSARY TO HAVE DIFFERENT OWNERS FOR THE VIEWS --* AND THE PLANS, THEN: --* (1) SELECT PRIVILEGE TO THE METADATA VIEWS MUST BE GRANTED --* TO THE OWNER OF THE DB2 PLANS. --* (2) IF THE VIEW NAMES USED IN THE METADATA RETRIEVAL PROGRAM --* METQ WILL REMAIN UNQUALIFIED THEN THE OWNER OF THE --* PLANS MUST FIRST CREATE SYNONYMS FOR THESE VIEWS. --* --****************************************************************** -- -- TAKE CARE OF THE AUTHORIZATIONS RIGHT UP FRONT -- GRANT BINDADD TO VIDA; SET CURRENT SQLID = 'VIDA'; -- -- CREATE THE VIEW FOR TABLE RELATED METADATA -- CREATE VIEW VIDA.RELATION_FIELDS (TBNAME, TBCREATOR, TYPE, DBNAME, COLCOUNT, CARD, FLDNAME, COLNO, DTYPE, LENGTH, SCALE, NULLS) AS SELECT SYSIBM.SYSTABLES.NAME, SYSIBM.SYSTABLES.CREATOR, SYSIBM.SYSTABLES.TYPE, SYSIBM.SYSTABLES.DBNAME, SYSIBM.SYSTABLES.COLCOUNT, (continued on next page) Copy of Gateway for DB2 Server Install STEP3A Through STEP3K E-3 Example E-1 (Cont.) JCL Used in Gateway for DB2 Server Install Job STEP3A SYSIBM.SYSTABLES.CARD, SYSIBM.SYSCOLUMNS.NAME, SYSIBM.SYSCOLUMNS.COLNO, SYSIBM.SYSCOLUMNS.COLTYPE, SYSIBM.SYSCOLUMNS.LENGTH, SYSIBM.SYSCOLUMNS.SCALE, SYSIBM.SYSCOLUMNS.NULLS FROM SYSIBM.SYSTABLES, SYSIBM.SYSCOLUMNS WHERE SYSIBM.SYSTABLES.NAME = SYSIBM.SYSCOLUMNS.TBNAME AND SYSIBM.SYSTABLES.CREATOR = SYSIBM.SYSCOLUMNS.TBCREATOR; -- -- CREATE THE 2ND VIEW FOR INDEX METADATA RETRIEVAL -- CREATE VIEW VIDA.INDEXES (IDXNAME, ITBNAME, ITBCREATOR, IDBNAME, UNIQUE, ICOLCOUNT, FIRSTKEYCARD, FULLKEYCARD, ICOLNAME, ICOLNO, COLSEQ, ORDERING) AS SELECT SYSIBM.SYSINDEXES.NAME, SYSIBM.SYSINDEXES.TBNAME, SYSIBM.SYSINDEXES.TBCREATOR, SYSIBM.SYSINDEXES.DBNAME, SYSIBM.SYSINDEXES.UNIQUERULE, SYSIBM.SYSINDEXES.COLCOUNT, SYSIBM.SYSINDEXES.FIRSTKEYCARD, SYSIBM.SYSINDEXES.FULLKEYCARD, SYSIBM.SYSKEYS.COLNAME, (continued on next page) E-4 Copy of Gateway for DB2 Server Install STEP3A Through STEP3K Example E-1 (Cont.) JCL Used in Gateway for DB2 Server Install Job STEP3A SYSIBM.SYSKEYS.COLNO, SYSIBM.SYSKEYS.COLSEQ, SYSIBM.SYSKEYS.ORDERING FROM SYSIBM.SYSINDEXES, SYSIBM.SYSKEYS WHERE SYSIBM.SYSINDEXES.NAME = SYSIBM.SYSKEYS.IXNAME AND SYSIBM.SYSINDEXES.CREATOR = SYSIBM.SYSKEYS.IXCREATOR; -- -- CREATE THE 3RD VIEW FOR SYNONYM RETRIEVAL -- CREATE VIEW VIDA.SYNONYMS (SYN_NAME, SYN_CREATOR, TABLE_NAME, TABLE_CREATOR) AS SELECT NAME, CREATOR, TBNAME, TBCREATOR FROM SYSIBM.SYSSYNONYMS; -- -- -- --******************************************************************* --* --* OPTIONAL: GRANT SELECT PRIVILEGE ON METADATA VIEWS --* --* SEE INSTRUCTIONS ABOVE FOR ADDITIONAL INFORMATION. --* --* GRANTOR MUST HAVE SELECT PRIVILEGE WITH THE GRANT OPTION --* ON THE FOLLOWING DB2 CATALOG TABLES: --* --* SYSIBM.SYSTABLES --* SYSIBM.SYSCOLUMNS --* SYSIBM.SYSINDEXES --* SYSIBM.SYSKEYS (continued on next page) Copy of Gateway for DB2 Server Install STEP3A Through STEP3K E-5 Example E-1 (Cont.) JCL Used in Gateway for DB2 Server Install Job STEP3A --* SYSIBM.SYSSYNONYMS --* --* REMOVE COMMENTS FROM SQL STATEMENTS AND EXECUTE IF --* NECESSARY. --* --******************************************************************* -- GRANT SELECT ON VIDA.RELATION_FIELDS TO PUBLIC; -- GRANT SELECT ON VIDA.INDEXES TO PUBLIC; -- GRANT SELECT ON VIDA.SYNONYMS TO PUBLIC; -- -- -- --******************************************************************* --* OPTIONAL: CREATE SYNONYMS FOR VIEWS --* --* SEE INSTRUCTIONS ABOVE FOR ADDITIONAL INFORMATION. --* REMOVE COMMENTS FROM SQL STATEMENTS AND EXECUTE IF --* NECESSARY. --* --******************************************************************* -- CREATE SYNONYM RELATION_FIELDS FOR VIDA.RELATION_FIELDS; -- CREATE SYNONYM INDEXES FOR VIDA.INDEXES; -- CREATE SYNONYM SYNONYMS FOR VIDA.SYNONYMS; -- E-6 Copy of Gateway for DB2 Server Install STEP3A Through STEP3K Example E-2 JCL Used in Gateway for DB2 Server Install Job STEP3B //DBISTP3B JOB ,'MODIFY METQUERY',MSGCLASS=A,CLASS=A //* //******************************************************************* //* //* STEP3B ALLOWS YOU TO MODIFY THE DB2 VIEW NAMES USED DURING //* METADATA RETRIEVAL. //* //* THIS IS MODEL JCL TO ASSEMBLE METQUERY. THIS JOB CONSISTS OF //* AN INLINE PROC DBISTP3B AND A SINGLE STEP TO EXECUTE THE //* PROC. //* //* NOTE 1: SOURCE FOR METQUERY IS INSTALLED IN YOUR TARGET //* ---- SOURCE LIBRARY AS ?TINDEX.VIDTSRCE MEMBER METQUERY. //* TO LOCATE THE NAMES TO BE MODIFIED, EDIT METQUERY AND //* DO A FIND ON: *VIDA //* //* NOTE 2: YOU MAY NEED TO INCREASE THE REGION TO 1M FOR STEP3B. //* ---- //* //* NOTE 3: EXPECT A RETURN CODE OF 4 FROM THE LINK EXIT STEP //* ---- DUE TO UNRESOLVED REFERENCES. //* //* MAKE THE FOLLOWING GLOBAL CHARACTER STRING CHANGES FOR //* SITE-SPECIFIC STANDARDS: //* //* 1) ?WRKUNIT //* THE GENERIC UNIT DEVICE TYPE FOR WORK DATASETS. //* EXAMPLES -- VIO OR WHD OR 3380 //* //* 2) ?DB2LOAD //* THE FULLY QUALIFIED DSN FOR THE DB2 LOAD LIBRARY, //* PART OF THE STEPLIB DD STATEMENT IN THE PRECOMPILE STEP, //* DB2PRE. EXAMPLE -- SYS1.DSN230.DSNLOAD //* //* 3) ?TINDEX //* THE HIGH LEVEL QUALIFIER FOR THE TARGET LIBRARIES. //* EXAMPLES -- YOUR USERID, OR VIDA //* (continued on next page) Copy of Gateway for DB2 Server Install STEP3A Through STEP3K E-7 Example E-2 (Cont.) JCL Used in Gateway for DB2 Server Install Job STEP3B //* 4) ?DB2MAC //* THE FULLY QUALIFIED DSN FOR THE DB2 MACRO LIBRARY -- //* PART OF THE SYSLIB DD STATEMENT IN THE ASSEMBLY STEP, ASM. //* EXAMPLE -- SYS1.DSN230.DSNMACS //* //* 5) ?SYSMAC //* THE FULLY QUALIFIED DSN FOR A SYSTEM MACRO LIBRARY -- //* PART OF THE SYSLIB DD STATEMENT IN THE ASSEMBLY STEP, ASM. //* EXAMPLE -- SYS1.MACLIB //* //* BEFORE SUBMITTING THIS JOB -- THE NECESSARY MODIFICATIONS //* MUST BE MADE IN ?TINDEX.VIDTSRCE, MEMBER METQUERY. SEE NOTE 1. //* //******************************************************************* //DBISTP3B PROC WRKUNIT='?WRKUNIT', // DB2LOAD='?DB2LOAD', // TINDEX='?TINDEX', // DB2MAC='?DB2MAC', // SYSMAC='?SYSMAC' //******************************************************************** //DB2PRE EXEC PGM=DSNHPC,PARM='HOST(ASM),TIME(ISO),DATE(ISO)' //STEPLIB DD DSN=&DB2LOAD,DISP=SHR //SYSCIN DD DISP=(,PASS),DSN=&&SYSIN1, // UNIT=&WRKUNIT,SPACE=(3200,(100,100)), // DCB=(LRECL=80,BLKSIZE=3200,RECFM=FB) //SYSPRINT DD SYSOUT=* //SYSTERM DD SYSOUT=* //SYSUT1 DD DSN=&&SYSUT1,UNIT=&WRKUNIT,SPACE=(1024,(100,100)) //DBRMLIB DD DSN=&TINDEX..VIDTDBRM(DBRMMETQ),DISP=OLD //SYSIN DD DSN=&TINDEX..VIDTSRCE(METQUERY),DISP=SHR //ASM EXEC PGM=IEV90,PARM='OBJECT,NODECK,LIST,XREF(SHORT)' //SYSLIB DD DSN=&DB2MAC,DISP=SHR // DD DSN=&SYSMAC,DISP=SHR //SYSPRINT DD SYSOUT=* //SYSUT1 DD UNIT=&WRKUNIT,SPACE=(1024,(300,100),,,ROUND) //SYSUT2 DD UNIT=&WRKUNIT,SPACE=(1024,(300,100),,,ROUND) //SYSUT3 DD UNIT=&WRKUNIT,SPACE=(1024,(300,100),,,ROUND) //SYSLIN DD DISP=(,PASS),DSN=&&OBJECT(METQ), (continued on next page) E-8 Copy of Gateway for DB2 Server Install STEP3A Through STEP3K Example E-2 (Cont.) JCL Used in Gateway for DB2 Server Install Job STEP3B // UNIT=&WRKUNIT,SPACE=(3200,(5,100,100)), // DCB=(LRECL=80,BLKSIZE=3200,RECFM=FB) //SYSIN DD DSNAME=&&SYSIN1,DISP=(OLD,DELETE) //LKED EXEC PGM=IEWL,PARM='XREF,LET,RENT,REFR,LIST,NCAL', // REGION=2048K //SYSLMOD DD DSN=&TINDEX..VIDTOBJ,DISP=SHR //SYSUT1 DD DSN=&&SYSUT1,UNIT=&WRKUNIT,SPACE=(1024,(50,20)) //SYSPRINT DD SYSOUT=*,DCB=(RECFM=FB,LRECL=121,BLKSIZE=1210) //OBJECT DD DISP=(OLD,DELETE),DSN=&&OBJECT // PEND //STEP3B EXEC DBISTP3B //LKED.SYSLIN DD * INCLUDE OBJECT(METQ) NAME METQ(R) // Copy of Gateway for DB2 Server Install STEP3A Through STEP3K E-9 Example E-3 JCL Used in Gateway for DB2 Server Install Job STEP3C //DBISTP3C JOB ,'MODIFY OPTIONS',MSGCLASS=A,CLASS=A //* //******************************************************************* //* //* STEP3C ALLOWS YOU TO MODIFY THE DBI SERVER RUN TIME OPTIONS. //* //* THIS IS MODEL JCL TO ASSEMBLE MODULE "OPTIONS". THIS JOB //* CONSISTS OF AN INLINE PROC DBISTP3C A STEP TO EXECUTE //* THE PROC. //* //* NOTE 1: SOURCE FOR USEROPTS IS INSTALLED IN YOUR TARGET //* ---- - SOURCE LIBRARY AS ?SRCETLI.VIDTSRCE MEMBER USEROPTS. //* //* MAKE THE FOLLOWING GLOBAL CHARACTER STRING CHANGES FOR //* SITE-SPECIFIC STANDARDS: //* //* 1) ?WRKUNIT //* THE GENERIC UNIT DEVICE TYPE FOR WORK DATASETS. //* EXAMPLES -- VIO OR WHD OR 3380 //* //* 2) ?TINDEX //* THE HIGH LEVEL QUALIFIER FOR THE TARGET LIBRARIES. //* EXAMPLES -- YOUR USERID, OR VIDA //* //* 3) ?SYSMAC //* THE FULLY QUALIFIED DSN FOR A SYSTEM MACRO LIBRARY -- //* PART OF THE SYSLIB DD STATEMENT IN THE ASSEMBLY STEP, ASM. //* EXAMPLE -- SYS1.MACLIB //* //* BEFORE SUBMITTING THIS JOB -- THE NECESSARY MODIFICATIONS //* MUST BE MADE IN ?TINDEX.VIDTSRCE, MEMBER OPTIONS. SEE NOTE. //* //******************************************************************* //DBISTP3C PROC WRKUNIT='?WRKUNIT', // TINDEX='?TINDEX', // SYSMAC='?SYSMAC' //******************************************************************** //ASM EXEC PGM=IEV90,PARM='OBJECT,NODECK,LIST,XREF(SHORT)' (continued on next page) E-10 Copy of Gateway for DB2 Server Install STEP3A Through STEP3K Example E-3 (Cont.) JCL Used in Gateway for DB2 Server Install Job STEP3C //SYSLIB DD DSN=&SYSMAC,DISP=SHR //SYSPRINT DD SYSOUT=* //SYSUT1 DD UNIT=&WRKUNIT,SPACE=(1024,(300,100),,,ROUND) //SYSUT2 DD UNIT=&WRKUNIT,SPACE=(1024,(300,100),,,ROUND) //SYSUT3 DD UNIT=&WRKUNIT,SPACE=(1024,(300,100),,,ROUND) //SYSLIN DD DISP=(,PASS),DSN=&&OBJECT(USEROPTS), // UNIT=&WRKUNIT,SPACE=(3200,(5,100,100)), // DCB=(LRECL=80,BLKSIZE=3200,RECFM=FB) //SYSIN DD DISP=SHR,DSN=&TINDEX..VIDTSRCE(OPTIONS) //* //LKED EXEC PGM=IEWL,PARM='XREF,LET,RENT,REFR,LIST,NCAL', // REGION=2048K //SYSLMOD DD DSN=&TINDEX..VIDTOBJ,DISP=SHR //SYSUT1 DD DSN=&&SYSUT1,UNIT=&WRKUNIT,SPACE=(1024,(50,20)) //SYSPRINT DD SYSOUT=*,DCB=(RECFM=FB,LRECL=121,BLKSIZE=1210) //OBJECT DD DISP=(OLD,DELETE),DSN=&&OBJECT // PEND //STEP3C EXEC DBISTP3C //LKED.SYSLIN DD * INCLUDE OBJECT(USEROPTS) NAME USEROPTS(R) // Copy of Gateway for DB2 Server Install STEP3A Through STEP3K E-11 Example E-4 JCL Used in Gateway for DB2 Server Install Job STEP3D //DBISTP3D JOB ,'LINK SERVER',MSGCLASS=A,CLASS=A //* //******************************************************************* //* STEP3D IS MODEL JCL TO LINK THE LOAD MODULES FOR DBI SERVER //* FOR DB2. IT IS ONLY NECESSARY IF YOU HAVE MODIFIED EITHER THE //* METADATA VIEW NAMES (METQUERY) OR CHANGED THE OPTIONS (OPTIONS). //* //* STEP3D CONSISTS OF THE DEFINITION OF THE INLINE PROC DBISTP3D, //* AND THE EXECUTION OF THAT PROC. //* //* NOTE 1: THIS JOB CREATES THE DBI SERVER FOR DB2 LOAD MODULES. //* ---- YOU NEED TO MAKE THESE LOAD MODULES ACCESSIBLE TO THE //* JOB WHICH STARTS THE CICS REGION WHERE DBI SERVER FOR //* DB2 IS TO RUN. STEP3D AS SUPPLIED WRITES THE SYSLMOD //* OUTPUT TO THE TARGET LIBRARY ?TINDEX.VIDTLOAD. SELECT //* ONE OF THE MECHANISMS LISTED, OR CREATE YOUR OWN METHOD //* FOR MAKING THE LOAD MODULES ACCESSIBLE TO CICS: //* //* A. CHANGE THE SYSLMOD SO THAT STEP3D WRITES THE OUTPUT //* DIRECTLY TO YOUR CICS USER LOAD MODULE LIBRARY. //* //* -- OR -- //* //* B. EXECUTE STEP3D AS SUPPLIED, AND COPY THE LOAD //* MODULES TO YOUR CICS USER LOAD MODULE LIBRARY. //* //* -- OR -- //* //* C. EXECUTE STEP3D AS SUPPLIED, AND ADD //* ?TINDEX.VIDTLOAD TO THE START-UP JCL FOR THE //* CICS REGION. //* //* NOTE 2: THE INPUT TO THE LINKAGE EDITOR USES DEFAULT LOAD MODULE //* ----- NAME DBISERV. IF YOU USE THIS NAME YOU DO NOT NEED TO //* MODIFY THE SYSLIN. IF YOU ELECT TO CHANGE THE NAME, YOU //* MUST EDIT THE SOURCE IN ?TINDEX.VIDTSRCE MEMBER SYSLIN. //* //* MAKE THE FOLLOWING GLOBAL CHARACTER STRING CHANGES FOR SITE- (continued on next page) E-12 Copy of Gateway for DB2 Server Install STEP3A Through STEP3K Example E-4 (Cont.) JCL Used in Gateway for DB2 Server Install Job STEP3D //* SPECIFIC STANDARDS: //* //* //* 1) ?DB2LOAD //* THE FULLY QUALIFIED DSN FOR THE DB2 LOAD LIBRARY, PART OF //* THE SYSLIB DD STATEMENT FOR THE LINK. //* EXAMPLE -- SYS1.DSN230.DSNLOAD //* //* 2) ?CICSLOA //* THE FULLY QUALIFIED DSN FOR THE CICS LOAD LIBRARY, PART OF //* THE SYSLIB DD STATEMENT FOR THE LINK. //* EXAMPLE -- CICS330.LOADLIB //* //* 3) ?TINDEX //* THE HIGH LEVEL QUALIFIER FOR THE TARGET LIBRARIES. //* EXAMPLES -- YOUR USERID, OR VIDA //* //* 4) ?DINDEX //* THE HIGH LEVEL QUALIFIER FOR THE DISTRIBUTION LIBRARIES. //* EXAMPLES -- YOUR USERID, OR VIDA //* //* 5) ?WRKUNIT //* THE GENERIC UNIT TYPE DEVICE FOR WORK DATASETS //* //* 6) ?CICSMAC //* THE FULLY QUALIFIED DSN FOR THE CICS MACLIB WHICH CONTAINS //* DFHEILIA, LINKAGE EDITOR INPUT, PART OF THE SYSLIN DD STATEMENT //* FOR THE LINK. EXAMPLE -- CICS330.ADFHMAC //* //* BEFORE SUBMITTING THIS JOB -- IF YOU ELECT TO CHANGE THE //* DEFAULT LOAD MODULE NAMES YOU MUST EDIT THE SOURCE IN //* ?TINDEX.VIDTSRCE MEMBER SYSLIN. SEE NOTE 2 ABOVE. //* //******************************************************************* //DBISTP3D PROC DB2LOAD='?DB2LOAD', // M=, // CICSLOA='?CICSLOA', // DINDEX='?DINDEX', (continued on next page) Copy of Gateway for DB2 Server Install STEP3A Through STEP3K E-13 Example E-4 (Cont.) JCL Used in Gateway for DB2 Server Install Job STEP3D // TINDEX='?TINDEX', // WRKUNIT='?WRKUNIT', // CICSMAC='?CICSMAC' //LKED EXEC PGM=IEWL,PARM='XREF,LET,RENT,REFR,LIST,NCAL', // REGION=2048K //SYSLIB DD DSN=&DB2LOAD,DISP=SHR // DD DSN=&CICSLOA,DISP=SHR //VIDDOBJ DD DSN=&TINDEX..VIDTOBJ,DISP=SHR // DD DSN=&DINDEX..VIDDOBJ,DISP=SHR //SYSLMOD DD DSN=&TINDEX..VIDTLOAD,DISP=SHR //SYSUT1 DD DSN=&&SYSUT1,UNIT=&WRKUNIT,SPACE=(1024,(50,20)) //SYSPRINT DD SYSOUT=*,DCB=(RECFM=FB,LRECL=121,BLKSIZE=1210) //SYSLIN DD DSN=&CICSMAC(DFHEILIA),DISP=SHR, // DCB=BLKSIZE=400 // DD DSN=&TINDEX..VIDTSRCE(&M),DISP=SHR // PEND //DBISERV EXEC DBISTP3D,M=SYSLIN // E-14 Copy of Gateway for DB2 Server Install STEP3A Through STEP3K Example E-5 JCL Used in Gateway for DB2 Server Install Job STEP3F //DBISTP3F JOB ,'BIND PLANS',MSGCLASS=A,CLASS=A //* //******************************************************************* //* //* STEP3F IS MODEL JCL TO BIND THE DBI SERVER FOR DB2 DBRMS INTO //* FOUR PACKAGES AND ONE PLAN. YOU CAN RUN THIS JOB OR YOU CAN //* DO THE BINDS THROUGH TSO. //* //* MAKE THE FOLLOWING GLOBAL CHARACTER STRING CHANGES FOR SITE- //* SPECIFIC STANDARDS: //* //* NOTE1 -- IF THE PAGKAGE NAMES WERE CHANGED IN OPTIONS THEN //* ----- THIS JOB MUST BE CHANGED TO REFLECT THOSE NAMES. //* //* NOTE2 -- IT IS HIGHLY RECOMMENDED THAT THE OWNER OF THESE //* ----- BE THE SAME OWNER OF THE METADATA VIEWS //* CREATED IN STEP3A. THIS JOB USES VIDA AS THE //* OWNER SINCE THIS WAS THE DEFAULT USED IN STEP3A. //* IF YOU CHANGED STEP3A THEN CHANGE THE OWNER VALUE HERE //* TO MATCH THE OWNER OF THE VIEWS. //* //* NOTE3 -- IF YOU ARE MIGRATING FROM A PREVIOUS VERSION OF THE //* ----- SERVER AND YOU ARE USING THE SAME METADATA VIEWS AS //* THE PREVIOUS SERVER (I.E. STEP3A WAS NOT RUN) THEN IT //* IS RECOMMENDED THAT YOU FIND THE OWNER OF THE VIEWS //* AND USE THAT VALUE AS THE OWNER VALUE IN THIS JOB. //* //* NOTE4 -- THERE ARE STRING REPLACEMENTS IN THE SYSTSIN INSTREAM //* ----- DATA AS WELL AS IN JCL. //* //* NOTE5 -- NOTE THE PLAN NAME FOR USE IN THE RCT ENTRY. ANY //* ----- PLAN NAME MAY BE USED. THE VALUE USED HERE IS THE //* SAME AS THE DEFAULT TRANSACTION ID. //* //* NOTE6 -- IT IS INTENDED THAT ALL PACKAGES FOR DBRMMETQ BE BOUND //* ----- WITH ISO(CS) EVEN THOUGH THEY RESIDE IN A PACKAGESET //* THAT IMPLIES REPEATABLE READ. //* (continued on next page) Copy of Gateway for DB2 Server Install STEP3A Through STEP3K E-15 Example E-5 (Cont.) JCL Used in Gateway for DB2 Server Install Job STEP3F //* //* 1) ?DB2LOAD //* THE FULLY QUALIFIED DSN FOR THE DB2 LOAD //* LIBRARY. EXAMPLE -- SYS1.DSN230.DSNLOAD //* //* 2) ?DB2SYS //* A DB2 SUBSYSTEM NAME FOR YOUR SITE. EXAMPLE -- DB23 //* //* 3) ?TINDEX //* THE HIGH LEVEL QUALIFIER FOR THE TARGET LIBRARIES. //* EXAMPLES -- YOUR USERID OR VIDA //* //******************************************************************* //BIND EXEC PGM=IKJEFT01 //STEPLIB DD DSN=?DB2LOAD,DISP=SHR //SYSTSPRT DD SYSOUT=* //SYSTSIN DD * DSN SYSTEM(?DB2SYS) BIND PACKAGE(DBICS) - MEM(ZBRMDB2) - LIB('?TINDEX.VIDTDBRM') - OWNER(VIDA) - ACTION(REPLACE) ISO(CS) VALIDATE(BIND) BIND PACKAGE(DBICS) - MEM(ZBRMMETQ) - LIB('?TINDEX.VIDTDBRM') - OWNER(VIDA) - ACTION(REPLACE) ISO(CS) VALIDATE(BIND) BIND PACKAGE(DBIRR) - MEM(ZBRMDB2) - LIB('?TINDEX.VIDTDBRM') - OWNER(VIDA) - ACTION(REPLACE) ISO(RR) VALIDATE(BIND) (continued on next page) E-16 Copy of Gateway for DB2 Server Install STEP3A Through STEP3K Example E-5 (Cont.) JCL Used in Gateway for DB2 Server Install Job STEP3F BIND PACKAGE(DBIRR) - MEM(ZBRMMETQ) - LIB('?TINDEX.VIDTDBRM') - OWNER(VIDA) - ACTION(REPLACE) ISO(CS) VALIDATE(BIND) BIND PLAN(DEC2) - PKLIST(DBICS.*,DBIRR.*) - OWNER(VIDA) - ACTION(REPLACE) RETAIN ISO(CS) VALIDATE(BIND) END /* // Copy of Gateway for DB2 Server Install STEP3A Through STEP3K E-17 Example E-6 JCL Used in Gateway for DB2 Server Install Job STEP3G //DBISTP3G JOB ,'BIND UPDATE PLANS',MSGCLASS=A,CLASS=A //* //******************************************************************* //* //* STEP3G IS MODEL JCL TO BIND THE DBI SERVER FOR DB2 DBRMS //* USED FOR UPDATE OPERATIONS. THIS STEP SHOULD NOT BE RUN //* UNLESS YOU: //* (1) INTEND TO IMPLEMENT SELECTIVE GRANTS FOR EXECUTE //* AUTHORITY ON THE UPDATE PACKAGES. //* (2) HAVE CHANGED THE DEFAULT NAMES SUPPLIED IN MODULE "OPTIONS" //* FOR THE UPDATE PACKAGES. //* //* YOU CAN RUN THIS JOB OR YOU CAN DO THE BINDS THROUGH TSO. //* //* MAKE THE FOLLOWING GLOBAL CHARACTER STRING CHANGES FOR SITE- //* SPECIFIC STANDARDS: //* //* NOTE1 -- YOU MUST SUPPLY THE PACKAGE NAMES AS ENTERED INTO //* ----- "OPTIONS". THIS JOB USES VALUES WHICH ARE NOT //* REFERENCED IN "OPTIONS" AS SUPPLIED IN ITS DEFAULT //* FORM. //* //* NOTE2 -- IT IS HIGHLY RECOMMENDED THAT THE OWNER OF THESE //* ----- BE THE SAME OWNER OF THE METADATA VIEWS //* CREATED IN STEP3A. THIS JOB USES VIDA AS THE //* OWNER SINCE THIS WAS THE DEFAULT USED IN STEP3A. //* IF YOU CHANGED STEP3A THEN CHANGE THE OWNER VALUE HERE //* TO MATCH THE OWNER OF THE VIEWS. //* //* NOTE3 -- IF YOU ARE MIGRATING FROM A PREVIOUS VERSION OF THE //* ----- SERVER AND YOU ARE USING THE SAME METADATA VIEWS AS //* THE PREVIOUS SERVER (I.E. STEP3A WAS NOT RUN) THEN IT //* IS RECOMMENDED THAT YOU FIND THE OWNER OF THE VIEWS //* AND USE THAT VALUE AS THE OWNER VALUE IN THIS JOB. //* //* NOTE4 -- THERE ARE STRING REPLACEMENTS IN THE SYSTSIN INSTREAM //* ----- DATA AS WELL AS IN JCL. //* (continued on next page) E-18 Copy of Gateway for DB2 Server Install STEP3A Through STEP3K Example E-6 (Cont.) JCL Used in Gateway for DB2 Server Install Job STEP3G //* NOTE5 -- THIS JOB ATTEMPTS TO REBIND THE PLAN FROM STEP3F //* ----- TO INCLUDE THE NEW PACKAGESETS. MAKE SURE THAT THE //* PACKAGESET NAMES AND THE PLAN NAME IN THIS JOB IS THE //* SAME AS IN STEP3F. //* //* NOTE6 -- IT IS INTENDED THAT ALL PACKAGES FOR DBRMMETQ BE BOUND //* ----- WITH ISO(CS) EVEN THOUGH THEY RESIDE IN A PACKAGESET //* THAT IMPLIES REPEATABLE READ. //* //* 1) ?DB2LOAD //* THE FULLY QUALIFIED DSN FOR THE DB2 LOAD //* LIBRARY. EXAMPLE -- SYS1.DSN230.DSNLOAD //* //* 2) ?DB2SYS //* A DB2 SUBSYSTEM NAME FOR YOUR SITE. EXAMPLE -- DB23 //* //* 3) ?TINDEX //* THE HIGH LEVEL QUALIFIER FOR THE TARGET LIBRARIES. //* EXAMPLES -- YOUR USERID OR VIDA //* //******************************************************************* //BIND EXEC PGM=IKJEFT01 //STEPLIB DD DSN=?DB2LOAD,DISP=SHR //SYSTSPRT DD SYSOUT=* //SYSTSIN DD * DSN SYSTEM(?DB2SYS) BIND PACKAGE(DBISECCS) - MEM(ZBRMDB2) - LIB('?TINDEX.VIDTDBRM') - OWNER(VIDA) - ACTION(REPLACE) ISO(CS) VALIDATE(BIND) BIND PACKAGE(DBISECCS) - MEM(ZBRMMETQ) - LIB('?TINDEX.VIDTDBRM') - OWNER(VIDA) - ACTION(REPLACE) ISO(CS) VALIDATE(BIND) (continued on next page) Copy of Gateway for DB2 Server Install STEP3A Through STEP3K E-19 Example E-6 (Cont.) JCL Used in Gateway for DB2 Server Install Job STEP3G BIND PACKAGE(DBISECRR) - MEM(ZBRMDB2) - LIB('?TINDEX.VIDTDBRM') - OWNER(VIDA) - ACTION(REPLACE) ISO(RR) VALIDATE(BIND) BIND PACKAGE(DBISECRR) - MEM(ZBRMMETQ) - LIB('?TINDEX.VIDTDBRM') - OWNER(VIDA) - ACTION(REPLACE) ISO(CS) VALIDATE(BIND) BIND PLAN(DEC2) - PKLIST(DBICS.*,DBIRR.*,DBISECCS.*,DBISECRR.*) - OWNER(VIDA) - ACTION(REPLACE) RETAIN ISO(CS) VALIDATE(BIND) END /* // E-20 Copy of Gateway for DB2 Server Install STEP3A Through STEP3K Example E-7 JCL Used in Gateway for DB2 Server Install Job STEP3H --******************************************************************* -- STEP3H. GRANT EXECUTE PRIVILEGES ON THE PACKAGES AND PLAN. -- -- PART 1: -- THE STATEMENT BELOW USES THE DEFAULT NAMES. IF YOUR SITE -- HAS CHANGED THE NAMES THEN YOU MUST CHANGE THE -- REFERENCES FROM THE DEFAULT NAMES BELOW. -- -- NOTE: IT IS ASSUMED THAT YOUR SITE WILL MAKE THESE RESOURCES -- AVAILABLE TO PUBLIC. YOU MAY WANT TO REVIEW THE CHAPTER -- ON SECURITY BEFORE ISSUING THESE GRANTS. --******************************************************************* -- GRANT EXECUTE ON PLAN DEC2 TO PUBLIC; GRANT EXECUTE ON PACKAGE DBICS, DBIRR TO PUBLIC; COMMIT; -- -- PART 2: -- THIS PART IS ONLY NECESSARY IF YOU HAVE ALSO RUN STEP3G TO -- CREATE UNIQUE UPDATE PACKAGESETS. YOU MUST UNCOMMENT THE LINES -- BELOW AND CHANGE THE PACKAGESET NAMES TO THOSE BOUND IN STEP3G. -- SINCE THE INTENT OF THIS IS TO LIMIT ACCESS, YOU MUST DUPLICATE -- THE GRANTS AND FILL IN THE NAMES OF THE SELECTED USERS --******************************************************************* -- -- GRANT EXECUTE ON PACKAGE DBISECCS, DBISECRR TO XXXXXXXX; -- COMMIT; -- Copy of Gateway for DB2 Server Install STEP3A Through STEP3K E-21 Example E-8 JCL Used in Gateway for DB2 Server Install Job STEP3IA ***************************************************************** * STEP3I * SAMPLE PPT ENTRY FOR PROGRAM DBISERV ***************************************************************** DBISERV DFHPPT TYPE=ENTRY, X PROGRAM=DBISERV, X PGMLANG=ASSEMBLER *************************************************************** * SAMPLE PCT ENTRY FOR DEC2 * *************************************************************** SPACE 3 DEC2 DFHPCT TYPE=ENTRY, X PROGRAM=DBISERV, X TRANSID=DEC2, X TWASIZE=0, X DTB=YES, X DTIMOUT=NO, X DUMP=YES, X DVSUPRT=VTAM, X EXTSEC=NO, X INBFMH=NO, X RTIMOUT=NO *********************************************************************** * SAMPLE JCT ENTRY FOR THE LOG *********************************************************************** LOG DFHJCT TYPE=ENTRY, X JFILEID=02, X BUFSIZE=256, X OPEN=INITIAL, X JTYPE=DISK1 E-22 Copy of Gateway for DB2 Server Install STEP3A Through STEP3K Example E-9 JCL Used in Gateway for DB2 Server Install Job STEP3IB //DBISTP3I JOB ,'RDO DEFINITIONS',CLASS=A,MSGCLASS=A //** //**************************************************************** //** ** //** THIS IS A MODEL JOB USED TO DEFINE THE DBI SERVER ** //** DEFINITIONS TO CICS. ** //** ** //** ** //** MAKE THE FOLLOWING GLOBAL CHARACTER STRING CHANGES FOR ** //** SITE-SPECIFIC STANDARDS: ** //** ** //** 1) ?CICSLOA ** //** THE FULLY QUALIFIED DSN FOR THE CICS LOAD LIBRARY ** //** WHICH CONTAINS THE CSD UTILITY PROGRAMS. ** //** ** //** 2) ?CICSCSD ** //** THE FULLY QUALIFIED DSN FOR YOUR SITE'S CSD FILE. ** //** ** //** 3) CHANGE TRANSACTION ID'S, PROGRAM NAMES, PROFILES ** //** AND GROUP NAMES TO MEET YOUR STIE SPECIFIC NAMING ** //** SCHEMES. ** //** ** //**************************************************************** //** //DEFCSD EXEC PGM=DFHCSDUP,REGION=1024K //STEPLIB DD DSN=?CICSLOA,DISP=SHR //DFHCSD DD DSN=?CICSCSD,DISP=SHR //SYSPRINT DD SYSOUT=* //SYSIN DD * ****************************************************************** * DELETE PREVIOUS GROUP IF IT EXISTS * ****************************************************************** DELETE GROUP(DBIGRP) * ****************************************************************** * OPTIONAL PROFILE SETTINGS * * NOTE: THIS SETTING OF RTIMOUT MAY BE APPROPRIATE FOR USE * * WITH LONG RUNNING CLIENT SERVICE SOFTWARE, SUCH AS * (continued on next page) Copy of Gateway for DB2 Server Install STEP3A Through STEP3K E-23 Example E-9 (Cont.) JCL Used in Gateway for DB2 Server Install Job STEP3IB * SQL SERVICES. * ****************************************************************** DEFINE PROFILE(DBIPROF) GROUP(DBIGRP) DESCRIPTION(DBI SERVER PROFILE) RTIMOUT(NO) ****************************************************************** * REQUIRED TRANSACTION * ****************************************************************** DEFINE TRANSACTION(DEC2) GROUP(DBIGRP) DESCRIPTION(DBI SERVER) PROFILE(DBIPROF) PROGRAM(DBISERV) TWASIZE(0) TASKDATALOC(BELOW) TASKDATAKEY(USER) ****************************************************************** * PROGRAM * ****************************************************************** DEFINE PROGRAM(DBISERV) GROUP(DBIGRP) DESCRIPTION(DBI SERVER) LANGUAGE(ASSEMBLER) CEDF(NO) DATALOCATION(BELOW) EXECKEY(USER) /* // E-24 Copy of Gateway for DB2 Server Install STEP3A Through STEP3K Example E-10 JCL Used in Gateway for DB2 Server Install Job STEP3J ***************************************************************** ** STEP3J ** SAMPLE RCT ENTRY FOR TRANSACTION DEC2 ** ** NOTE: THRDA AND THRDM MAY BE ANY VALUE. THIS IS A CHANGE FROM ** ---- THE V2 SERVER WHICH REQUIRED UNPROTECTED THREADS IN ORDER ** TO PERFORM DYNAMIC PLAN SELECTION. THE RCT ENTRY HERE ** STILL HAS VALUES TO FORCE AN UNPROTECTED THREAD. THESE ** MAY BE CHANGED TO MEET YOUR SITES REQUIREMENTS. ** *********************************************************************** DSNCRCT TYPE=ENTRY, X TXID=DEC2, X THRDA=0, X THRDM=0, X TWAIT=POOL, X ROLBI=NO, X PLAN=DEC2, X AUTH=USERID Copy of Gateway for DB2 Server Install STEP3A Through STEP3K E-25 Example E-11 JCL Used in Gateway for DB2 Server Install Job STEP3K //DBISTP3K JOB ,'CREATE CICS JOURNAL',MSGCLASS=A,CLASS=A //* //* NOTE 1: THIS STEP IS OPTIONAL. THE DBI SERVER ONLY //* WRITES DEBUGGING INFORMATION INTO THE //* CICS JOURNAL. //* //* THE CLIENT SHOULD NOT NORMALLY NEED TO COLLECT //* THE DEBUGGING INFORMATION. USE OF THIS OPTION WILL //* BE DETRIMENTAL TO PERFORMANCE DUE TO THE VOLUME //* OF DATA BEING WRITTEN TO THE JOURNAL. //* //* SHOULD IT BECOME NECESSARY TO COLLECT THIS INFORMATION //* IN THE COURSE OF PROBLEM DETERMINATION, THEN THIS //* JOB MUST BE RUN IN ORDER TO CREATE THE JOURNAL FILE. //* //************************************************************ //* THIS IS JCL TO ALLOCATE AND INITIALIZE THE CICS JOURNAL //* FOR DBI SERVER FOR DB2. THE PRTJRNL JOB IN INSTLIB //* IS AVAILABLE FOR PRINTING THE JOURNAL. //* //* MAKE THE FOLLOWING GLOBAL CHARACTER STRING CHANGES FOR //* SITE-SPECIFIC STANDARDS: //* //* 1) ?CICSLOA //* THE FULLY QUALIFIED DATASET NAME OF THE CICS //* LOAD LIBRARY WHICH CONTAINS DFHJCJFP. //* EXAMPLE -- CICS330.LOADLIB //* //* 2) ?JRNLDSN //* THE FULLY QUALIFIED DATASET NAME OF THE CICS JOURNAL. //* EXAMPLE -- CICS330.JRNL02 //* //* 3) ?JRNLDSK //* THE GENERIC UNIT DEVICE TYPE FOR THE CICS JOURNAL. //* EXAMPLE -- SYSDA //* //* 4) ?JRNLVOL //* THE VOLUME USED FOR THE CICS JOURNAL. (continued on next page) E-26 Copy of Gateway for DB2 Server Install STEP3A Through STEP3K Example E-11 (Cont.) JCL Used in Gateway for DB2 Server Install Job STEP3K //* EXAMPLE -- DM0023 //* //************************************************************ //STEP1 EXEC PGM=DFHJCJFP //STEPLIB DD DISP=SHR,DSN=?CICSLOA //JOURNAL DD DISP=(NEW,CATLG),DSN=?JRNLDSN, // UNIT=?JRNLDSK,VOL=SER=?JRNLVOL, // DCB=BLKSIZE=256, // SPACE=(TRK,20) // Copy of Gateway for DB2 Server Install STEP3A Through STEP3K E-27 F ________________________________________________________________ Copy of Gateway for DB2 Server Install STEP4A Through STEP4G This appendix contains a copy of the JCL, SQL command streams, and CICS table entries that are contained in STEP4A through STEP4G. These are shown in Example F-1 through Example F-7. Example F-1 JCL Used in Gateway for DB2 Server Install Job STEP4A Example F-2 JCL Used in Gateway for DB2 Server Install Job STEP4B Example F-3 JCL Used in Gateway for DB2 Server Install Job STEP4C Example F-4 JCL Used in Gateway for DB2 Server Install Job STEP4D Example F-5 JCL Used in Gateway for DB2 Server Install Job STEP4E Example F-6 JCL Used in Gateway for DB2 Server Install Job STEP4F Example F-7 JCL Used in Gateway for DB2 Server Install Job STEP4G Example F-3 shows the DB2 CREATE statements for the sample PERSONNL database. This step provides the names of the tables and the names of the indexes in PERSONNL. Gateway for DB2 client users can access the PERSONNL database to test examples in the DEC DB Integrator Product Family User's Guide and to verify that the gateway for DB2 client and gateway for DB2 server software are correctly installed. The gateway for DB2 server installation tape contains the source data and the JCL to load the PERSONNL database. Section 2.4 contains instructions for building the PERSONNL database. Copy of Gateway for DB2 Server Install STEP4A Through STEP4G F-1 Example F-1 JCL Used in Gateway for DB2 Server Install Job STEP4A //DBISTP4A JOB 01,'COPY PERSONNL FILES',CLASS=A,MSGCLASS=A //* //****************************************************************** //* //* STEP4A COPIES FILES 7 - 14 FROM THE DISTRIBUTION TAPE TO DISK. //* THESE SEQUENTIAL FILE ARE USED AS INPUT IN THE DB2 LOAD //* UTILITY JOB (STEP4F) TO BUILD THE TEST DATABASE PERSONNL. //* //* STEP4A CONSISTS OF THE DEFINITION OF THE INLINE PROC STEP4A, //* AND THE EXECUTION OF THAT PROC. //* //* MAKE THE FOLLOWING GLOBAL CHARACTER STRING CHANGES FOR SITE- //* SPECIFIC STANDARDS: //* //* 1) ?VIDPDSK //* THE GENERIC UNIT DEVICE TYPE FOR THE PERSONNL SEQUENTIAL //* FILES ON DISK. //* //* 2) ?VIDPVOL //* THE VOLUME USED FOR THE PERSONNL SEQUENTIAL FILES. //* //* 3) ?TAPUNIT //* THE GENERIC UNIT DEVICE TYPE FOR TAPE FILES. //* //* NOTE -- THE SYSUT2 SEQUENTIAL DATASETS POPULATED IN THIS STEP ARE //* READ AS INPUT IN STEP4F. IF YOU ELECT TO CHANGE TO HIGH LEVEL //* QUALIFIERS HERE TO SOMETHING OTHER THAN "VIDA," THE SAME QUALIFIER //* CHANGES WILL BE NEEDED IN STEP4F. //* //****************************************************************** //* //STEP4A PROC VIDPDSK='?VIDPDSK', // VIDPVOL='?VIDPVOL', // TAPUNIT='?TAPUNIT' //* //STEP01 EXEC PGM=IEBGENER //SYSIN DD DUMMY //SYSPRINT DD SYSOUT=* (continued on next page) F-2 Copy of Gateway for DB2 Server Install STEP4A Through STEP4G Example F-1 (Cont.) JCL Used in Gateway for DB2 Server Install Job STEP4A //SYSUT2 DD DSN=VIDA.COLLEGES, // SPACE=(TRK,(5,5)), // DISP=(NEW,CATLG,DELETE),UNIT=&VIDPDSK,VOL=SER=&VIDPVOL, // DCB=(RECFM=VB,LRECL=255,BLKSIZE=3120) //SYSUT1 DD DSN=INPUT.COLLEGES,UNIT=&TAPUNIT, // DISP=(OLD,PASS),VOL=SER=(VI3100),LABEL=(7,SL) //* //* //STEP02 EXEC PGM=IEBGENER //SYSIN DD DUMMY //SYSPRINT DD SYSOUT=* //SYSUT2 DD DSN=VIDA.DEGREES, // SPACE=(TRK,(5,5)), // DISP=(NEW,CATLG,DELETE),UNIT=&VIDPDSK,VOL=SER=&VIDPVOL, // DCB=(RECFM=VB,LRECL=255,BLKSIZE=3120) //SYSUT1 DD DSN=INPUT.DEGREES,UNIT=&TAPUNIT, // DISP=(OLD,PASS),VOL=SER=(VI3100),LABEL=(8,SL) //* //* //STEP03 EXEC PGM=IEBGENER //SYSIN DD DUMMY //SYSPRINT DD SYSOUT=* //SYSUT2 DD DSN=VIDA.DEPTS, // SPACE=(TRK,(5,5)), // DISP=(NEW,CATLG,DELETE),UNIT=&VIDPDSK,VOL=SER=&VIDPVOL, // DCB=(RECFM=VB,LRECL=255,BLKSIZE=3120) //SYSUT1 DD DSN=INPUT.DEPTS,UNIT=&TAPUNIT, // DISP=(OLD,PASS),VOL=SER=(VI3100),LABEL=(9,SL) //* //* //STEP04 EXEC PGM=IEBGENER //SYSIN DD DUMMY //SYSPRINT DD SYSOUT=* //SYSUT2 DD DSN=VIDA.EMPLOYEE, // SPACE=(TRK,(5,5)), // DISP=(NEW,CATLG,DELETE),UNIT=&VIDPDSK,VOL=SER=&VIDPVOL, // DCB=(RECFM=VB,LRECL=255,BLKSIZE=3120) //SYSUT1 DD DSN=INPUT.EMPLOYEE,UNIT=&TAPUNIT, (continued on next page) Copy of Gateway for DB2 Server Install STEP4A Through STEP4G F-3 Example F-1 (Cont.) JCL Used in Gateway for DB2 Server Install Job STEP4A // DISP=(OLD,PASS),VOL=SER=(VI3100),LABEL=(10,SL) //* //* //STEP05 EXEC PGM=IEBGENER //SYSIN DD DUMMY //SYSPRINT DD SYSOUT=* //SYSUT2 DD DSN=VIDA.JOBS, // SPACE=(TRK,(5,5)), // DISP=(NEW,CATLG,DELETE),UNIT=&VIDPDSK,VOL=SER=&VIDPVOL, // DCB=(RECFM=VB,LRECL=255,BLKSIZE=3120) //SYSUT1 DD DSN=INPUT.JOBS,UNIT=&TAPUNIT, // DISP=(OLD,PASS),VOL=SER=(VI3100),LABEL=(11,SL) //* //* //STEP06 EXEC PGM=IEBGENER //SYSIN DD DUMMY //SYSPRINT DD SYSOUT=* //SYSUT2 DD DSN=VIDA.JOBHIST, // SPACE=(TRK,(5,5)), // DISP=(NEW,CATLG,DELETE),UNIT=&VIDPDSK,VOL=SER=&VIDPVOL, // DCB=(RECFM=VB,LRECL=255,BLKSIZE=3120) //SYSUT1 DD DSN=INPUT.JOBHIST,UNIT=&TAPUNIT, // DISP=(OLD,PASS),VOL=SER=(VI3100),LABEL=(12,SL) //* //* //STEP07 EXEC PGM=IEBGENER //SYSIN DD DUMMY //SYSPRINT DD SYSOUT=* //SYSUT2 DD DSN=VIDA.SALHIST, // SPACE=(TRK,(5,5)), // DISP=(NEW,CATLG,DELETE),UNIT=&VIDPDSK,VOL=SER=&VIDPVOL, // DCB=(RECFM=VB,LRECL=255,BLKSIZE=3120) //SYSUT1 DD DSN=INPUT.SALHIST,UNIT=&TAPUNIT, // DISP=(OLD,PASS),VOL=SER=(VI3100),LABEL=(13,SL) //* //* //STEP08 EXEC PGM=IEBGENER //SYSIN DD DUMMY (continued on next page) F-4 Copy of Gateway for DB2 Server Install STEP4A Through STEP4G Example F-1 (Cont.) JCL Used in Gateway for DB2 Server Install Job STEP4A //SYSPRINT DD SYSOUT=* //SYSUT2 DD DSN=VIDA.WORKSTAT, // SPACE=(TRK,(5,5)), // DISP=(NEW,CATLG,DELETE),UNIT=&VIDPDSK,VOL=SER=&VIDPVOL, // DCB=(RECFM=VB,LRECL=255,BLKSIZE=3120) //SYSUT1 DD DSN=INPUT.WORKSTAT,UNIT=&TAPUNIT, // DISP=(OLD,KEEP),VOL=SER=(VI3100),LABEL=(14,SL) // PEND //DBISTP4A EXEC STEP4A // Copy of Gateway for DB2 Server Install STEP4A Through STEP4G F-5 Example F-2 SQL Command Stream Used in Gateway for DB2 Server Install Job STEP4B --**************************************************************** -- STEP4B CONTAINS THESE STEPS: -- -- CREATE THE STORAGE GROUP VIDA. -- GRANT USE OF STORAGE GROUP. -- CREATE THE PERSONNL DATABASE. -- GRANT DBADM ON PERSONNL DATABASE. -- CREATE TABLESPACE PERSONNL.PERSONNL -- -- -- NOTE -- STEP4G CONTAINS DROP COMMANDS FOR ALL THE ELEMENTS IN -- ---- THE PERSONNL DATABASE. FOR EXECUTIONS OF STEP4B -- AFTER THE FIRST, OR WHEN YOU NO LONGER NEED THE -- PERSONNL DATABASE, EXECUTE SELECTED COMMANDS OR ALL -- COMMANDS IN STEP4G. -- -- MAKE THESE CHARACTER STRING CHANGES FOR THE DB2 STORAGE -- GROUP VOLUME AND VCAT: -- -- (1) ?DB2VOL -- DB2 STORAGE GROUP VOLUME EXAMPLE -- DSNV01 -- (2) ?DB2VCAT -- DB2 STORAGE GROUP VCAT EXAMPLE -- DSNC120 -- --**************************************************************** CREATE STOGROUP VIDA VOLUMES (?DB2VOL) VCAT ?DB2VCAT; -- --**************************************************************** -- GRANT USE OF THE STORAGE GROUP "VIDA" ONLY TO MEMBERS OF THE -- USER ID VIDA. --**************************************************************** -- GRANT USE OF STOGROUP VIDA TO VIDA; -- (continued on next page) F-6 Copy of Gateway for DB2 Server Install STEP4A Through STEP4G Example F-2 (Cont.) SQL Command Stream Used in Gateway for DB2 Server Install Job STEP4B --***************************************************************** -- CREATE THE DATABASE "PERSONNL" FOR INSTALLATION OF THE TABLES * -- ASSOCIATED WITH THE PERSONNL DATABASE * --***************************************************************** -- CREATE DATABASE PERSONNL STOGROUP VIDA BUFFERPOOL BP0; -- --***************************************************************** -- GRANT DBADM TO USER "VIDA" ON THE "PERSONNL" DATABASE * -- THIS IS NECESSARY TO RUN THE "LOAD UTILITY" * --***************************************************************** -- GRANT DBADM ON DATABASE PERSONNL TO VIDA WITH GRANT OPTION; -- --***************************************************************** -- CREATE THE TABLESPACE "PERSONNL" FOR INSTALLATION OF THE TABLES* -- ASSOCIATED WITH THE PERSONNL DATABASE * --***************************************************************** -- CREATE TABLESPACE PERSONNL IN PERSONNL USING STOGROUP VIDA BUFFERPOOL BP0 LOCKSIZE PAGE; -- Copy of Gateway for DB2 Server Install STEP4A Through STEP4G F-7 Example F-3 SQL Command Stream Used in Gateway for DB2 Server Install Job STEP4C --********************************************************************* --* * --* STEP4C CREATES THE PERSONNL DATABASE TABLES * --* * --* NOTE -- STEP4G CONTAINS DROP COMMANDS FOR ALL THE ELEMENTS IN * --* THE PERSONNL DATABASE. FOR EXECUTIONS OF STEP4C * --* AFTER THE FIRST, OR WHEN YOU NO LONGER NEED THE * --* PERSONNL DATABASE, EXECUTE SELECTED COMMANDS OR ALL * --* COMMANDS IN STEP4G. * --* * --********************************************************************* -- -- --*************************************************************** -- CREATE TABLE FOR COLLEGES --*************************************************************** -- -- CREATE TABLE VIDA.COLLEGES (COLLEGE_CODE CHAR(4) NOT NULL WITH DEFAULT, COLLEGE_NAME CHAR(25) NOT NULL WITH DEFAULT, ADDRESS_DATA CHAR(20), STREET CHAR(25), TOWN CHAR(20), STATE CHAR(2), ZIP CHAR(5)) IN PERSONNL.PERSONNL; -- (continued on next page) F-8 Copy of Gateway for DB2 Server Install STEP4A Through STEP4G Example F-3 (Cont.) SQL Command Stream Used in Gateway for DB2 Server Install Job STEP4C --*************************************************************** -- CREATE TABLE AND INDEX FOR DEGREES --*************************************************************** -- -- CREATE TABLE VIDA.DEGREES (EMPLOYEE_ID CHAR(5) NOT NULL WITH DEFAULT, COLLEGE_CODE CHAR(4), YEAR_GIVEN SMALLINT NOT NULL WITH DEFAULT, DEGREE CHAR(3) NOT NULL WITH DEFAULT, DEGREE_FIELD CHAR(15) NOT NULL WITH DEFAULT) IN PERSONNL.PERSONNL; -- CREATE INDEX DEG_COLLEGE_CODE ON VIDA.DEGREES (COLLEGE_CODE ASC) USING STOGROUP VIDA BUFFERPOOL BP0; -- --*********************************************************** -- CREATE TABLE FOR DEPARTMENTS --*********************************************************** -- -- -- -- CREATE TABLE VIDA.DEPARTMENTS (DEPARTMENT_CODE CHAR(4) NOT NULL WITH DEFAULT, DEPARTMENT_NAME CHAR(30) NOT NULL WITH DEFAULT, MANAGER_ID CHAR(5) NOT NULL WITH DEFAULT, BUDGET_PROJECTED INTEGER, BUDGET_ACTUAL INTEGER) IN PERSONNL.PERSONNL; -- -- -- (continued on next page) Copy of Gateway for DB2 Server Install STEP4A Through STEP4G F-9 Example F-3 (Cont.) SQL Command Stream Used in Gateway for DB2 Server Install Job STEP4C --*********************************************************** -- CREATE TABLE FOR EMPLOYEES --*********************************************************** -- -- -- CREATE TABLE VIDA.EMPLOYEES (EMPLOYEE_ID CHAR(5) NOT NULL WITH DEFAULT, LAST_NAME CHAR(14) NOT NULL WITH DEFAULT, FIRST_NAME CHAR(10) NOT NULL WITH DEFAULT, MIDDLE_INITIAL CHAR(1), ADDRESS_DATA CHAR(20), STREET CHAR(25) NOT NULL WITH DEFAULT, TOWN CHAR(20) NOT NULL WITH DEFAULT, STATE CHAR(2) NOT NULL WITH DEFAULT, ZIP CHAR(5), SEX CHAR(1) NOT NULL WITH DEFAULT, BIRTHDAY DATE, SOCIAL_SECURITY CHAR(9) NOT NULL WITH DEFAULT, STATUS_CODE CHAR(1) NOT NULL WITH DEFAULT) IN PERSONNL.PERSONNL; -- -- CREATE UNIQUE INDEX EMP_EMPLOYEE_ID ON VIDA.EMPLOYEES (EMPLOYEE_ID ASC) USING STOGROUP VIDA BUFFERPOOL BP0; -- -- CREATE INDEX EMP_LAST_NAME ON VIDA.EMPLOYEES (LAST_NAME ASC) USING STOGROUP VIDA BUFFERPOOL BP0; (continued on next page) F-10 Copy of Gateway for DB2 Server Install STEP4A Through STEP4G Example F-3 (Cont.) SQL Command Stream Used in Gateway for DB2 Server Install Job STEP4C --********************************************************** -- CREATE TABLE AND INDEX FOR JOB_HISTORY --********************************************************** -- -- -- CREATE TABLE VIDA.JOB_HISTORY (EMPLOYEE_ID CHAR(5) NOT NULL WITH DEFAULT, JOB_CODE CHAR(4) NOT NULL WITH DEFAULT, JOB_START DATE, JOB_END DATE, DEPARTMENT_CODE CHAR(4) NOT NULL WITH DEFAULT, SUPERVISOR_ID CHAR(5) NOT NULL WITH DEFAULT) IN PERSONNL.PERSONNL; -- CREATE INDEX JH_EMPLOYEE_ID ON VIDA.JOB_HISTORY (EMPLOYEE_ID ASC) USING STOGROUP VIDA BUFFERPOOL BP0; -- CREATE INDEX JH_END_DATE ON VIDA.JOB_HISTORY (JOB_END ASC) USING STOGROUP VIDA BUFFERPOOL BP0; -- -- (continued on next page) Copy of Gateway for DB2 Server Install STEP4A Through STEP4G F-11 Example F-3 (Cont.) SQL Command Stream Used in Gateway for DB2 Server Install Job STEP4C --************************************************************* -- CREATE TABLE FOR JOBS --************************************************************* -- -- -- CREATE TABLE VIDA.JOBS (JOB_CODE CHAR(4) NOT NULL WITH DEFAULT, WAGE_CLASS CHAR(1) NOT NULL WITH DEFAULT, JOB_TITLE CHAR(20) NOT NULL WITH DEFAULT, MINIMUM_SALARY DECIMAL(9,2) NOT NULL WITH DEFAULT, MAXIMUM_SALARY DECIMAL(9,2) NOT NULL WITH DEFAULT) IN PERSONNL.PERSONNL; -- -- --************************************************************ -- CREATE TABLE AND INDEX FOR SALARY_HISTORY --************************************************************ -- -- -- CREATE TABLE VIDA.SALARY_HISTORY (EMPLOYEE_ID CHAR(5) NOT NULL WITH DEFAULT, SALARY_AMOUNT DECIMAL(9,2) NOT NULL WITH DEFAULT, SALARY_START DATE, SALARY_END DATE) IN PERSONNL.PERSONNL; -- CREATE INDEX SH_EMPLOYEE_ID ON VIDA.SALARY_HISTORY (EMPLOYEE_ID ASC) USING STOGROUP VIDA BUFFERPOOL BP0; -- CREATE INDEX SH_END_DATE ON VIDA.SALARY_HISTORY (SALARY_END ASC) USING STOGROUP VIDA (continued on next page) F-12 Copy of Gateway for DB2 Server Install STEP4A Through STEP4G Example F-3 (Cont.) SQL Command Stream Used in Gateway for DB2 Server Install Job STEP4C BUFFERPOOL BP0; --********************************************************** -- CREATE TABLE FOR WORK_STATUS --********************************************************** -- -- -- CREATE TABLE VIDA.WORK_STATUS (STATUS_CODE CHAR(1) NOT NULL WITH DEFAULT, STATUS_NAME CHAR(8) NOT NULL WITH DEFAULT, STATUS_TYPE CHAR(14) NOT NULL WITH DEFAULT) IN PERSONNL.PERSONNL; Copy of Gateway for DB2 Server Install STEP4A Through STEP4G F-13 Example F-4 SQL Command Stream Used in Gateway for DB2 Server Install Job STEP4D --********************************************************************* --* STEP4D * --* GRANT SELECT PRIVILEGE ON PERSONNL DATABASE TABLES TO PUBLIC * --* * --********************************************************************* GRANT SELECT ON TABLE VIDA.COLLEGES TO PUBLIC; GRANT SELECT ON TABLE VIDA.DEGREES TO PUBLIC; GRANT SELECT ON TABLE VIDA.DEPARTMENTS TO PUBLIC; GRANT SELECT ON TABLE VIDA.EMPLOYEES TO PUBLIC; GRANT SELECT ON TABLE VIDA.JOBS TO PUBLIC; GRANT SELECT ON TABLE VIDA.JOB_HISTORY TO PUBLIC; GRANT SELECT ON TABLE VIDA.SALARY_HISTORY TO PUBLIC; GRANT SELECT ON TABLE VIDA.WORK_STATUS TO PUBLIC; F-14 Copy of Gateway for DB2 Server Install STEP4A Through STEP4G Example F-5 SQL Command Stream Used in Gateway for DB2 Server Install Job STEP4E --********************************************************************* --* STEP4E * --* CREATE SYNONYMS FOR TABLES IN PERSONNL DATABASE * --* * --********************************************************************* CREATE SYNONYM COLLEGES FOR VIDA.COLLEGES; CREATE SYNONYM DEGREES FOR VIDA.DEGREES; CREATE SYNONYM DEPARTMENTS FOR VIDA.DEPARTMENTS; CREATE SYNONYM EMPLOYEES FOR VIDA.EMPLOYEES; CREATE SYNONYM JOBS FOR VIDA.JOBS; CREATE SYNONYM JOB_HISTORY FOR VIDA.JOB_HISTORY; CREATE SYNONYM SALARY_HISTORY FOR VIDA.SALARY_HISTORY; CREATE SYNONYM WORK_STATUS FOR VIDA.WORK_STATUS; Copy of Gateway for DB2 Server Install STEP4A Through STEP4G F-15 Example F-6 JCL Used in Gateway for DB2 Server Install Job STEP4F //DBISTP4F JOB ,'LOAD PERSONNL DATABASE',MSGCLASS=A,CLASS=A //* //********************************************************************* //* //* STEP4F EXECUTES THE DB2 LOAD UTILITY TO LOAD THE TEST //* DATABASE PERSONNL. THE SEQUENTIAL FILES ON DISK CREATED IN //* STEP4A ARE USED TO LOAD TABLES INTO THE PERSONNL DATABASE. //* //* MAKE THE GOLLOWING GLOBAL CHARACTER STRING CHANGES FOR SITE- //* SPECIFIC STANDARDS: //* //* 1) ?DB2SYS //* THE DB2 SUBSYSTEM NAME INTO WHICH YOU WANT THE PERSONNL //* TABLES LOADED. EXAMPLE -- DB23 //* //* 2) ?USERID //* THE USERID WITH THE PROPER DB2 AUTHORITY TO LOAD //* THE PERSONNL TABLES. //* //* 3) ?LINDEX //* THE HIGH LEVEL QUALIFIER FOR THE LOAD UTILITY WORK DATASETS. //* //* 4) ?LWRKDSK //* THE GENERIC UNIT DEVICE TYPE FOR THE DB2 LOAD UTILITY //* WORK AREAS. //* //********************************************************************* //* //UTIL1 EXEC DSNUPROC,SYSTEM='?DB2SYS',UID='?USERID',UTPROC='',COND=(8,LT) //* //DSNUPROC.SORTWK01 DD DSN=?LINDEX.SORTWK01, // DISP=(MOD,DELETE,CATLG), // SPACE=(4000,(20,20),,,ROUND), // UNIT=?LWRKDSK //DSNUPROC.SORTWK02 DD DSN=?LINDEX.SORTWK02, // DISP=(MOD,DELETE,CATLG), // SPACE=(4000,(20,20),,,ROUND), // UNIT=?LWRKDSK (continued on next page) F-16 Copy of Gateway for DB2 Server Install STEP4A Through STEP4G Example F-6 (Cont.) JCL Used in Gateway for DB2 Server Install Job STEP4F //DSNUPROC.SORTWK03 DD DSN=?LINDEX.SORTWK03, // DISP=(MOD,DELETE,CATLG), // SPACE=(4000,(20,20),,,ROUND), // UNIT=?LWRKDSK //DSNUPROC.SORTWK04 DD DSN=?LINDEX.SORTWK04, // DISP=(MOD,DELETE,CATLG), // SPACE=(4000,(20,20),,,ROUND), // UNIT=?LWRKDSK //DSNUPROC.SYSUT1 DD DSN=?LINDEX.SYSUT1, // DISP=(MOD,DELETE,CATLG), // SPACE=(4000,(20,20),,,ROUND), // UNIT=?LWRKDSK //DSNUPROC.SORTOUT DD DSN=?LINDEX.SORTOUT, // DISP=(MOD,DELETE,CATLG), // SPACE=(4000,(20,20),,,ROUND), // UNIT=?LWRKDSK //DSNUPROC.COLLEGES DD DSN=VIDA.COLLEGES, // DISP=OLD //DSNUPROC.DEGREES DD DSN=VIDA.DEGREES, // DISP=OLD //DSNUPROC.DEPTS DD DSN=VIDA.DEPTS, // DISP=OLD //DSNUPROC.EMPLOYEE DD DSN=VIDA.EMPLOYEE, // DISP=OLD //DSNUPROC.JOBS DD DSN=VIDA.JOBS, // DISP=OLD //DSNUPROC.JOBHIST DD DSN=VIDA.JOBHIST, // DISP=OLD //DSNUPROC.SALHIST DD DSN=VIDA.SALHIST, // DISP=OLD //DSNUPROC.WORKSTAT DD DSN=VIDA.WORKSTAT, // DISP=OLD //DSNUPROC.SYSIN DD * LOAD DATA INDDN COLLEGES REPLACE LOG NO INTO TABLE VIDA.COLLEGES (COLLEGE_CODE POSITION (1) CHAR (4), (continued on next page) Copy of Gateway for DB2 Server Install STEP4A Through STEP4G F-17 Example F-6 (Cont.) JCL Used in Gateway for DB2 Server Install Job STEP4F COLLEGE_NAME POSITION (5) CHAR (25), ADDRESS_DATA POSITION (30) CHAR (20) NULLIF (30:49 = X'4040404040404040404040404040404040404040'), STREET POSITION (50) CHAR (25) NULLIF (50:69 = X'4040404040404040404040404040404040404040'), TOWN POSITION (75) CHAR (20) NULLIF (75:94 = X'4040404040404040404040404040404040404040'), STATE POSITION (95) CHAR (2) NULLIF (95:96 = X'4040'), ZIP POSITION (97) CHAR (5) NULLIF (97:101= X'F0F0F0F0F0')) LOAD DATA INDDN DEGREES RESUME YES LOG NO INTO TABLE VIDA.DEGREES (EMPLOYEE_ID POSITION (1) CHAR (5), COLLEGE_CODE POSITION (6) CHAR (4) NULLIF (6:9 = X'40404040'), YEAR_GIVEN POSITION (10) INTEGER EXTERNAL(4), DEGREE POSITION (21) CHAR (3), DEGREE_FIELD POSITION (24) CHAR (15)) LOAD DATA INDDN DEPTS RESUME YES LOG NO INTO TABLE VIDA.DEPARTMENTS (DEPARTMENT_CODE POSITION (1) CHAR (4), DEPARTMENT_NAME POSITION (5) CHAR (30), MANAGER_ID POSITION (35) CHAR (5), BUDGET_PROJECTED POSITION (40) INTEGER EXTERNAL(8) NULLIF (40:47 = X'F0F0F0F0F0F0F0F0'), BUDGET_ACTUAL POSITION (48) INTEGER EXTERNAL(8) NULLIF (48:55 = X'F0F0F0F0F0F0F0F0')) LOAD DATA INDDN EMPLOYEE RESUME YES LOG NO INTO TABLE VIDA.EMPLOYEES (EMPLOYEE_ID POSITION (1) CHAR (5), LAST_NAME POSITION (6) CHAR (14), (continued on next page) F-18 Copy of Gateway for DB2 Server Install STEP4A Through STEP4G Example F-6 (Cont.) JCL Used in Gateway for DB2 Server Install Job STEP4F FIRST_NAME POSITION (20) CHAR (10), MIDDLE_INITIAL POSITION (30) CHAR (1) NULLIF (30 = X'40'), ADDRESS_DATA POSITION (31) CHAR (20) NULLIF (31:50 = X'4040404040404040404040404040404040404040'), STREET POSITION (51) CHAR (25), TOWN POSITION (76) CHAR (20), STATE POSITION (96) CHAR (2), ZIP POSITION (98) CHAR (5) NULLIF (98:102 = X'F0F0F0F0F0'), SEX POSITION (103) CHAR (1), BIRTHDAY POSITION (104) DATE EXTERNAL(10) NULLIF (104:113 = X'F0F14BF0F14BF0F0F0F1'), SOCIAL_SECURITY POSITION (114) CHAR (9), STATUS_CODE POSITION (123) CHAR (1)) LOAD DATA INDDN JOBS RESUME YES LOG NO INTO TABLE VIDA.JOBS (JOB_CODE POSITION (1) CHAR (4), WAGE_CLASS POSITION (5) CHAR (1), JOB_TITLE POSITION (6) CHAR (20), MINIMUM_SALARY POSITION (26) INTEGER EXTERNAL(9), MAXIMUM_SALARY POSITION (36) INTEGER EXTERNAL(9)) LOAD DATA INDDN JOBHIST RESUME YES LOG NO INTO TABLE VIDA.JOB_HISTORY (EMPLOYEE_ID POSITION (1) CHAR (5), JOB_CODE POSITION (6) CHAR (4), JOB_START POSITION (10) DATE EXTERNAL(10) NULLIF (10:19 = X'F0F14BF0F14BF0F0F0F1'), JOB_END POSITION (20) DATE EXTERNAL(10) NULLIF (20:29 = X'F0F14BF0F14BF0F0F0F1'), DEPARTMENT_CODE POSITION (30) CHAR (4), SUPERVISOR_ID POSITION (34) CHAR (5)) LOAD DATA INDDN SALHIST RESUME YES (continued on next page) Copy of Gateway for DB2 Server Install STEP4A Through STEP4G F-19 Example F-6 (Cont.) JCL Used in Gateway for DB2 Server Install Job STEP4F LOG NO INTO TABLE VIDA.SALARY_HISTORY (EMPLOYEE_ID POSITION (1) CHAR (5), SALARY_AMOUNT POSITION (6) INTEGER EXTERNAL(9), SALARY_START POSITION (16) DATE EXTERNAL(10) NULLIF (16:25 = X'F0F14BF0F14BF0F0F0F1'), SALARY_END POSITION (26) DATE EXTERNAL(10) NULLIF (26:35 = X'F0F14BF0F14BF0F0F0F1')) LOAD DATA INDDN WORKSTAT RESUME YES LOG NO INTO TABLE VIDA.WORK_STATUS (STATUS_CODE POSITION (1) CHAR (1), STATUS_NAME POSITION (2) CHAR (8), STATUS_TYPE POSITION (10) CHAR (14)) // F-20 Copy of Gateway for DB2 Server Install STEP4A Through STEP4G Example F-7 SQL Command Stream Used in Gateway for DB2 Server Install Job STEP4G --********************************************************************* --* * --* STEP4G DROPS THE PERSONNL DATABASE ENVIRONMENT * --* * --* STEP4G IS AVAILABLE TO COMPLETELY DROP THE ENVIRONMENT * --* WHEN YOU NO LONGER NEED IT, OR FOR SELECTIVE EXECUTION * --* OF THE DROPS OF SPECIFIC OBJECTS. * --* * --********************************************************************* DROP TABLE VIDA.COLLEGES; COMMIT; -- -- DROP TABLE VIDA.DEGREES; COMMIT; -- -- DROP TABLE VIDA.DEPARTMENTS; COMMIT; -- -- DROP TABLE VIDA.EMPLOYEES; COMMIT; -- -- DROP TABLE VIDA.JOB_HISTORY; COMMIT; -- -- (continued on next page) Copy of Gateway for DB2 Server Install STEP4A Through STEP4G F-21 Example F-7 (Cont.) SQL Command Stream Used in Gateway for DB2 Server Install Job STEP4G -- DROP TABLE VIDA.JOBS; COMMIT; -- -- DROP TABLE VIDA.SALARY_HISTORY; COMMIT; -- -- DROP TABLE VIDA.WORK_STATUS; COMMIT; -- -- DROP TABLESPACE PERSONNL.PERSONNL; COMMIT; -- -- DROP DATABASE PERSONNL; COMMIT; -- -- DROP STOGROUP VIDA; COMMIT; -- -- F-22 Copy of Gateway for DB2 Server Install STEP4A Through STEP4G G ________________________________________________________________ How to Order Additional Documentation Technical Support If you need help deciding which documentation best meets your needs, call 800-DIGITAL (800-344-4825) and press 2 for technical assistance. Electronic Orders If you wish to place an order through your account at the Electronic Store, dial 800-234-1998, using a modem set to 2400- or 9600-baud. You must be using a VT terminal or terminal emulator set at 8 bits, no parity. If you need assistance using the Electronic Store, call 800-DIGITAL (800-344-4825) and ask for an Electronic Store specialist. Telephone and Direct Mail Orders __________________________________________________________ From__________Call______________Write_____________________ U.S.A. DECdirect Digital Equipment Phone: 800- Corporation DIGITAL P.O. Box CS2008 (800-344-4825) Nashua, New Hampshire FAX: (603) 884- 03061 5597 Puerto Rico Phone: (809) Digital Equipment 781-0505 Caribbean, Inc. FAX: (809) 749- 3 Digital Plaza, 1st 8377 Street Suite 200 Metro Office Park San Juan, Puerto Rico 00920 How to Order Additional Documentation G-1 __________________________________________________________ From__________Call______________Write_____________________ Canada Phone: 800-267- Digital Equipment of 6215 Canada Ltd. FAX: (613) 592- 100 Herzberg Road 1946 Kanata, Ontario, Canada K2K 2A6 Attn: DECdirect Sales International -- Local Digital subsidiary or approved distributor Internal DTN: 264-3030 U.S. Software Supply Orders[1] (603) 884-3030 Business (SSB) (for Digital Equipment software Corporation and hardware 10 Cotton Road documentation) Nashua, New Hampshire 03063-1260 [1]Call_to_request_an_Internal_Software_Order_Form_(EN-___ 01740-07).________________________________________________ G-2 How to Order Additional Documentation ________________________________________________________________ Index A__________________________ B__________________________ ACF2, 5-4 BINDADD authorization, ACF/VTAM, 1-2 2-26 Application packages Binding packages See Packages maintaining consistency, Application plans 3-7 See Plans METAPLN, 2-26 Assembler H, 1-2 READCS, 2-26 ATTACHSEC(IDENTIFY), 5-5 READRR, 2-26 ATTACHSEC(VERIFY), 5-5 write packages, 2-28 Attach-time security, 5-2 Binding plans value specified in LU 6.2 for gateway for DB2 terminal, 5-4 server, 3-7 Authorization ID maintaining consistency, See also DB2 2-19, 2-27 authorization ID Bind-time security, 5-1 specifying in RCT, 2-39 password, 5-1 Authorize C access to DB2 plans, 5-7 ___________________________ access to DB2 tables, 4-2 Catalog table access to tables, 1-3 See DB2, catalog tables CICS user IDs, 1-4 CICS, 2-2 data required by gateway ACF2 security package, for DB2 client users, 5-4 1-4 attach-time security, 5-2 DB2 authorization IDs, authorizing user IDs and 1-4 passwords to, 4-2 new users, 4-2 bind-time security, 5-1 passwords to CICS, 4-2 CICS/ESA, 1-2 user IDs to CICS, 4-2 CICS/MVS, 1-2 Index-1 CICS (cont'd) Customizing system CICS application program, parameters, 2-21 1-1 Customizing views, 4-1 defining load modules, 2-35 D__________________________ defining resources to, Data access path, 1-4 2-30, 2-34 Data sets defining terminals, 2-32, planning space allocation 2-36 for, 2-6 Gateway for DB2 server, DB2, 1-2 1-1 accessing plans, 5-7 journal, 2-41 access to, 3-1, 4-2 logging facility, 2-41 authorization ID, 1-4, modifying entries, 2-34 5-5 modifying table entries, catalog tables, 3-1, 3-8 2-30 CICS/OS/VS attachment security, 5-1 facility, 1-2 setting RTIMOUT, 2-32, CREATE statements, F-8 2-36 creating metadata views, sign-on table, 5-3 2-19 user IDs, 1-4 limiting accessing CICS definitions objects, 5-8 checking, 2-6 PERSONNL, 2-44 Collection-id security, 5-5 selection of name, 4-7 system library data set Consistency names, 2-10 when binding plan and DBRMs packages, 2-19, 3-7 used for installation, when binding plans, 2-27, 4-3 3-7 DDDEF statements, 2-16 when creating views, 2-21 DEC2 Controlling read-only RCT, 2-39 access, 2-24, 4-7 DEC SNA gateway Controlling write access, NCP entry, 2-5 2-24, 4-7 VTAM entry, 2-5 Cursor stability DFHSNT, 5-3 as bind option, 2-26 Distribution libraries, Customize 2-9 See also Naming, Views planning space allocation environment, 2-18 for, 2-6 views, 3-1 Index-2 E__________________________ I__________________________ Environment, customizing, INPUT.COLLEGES, A-2 2-18 INPUT.DEGREES, A-2 Execute authority, 2-29 INPUT.DEPTS, A-2 controlling on DB2 plans, INPUT.EMPLOYEE, A-2 5-7 INPUT.JOBHIST, A-2 INPUT.JOBS, A-2 F__________________________ INPUT.SALHIST, A-2 Flowcharts INPUT.WORKSTAT, A-2 for use with installation Installation customizing gateway for steps 2A through 2I, DB2 server, 2-18 2-12 customizing views, 3-1 for use with installation planning for, 1-1 steps 3A through 3K, read-only server, 2-24 2-18 sample tape, A-1 for use with installation SMP/E data sets, 2-7 steps 4A through 4G, target libraries, 2-8 2-42 verifying, F-8 overview of installation Installation data set steps, 2-1 creating, 2-12 modifying data set G__________________________ members, 2-19 Gateway for DB2 client Installation recommenda- in relation to Gateway tions, 2-2 for DB2 server, 1-1 Installation tape Gateway for DB2 server, checking, 2-6 1-1 format for, 2-6 changing run-time options J , 2-22, 4-1 ___________________________ customizing views, 3-1 JCL in relation for Gateway data set names worksheet, for DB2 client, 1-1 B-1 installation sample, A-1 for allocating target and to A-4 distribution libraries, read-only access, 5-6 2-15 for installation data set, 2-12 strings worksheet, 2-19, C-1 used to install PERSONNL database, F-1 Index-3 JCT, 2-34 METAPLN Job control language binding, 2-26 See JCL granting execute Journal Control Table authority to, 2-29 See JCT METQUERY, 2-34 considerations with view K names, 2-21 ___________________________ modifying view names, 3-6 KWIKSTP2 Migration JCL install job, D-28 to new server software, 1-6 L__________________________ MVS/XA, 1-2 Link-edit procedure, 2-25 N when modifying view names ___________________________ , 3-7 Naming Load modules, 2-25 in PERSONNL table defining to CICS, 2-35 privileges, 2-43 in PPT, 2-30 in views, 3-1 LOAD utility, with PERSONNL when creating views, 2-19 tables, 2-44 when customizing views, Logging, 2-34 3-5 Logging facility, with SYNONYMS, 2-43 initializing journal, New users 2-41 authorizing, 4-2 Logon Mode Table See VTAM Logon Mode Table O__________________________ entry Operating system LU 6.2 verifying, 2-2 security enforcement, 5-1 Operations, 4-1 with ACF2, 5-4 authorizing new users, LU 6.2 terminals 4-2 in RDO, 2-36 changing view definitions in TCT, 2-32 , 4-1 maintaining packages, 4-3 M__________________________ Overview of software, 1-1 Maintenance P See Operations ___________________________ Metadata Packages modifying view names, authorizing access, 4-2 2-21 binding, 2-26 retrieving through views, granting execute 3-1 authority, 2-29 maintaining, 4-3 Index-4 PCT, 2-31 PERSONNL R__________________________ creating sample database, RACF 2-41 to 2-44 profile, 5-4 DB2 CREATE statements, with LU 6.2, 5-4 F-8 RCT, 2-39 deleting environment, DB2 security 2-44 considerations, 5-5 files used for loading, specifying authorization A-2 ID, 2-39 granting table privileges RDO to, 2-43 defining load modules, re-creating sample 2-34 environment, 2-43 READCS verifying installation, binding, 2-26 F-8 granting execute Plan authority to, 2-29 authorizing access, 4-2 Read-only access binding, 2-26, 3-7 controlling, 2-24, 4-7 function of, 4-6 READRR granting execute binding, 2-26 authority, 2-29 granting execute maintaining owner authority to, 2-29 consistency, 3-7 Read/write access, 5-6 selection of, 4-4 RELFILE data sets, A-1 PPT, 2-30 Repeatable read Prerequisite software as bind option, 2-26 verifying, 2-2 Resource Control Table Privileges See RCT granting on application Resource Definition Online plan and packages, See RDO 2-29 Run-time options granting on PERSONNL changing, 2-22, 4-1 tables, 2-43 DB2INFO, 2-23 Program Control Table VIDAJOUR, 2-24 See PCT WRITEFLG, 2-24, 5-6 Program directory, A-2 reviewing, 2-14 S__________________________ space requirement Security, 5-1 information, 2-7 ACF2 security package, Program Properties Table 5-4 See PPT ATTACHSEC(IDENTIFY), 5-5 ATTACHSEC(VERIFY), 5-5 Index-5 Security (cont'd) SMPVIDA PROC, creating, attach-time, 5-2 2-15 bind-time, 5-1 Space allocation CICS default, 5-3 for data sets, 2-6 controlling read/write Standards, site specific, access, 5-6 2-25 DDL operations, 5-9 STEP1A, 2-2 default access to DB2 STEP1B, 2-3 packages, 5-7 STEP1C, 2-5 DML operations, 5-8 STEP1D, 2-6 implementing, 5-3 STEP1E, 2-6 in PCT table, 2-31 STEP1F, 2-6 in transactions, 2-31 STEP1G, 2-10 limiting access to DB2 STEP2A, 2-12 objects, 5-8 STEP2B, 2-14 limiting access to DB2 STEP2C, 2-15 plans, 5-7 JCL install job, D-2 limiting capabilities of STEP2D, 2-15 gateway for DB2 server, JCL install job, D-6 5-6 STEP2E, 2-15 migrating to read/write JCL install job, D-18 server, 5-8 STEP2F, 2-16 RACF security package, JCL install job, D-20 STEP2G, 2-17 5-4 JCL install job, D-22 read-only access, 5-6 STEP2H, 2-17 SELECT operation, 5-9 JCL install job, D-24 with DB2, 5-5 STEP2I, 2-17 within CICS JCL install job, D-26 intercommunication STEP2J environment, 5-1 JCL install job, D-27 SMP/E, 1-2 STEP3A, 2-19 ACCEPT, 2-17 JCL install job, E-2 allocating and defining, migration notes, 2-19 2-15 modifying view names, 3-6 APPLY, 2-17 STEP3B, 2-21 data sets, 2-6 JCL install job, E-7 DDDEF statements, 2-16 migration notes, 2-21 initializing environment, modifying view names, 3-6 2-16 STEP3C, 2-22 RECEIVE, 2-17 JCL install job, E-10 SMPMCS file, A-1 migration notes, 2-25 SMP RELFILE format, A-1 STEP3D, 2-25 JCL install job, E-12 migration notes, 2-25 Index-6 STEP3D (cont'd) STEP4G, 2-44 modifying view names, 3-7 JCL install job, F-21 VIDASERVE and VIDAPLEX, Synonyms 2-25 creating, 2-19 STEP3E, 2-25 for the DB2 metadata migration notes, 2-26 views, 2-19 modifying view names, 3-7 for the PERSONNL tables, STEP3F, 2-26 2-43 JCL install job, E-15 when required by bind, migration notes, 2-28 3-8 modifying view names, 3-7 System administrator, 1-4 STEP3G System names JCL install job, E-18 changing, 2-22 migration notes, 2-29 modifying view names, 3-7 T__________________________ STEP3H Target libraries, 2-8, 2-9 granting execute allocating, 2-15 authority, 2-29 planning space allocation JCL install job, E-21 for, 2-6 STEP3IA TCT, 2-32, 2-36 JCL install job, E-22 Terminal Control Table modifying CICS table entries, 2-30 See TCT STEP3IB Terminal definitions, 5-2 JCL install job, E-23 Timeouts, 2-31, 2-36 modifying CICS entries, Transaction 2-34 definitions, 5-2 STEP3J, 2-39 names, 2-31, 2-35 JCL install job, E-25 security, 2-31 STEP3K, 2-40 Transaction definitions, JCL install job, E-26 5-4 STEP4A, 2-42 Transactions, authorizing JCL install job, F-2 access to, 4-2 STEP4B, 2-43 TRANSEC parameter, 2-31 JCL install job, F-6 TSO, 1-3 STEP4C, 2-43 JCL install job, F-8 U__________________________ STEP4D, 2-43 User IDs, 4-2 JCL install job, F-14 User interface, 1-2 STEP4E, 2-43 JCL install job, F-15 STEP4F, 2-44 JCL install job, F-16 Index-7 granting select V__________________________ privileges on, 2-19 VIDAJOUR, 2-34 maintaining consistency VIDA user ID, 2-2, 2-20, when creating, 2-21 3-5 modifying names, 3-6 VIDDDBRM distribution supplied with gateway for library, A-1 DB2 server, 3-2 VIDDOBJ distribution VIDA.INDEXES, 3-1 library, A-1 VIDA.RELATION_FIELDS, 3-1 VIDDSRCE distribution VIDA.SYNONYMS, 3-1 library, A-1 VTAM Logon Mode Table entry VIDTDBRM target library, , 2-3 A-1 W VIDTSRCE target library, ___________________________ A-1 Write access View definitions, changing, controlling, 2-24, 4-7, 4-1 5-6 View names, 3-6 Write packages Views binding, 2-28 changing definitions, 4-1 creating, 2-19 Z__________________________ customized sample, 3-10 ZLASTSTP customizing, 3-1 SMP/E zone merge, D-34 Index-8