title: Cobol Reading Record with a Table
body: <p>I'm trying to display some data that I'm reading into a table. However, I keep getting the error: </p>
  
  <blockquote>
    <p>IN-FUND-NBR was not a uniquely defined name...Expected a reference-modification specification but found ")".</p>
  </blockquote>
  
  <p>***EDIT: Okay, so I found the root of the problem. However, can't I still access <code>IN-FUND-NBR</code> as it sits? I tried the following, but it does not work:</p>
  
  <pre><code>DISPLAY "IN-FUND-NBR = " IN-FUND-NBR (MF-SALE-SUB) OF IN-MF-SALE
  </code></pre>
  
  <p>***END EDIT</p>
  
  <p>I have the following record defined as follows: </p>
  
  <pre><code> 01  SALES-RECORD.                          
       05  IN-CITY-NAME           PIC X(20).  
       05  IN-CUSTOMER-NAME       PIC X(20).  
       05  IN-MF-SALE             OCCURS 4.   
           10  IN-FUND-NBR        PIC 9(2).   
           10  IN-PRICE-FLAG      PIC 9.      
           10  IN-PURCH-AMT       PIC 9(5)V99.
  </code></pre>
  
  <p>I'm trying to extract the first instance of IN-FUND-NBR by doing the following in a paragrah:</p>
  
  <pre><code> PERFORM                                          
     VARYING MF-SALE-SUB FROM 1 BY 1                
       UNTIL MF-SALE-SUB &gt; 4                        
  
         DISPLAY "Fund Number: " IN-FUND-NBR(MF-SALE-SUB)
  
   END-PERFORM.
  </code></pre>