Previous Topic Next topic Print topic


Duplicate Paragraph-names

Solution:

To ensure that references to duplicate paragraph-names are correctly resolved, you must qualify a reference to a duplicate paragraph-name by adding the section-name in which it is declared.

Example:

If your source code contains the following:

      .... 
      perform para-2. 
      .... 
 sect-1 section. 
      para-1. 
      .... 
      para-2. 
      .... 
 sect-2 section. 
      para-2. 
      ....

the RM/COBOL system will resolve the reference to para-2 in the PERFORM statement by using the declaration of para-2 in the sect-1 SECTION. Under this COBOL system, however, you must qualify the reference to the duplicate paragraph-name in your source code by using the PERFORM para-2 OF sect-1 statement.

Previous Topic Next topic Print topic