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

"PERFORM" statements should not be deeply nested

    Details

    • Type: Finding Detection
    • Status: Closed
    • Resolution: Duplicate
    • Labels:
      None
    • Message:
      TODO
    • List of parameters:
      • maximum -> TODO
    • Default Severity:
      Major
    • Impact:
      Low
    • Likelihood:
      High
    • Targeted languages:
      Cobol

      Description

      TODO

      Noncompliant Code Example

      PERFORM UNTIL FIN-RGL0
           PERFORM DEBUT-RGL0
           PERFORM UNTIL FIN-RGL1
           PERFORM DEBUT-RGL1
                PERFORM UNTIL FIN-RGL2
                 PERFORM DEBUT-RGL2
                 PERFORM ALIM-RGL2
                 PERFORM FIN-RGL2
           END-PERFORM
           PERFORM FIN-RGL1
      END-PERFORM
           PERFORM FIN-RGL0
      END-PERFORM
      

      Compliant Solution

      PERFORM TRAITEMENT-RGL0 UNTIL FIN-RGL0.
      TRAITEMENT-RGL0.
      PERFORM DEBUT-RGL0
      PERFORM TRAITEMEN-RGL1 UNTIL FIN-RGL1
           PERFORM FIN-RGL0
      	.
      TRAITEMENT-RGL1.
           PERFORM DEBUT-RGL1
           PERFORM UNTIL FIN-RGL2
                 PERFORM DEBUT-RGL2
                 PERFORM ALIM-RGL2
                 PERFORM FIN-RGL2
           END-PERFORM
           PERFORM FIN-RGL1
      

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: