Results 1 to 5 of 5
  1. #1
    Join Date
    Feb 2004
    Location
    Wiessrussland
    Posts
    10

    Unanswered: Multiple Db/packages In One Pgm ??

    Hi,
    Anybody can refine my syntacsis how to compile/bind 2 packages into 1 plan. Idea : I had 1 pgm that should deal with 2 db (bill and trade). I splitted it into 2 pgms (one for each db), but they have to communicate with each other somehow (I used LINK), but still has -805, once first trade envoked in linked pgm still alive when it came back to Linking pgm.
    Or there is any way to kill tread using CICS/DB2 appliation.
    Thanks for all info, I little bit lacking of system resources here in BY.

    Best
    Natasha

    ===========================
    //STEP010 EXEC CBTDB2CI,
    ..
    // MEM='PGM12000'
    //BINDPKG.SYSTSIN DD *
    DSN SYSTEM(DT50)
    BIND PACKAGE() MEMBER(PGM1200) -
    ACTION(REPLACE) QUALIFIER(TRDT) OWNER(TRDT) ISOLATION(CS) -
    EXPLAIN(NO) RELEASE(COMMIT) VALIDATE(BIND)
    END
    //*
    //STEP020 EXEC CBTDB2CI,
    ..
    // MEM='PGM12077'
    //BINDPKG.SYSTSIN DD *
    DSN SYSTEM(DT50)
    BIND PACKAGE(BILT_CICS_BILT) MEMBER(PGM12077) -
    ACTION(REPLACE) QUALIFIER(BILT) OWNER(BILT) ISOLATION(CS) -
    EXPLAIN(NO) RELEASE(COMMIT) VALIDATE(BIND)
    END
    ????
    BIND PLAN(MYPLAN) MEMBER(PGM1200,PGM12077)
    PKLIST (TRDT_CICS_TRDT .PGM1200, BILT_CICS_BILT.PGM12077)

  2. #2
    Join Date
    May 2003
    Location
    USA
    Posts
    5,737
    I really don't understand what you are trying to do, or what your problem is. But there is one thing that I don't understand. In DB2 for OS/390, you don't need different programs for different databases unless they are really different sub-systems. But in this example, both sub-systems seem to be DT50, so I don't understand the reference to databases (application programs are not even aware of databases unless they need to create tables or indexes).

    Most of the DB2 manuals are available on-line in PDF format here:
    http://www-306.ibm.com/software/data...0/library.html
    M. A. Feldman
    IBM Certified DBA on DB2 for Linux, UNIX, and Windows
    IBM Certified DBA on DB2 for z/OS and OS/390

  3. #3
    Join Date
    Jan 2004
    Location
    Egypt
    Posts
    61

    Re: Multiple Db/packages In One Pgm ??

    Originally posted by DAINOVA
    Hi,
    Anybody can refine my syntacsis how to compile/bind 2 packages into 1 plan. Idea : I had 1 pgm that should deal with 2 db (bill and trade). I splitted it into 2 pgms (one for each db), but they have to communicate with each other somehow (I used LINK), but still has -805, once first trade envoked in linked pgm still alive when it came back to Linking pgm.
    Or there is any way to kill tread using CICS/DB2 appliation.
    Thanks for all info, I little bit lacking of system resources here in BY.

    Best
    Natasha

    ===========================
    //STEP010 EXEC CBTDB2CI,
    ..
    // MEM='PGM12000'
    //BINDPKG.SYSTSIN DD *
    DSN SYSTEM(DT50)
    BIND PACKAGE() MEMBER(PGM1200) -
    ACTION(REPLACE) QUALIFIER(TRDT) OWNER(TRDT) ISOLATION(CS) -
    EXPLAIN(NO) RELEASE(COMMIT) VALIDATE(BIND)
    END
    //*
    //STEP020 EXEC CBTDB2CI,
    ..
    // MEM='PGM12077'
    //BINDPKG.SYSTSIN DD *
    DSN SYSTEM(DT50)
    BIND PACKAGE(BILT_CICS_BILT) MEMBER(PGM12077) -
    ACTION(REPLACE) QUALIFIER(BILT) OWNER(BILT) ISOLATION(CS) -
    EXPLAIN(NO) RELEASE(COMMIT) VALIDATE(BIND)
    END
    ????
    BIND PLAN(MYPLAN) MEMBER(PGM1200,PGM12077)
    PKLIST (TRDT_CICS_TRDT .PGM1200, BILT_CICS_BILT.PGM12077)

    u can do this if u r using C programs, i had done this many times under unix andd linux i will layout the process, then u can applay it on yr enviroment if possible

    program1.sqc will contain SQL to deal with 1st DB
    program2.sqc will contain SQL to deal with 2nd DB
    both programs will share array of sturctures that is global, so u can access in both functions

    then u can prepare program1.sqc, then bind it, complie it using C complier ( to produce program1.o)
    and do the same for program2.sqc ( u will get program2.o)

    then link both objects

    cc -o finalprogram program1.o program2.o -LDB2include libraray ...

    the finalprogram can run and deal with bothe DB, if u find this usefull, i can provide you with soucre code and makefile
    hany heggy,
    IBM certified Professional, AIX system support
    www.melodyhits.tv

  4. #4
    Join Date
    May 2003
    Location
    USA
    Posts
    5,737
    DAINOVA is on OS/390, which is totally different from Linux, Unix or Windows.
    M. A. Feldman
    IBM Certified DBA on DB2 for Linux, UNIX, and Windows
    IBM Certified DBA on DB2 for z/OS and OS/390

  5. #5
    Join Date
    Jan 2004
    Location
    Egypt
    Posts
    61
    Originally posted by Marcus_A
    DAINOVA is on OS/390, which is totally different from Linux, Unix or Windows.
    i know that, i just give him the idea only, i also worked with MVS and VM and VSE but this is history for me now
    hany heggy,
    IBM certified Professional, AIX system support
    www.melodyhits.tv

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •