Professional Web Applications Themes

CURRENT PACKAGESET and DB2 UDB LUW embedded SQL - IBM DB2

The statement "SET CURRENT PACKAGESET statement" is a powerful construct. But how to use without harm when modules are used? Here illustrated with MF Cobol. In MF Cobol, for a program PROG1.cbl a package PROG1 is generated. For a progam PROG2.cbl, the package is PROG2. The MF runtime has a dynamic link feature: if we code in PROG1: call "PROG2" using ... PROG2 is at call time, when not linked in the run-time and was not called before (or canceled after call), retrieved from the file system, linked-in and executed. PROG2 can use "SET CURRENT PACKAGESET <schema>" to access the ...

  1. #1

    Default CURRENT PACKAGESET and DB2 UDB LUW embedded SQL

    The statement "SET CURRENT PACKAGESET statement" is a powerful
    construct. But how to use without harm when modules are used?

    Here illustrated with MF Cobol.

    In MF Cobol, for a program PROG1.cbl a package PROG1 is generated. For
    a progam PROG2.cbl, the package is PROG2. The MF runtime has a dynamic
    link feature:

    if we code in PROG1:

    call "PROG2" using ...

    PROG2 is at call time, when not linked in the run-time and was not
    called before (or canceled after call), retrieved from the file
    system, linked-in and executed.

    PROG2 can use "SET CURRENT PACKAGESET <schema>" to access the tables
    binded in <schema>.PROG2.

    Tremendous once mastered.

    But when PROG2 issues a goback maybe he has destroyed the current
    package as seen by PROG1.

    One can say PROG1 should after the call reinforce his current package
    set, just to be sure.

    My understanding is that PROG2 is not allowed to break PROG1 by
    changing something global (the current package set) just for its
    private use.

    So PROG2 should be able to restore the (global) current package set
    that was active when it was called. But UDB LUW has no current
    packageset register...

    Question: is there another way PROG2 can get the current active
    package schema (for an embedded language connection)?

    or will DB2 UDB improve its orthogonality for developers by
    implementing: get current packageset?

    Quoted from An introduction to Database Systems Seventh
    Edition by Chris Date page 223: Orthogonality means independence. A
    language is orthogonal if independent concepts are kept independent
    and not mixed together in confusing ways. Orthogonality is desirable
    because the less orthogonal a language is, the more complicated it is
    and -paradoxically but simultaneously- the less powerful it is."

    Bernard Dhooghe
    Bernard Guest

  2. #2

    Default Re: CURRENT PACKAGESET and DB2 UDB LUW embedded SQL

    I passed your ocmments/questions on here in the Lab.

    Cheers
    Serge


    Serge Guest

  3. #3

    Default Re: CURRENT PACKAGESET and DB2 UDB LUW embedded SQL

    "Serge Rielau" <eyebeem.com> wrote in message news:<bmglel$ak9$torolab.ibm.com>... 

    Thank you!

    Bernard (Dhooghe)
    Bernard Guest

  4. #4

    Default Re: CURRENT PACKAGESET and DB2 UDB LUW embedded SQL

    OK.. I did some sniffing.
    SET CURRENT PACKAGESET
    is local to the source file.

    Does that answer the question? Send me a note if you need more detail.
    Cheers
    Serge


    Serge Guest

Similar Threads

  1. Replies: 3
    Last Post: March 9th, 05:19 PM
  2. Databind an embedded control in an embedded datagrid
    By Thomas Dodds in forum ASP.NET Data Grid Control
    Replies: 1
    Last Post: July 29th, 10:15 AM
  3. Replies: 1
    Last Post: July 20th, 03:27 PM

Bookmarks

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139