0
votes

I am trying to call a paragraph N times using an online compiler which is OpenCOBOL v1.1.0 This is what I am doing :

IDENTIFICATION DIVISION.
PROGRAM-ID. PerformNTimes.

    PROCEDURE DIVISION.
       PERFORM 3 TIMES
         DISPLAY 'IN A-PARA'
       END-PERFORM

       PERFORM B-PARA 3 TIMES.
       STOP RUN.

       B-PARA.
       DISPLAY 'IN B-PARA'

Why it is not calling B-PARA?

2

2 Answers

2
votes

It will probably be much more convenient for you to get your own compiler. OpenCOBOL is now known as GnuCOBOL, and is available, in more up-to-date versions, from SourceForge.Net.

Your example may not be compiling. You don't show a final full-stop/period after the DISPLAY in B-PARA.

There's full support for the product and assistance with COBOL in the discussion groups at the GnuCOBOL area: https://sourceforge.net/p/open-cobol/discussion/?source=navbar

0
votes

Finally, I solved it. The point is each line should end with CRLF. Added a period after the DISPLAY in B-PARA and ended each line with CRLF. You can refer here to see how you can achieve this.