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
- is implemented by
-
SONARRPG-38 Rule: An indicator should be used on a "CHAIN" statement
-
- Closed
-