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.

Example 2: High-speed Apply JCL generated by the online interface

The following figure includes the JCL of a separate High-speed Apply job that was generated from the Log Master online interface.

This example:

  • Includes three tables

  • Contains one job that generates SQL statements (for migrating data to a set of parallel tables)

  • Includes a separate High-speed Apply job that executes the SQL against the target tables. The High-speed Apply job uses configuration parameters to:

    • Translate the table names during execution (/OBJECTMAP/ section)

    • Enable multi-threaded execution of the SQL statements (/AGENT/ section)

//**********************************************************************
//*     BMC AMI Log Master for Db2
//*     DSN: 'DB2DBA.JCL.EXSQL(ESQL$E3)'
//*     GENERATED BY USER: DB2DBA3
//**********************************************************************
//*              >>>>> GENERATE MIGRATE SQL <<<<<
//**********************************************************************
//MIGSQL1   EXEC PGM=ALPMAIN,
//          PARM='DGA1,,MSGLEVEL(2),ALPOPTS(ALP$OPTS)',REGION=0M
//STEPLIB	DD DISP=SHR,DSN=product.libraries
//			DD DISP=SHR,DSN=DB2.DSNEXIT
//			DD DISP=SHR,DSN=DB2.DSNLOAD
//ALPPRINT  DD   SYSOUT=*
//SYSOUT    DD   SYSOUT=*
//ALPDUMP	DD   SYSOUT=*
//SYSUDUMP  DD   SYSOUT=*
//SYSIN     DD *,DLM=##
 /* DB2DBA.$$WORKID0001                                      */
 /* DB2DBA 2020-08-18 GENERATE MIGRATE SQL                   */
  OPTION
     FILTERREL AND EXECUTION MODE CURRENT
     DATEFMT ISO
  WORKID DB2DBA.$$WORKID0001
     DESC 'DB2DBA GENERATE MIGRATE SQL'
LOGSCAN
     SQL MIGRATE DATASET
            DB2DBA.DEV.OUTSQ1 SHR
         TEMPLATE
            DB2DBA.DEV.OUTSQTE1 SHR
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;FROM  DATE(08/18/2020) TIME(10.32.05.000000)
     TO    DATE(08/18/2020) TIME(10:35:15.000000)
     WHERE
        TABLE NAME IN (DB2DBADB.DB2DBAT1,
                       DB2DBADB.DB2DBAT3,
                       DB2DBADB.DB2DBAT5)
##
//**********************************************************************
//*                                                                     
//*               High-speed Apply V12.1.00
//*                                                                     
//*     DSN: 'DB2DBA.DEV.JCLEXSQL(OUTPUT01)'                            
//*                                                                     
//*     GENERATED BY USER: DB2DBA3                                      
//**********************************************************************
//* EXECUTE High-speed APPLY STEP
//**********************************************************************
//*                                                                     
//APPLYPLS EXEC PGM=APTBMAIN,                                           
//            PARM='CFN=SYSIN',                                         
//            REGION=0M                                                 
//STEPLIB	DD DISP=SHR,DSN=product.libraries
//			DD DISP=SHR,DSN=DB2.DSNEXIT
//			DD DISP=SHR,DSN=DB2.DSNLOAD
//APTPRINT  DD SYSOUT=*                                                 
//APTLOG    DD SYSOUT=*,LRECL=550,RECFM=VB                              
//SYSPRINT  DD SYSOUT=*                                                 
//SYSOUT    DD SYSOUT=*                                                 
//APTERR    DD SYSOUT=*,LRECL=200                                       
//SYSTERM   DD SYSOUT=*                                                 
//SYSUDUMP  DD SYSOUT=*                                                 
//SYSIN     DD *,DLM=##                                                 
                                                                        
/STARTUP/                                                               
	FILENAME=DB2DBA.DEV.OUTSQ1                                            
	INPUTTYPE=SQL 
	SSID=DGA2          
	Default values omitted
/AGENT/                                                    
  MAXAGENTS=5 
	Default values omitted
/OBJECTMAP/                                                             
  SOURCETABLE=DB2DBA.DB2DBAT1                                           
  TARGETTABLE=DB2DBA.MIGSQLT1                                           
  SOURCETABLE=DB2DBA.DB2DBAT3                                           
  TARGETTABLE=DB2DBA.MIGSQLT3                                          
  SOURCETABLE=DB2DBA.DB2DBAT5                                          
  TARGETTABLE=DB2DBA.MIGSQLT5                                          
##

The following table compares this example using the generated High-speed Apply JCL method with examples that perform the same basic tasks using other methods.

Example figure

Method

Differences

JCL sample in Examples using JCL for EXECSQL

EXECSQL

  • To translate table names, the EXECSQL example includes the Log Master SQLXLAT DD statement (to translate table names during SQL generation), instead of High-speed Apply object mapping parameters (which translate during SQL execution).

  • EXECSQL does not support multi-threaded execution of SQL statements (multiple agents).

JCL sample in Example using independently coded High-speed Apply JCL

Independently coded High-speed Apply JCL

This example includes restart capability, which generated High-speed Apply JCL does not support.

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

Comments