Example using independently coded High-speed Apply JCL

The following figure shows independently coded JCL for a separate High-speed Apply job that executes the SQL statements that are contained in a specific file.

This example:

  • Includes three tables

  • Shows the use of High-speed Apply to translate the table names during execution, instead of during generation with the SQLXLAT DD statement (parameters in the /ObjectMap/ section)

  • Shows the use of a High-speed Apply parameter to enable multi-threaded execution (in the /Agent/ section)

    For more information, see "To generate High-speed Apply JCL" in Example 1: Using the online interface to generate High-speed Apply JCL.

  • Shows the use of High-speed Apply parameters to enable restart processing (in the /Restart/ section)

    If your operating system or database environment fails during SQL execution, you can continue running High-speed Apply from the point of the failure, instead of from the start of the input file. This feature prevents the product from repeating transactions that have already been processed. To use this feature, you must create a restart table within Db2, and define the restart table within your High-speed Apply configuration. For more information about restart tables, see the section about restart and recovery in the High-speed Apply Engine documentation Open link .

//**********************************************************************
//*     BMC AMI Log Master for Db2 V12.01.00
//*     DSN: 'DB2DBA.JCL.EXSQL(ESQL$E5)'
//*     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
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.01.00
//*     DSN: 'DB2DBA.JCL.EXSQL(ESQL$E6)'
//*     GENERATED BY USER: DB2DBA3
//**********************************************************************
//*              >>>>> EXECUTE MIGRATE SQL <<<<<
//**********************************************************************
//EXESQL1   EXEC PGM=APTBMAIN,PARM='SSID=DGA1',REGION=0M
//STEPLIB	DD DISP=SHR,DSN=product.libraries
//			DD DISP=SHR,DSN=DB2.DSNEXIT
//			DD DISP=SHR,DSN=DB2.DSNLOAD
//APTERR    DD SYSOUT=*
//APTPRINT  DD SYSOUT=*
//SYSOUT    DD SYSOUT=*
//SYSPRINT  DD SYSOUT=*
//SYSMDUMP  DD DSN=DB2DBA.DEV.APPLY.SYSMDUMP,
//             DISP=(NEW,CATLG,CATLG),
//             UNIT=(SYSALLDA,3),SPACE=(CYL,(50,25),RLSE)
//SYSTERM   DD SYSOUT=*
//SYSERR    DD SYSOUT=*
//SYSIN     DD *,DLM=##

/StartUp/
InputType=SQL
FileName=DB2DBA.DEV.OUTSQ1

/Restart/
RestartType=New/Restart
RestartID=DB2DBA

/Agent/
MaxAgents=5

/ObjectMap/
SourceTable=DB2DBADB.DB2DBAT1
TargetTable=DB2DBADB.MIGSQLT1

SourceTable=DB2DBADB.DB2DBAT3
TargetTable=DB2DBADB.MIGSQLT3

SourceTable=DB2DBADB.DB2DBAT5
TargetTable=DB2DBADB.MIGSQLT5
##
//*


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

Example figure

Method

Differences

The figure in Examples using JCL for EXECSQL

EXECSQL

  • To translate table names, the EXECSQL example includes the Log Master SQLXLAT DD statement, instead of High-speed Apply object mapping parameters.

  • This method does not support:

    • Multi-threaded execution of SQL statements

    • Restart capability

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

Generated High-speed Apply JCL

This method does not support restart capability.

Related topic

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

Comments