AOCDDL サンプル JCL ジョブは、SMP/E テープ・インストールを実行するときに DB2 サブシステムに抽出されます。このサンプル・ジョブは、クライアント・システム上のクライアント用のインストール・ディレクトリーの ¥serverconfig¥ZOS¥z/OS_version_number_and_mode サブディレクトリーから見つけることもできます。
以下の 6 つのバージョンの AOCDDL サンプル・ジョブが使用可能です。
サブシステム | JCL ジョブ・ファイル |
---|---|
DB2 Version 10 for z/OS (新機能モード) | AOCDDL10 |
DB2 Version 10 for z/OS (バージョン 9 からの移行モード) | AOCDDLX9 |
DB2 Version 10 for z/OS (バージョン 8 からの移行モード) | AOCDDLX8 |
DB2 Version 9.1 for z/OS | AOCDDL9 |
DB2 for z/OS バージョン 8 (新機能モード) | AOCDDL8N |
DB2 for z/OS バージョン 8 (互換モード) | AOCDDL8C |
以下の例は、DB2 Version 9.1 for z/OS サブシステム用の AOCDDL サンプル・ジョブのプロローグを示したものです。
//********************************************************************* //* Name = AOCDDL //* //* Descriptive Name = //* DB2 Installation Job Stream //* //* Licensed Materials - Property of IBM //* 5655-V81 //* COPYRIGHT 2010 IBM Corp. All Rights Reserved. //* //* STATUS = Version 9 //* //* Function = Create objects required by the IBM Optim Query //* Tuner (QT) //* //* Pseudocode = //* AOCICU Step Drop the QT routines, database, //* and stogroup (optional) //* AOCIAS Step Create the QT stogroups and databases //* AOCEXP Step Create sample explain objects for a specific //* user (default is SYSADM). To modify perform //* a change all from SYSADM to desired ID. //* This step has two LOB tablespaces, //* AOCULTS1 and AOCULTS2 //* which must be unique per user. Modify the //* name to insure uniqueness. //* AOCAPCSA Step Create QT SA profile objects and //* Plan Comparision objects //* AOCTPRO Step Create the OQT profile objects //* AOCWCC Step Create QT WCC objects //* AOCWSA Step Create QT WSA objects //* AOCWIA Step Create QT WIA objects //* AOCWQA Step Cretae QT WQA objects //* AOCBIND Step Bind QT packages //* AOCTJRT Step Create the LE environment options data set for //* the WLM environment used to execute stored //* procedure SYSPROC.OPT_EXECUTE_TASK //* AOCGRT Step Grant access on objects created by this job, //* add grant package //* //* //* Dependencies = //* //* Notes = //* PRIOR TO RUNNING THIS JOB, customize it for your system: //* (1) Add a valid job card //* (2) Locate and change all occurrences of the following strings //* as indicated: //* (A) The subsystem name '!DSN!' to the name of your DB2 //* (B) 'DSNTIA!!' to the plan name for DSNTIAD on your DB2 //* (C) 'DSNC!!0' to the VCAT for the QT table spaces //* (D) '!DSNV01!' to the volume serial id for QT database //* (E) 'DSN!!0' to the prefix of the target library for DB2 //* (F) '!AOCPREFX!' to the prefix of target library for QT //* (G) '!USERID!' to the USER ID which grant authorization to packages. //* (3) Review and optionally update buffer pool settings in the //* CREATE DATABASE and TABLESPACE statements processed by //* this job. //* (4) Review and optionally update the WLM environment names //* specified in the CREATE PROCEDURE statements processed //* by job steps AOCBIND. //* (5) In job step AOCTJRT, review and optionally update the name //* of the data set having the LE environment options for //* stored procedures SYSPROC.OPT_EXECUTE_TASK and. //* This data set needs to be allocated //* by the JAVAENV DD of the address space proc for the WLM //* environment for executing SYSPROC.OPT_EXECUTE_TASK. //* See further below for an example of //* the address space proc and how to customize it for your site. //* Also in the AOCTJRT step review and optionally update the //* following java paths: //* (a) CLASSPATH is the path where the java stored //* procedure JAR file is located. //* Example: /usr/lpp/db2910_base/classes/ //* (b) JCC_HOME is the path where the jcc driver is //* located. //* Example: /usr/lpp/db2910_jdbc //* (c) JAVA_HOME is the path where the JDK is located. //* Example: /usr/lpp/java140/J1.4 //* (6) In job step AOCGRT, review and optionally update the GRANT //* statements to conform to the authorization policy enforced //* at your site. Special considerations: //* - In the the GRANT EXCECUTE statement for SYSPROC.OPT_RUNSQL, //* change !GRANTEE! to one or more authorization IDs that //* need to use stored procedures to snap all statements //* in the dynamic statement cache and to capture workloads //* from dynamic statement cache. //* //* Following is an example JCL proc for the address space of the //* WLM environment needed to execute stored procedures //* SYSPROC.OPT_EXECUTE_TASK: //* //* //procName PROC DB2SSN=ssnm,NUMTCB=1,APPLENV=wlmEnvName //* //TCBNUM1 EXEC PGM=DSNX9WLM,TIME=1440, //* // PARM='&DB2SSN,&NUMTCB,&APPLENV', //* // REGION=0M //* //STEPLIB DD DISP=SHR,DSN=ceepre.SCEERUN <- LE runtime lib //* // DD DISP=SHR,DSN=dsnpre.SDSNEXIT <- DB2 exit lib //* // DD DISP=SHR,DSN=dsnpre.SDSNLOAD <- DB2 runtime lib //* // DD DISP=SHR,DSN=dsnpre.SDSNLOD2 <- JDBC/SQLJ DLL lib //* //JAVAENV DD DISP=SHR,DSN=prefix.JSPENV <- JSP runtime opts //* //JSPDEBUG DD SYSOUT=A <- debugging output //* //CEEDUMP DD SYSOUT=A <- LE dump output //* //SYSPRINT DD SYSOUT=A <- diagnostics //* //JAVAOUT DD pathname <- output file path //* //JAVAERR DD pathname <- error file path //* //* where: //* - wlmEnvName is the name of the WLM environment for executing //* SYSPROC.OPT_EXECUTE_TASK //* - procName is the procedure name associated with the WLM env. //* - ssnm is the DB2 subsystem name //* - NUMTCB must be set to 1 //* - ceepre is the prefix of the IBM Language Environment (LE) //* runtime library. //* - dsnpre is the prefix of your DB2 for z/OS runtime libraries //* - prefix.JSPENV specifies the data set containing the LE runtime //* options for executing stored procedures SYSPROC.OPT_EXECUTE_- //* TASK. This data set is created by job //* step AOCGRT. For more information about the JAVAENV DD, see //* the DB2 for z/OS Application Programming Guide and Reference //* for Java manual. //* - Both JAVAOUT and JAVAERR specify a path for output files for //* Java stored procedures. You can specify any location that //* is available where DB2 has authority to write to the output //* files and a DB2 user can read from these output files. Use //* the Unix System Services command //* chmod -R +rw pathname //* to add the required write privileges. //*