ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

DDS vs DDL

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • DDS vs DDL

    I'm trying to use DDL, as opposed to DDS, to create a new interface to our logistics company. Got the source and objects for the files they will be transmitting to us.

    While using OPS Nav to Generate SQL for the tables and indexes, I notice that all existing LF's are regarded as views and not indexes.

    from IBM Redbook sg24-6393-00.pdf:
    Code:
    [U]SQL term        iSeries term[/U]
    Table            Physical file
    View             Non keyed logical file
    Index            Keyed logical file
    Any ideas as to why this is?

    TIA
    Regards

    Kit
    http://www.ecofitonline.com
    DeskfIT - ChangefIT - XrefIT
    ___________________________________
    There are only 3 kinds of people -
    Those that can count and those that can't.

  • #2
    Re: DDS vs DDL

    personally i think that is one of the most idiotic things about how IBM treats DDL. it always treats DDS LFs as views. the more appropriate behavior would have been to treated LFs that only change key values as indexes and select/omits as unkeyed views. but i digress....the mentality (or reason) is that DDS LFs are all select/omit by default they are created as SELECT ALL logical views (hence their line of thought). but with SQL an index is not a select all view..it's truly an index (access path...i'm sure Birgitta can explain this much better than i can) and SQL Views are basically a prepared SQL statement and the access plan is stored for future reference...as far as native I/O a View is an unkeyed select/omit LF.

    HTH
    I'm not anti-social, I just don't like people -Tommy Holden

    Comment


    • #3
      Re: DDS vs DDL

      Thanks Tom
      Regards

      Kit
      http://www.ecofitonline.com
      DeskfIT - ChangefIT - XrefIT
      ___________________________________
      There are only 3 kinds of people -
      Those that can count and those that can't.

      Comment


      • #4
        Re: DDS vs DDL

        One of the advantages of using DDL is that you do not have to recompile the the programs after changing an index.

        However, this can be a disadvantage because the program will still run but may return invalid results. eg. I removed a field in the key of the index, but left it in the the program's 'KLIST'. Program ran but found no recs to process. i.e. no warning that that the key no matches to the index.

        Interesting... I wonder what whould happen if I just populate the field in the program with the correct value so that the chain would be theoritically successful, were the field in the key?
        Last edited by kitvb1; March 18, 2008, 02:32 AM. Reason: add , to ?
        Regards

        Kit
        http://www.ecofitonline.com
        DeskfIT - ChangefIT - XrefIT
        ___________________________________
        There are only 3 kinds of people -
        Those that can count and those that can't.

        Comment


        • #5
          Re: DDS vs DDL

          Originally posted by kitvb1 View Post
          One of the advantages of using DDL is that you do not have to recompile the the programs after changing an index.
          but one has to recompile if one changes the table
          Regards

          Kit
          http://www.ecofitonline.com
          DeskfIT - ChangefIT - XrefIT
          ___________________________________
          There are only 3 kinds of people -
          Those that can count and those that can't.

          Comment


          • #6
            Re: DDS vs DDL

            Originally posted by kitvb1 View Post
            but one has to recompile if one changes the table
            yep...it's the same as adding fields,etc to a DDS file you have to recompile.
            I'm not anti-social, I just don't like people -Tommy Holden

            Comment

            Working...
            X