View previous topic :: View next topic |
Author |
Message |
mf_user Intermediate
Joined: 01 Jun 2003 Posts: 372 Topics: 105
|
Posted: Thu Feb 07, 2008 9:59 am Post subject: Section using different EXIT. |
|
|
Hi,
In one of our production COBOL programs, we have the code as shown below:
Code: |
S0400-CHEKK-LOAN-CUT SECTION.
.
.
.
.
.
S0300-EXIT.
EXIT.
|
This section has got non-matching exit. The usage of 'S0400-CHECK-LOAN-CUT-SECTION' is just a PERFORM statement only.
Code: |
S0300-WRITE-REPORT-LINE SECTION.
PERFORM S0400-CHECK-LOAN-CUT
WRITE O-ERRREPT-RECORD FROM P-ERROR-REPORT-LINE
ADD 1 TO A-LINE-CNT
MOVE SPACE TO P-ERROR-REPORT-LINE
.
S0300-EXIT.
EXIT.
|
We are not using PERFORM THRU statement in anywhere inside the program. Would it cause any problems?
Please suggest.
Thanks. _________________ MF
==
Any training that does not include the emotions, mind and body is incomplete; knowledge fades without feeling.
== |
|
Back to top |
|
|
dbzTHEdinosauer Supermod
Joined: 20 Oct 2006 Posts: 1411 Topics: 26 Location: germany
|
Posted: Thu Feb 07, 2008 10:17 am Post subject: |
|
|
it is an unreferenced Paragraph name, thus the fact that it is dup will not give a problem. _________________ Dick Brenholtz
American living in Varel, Germany |
|
Back to top |
|
|
mf_user Intermediate
Joined: 01 Jun 2003 Posts: 372 Topics: 105
|
Posted: Thu Feb 07, 2008 10:56 am Post subject: |
|
|
Thank you. 8)
How to figure out such other non-required entries from the program to remove them forever. _________________ MF
==
Any training that does not include the emotions, mind and body is incomplete; knowledge fades without feeling.
== |
|
Back to top |
|
|
Terry_Heinze Supermod
Joined: 31 May 2004 Posts: 391 Topics: 4 Location: Richfield, MN, USA
|
Posted: Thu Feb 07, 2008 2:24 pm Post subject: |
|
|
SECTIONs can be PERFORMed with or without the THRU option. As coded, the EXIT will be treated as a "no operation" statement and the PERFORM will be terminated by the beginning of the next SECTION or end of program. To confirm this, execute this part of the code as is in a little test program. I see unexpected results from this part of the program. Also, this should be covered in the Language Reference Manual. As Dick mentioned, dup paragraph names only present a problem if it is referenced. I'd clean up that code because of the "unmatched" EXIT paragraph though. _________________ ....Terry |
|
Back to top |
|
|
Terry_Heinze Supermod
Joined: 31 May 2004 Posts: 391 Topics: 4 Location: Richfield, MN, USA
|
|
Back to top |
|
|
|
|