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

Indicators should be used on "CHAIN" statements

    XMLWordPrintable

    Details

    • Type: Code Smell Detection
    • Status: Active
    • Resolution: Unresolved
    • Labels:
    • Message:
      Add an indicator to this {{CHAIN}} statement
    • Default Severity:
      Minor
    • Impact:
      Low
    • Likelihood:
      Low
    • Default Quality Profiles:
      Sonar way
    • Covered Languages:
      RPG
    • Remediation Function:
      Constant/Issue
    • Constant Cost:
      30min

      Description

      A results indicator should be used on a CHAIN statement because it leads to cleaner, more readable, and more correct code. Using an indicator results in the conditions record not found, and end of file being automatically handled correctly, without the need for further error handling.

      Noncompliant Code Example

      C     K0GMCP        CHAIN     SSGMCPR
      

      Compliant Solution

      C     K0GMCP        CHAIN     SSGMCPR                            81 
      

      Exceptions

      Free-form CHAIN statements cannot have indicators, and are ignored.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              freddy.mallet Freddy Mallet (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated: