IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Paragraph thru exit in a section


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Ziko13

New User


Joined: 19 Jul 2018
Posts: 43
Location: Greece

PostPosted: Thu Aug 07, 2025 10:21 pm
Reply with quote

Dear all,

I am executing a section in a Cobol program. Everything was working fine until I included an execution of a paragraph with the perform thru logic where the thru portion contains just an exit statement.
My theory is that this exit statement is causing my problem.
Is my theory correct ?
Is having this kind of logic ( paragraph thu exit in a section) a good practice?
I can provide my code if needed as I do not have access to my work-laptop right now.

Thank you in advance.
Ziko
Back to top
View user's profile Send private message
sergeyken

Senior Member


Joined: 29 Apr 2008
Posts: 2263
Location: USA

PostPosted: Thu Aug 07, 2025 10:32 pm
Reply with quote

You forgot to describe the matter of the problem itself!... icon_question.gif
Back to top
View user's profile Send private message
Rohit Umarjikar

Global Moderator


Joined: 21 Sep 2010
Posts: 3108
Location: NYC,USA

PostPosted: Fri Aug 08, 2025 10:27 am
Reply with quote

Please do so and it shouldn’t be a problem as we don’t know what problem.
Back to top
View user's profile Send private message
Ziko13

New User


Joined: 19 Jul 2018
Posts: 43
Location: Greece

PostPosted: Sat Aug 09, 2025 10:44 pm
Reply with quote

On Monday I will post my code. Please bear with me
Back to top
View user's profile Send private message
Ziko13

New User


Joined: 19 Jul 2018
Posts: 43
Location: Greece

PostPosted: Mon Aug 11, 2025 12:53 pm
Reply with quote

Code:

        SET CWT-OP-UPDATE TO TRUE                 
        IF WS-PAGE-CNT-NBR = 0                   
*          DISPLAY 'BEFORE CWT-CSSERVHS-UPDT'     
           PERFORM CWT-CSSERVHS-UPDT             
*             THRU CWT-CSSERVHS-UPDT-EXIT         
        ELSE                                     
*          DISPLAY 'BEFORE CWT-CSSERVHS-UPDT-LAST'
           PERFORM CWT-CSSERVHS-UPDT-LAST         
              THRU CWT-CSSERVHS-UPDT-LAST-EXIT   
        END-IF                                   


If I make CWT-CSSERVHS-UPDT a normal paragraph I am in a loop.
Back to top
View user's profile Send private message
Ziko13

New User


Joined: 19 Jul 2018
Posts: 43
Location: Greece

PostPosted: Mon Aug 11, 2025 1:34 pm
Reply with quote

Got it. Inside the paragraph there was a section executed (hidden in a copybook).
Back to top
View user's profile Send private message
View previous topic : : View next topic  
Post new topic   Reply to topic All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts Section within Section Reporting DFSORT/ICETOOL 6
No new posts COBOL -Linkage Section-Case Sensitive COBOL Programming 1
No new posts Need help for File Aid JCL to extract... Compuware & Other Tools 23
No new posts Using Dynamic file handler in the Fil... COBOL Programming 2
No new posts Use of Perform Thru Exit COBOL Programming 6
Search our Forums:


Back to Top