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

Programs should begin with titles

    XMLWordPrintable

    Details

    • Type: Code Smell Detection
    • Status: Active
    • Resolution: Unresolved
    • Labels:
    • Message:
      Hide
      * Add a title to this program.
      * Move this title to the first line of the file.
      Show
      * Add a title to this program. * Move this title to the first line of the file.
    • Highlighting:
      Hide

      TITLE if it exists on the wrong line, otherwise file level issue

      Show
      TITLE if it exists on the wrong line, otherwise file level issue
    • Default Severity:
      Minor
    • Impact:
      Low
    • Likelihood:
      Low
    • Covered Languages:
      Cobol
    • Remediation Function:
      Constant/Issue
    • Constant Cost:
      5min

      Description

      Program/file names offer only very limited space for indicating program function, which is why you should take advantage of the ability to specify a program TITLE. Omitting the TITLE statement will result in a default, uncommunicative TITLE value being printed at the top of each page of the source listing. Instead, you should write an expressive title that gives a clear impression of the program's function.

      This rule raises an issue when a there is no TITLE before the IDENTIFICATION DIVISION. Ideally, TITLE will be the first line of a program, but it cannot be placed before compiler options.

      Noncompliant Code Example

            * Copyright (c) 2012 MyCo. All rights reserved.  *> Noncompliant
             IDENTIFICATION DIVISION.
      

      Compliant Solution

             TITLE 'IntradayPosition.ExecutePostProcessing'
            * Copyright (c) 2012 MyCo. All rights reserved. 
             IDENTIFICATION DIVISION.
      

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                Created:
                Updated: