Uploaded image for project: 'Rules Repository'
  1. Rules Repository
  2. RSPEC-3625

Unused "TABLE" declarations should be removed

    XMLWordPrintable

    Details

    • Type: Code Smell Detection
    • Status: Active
    • Resolution: Unresolved
    • Labels:
    • Message:
      Remove this table "XXX" declaration; it is never used.
    • Highlighting:
      Hide

      DECLARE ... TABLE

      Show
      DECLARE ... TABLE
    • Default Severity:
      Minor
    • Impact:
      Low
    • Likelihood:
      Low
    • Default Quality Profiles:
      Sonar way
    • Covered Languages:
      Cobol
    • Remediation Function:
      Constant/Issue
    • Constant Cost:
      5min
    • Analysis Scope:
      Main Sources, Test Sources

      Description

      If a SQL TABLE is declared but not used in the program, it can be considered dead code and should therefore be removed. This will improve maintainability because developers will not wonder what the variable is used for.

      Noncompliant Code Example

      EXEC SQL
       DECLARE DSN8B10.DEPT TABLE  -- Noncompliant
         ( ...  ) 
      END-EXEC.
      

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              ann.campbell.2 Ann Campbell
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated: