Installation Procedure

Topics:

Refer to your answers on the installation worksheet, then proceed through appropriate flow of steps for your installation.

Step 1. Unload Two Data Sets From the Tape

Run an IEBCOPY or allocate and initialize your qualif.HOME.DATA and qualif.HOME.LOAD datasets.

qualif.HOME.DATA contains JCL procedures needed for the Extender for Db2 installation.

The JCL is

//COPYEM  EXEC PGM=IEBCOPY
//IN1     DD   DISP=(OLD,PASS),DSN=HOME.DATA,LABEL=(1,SL),
//             UNIT=CART,VOL=(,RETAIN,,SER=tapvol)
//IN2     DD   DISP=(OLD,PASS),DSN=HOME.LOAD,LABEL=(12,SL),
//             UNIT=CART,VOL=(,RETAIN,,SER=tapvol)
//OUT1    DD   DISP=(NEW,CATLG,DELETE),SPACE=(CYL,(5,2,20)),
//             UNIT=SYSDA,DSN=qualif.HOME.DATA,
//             DCB=(RECFM=FB,LRECL=80,BLKSIZE=1600),
//OUT2    DD   DISP=(NEW,CATLG,DELETE),SPACE=(CYL,(200,20)),
//             UNIT=SYSDA,DSN=qualif.HOME.LOAD,
//             DCB=(RECFM=U,LRECL=0,BLKSIZE=13030),DSNTYPE=LIBRARY
//SYSUT1  DD   UNIT=workunit,SPACE=(CYL,(5,1))
//SYSPRINT DD SYSOUT=*
//SYSIN1 DD *
COPY OUTDD=OUT1,INDD=IN1
COPY OUTDD=OUT2,INDD=IN2
/*

where:

workunit

Is the unit for the work data set.

qualif

Is the high-level qualifier for HOME.DATA.

UNIT

Specifies the unit type of the tape drive being used. CART is the default value, but other common names include 3480, TAPE, 3420, 3490.

tapvol

Is the volser label of the installation tape.

After this job has run, qualif.HOME.DATA is allocated, cataloged, and populated with the procedures and jobs needed to install the Extender for Db2.

Step 2. Copy Extender Entry Points

This step copies and renames Db2 Extender entry points creating a user library named qualif.HOMEEXT.LOAD. This user library must be concatenated ahead of the standard Db2 load library when running your application.

Edit qualif.HOME.DATA(EXTINST2), replacing qualif for the appropriate high level qualifier. Add a job card and submit the job.

//*        Job Card Goes Here
//*
//* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
//*Purpose: To copy and rename DB2 Extender entry points to a user  *
//*         library. This user library must be concatenated ahead   *
//*         of the standard DB2 load library when running your      *
//*         application.                                            *
//*                                                                 *
//*Substitutions:                                                   *
//*      qualif  should be replaced with high level qualifier for   *
//*              DB2 Extender datasets.                             *
//* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
//EXTINST2  EXEC PGM=IEBCOPY
//SYSUT1    DD  SPACE=(CYL,(5,1)),UNIT=SYSDA
//SYSUT4    DD  SPACE=(CYL,(1,1)),UNIT=SYSDA
//IN01      DD  DISP=SHR,
//          DSN=qualif.HOME.LOAD
//OU01      DD  DISP=(MOD,CATLG),SPACE=(CYL,(5,2)),
//          DSN=qualif.HOMEEXT.LOAD,
//          LIKE=qualif.HOME.LOAD
//SYSPRINT  DD SYSOUT=*
//SYSIN     DD *
  COPYMOD INDD=((IN01,R)),OUTDD=OU01
  SELECT MEMBER=((@DSNALI,DSNALI),(@DSNCLI,DSNCLI),(@DSNELI,DSNELI),   -
  (@DSNTIAR,DSNTIAR),(@DSNHLI,DSNHLI),(@DSNHLI2,DSNHLI2))
/*

Step 3. Link-edit the Extender for Db2 Module With Db2 Entry Points (Optional)

This step links the main Extender for Db2 module with Db2 entry points DSNALI, DSNHLI, DSNHLI2, and DSNTIAR. This is required to enable calls by the Extender for Db2 module to Db2 only for those applications that communicate with the local Db2 subsystem. To perform this step, modify and run qualif.HOME.DATA(EXTLINK).

Note: If your application does not need to access the local Db2 subsystem, see Installing the Extender for DB2 Without DB2.

A sample of qualif.HOME.DATA(EXTLINK) follows:

//*        Job Card Goes Here
//
//* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
//*Purpose: To link DB2 Extender with DB2 Entry points.             *
//*         This is an optional task, only required if you run      *
//*         applications that communicate to the local DB2 system   *
//*         directly (without using the server).                    *
//*                                                                 *
//*Substitutions:                                                   *
//*      qualif  High level qualifier for DB2 Extender dataset.     *
//*      db2hlq  High level qualifier for DB2 Load Library          *
//* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
//LKED    EXEC PGM=IEWL,PARM='XREF'                               00003700
//SYSLMOD  DD  DISP=SHR,DSN=qualif.HOMEEXT.LOAD                   00003800
//SYSLIB   DD  DISP=SHR,DSN=db2hlq.SDSNLOAD                       00003900
//SYSPRINT DD  SYSOUT=*                                           00004000
//SYSUT1   DD  SPACE=(1024,(50,50)),UNIT=SYSDA                    00005100
//SYSLIN   DD  *                                                  00005200
   INCLUDE SYSLIB(DSNTIAR)                                        00005300
   MODE    AMODE(31),RMODE(ANY)                                   00005400
   ENTRY   DSNTIAR                                                00005500
   NAME    QXQTIAR(R)                                             00005600
   INCLUDE SYSLIB(DSNALI)                                         00005701
   MODE    AMODE(31),RMODE(ANY)                                   00005800
   ENTRY   DSNALI                                                 00005901
   NAME    QXQALI(R)                                              00006001
   INCLUDE SYSLIB(DSNALI)                                         00006101
   MODE    AMODE(31),RMODE(ANY)                                   00006201
   ENTRY   DSNHLI                                                 00006301
   NAME    QXQHLI(R)                                              00006401
   INCLUDE SYSLIB(DSNELI)                                         00006501
   MODE    AMODE(31),RMODE(ANY)                                   00006601
   ENTRY   DSNHLI                                                 00006701
   NAME    QXQELI(R)                                              00006801
/*                                                                00006901

Step 4. Configure the Parameter File EDAPARMS (Optional)

Configuring the EDAPARMS parameter file is optional because the Extender for Db2 runs without it. However, you can use the EDAPARMS parameter file to set certain parameters—such as default error numbers, default servers, and continental decimal notation (CDN)—and the destination of partially-qualified names.

If your application loads the Db2 entry points dynamically, this step is not required.

To set up the EDAPARMS parameter file, create a data set named qualif.EDAPARMS. For more information about configuring an EDAPARMS file, see Configuring the EDAPARMS File.

Step 5. Link the Extender for Db2 Interceptors With Your Application (Optional)

Topics:

Your Db2 application may require a static link to the standard Db2 entry points, such as DSNALI and DSNTIAR. If you must link-edit your application with the Extender for Db2's interceptors (DSNALI, DSNELI, and DSNTIAR) instead of Db2 entry points, run the JCL in Step 5.1. Link-Edit JCL to Link Extender for DB2 Interceptors With Your Application (Optional).

Note: If you are using the Call Attach Facility with explicit load of DSNALI, skip this step and proceed to Step 6. Prepare Run-time Allocation Streams.

Step 5.1. Link-Edit JCL to Link Extender for Db2 Interceptors With Your Application (Optional)

After linking the Extender for Db2 modules to your application program, edit the following sample JCL member qualif.HOME.DATA(EXTLNKAP). This job stream replaces the calls to the IBM modules with calls to the Extender for Db2 modules.

  • If your application uses DSNALI as the entry point to interface to Db2, substitute DSNALI for the first INCLUDE statement.
  • If your application uses DSNELI as the entry point to interface to Db2, substitute DSNELI for the first INCLUDE statement.

A sample JCL member qualif.HOME.DATA(EXTLNKAP) follows:

//*********************************************************************
//* Purpose: Link the user program with DB2 Extender
//*
//* Substitutions:-Change "qualif" into the high level qualifier
//*                for your DB2 Extender datasets.
//*               -Change "userpgm" to the name of your program.
//*               -Change "userentry" to the entry point of your code.
//*
//* If your application uses DSNELI as the entry point to interface to
//* DB2, substitute DSNELI for the first INCLUDE statement.
//*********************************************************************
//LKED     EXEC PGM=IEWL,PARM='LIST,MAP,XREF,LET'
//SYSLMOD  DD   DISP=SHR,DSN=userhlq.LOAD
//EDAEXT   DD   DISP=SHR,DSN=qualif.HOMEEXT.LOAD                       
//SYSUT1   DD   UNIT=SYSDA,SPACE=(800,(150,50))                        
//SYSPRINT DD   SYSOUT=*                                               
//SYSLIN   DD   *                                                      
  INCLUDE EDAEXT(DSNALI)                                               
  INCLUDE EDAEXT(DSNTIAR)                                              
  INCLUDE SYSLMOD(userpgm)               <- name of program            
  MODE    AMODE(31),RMODE(ANY)         
  ENTRY   userentry                      <- program entry point
  NAME  userpgm(R)                     <- name of program    
/*           

where:

userhlq

Is the user high-level qualifier.

qualif

Is the high-level qualifier for your data sets.

userpgm

Is the name of your program.

userentry

Is the entry point of your code.

Step 6. Prepare Run-time Allocation Streams

Topics:

If using the Call Attach Facility (CAF) with Explicit Load of DSNALI, follow the instructions in Step 6.1. Call Attach Facility (CAF) With Explicit Load of DSNALI to prepare your run-time allocation.

If using the Call Attach Facility (CAF) with Link-edit of DSNALI, follow the instructions in Step 6.2. Call Attach Facility (CAF) With Link-Edit of DSNALI to prepare your run-time allocation.

If using the DSN Command Processor (TSO Attach), follow the instructions in Step 6.3. DSN Command Processor (TSO Attach) to prepare your run-time allocation.

Step 6.1. Call Attach Facility (CAF) With Explicit Load of DSNALI

A sample CLIST and JCL are shown below for CAF explicit load of the DSNALI. To enable your application to invoke the Extender for Db2, you must tailor your logon environment or batch address space to the following allocation streams.

In addition, you must have a correctly configured communications configuration file (CLNTCS3).

In the following examples, qualif is the high level qualifier for your data sets. Other variables shown in the examples are site-dependent.

Sample CLIST

The following is an example of the CLIST necessary to deploy your client using a communicating server with CAF explicit load.

A sample qualif.HOME.DATA(EXTCQMF) follows:

/*-------------------------  REXX  -------------------------------*   
 * Purpose: Sample CLIST to run QMF with the Extender             * 
 *                                                                * 
 * Pass the following parameters at invocation:                   *     
 *      qualif   High level qualifier for DB2 Extender datasets.  *      
 *      db2hlq   High level qualifier for DB2 Libraries.          *  
 *      qmfhlq   High level qualifier for QMF Libraries.          *  
 *      dbss     DB2 Subsytem name.                               *          
 *----------------------------------------------------------------*/    
 parse upper arg qualif db2hlq qmfhlq dbss    
 "ALLOC FI(DSQLLIB) DA('"qualif".HOMEEXT.LOAD'," ,        
                      "'"qualif".HOME.LOAD'," ,           
                      "'ISP.SISPLOAD',"       ,           
                      "'"qmfhlq".SDSQLOAD',"    ,         
                      "'"db2hlq".SDSNEXIT',"    ,         
                      "'"db2hlq".SDSNLOAD') SHR REUSE"    
 "ALLOC FI(ADMCDATA) DA('GDDM.SADMCDA')      SHR REUSE" 
 "ALLOC FI(ADMDEFS)  DA('GDDM.ADMDEFS')      SHR REUSE"  
 "ALLOC FI(ADMGDF)   DA('GDDM.SADMGDF')      SHR REUSE"  
 "ALLOC FI(ADMSYMBL) DA('GDDM.SADMSYM')      SHR REUSE"     
 "ALLOC FI(ADMCFORM) DA('"qmfhlq".SDSQCHRT') SHR REUSE"    
 "ALLOC FI(ADMGGMAP) DA('"qmfhlq".SDSQMAPE') SHR REUSE"    
 "ALLOC FI(DSQPNLE)  DA('"qmfhlq".DSQPNLE')  SHR REUSE"     
 "ALLOC FI(DSQEDIT) NEW UNIT(SYSALLDA) CYL SPACE(1 1)    
        DSORG(PS) RECFM(F B A) LRECL(79) BLKSIZE(4029)"     
 "ALLOC FI(DSQDEBUG) DA(*)                  SHR REUSE"     
 "ALLOC FI(DSQPRINT) DA(*)                  SHR REUSE"     
 "ALLOC F(EDADPDS) DUMMY SHR"                         
            /* copy EDAENV contents from sample EXTJQMF jcl */ 
 "ALLOC F(EDAENV)   DA('"qualif".EDAENV')   SHR REUSE"  
            /* copy EDACS3 contents from sample EXTJQMF jcl */ 
 "ALLOC F(EDACS3)   DA('"qualif".EDACS3')   SHR REUSE" 
 /* "ALLOC F(EDAPARMS) DA('"qualif".EDAPARMS') SHR REUSE" */    
              /* copy IBITRACE contents from sample EXTJQMF jcl */  
 "ALLOC F(IBITRACE) DA('"qualif".IBITRACE') SHR REUSE"      
 "ALLOC F(FSTRACE) SYSOUT(X) RECFM(F) LRECL(132) BLKSIZE(132)" 
                                                                                
 "ALTLIB ACT APPL(CLIST) DA('"qmfhlq".SDSQCLTE')"  
 "ALTLIB ACT APPL(EXEC)  DA('"qmfhlq".SDSQEXCE')"    
 address ispexec "LIBDEF ISPLLIB LIBRARY ID(DSQLLIB) STACK"  
 address ispexec "LIBDEF ISPMLIB DATASET ID('"qmfhlq".SDSQMLBE') STACK" 
 address ispexec "LIBDEF ISPPLIB DATASET ID('"qmfhlq".SDSQPLBE') STACK" 
 address ispexec "LIBDEF ISPSLIB DATASET ID('"qmfhlq".SDSQSLBE') STACK"  
                     /* QMF invocation */    
 address ispexec "SELECT PGM(DSQQMFE) NEWAPPL(DSQE) PASSLIB NOCHECK  
                  SCRNAME(QMF) PARM(DSQSSUBS="dbss")" 
 address ispexec "LIBDEF ISPLLIB"   
 address ispexec "LIBDEF ISPMLIB"     
 address ispexec "LIBDEF ISPPLIB"     
 address ispexec "LIBDEF ISPSLIB"    
 "ALTLIB DEACT APPL(EXEC)"       
 "ALTLIB DEACT APPL(CLIST)"     
 "FREE FI(ADMCDATA ADMCFORM ADMGDF   ADMDEFS  ADMSYMBL ADMGGMAP)"  
 "FREE FI(DSQDEBUG DSQEDIT  DSQLLIB  DSQPNLE  DSQPRINT EDADPDS)"     
 "FREE FI(EDAENV   EDACS3   EDAPARMS IBITRACE FSTRACE)"

Sample JCL

The following is an example, supplied at qualif.HOME.DATA(EXTJQMF), of the JCL necessary to deploy your client using a communicating server with CAF explicit load of the DSNALI.

//*        Job Card Goes Here
//*
//* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
//*Purpose: Sample JCL to run a QMF procedure in Batch.             *
//*                                                                 *
//*Substitutions:                                                   *
//*      qualif   High level qualifier for DB2 Extender datasets.   *
//*      db2hlq   High level qualifier for DB2 Libraries.           *
//*      qmfhlq   High level qualifier for QMF Libraries.           *
//*      hostn    Server's Host name or Server's IP address.        *
//*      portn    TCP/IP Port number server is listening on.        *
//*      userid   Owner of QMF procedure to be executed.            *
//*      qmfprocs QMF Procedure name.                               *
//*      dbss     DB2 Subsytem name.                                *
//* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
//          SET DB2REL=db2hlq                               
//          SET QMFREL=qmfhlq     
//*************************************************************   
//QMFBAT   EXEC  PGM=IKJEFT01,DYNAMNBR=30,TIME=1440,REGION=4096K  
//STEPLIB  DD    DISP=SHR,DSN=qualif.HOMEEXT.LOAD     
//         DD    DISP=SHR,DSN=qualif.HOME.LOAD  
//         DD    DISP=SHR,DSN=&QMFREL..SDSQLOAD  
//         DD    DISP=SHR,DSN=&DB2REL..SDSNEXIT       
//         DD    DISP=SHR,DSN=&DB2REL..SDSNLOAD    
//         DD    DISP=SHR,DSN=ISP.SISPLOAD   
//*---------------------------------------------------------------  
//*                Extender Client Configuration File   
//*--------------------------------------------------------------- 
//EDACS3   DD    *                      
NAME        = Client Odin File
NODE = EDASERVE
  BEGIN
    PROTOCOL  = TCP
    CLASS     = CLIENT
    HOST      = hostn    ;Server's Host name or IP address
    PORT      = portn    ;Port # server is listening on
;   TRACE     = 31
  END
/*
//*---------------------------------------------------------------  
//*                Extender Environment
//*---------------------------------------------------------------   
   //EDAENV   DD    *  
EDACONF=/PDS      
FSTRACE=DD:FSTRACE
/*        
//EDADPDS  DD    DUMMY   
//*--------------------------------------------------------------- 
//*                Extender EDAPARMS File (Optional)  
//*        Extender Traces are enabled in EDAPARMS DD and output
//*             goes to DD QXTRACE (dynamically allocated)
//*---------------------------------------------------------------   
//*EDAPARMS  DD  DISP=SHR,DSN=qualif.EDAPARMS    
//*---------------------------------------------------------------   
//*            API Tracing (trace output goes to DD FSTRACE)    
//*---------------------------------------------------------------   
//IBITRACE DD *    
  SET TRACEON=ALL
//FSTRACE  DD    SYSOUT=*,DCB=(LRECL=132,RECFM=FB,BLKSIZE=132)  
//*--------------------------------------------------------------     
//*               Client Application Allocations           
//*-------------------------------------------------------------- 
//*-------------- TSO Datasets (Required for QMF) ---------------   
//SYSPROC  DD  DSN=&QMFREL..SDSQCLTE,DISP=SHR             
//SYSEXEC  DD  DSN=&QMFREL..SDSQEXCE,DISP=SHR     
//SYSTSPRT DD  SYSOUT=*        
//*-------------- ISPF DATASETS (REQUIRED FOR QMF) --------------    
//ISPPLIB  DD  DSN=&QMFREL..SDSQPLBE,DISP=SHR 
//         DD  DSN=ISP.SISPPENU,DISP=SHR   
//ISPMLIB  DD  DSN=&QMFREL..SDSQMLBE,DISP=SHR   
//         DD  DSN=ISP.SISPMENU,DISP=SHR  
//ISPSLIB  DD  DSN=&QMFREL..SDSQSLBE,DISP=SHR
//         DD  DSN=ISP.SISPSENU,DISP=SHR   
//ISPTLIB  DD  DSN=ISP.SISPTENU,DISP=SHR  
//ISPPROF  DD  UNIT=SYSDA,SPACE=(TRK,(9,1,4)),       
//         DCB=(LRECL=80,BLKSIZE=3120,RECFM=FB,DSORG=PO)
//*-------------- QMF Datasets ---------------------------------- 
//ADMGGMAP  DD  DISP=SHR,DSN=&QMFREL..SDSQMAPE        
//ADMCFORM  DD  DISP=SHR,DSN=&QMFREL..SDSQCHRT      
//ADMDEFS   DD  DISP=SHR,DSN=CSDDBS.QMF.ADMDEFS     
//*-------------- Datasets used by QMF --------------------------    
//DSQPRINT   DD  SYSOUT=*    
//DSQDEBUG   DD  SYSOUT=*    
//*DSQUDUMP  DD  SYSOUT=A,DCB=(RECFM=VBA,LRECL=125,BLKSIZE=1632)     
//*SYSUDUMP  DD  SYSOUT=*       
//DSQSPILL  DD  DSN=&&SPILL,DISP=(NEW,DELETE),     
//          UNIT=SYSDA,SPACE=(CYL,(1,1),RLSE),    
//          DCB=(RECFM=F,LRECL=4096,BLKSIZE=4096)     
//DSQEDIT   DD  UNIT=SYSDA,SPACE=(TRK,(10,1,5))    
//*---------------------------------------------------------        
//*              Executes QMF Batch Procedures   
//*---------------------------------------------------------    
//SYSTSIN   DD  *    
ISPSTART PGM(DSQQMFE) NEWAPPL(DSQE) -
         PARM(M=B,I=userid.qmfprocs,S=dbss)   
/*

Step 6.2. Call Attach Facility (CAF) With Link-Edit of DSNALI

Use this option if your application program requires a link-edit of the standard IBM Db2 Interface modules DSNALI and/or DSNTIAR (instead of the execution of a load macro) to call its routines.

The Extender for Db2 interface modules have the same aliases as the standard IBM modules DSNALI or DSNTIAR. If the IBM modules have been linked into your application program, then these modules must be substituted by the Extender for Db2 interface modules DSNALI or DSNTIAR residing in the qualif.HOMEEXT.LOAD.

  • If your application accesses both a server and the local Db2 subsystem, your execution job stream must allocate the load libraries in sequence order ahead of the Db2 standard load libraries. The allocation is done in STEPLIB.

    Step 6.2 Example 1:

    //RUNSTEP EXEC PGM=userprogram
    //STEPLIB DD   DISP=SHR,DSN=qualif.HOMEEXT.LOAD
    //        DD   DISP=SHR,DSN=qualif.HOME.LOAD
    //        DD   DISP=SHR,DSN=DSN810.SDSNEXIT
    //        DD   DISP=SHR,DSN=DSN810.SDSNLOAD
  • If your application does not access the local Db2 subsytem, then you only need the Db2 Extender load libraries in STEPLIB.

    Step 6.2 Example 2:

    //RUNSTEP EXEC PGM=userprogram//STEPLIB DD   DISP=SHR,DSN=qualif.HOMEEXT.LOAD
    //        DD   DISP=SHR,DSN=qualif.HOME.LOAD

    where:

    userpgm

    Is the name of your program.

    qualif

    Is the high-level qualifier for your data sets.

The following is a full Job stream Job stream that runs a program with Db2 Extender using the Link-Edit facility of DSNALI (CAF); it is provided at qualif.HOME.DATA(EXTCBCAF). (Notice that it uses the case described Example 1.)

//*        Job Card Goes Here      
//*
//* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
//*Purpose:Sample JCL to run CAF (DSNALI) program with DB2 Extender *
//*                                                                 *
//*Substitutions:                                                   *
//*      qualif   High level qualifier for DB2 Extender datasets.   *
//*      db2hlq   High level qualifier for DB2 Libraries.           *
//*      hostn    Server's Host name or Server's IP address.        *
//*      portn    TCP/IP Port number server is listening on.        *
//*      userlib  Dataset where XTDCOB program resides.             *
//*      XTDCOB   replace with the name of your program             *
//* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
//         SET   DB2REL=db2hlq    
//CAFRUN   EXEC  PGM=XTDCOB 
//STEPLIB  DD    DISP=SHR,DSN=userlib.LOAD  
//         DD    DISP=SHR,DSN=qualif.HOMEEXT.LOAD   
//         DD    DISP=SHR,DSN=qualif.HOME.LOAD    
//         DD    DISP=SHR,DSN=&DB2REL..SDSNEXIT 
//         DD    DISP=SHR,DSN=&DB2REL..SDSNLOAD
//*---------------------------------------------------------------
//*                Extender Client Configuration File  
//*---------------------------------------------------------------   
//EDACS3   DD    *      
NAME        = Client Odin File  
NODE = EDASERVE    
  BEGIN   
    PROTOCOL  = TCP       
    CLASS     = CLIENT
    HOST      = hostn    ;Server's Host name or IP address  
    PORT      = portn    ;Port # server is listening on      
;   TRACE     = 31
 END      
/* 
 
//*---------------------------------------------------------------   
//*                Extender Environment  
//*--------------------------------------------------------------- 
//EDAENV   DD    *  
FSTRACE=DD:FSTRACE  
EDACONF=/PDS 
/*   
//EDADPDS  DD    DUMMY 
//*---------------------------------------------------------------  
//*                Extender EDAPARMS File (Optional)                    
//*        Extender Traces are enabled in EDAPARMS DD and output        
//*             goes to DD QXTRACE (dynamically allocated)              
//*---------------------------------------------------------------      
//*EDAPARMS  DD  DISP=SHR,DSN=qualif.EDAPARMS                           
//*---------------------------------------------------------------      
//*            API Tracing (trace output goes to DD FSTRACE)           
//*---------------------------------------------------------------     
//IBITRACE DD *                                                        
   SET TRACEON=ALL                                                   
//FSTRACE  DD    SYSOUT=*,DCB=(LRECL=132,RECFM=FB,BLKSIZE=132)          
//*--------------------------------------------------------------       
//*               User Application Allocations                          
//*--------------------------------------------------------------       
//XTDPRM    DD  *                                                       
DEBUG=N,BATCH=Y                                                         
/*                                                                      
//DBGOUT  DD    SYSOUT=*                                                
//SYSOUT  DD    SYSOUT=*                                                
//SYSIN   DD  *                                                        
SQL                                                                    
SELECT COUNTRY,CAR,MODEL,BODYTYPE FROM EDASERVE.ANYNAME.CAR             
END                                                         
SQL                                                         
SELECT LAST_NAME,FIRST_NAME FROM EDASERVE.ANYNAME.EMPLOYEE  
END                                                         
EXIT                                                        
/*

Step 6.3. DSN Command Processor (TSO Attach)

The Extender for Db2 provides a back end to your application and contains invocations similar to the Db2 DSN Command Processor invocations.

  • Application requests destined to the local Db2 subsystem are first intercepted by the Extender for Db2, which then passes them through to the DSN Command Processor Facility of the local Db2 subsystem.
  • Application requests destined for server databases are routed to the server.

In all cases, the application invokes the Extender using the calls and conventions of the DSN Command Processor Facility.

To enable your application directly to the Extender for Db2's interface modules, instead of to the standard Db2 DSN Command Processor modules, you must link-edit the Extender for Db2 interface modules to your application. After you perform this link-edit, your application invokes the Extender for Db2's DSN interface, which input mimics the standard Db2 Command Processor Facility.

The following is an example, provided at qualif.HOME.DATA(EXTCBTSO), of the run-time allocation job stream for the client using a communicating client/server architecture with DSN.

//*        Job Card Goes Here 
//*
//* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ** 
//*Purpose:Sample JCL to run TSO (DSNELI) program with DB2 Extender* 
//*                                                                * 
//*Substitutions:                                                  * 
//*      qualif   High level qualifier for DB2 Extender datasets.  * 
//*      db2hlq   High level qualifier for DB2 Libraries.          * 
//*      dbss     DB2 Subsytem name.                               * 
//*      hostn    Server's Host name or Server's IP address.       * 
//*      portn    TCP/IP Port number server is listening on.       * 
//*      userlib  Dataset where TSOCOB program resides.            * 
//*      TSOCOB   replace with the name of your program.           * 
//* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *     
//         SET   DB2REL=db2hlq
//TSORUN   EXEC  PGM=IKJEFT01 
//STEPLIB  DD    DISP=SHR,DSN=qualif.HOMEEXT.LOAD  
//         DD    DISP=SHR,DSN=qualif.HOME.LOAD  
//         DD    DISP=SHR,DSN=&DB2REL..SDSNEXIT   
//         DD    DISP=SHR,DSN=&DB2REL..SDSNLOAD
//*---------------------------------------------------------------    
//*                Extender Client Configuration File  
//*---------------------------------------------------------------    
//EDACS3   DD    *            
NAME        = Client Odin File   
NODE = EDASERVE               
  BEGIN      
    PROTOCOL  = TCP   
    CLASS     = CLIENT  
    HOST      = hostn    ;Server's Host name or IP address     
    PORT      = portn    ;Port # server is listening on      
;   TRACE     = 31      
  END
/*
//*--------------------------------------------------------------- 
//*                Extender Environment          
//*---------------------------------------------------------------    
//EDAENV   DD    *
FSTRACE=DD:FSTRACE
EDACONF=/PDS  
/*
//EDADPDS  DD    DUMMY 
//*--------------------------------------------------------------- 
//*                Extender EDAPARMS File (Optional)      
//*        Extender Traces are enabled in EDAPARMS DD and output   
//*             goes to DD QXTRACE (dynamically allocated)   
//*---------------------------------------------------------------  
//*EDAPARMS  DD  DISP=SHR,DSN=qualif.EDAPARMS        
//*---------------------------------------------------------------     
//*            API Tracing (trace output goes to DD FSTRACE)           
//*---------------------------------------------------------------
//IBITRACE DD *
  SET TRACEON=ALL         
//FSTRACE  DD    SYSOUT=*,DCB=(LRECL=132,RECFM=FB,BLKSIZE=132)
//*-------------------------------------------------------------- 
//*               User Application Allocations                      
//*--------------------------------------------------------------    
//XTDPRM    DD  *
DEBUG=N,BATCH=Y 
/*
//DBGOUT  DD    SYSOUT=*  
//SYSOUT  DD    SYSOUT=*  
//SYSTSPRT  DD  SYSOUT=*
//SYSTSIN   DD  * 
  DSN SYSTEM(dbss) 
  RUN PROGRAM (TSOCOB)      -
      LIB('userlib.LOAD')    
  END                                                         
/*                                                            
//SYSIN   DD  *                                               
SQL                                                           
SELECT COUNTRY,CAR,MODEL,BODYTYPE FROM EDASERVE.ANYNAME.CAR   
END                                                           
SQL                                                           
SELECT LAST_NAME,FIRST_NAME FROM EDASERVE.ANYNAME.EMPLOYEE    
END                                                           
EXIT                                                          
/*    

WebFOCUS

Feedback