|
View previous topic :: View next topic
|
| Author |
Message |
Ziko13
New User
Joined: 19 Jul 2018 Posts: 43 Location: Greece
|
|
|
|
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 |
|
 |
sergeyken
Senior Member

Joined: 29 Apr 2008 Posts: 2263 Location: USA
|
|
|
|
You forgot to describe the matter of the problem itself!...  |
|
| Back to top |
|
 |
Rohit Umarjikar
Global Moderator

Joined: 21 Sep 2010 Posts: 3108 Location: NYC,USA
|
|
|
|
| Please do so and it shouldn’t be a problem as we don’t know what problem. |
|
| Back to top |
|
 |
Ziko13
New User
Joined: 19 Jul 2018 Posts: 43 Location: Greece
|
|
|
|
| On Monday I will post my code. Please bear with me |
|
| Back to top |
|
 |
Ziko13
New User
Joined: 19 Jul 2018 Posts: 43 Location: Greece
|
|
|
|
| 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 |
|
 |
Ziko13
New User
Joined: 19 Jul 2018 Posts: 43 Location: Greece
|
|
|
|
| Got it. Inside the paragraph there was a section executed (hidden in a copybook). |
|
| Back to top |
|
 |
|
|