No announcement yet.

*** DDL verses DDS ***

  • Filter
  • Time
  • Show
Clear All
new posts

  • *** DDL verses DDS ***

    Can I have a DDS-LF with Select/Omit over a DDL (Table) ?.

    I tried, the DDS-LF created successfully, but when I DBU/SQL the LF, I do not see the records based out of Select/Omit.

    I know, I can create an Index - DDL-LF, but I wanted to see if the above is a possibility or not.


  • #2
    You can generate a DDS described logical file over an DDL defined table, independent of if there are SELECT/OMIT clauses or not!
    If there is any problem it might be DBU/SQL! Did you try to execute the logical file (even though it is not the best idea) with ACS run SQL Script or STRSQL?
    If you are working with SQL you should decide what you want and then create an SQL VIEW (which supports everything that is possible in an SELECT statement (with the exception of the order by). If you want to use a keyed access with native I/O you should create an SQL Index with WHERE conditions. (you may also create this additional index for optimizing your data access with SQL).


    • #3
      Thanks for your response. I understand DDS-LF can be created over DDL table. but as I mentioned, Select and Omit not working. I was just verifying the DDS-LF by looking the record in DBU and SQL, and it is not showing that record there. For example, DDL-Table has Oder# 1000 with "Open" status, and DDS-LF has select with "Open" status, Both DBU and SQL over DDS-LF showing Order# 1000. If I remove the Select in DDS-LF, then that order# 1000 shows up in both DBU and SQL.

      My problem, an RPG program is written over DDS-LF-WITH SELECT/OMIT, with SETLL etc, and the above order# 1000 is not even read. DBU/SQL/RPG nothing is recognizing that record.
      If I remove, the Select/Omit in DDS-LF, then it is working.

      Hence, I was just wondering if we there is any restriction over DDL-Table with DDS-LF with Select/Omit

      I can do with an Index ( DDL-LF ), but I just wanted to know the concept if any ? Why my SQL/DBU/RPG not bringing that record even though it matches the selection


      • #4
        No there are no restrictions, logical files with SELECT/OMIT clauses should work correctly in composition with native I/O.
        ... if not it is an IBM bug and you should open a PMR at IBM.


        • #5
          Can you show us how the select/omit is coded in the DDS?