Space announcements

   

This space provides the same content as before, but the organization of the home page has changed. The content is now organized based on logical branches instead of legacy book titles. We hope that the new structure will help you quickly find the content that you need.

Building Log Master jobs

To build a job that uses Log Master for DB2, you must create the appropriate job control language (JCL) statements.

You can use either of the following methods to create the JCL:

  • Use the Log Master online interface to create the JCL.

    If you have limited experience with Log Master or JCL, you can use the online interface to complete the steps needed to create the appropriate JCL for the tasks that you want to accomplish. For information about using the Log Master online interface, see the Log Master User Guide .

    Use the online interface when you first create a special type of Log Master job that contains an ongoing log scan. The online interface assigns an ongoing handle ID and updates the Log Master Repository with important information. For more information about ongoing jobs, see Ongoing log scans.

  • Create your own JCL.

    If you are comfortable creating your own JCL, you can bypass the online interface. For example, you might prefer to edit the JCL of an existing Log Master job. However, even if you are experienced with JCL, you might use the online interface to generate JCL for a task that you have not performed before. This section summarizes the process of using the batch syntax to run Log Master jobs.

To build a Log Master job, create JCL with the following elements:

  • A JOB statement

  • An EXEC statement that includes Log Master parameters

    For information on the parameters of the EXEC statement, see Specifying the EXEC statement.

  • Data definition (DD) statements to specify the following required and optional data sets:

    • Log Master load libraries, for example HLQ.DBLINK, HLQ.XXLINK, HLQ.BBLINK, where HLQ is a qualifier that your environment assigns during installation.

    • DB2 load library that Log Master uses

    • ALPPRINT output data set to contain product messages

    • SYSOUT output data set to contain task-level messages

    • (optional) ALPDUMP and SYSUDUMP/SYSMDUMP output data sets to contain diagnostic and troubleshooting information

    • (optional) sort work data sets to enable sorting

      Declare these data sets if dynamic allocation of sort work data sets is not appropriate for your environment.

  • SYSIN input that contains the Log Master statements and keywords

The following figure shows sample JCL for a basic Log Master job.

//ALPUSER  JOB(0000),'LOGSCAN'
//*************************************************************
//*    LOG MASTER FOR DB2 V10.1.00 
//*    DSN: 'ALPUSER.JCL(WKMIGR)' 
//* 
//*    GENERATED BY USER: ALPUSER 
//*                      ON DATE: 2010/12/18 
//*                      AT TIME: 13:49 
//*************************************************************
//LOGMSTR EXEC PGM=ALPMAIN,
//        PARM='DBAT', 
//        REGION=0M 
//STEPLIB DD DISP=SHR,DSN=product.libraries
//        DD DISP=SHR,DSN=DB2.DSNEXIT
//        DD DISP=SHR,DSN=DB2.DSNLOAD
//ALPPRINT DD  SYSOUT=* 
//SQLPRINT DD  SYSOUT=* 
//SYSOUT   DD  SYSOUT=* 
//ALPDUMP  DD  SYSOUT=* 
//SYSTERM  DD  SYSOUT=* 
//SYSUDUMP DD  SYSOUT=* 
//SYSIN    DD  *,DLM=## 
    /* ALPUSER.$$WORKID0009                                  */
    /* LOGSCAN MIGR SQL                                      */
  OPTION 
 FILTERREL AND EXECUTION MODE CURRENT 

 WORKID ALPUSER.$$WORKID0009 
   DESC 'LOGSCAN - MIGRATE SQL' 

 LOGSCAN 
   SQL 
    MIGRATE 
      DATASET &SYSUID..D&DATE..T&TIME..MIGRATE.SQL NEW 
        CYLINDERS SPACE(1,1) UNIT(SYSDA) RELEASE
      TEMPLATE &SYSUID..D&DATE..T&TIME..MIGRATE.TEMPLATE NEW
        CYLINDERS SPACE(1,1) UNIT(SYSDA) RELEASE 
      INCLUDE RI NO 
    DB2CATALOG NO 
    FROM  DATE(2010-12-16) TIME(12.19.57.000000) 
    TO  DATE(2010-12-18) TIME(13.17.57.000000) 
    WHERE 
      TABLE NAME = USERDB.USERTB01 
## 
//SQLCODES DD DUMMY



Was this page helpful? Yes No Submitting... Thank you

Comments