Example JCL

Example: Load the accelerator with data from another Db2® subsystem

The following sample syntax shows control cards to load only the accelerator with data from another Db2 subsystem. In the example, hlvid represents the name of the Accelerator Loader server started task that was customized by using Tools Customizer.
EXEC SQL 
     DECLARE HLOCSR CURSOR FOR 
     SELECT * FROM DSNC810.SOURCE_DB2_TABLE 
ENDEXEC 


LOAD DATA REPLACE 
     IDAA_ONLY ON UB1AACC1 
     LOG NO NOCOPYPEND
     ENFORCE NO   
     ACCEL_CURSOR HLOCSR 
     ACCEL_SOURCE_DB2 RA1B 
     ACCEL_HLV_SSID hlvid 
     ACCEL_REMOVE_AND_ADD_TABLES
     ACCEL_ON_SUCCESS_ENABLE YES
     ACCEL_LOAD_TASKS 1
INTO TABLE DSNC810.TARGET_DB2_TABLE 
The sample syntax is converted to the following Db2 LOAD statement:
LOAD DATA
     INDDN HLOREC
     REPLACE 
     FORMAT INTERNAL
     INTO TABLE DSNC810.TARGET_DB2_TABLE

Example: Load the accelerator with data from a remote system

The following sample syntax shows control cards to load only the accelerator with source data from a remote Accelerator Loader server.
 LOAD DATA
      IDAA_ONLY ON RDSBACC1
      REPLACE
      LOG NO NOCOPYPEND
      ENFORCE NO
      ACCEL_CURSOR HLVCSR
      ACCEL_HLV_SSID HLVS
      ACCEL_DATA_SERVER HSZ3
      ACCEL_REMOVE_AND_ADD_TABLES
      ACCEL_ON_SUCCESS_ENABLE YES
      ACCEL_LOAD_TASKS 1
      INTO TABLE "DSNC810"."RemoteLoad"
/*

Example: Load the accelerator with data using Virtual Parallel Data (VPD)

Virtual Parallel Data (VPD) allows you to group multiple simultaneous requests against the same data source and run them in parallel, while performing the input and output (I/O) only once. A separate Accelerator Loader job must be generated and submitted for each request, and these jobs must be run concurrently. When parallelism is used, each parallel thread joins the group separately and must join the group within a specified timeout value. Threads that do not appear within the timeout time are placed in a new group, resulting in an additional read of the data set.

To use Virtual Parallel Data (VPD) when loading data to the accelerator, use the following Accelerator Loader syntax options:
  • ACCEL_HLV_VPD_GROUP
  • ACCEL_HLV_VPD_MEMBERS
  • ACCEL_HLV_VPD_TIMEOUT
  • ACCEL_HLV_VPD_IOT
As an example, to process three different SMF record types in one pass through a data set, submit three Accelerator Loader jobs, one for each record type. The following sample control cards include the VPD syntax options for this example, which would need to be included in each of the jobs:

EXEC SQL DECLARE HLVCSR CURSOR FOR
  SELECT * FROM SMF_01400
ENDEXEC

LOAD DATA
    IDAA_ONLY ON DB9AACC1
    REPLACE
    LOG NO NOCOPYPEND
    ENFORCE NO
    ACCEL_CURSOR HLVCSR
    ACCEL_HLV_SSID HLV9
    ACCEL_HLV_VPD_GROUP TESTVPD
    ACCEL_HLV_VPD_MEMBERS 3
    ACCEL_HLV_VPD_TIMEOUT 300
    ACCEL_REMOVE_AND_ADD_TABLES
    ACCEL_ON_SUCCESS_ENABLE YES
    ACCEL_LOAD_TASKS 1
    INTO TABLE "DSNC810"."SMF_01400"
Note: ACCEL_HLV_VPD_IOT is an optional parameter. Because this parameter is not included in the example, the default value will be used.

Submit the jobs to run concurrently. If one of the jobs fails to join the group within the specified timeout value, the other two jobs would proceed and the third job would be placed in a new group, resulting in an additional read of the data set.

For more information about using VPD, see Generating JCL and Virtual Parallel Data.

Example: Load the accelerator and Db2 with data from a virtualized data source

The following figure contains example JCL to load both the accelerator and Db2 with source data from a virtualized data source using the Accelerator Loader server.
//HLOD0100 EXEC PGM=DSNUTILB,
//         REGION=1024M,
//         PARM=('QAA5','USER01.LOAD')
//STEPLIB  DD DISP=SHR,DSN=QDS5.SDSNEXIT
//         DD DISP=SHR,DSN=DSN.VA10.SDSNLOAD
//HLODUMMY DD DUMMY
//SYSPRINT DD SYSOUT=*
//UTPRINT  DD SYSOUT=*
//SYSIN    DD *
    TEMPLATE ISYSREC
        DSN 'DSNC810.DA1A.HLOLAB2D.HLOTS2.SYSREC'
        DISP(SHR,KEEP,KEEP)
    TEMPLATE ISYSERR
        DSN &US..IDSE.&DB..&TS..&UQ.
        DISP(MOD,CATLG,CATLG)
        SPACE (10,100) CYL
    TEMPLATE ISYSMAP
        DSN &DB..&SN..&US..&JO.
        DISP(MOD,CATLG,CATLG)
        SPACE (10,100) CYL
    TEMPLATE ISYSUT1
        DSN &US..IDSU.&DB..&TS..&UQ.
        DISP(MOD,DELETE,CATLG)
        SPACE (10,100) CYL
    TEMPLATE ISORTOUT
        DSN &US..IDSO.&DB..&TS..&UQ.
        DISP(MOD,DELETE,CATLG)
        SPACE (10,100) CYL
    EXEC SQL
        DECLARE HLVCSR CURSOR FOR
        SELECT * FROM DSNC810.SOURCE_DB2_TABLE
    ENDEXEC
    LOAD DATA
        IDAA_DUAL ON RDSBACC1
        REPLACE
        LOG NO NOCOPYPEND
        ENFORCE NO
        ACCEL_CURSOR HLVCSR
        ACCEL_HLV_SSID HLVS
        ACCEL_DATA_SERVER HSZ3
        ACCEL_REMOVE_AND_ADD_TABLES
        ACCEL_ON_SUCCESS_ENABLE YES
        ACCEL_LOAD_TASKS 1
        INTO TABLE "DSNC810"."RemoteLoad"
/*
//