AOCDDL 샘플 JCL 작업은 SMP/E 테이프 설치를 수행할 때 DB2 서브시스템에 추출됩니다. 클라이언트 시스템에서 클라이언트 설치 디렉토리의 \serverconfig\ZOS\z/OS_version_number_and_mode 서브디렉토리에서도 이 샘플 작업을 찾을 수 있습니다.
다음 6개 버전의 AOCDDL 샘플 작업을 사용할 수 있습니다.
서브시스템 | JCL 작업 파일 |
---|---|
z/OS용 DB2 버전 10 새 기능 모드 | AOCDDL10 |
버전 9에서 z/OS용 DB2 버전 10 변환 모드 | AOCDDLX9 |
버전 8에서 z/OS용 DB2 버전 10 변환 모드 | AOCDDLX8 |
z/OS용 DB2 버전 9.1 | AOCDDL9 |
z/OS용 DB2 버전 8 새 기능 모드 | AOCDDL8N |
z/OS용 DB2 버전 8 호환성 모드 | AOCDDL8C |
다음 예는 z/OS용 DB2 버전 9.1 서브시스템의 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. //*