title: Not a uniquely defined Name?
body: <p>I keep getting the error </p>
  
  <p>"LOWMID-COMMISSION-CTR" was not a uniquely defined name.  The definition
                          to be used could not be determined from the context.</p>
  
  <p>And similar on all of my counters. I have no idea where I'm going wrong here, how is it not a uniquely defined name when it is clearly in the WORKING-STORAGE SECTION? Do I put it somewhere else so that it's a uniquely defined name? Below I have showed where I defined my counters, and where the counters are used. </p>
  
  <pre><code>   IDENTIFICATION DIVISION.
     PROGRAM-ID. LAB3.
     AUTHOR.  
  
    ******************************************************************
     ENVIRONMENT DIVISION.
    *  defines the external files - an input file and output file
     INPUT-OUTPUT SECTION.
     FILE-CONTROL.
  
  
         SELECT SALES-FILE ASSIGN TO DATAIN
            FILE STATUS IS EF-STATUS.
  
         SELECT REPORT-FILE ASSIGN TO DATAOUT
            FILE STATUS IS PF-STATUS.
     DATA DIVISION.
    * has two sections - the file section that describes the files
    * and the working storage section - where output lines and
    * processing variables are defined
  
     FILE SECTION.
  
     FD SALES-FILE.
     01 SALES-RECORD.
         05 EMPLOYEE-NAME-IN PIC X(24).
         05 SALES-IN           PIC 99999.
         05 FILLER             PIC X(51).
     FD REPORT-FILE.
     01 REPORT-RECORD                PIC X(80).
  
     WORKING-STORAGE SECTION.
  
     01 FLAGS-AND-ACCUMLATORS.
         05 LOW-COMMISSION-CTR   PIC 99999 VALUE ZERO.
         05 LOWMID-COMMISSION-CTR PIC 99999 VALUE ZERO.
         05 HIGHMID-COMMISSION-CTR PIC 99999 VALUE ZERO.
         05 HIGH-COMMISSION-CTR   PIC 99999 VALUE ZERO.
         05 TOTAL-SALES PIC $$$,$$9.99 VALUE ZERO.
         05 TOTAL-COMMISSION PIC $$$,$$9.99 VALUE ZERO.
         05   END-OF-FILE            PIC XXX VALUE "NO".
         05   EF-STATUS              PIC 99  VALUE 0.
         05   PF-STATUS              PIC 99  VALUE 0.
         05   COMMISSION             PIC 99999V99.
  
     01 REPORT-BLANK-LINE.
         05                          PIC X(80).
  
     01  HEADING-LINE-1.
         05                          PIC X(30) VALUE SPACES.
         05                          PIC X(19) VALUE
              "COMPANY OF AARON".
  
  
  
     01  HEADING-LINE-2.
          05                          PIC X(30) VALUE SPACES.
          05                          PIC X(19) VALUE
                "KEARNEY, MISSOURI".
     01  HEADING-LINE-3.
          05                      PIC X(03) VALUE SPACES.
          05                      PIC X(48) VALUE
                "Number of employees with up to 10,000 in sales: ".
          05 LOW-COMMISSION-CTR PIC 99999.
     01  HEADING-LINE-4.
          05                      PIC X(03) VALUE SPACES.
          05                      PIC X(52) VALUE
                "Number of employees from 10,001 to 20,000 in sales: ".
          05 LOWMID-COMMISSION-CTR PIC 99999.
     01 HEADING-LINE-5.
          05                      PIC X(03) VALUE SPACES.
          05                      PIC X(52) VALUE
             "Number of employees from 20,001 to 30,000 in sales: ".
          05 HIGHMID-COMMISSION-CTR PIC 99999.
     01 HEADING-LINE-6.
          05                      PIC X(03) VALUE SPACES.
          05                      PIC X(42) VALUE
             "Number of employees over 30,000 in sales: ".
          05 HIGH-COMMISSION-CTR PIC 99999.
     01 HEADING-LINE-7.
          05                      PIC X(03) VALUE SPACES.
          05                      PIC X(13) VALUE
              "Total Sales: ".
          05 TOTAL-SALES PIC $$$,$$9.99.
     01 HEADING-LINE-8.
          05                      PIC X(03) VALUE SPACES.
          05                      PIC X(18) VALUE
               "TOTAL COMMISSION: ".
          05 TOTAL-COMMISSION PIC $$$,$$9.99.
  
     01  COLUMN-HEADING-1.
          05                      PIC X(03) VALUE SPACES.
          05                      PIC X(24) VALUE "SALESPERSON".
          05                      PIC X(15) VALUE "SALES".
          05                      PIC X(10) VALUE "COMMISSION".
     01  COLUMN-HEADING-2.
          05                      PIC X(14) VALUE "SUMMARY REPORT".
  
  
     01  DETAIL-LINE.
          05                      PIC X(03) VALUE SPACES.
          05 EMPLOYEE-NAME-OUT    PIC X(24).
          05 SALES-OUT            PIC $$$,$$9.
          05                      PIC X(05) VALUE SPACES.
          05 COMMISSION-OUT       PIC $$$,$$9.99.
  
  
     PROCEDURE DIVISION.
  
     1000-MAIN-CONTROL.
         PERFORM 2000-INITIALIZE.
         PERFORM UNTIL END-OF-FILE = "YES"
           READ SALES-FILE
             AT END
               MOVE "YES" TO END-OF-FILE
             NOT AT END
               PERFORM 3000-PROCESS
         END-PERFORM
         PERFORM 4000-PROCESS.
         STOP RUN.
  
     2000-INITIALIZE.
            OPEN INPUT SALES-FILE
                 OUTPUT REPORT-FILE.
  
         WRITE REPORT-RECORD         FROM HEADING-LINE-1.
         WRITE REPORT-RECORD         FROM HEADING-LINE-2.
         WRITE REPORT-RECORD         FROM REPORT-BLANK-LINE.
         WRITE REPORT-RECORD         FROM COLUMN-HEADING-1.
         WRITE REPORT-RECORD         FROM REPORT-BLANK-LINE.
  
      3000-PROCESS.
  
         IF SALES-IN &lt; 10001
           MULTIPLY SALES-IN BY .04 GIVING COMMISSION
            ADD 1 TO LOW-COMMISSION-CTR
            ADD COMMISSION TO TOTAL-COMMISSION
         END-IF.
  
  
         IF SALES-IN &gt; 10000 AND &lt; 20001
           MULTIPLY SALES-IN BY .055 GIVING COMMISSION
            ADD 1 TO LOWMID-COMMISSION-CTR
            ADD COMMISSION TO TOTAL-COMMISSION
         END-IF.
  
         IF SALES-IN &gt; 20000 AND &lt; 30000
           MULTIPLY SALES-IN BY .065 GIVING COMMISSION
            ADD 1 TO HIGHMID-COMMISSION-CTR
            ADD COMMISSION TO TOTAL-COMMISSION
            END-IF.
  
         IF SALES-IN &gt; 30000
           MULTIPLY SALES-IN BY .075 GIVING COMMISSION
            ADD 1 TO HIGH-COMMISSION-CTR
            ADD COMMISSION TO TOTAL-COMMISSION
            END-IF.
  
         MOVE EMPLOYEE-NAME-IN       TO EMPLOYEE-NAME-OUT.
         MOVE SALES-IN               TO SALES-OUT.
         MOVE COMMISSION             TO COMMISSION-OUT.
  
         WRITE REPORT-RECORD         FROM DETAIL-LINE.
  
     4000-PROCESS.
         WRITE REPORT-RECORD         FROM REPORT-BLANK-LINE.
         WRITE REPORT-RECORD         FROM COLUMN-HEADING-2.
         WRITE REPORT-RECORD         FROM HEADING-LINE-3.
         WRITE REPORT-RECORD         FROM HEADING-LINE-4.
         WRITE REPORT-RECORD         FROM HEADING-LINE-5.
         WRITE REPORT-RECORD         FROM HEADING-LINE-6.
         WRITE REPORT-RECORD         FROM HEADING-LINE-7.
         WRITE REPORT-RECORD         FROM HEADING-LINE-8.
     4000-TERMINATE.
         CLOSE SALES-FILE, REPORT-FILE.
  </code></pre>