MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Section using different EXIT.

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming
View previous topic :: View next topic  
Author Message
mf_user
Intermediate


Joined: 01 Jun 2003
Posts: 372
Topics: 105

PostPosted: Thu Feb 07, 2008 9:59 am    Post subject: Section using different EXIT. Reply with quote

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? Shocked

Please suggest. Idea

Thanks. Confused
_________________
MF
==
Any training that does not include the emotions, mind and body is incomplete; knowledge fades without feeling.
==
Back to top
View user's profile Send private message Send e-mail
dbzTHEdinosauer
Supermod


Joined: 20 Oct 2006
Posts: 1411
Topics: 26
Location: germany

PostPosted: Thu Feb 07, 2008 10:17 am    Post subject: Reply with quote

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
View user's profile Send private message
mf_user
Intermediate


Joined: 01 Jun 2003
Posts: 372
Topics: 105

PostPosted: Thu Feb 07, 2008 10:56 am    Post subject: Reply with quote

Thank you. 8)

How to figure out such other non-required entries from the program to remove them forever. Question
_________________
MF
==
Any training that does not include the emotions, mind and body is incomplete; knowledge fades without feeling.
==
Back to top
View user's profile Send private message Send e-mail
Terry_Heinze
Supermod


Joined: 31 May 2004
Posts: 391
Topics: 4
Location: Richfield, MN, USA

PostPosted: Thu Feb 07, 2008 2:24 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
Terry_Heinze
Supermod


Joined: 31 May 2004
Posts: 391
Topics: 4
Location: Richfield, MN, USA

PostPosted: Thu Feb 07, 2008 2:56 pm    Post subject: Reply with quote

See the 2nd bullet here: http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/IGY3LR30/6.2.27.1?SHELF=&DT=20050714120224
_________________
....Terry
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group