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

Doubt in Perform ..Thru...


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

Active User


Joined: 15 Dec 2005
Posts: 271

PostPosted: Thu Jul 03, 2008 1:13 pm
Reply with quote

Dear all,

while Executing the below piece of codes,
In code-1 after performing Para-a control goes to Para-c.
In code-2 after performing Para-a control foes to Para-b.

Will 'Thru' tracks down the control while exiting a para?

Please Let me know how the tracking process happens?

Regards,
Murali.

Code-1
-----------------------
Perform para-a .
Perform para-b
.
.
.
Para-a.

.
.
Go to Para-a-exit.

Para-a-exit.
Exit.

Para-c.
------------------------------------
Code-2
----------------------------------------------

Perform para-a Thru para-a-exit.
Perform para-b
.
.
.
Para-a.

.
.
Go to Para-a-exit.

Para-a-exit.
Exit.

Para-c.
-------------------------------------------------
Back to top
View user's profile Send private message
birdy K

New User


Joined: 05 Mar 2008
Posts: 72
Location: chennai

PostPosted: Thu Jul 03, 2008 1:22 pm
Reply with quote

In code-1.

In Para-a. Go to para-a-exit. The control is not coming back. So the next statement of para-c is working.

In code-2.

Perform para-a thru para-a-exit. The control is coming back. And then control Perform para-b is working.

Corrections are welcome.
Back to top
View user's profile Send private message
santy
Warnings : 1

New User


Joined: 19 Jul 2007
Posts: 22
Location: mumbai

PostPosted: Thu Jul 03, 2008 3:28 pm
Reply with quote

For code-1:-

In Para-a. Go to para-a-exit. Go To command is not giving back to Para-a. So the next statement of para-c is working.

For code-2:-

Perform para-a thru para-a-exit. The control is coming back at para-a. And then control Perform para-b is working.
Back to top
View user's profile Send private message
ashimer

Active Member


Joined: 13 Feb 2004
Posts: 551
Location: Bangalore

PostPosted: Thu Jul 03, 2008 3:35 pm
Reply with quote

In code 1

you are not mentioning the end of the active perform ....


please refer to cobol language reference manual and check for EXIT statement definition
Back to top
View user's profile Send private message
mmwife

Super Moderator


Joined: 30 May 2003
Posts: 1592

PostPosted: Thu Jul 03, 2008 6:43 pm
Reply with quote

The thru .... sets the exit pgraph to return to the NSI after the perform.
If you don't use thru when you GOTO a-exit the EXIT is a NOOP so you fall thru to pgraph C.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Thu Jul 03, 2008 7:17 pm
Reply with quote

another reason to use sections. within the section only have one paragraph, the exit. then you can use your primative go to coding.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts Use of Perform Thru Exit COBOL Programming 6
No new posts Doubt about pl/1 (job offer) General Talk & Fun Stuff 5
No new posts doubt when executing a file when logg... TSO/ISPF 2
No new posts Doubt in MFS IMS DB/DC 2
No new posts How to perform Digest Access Authenti... All Other Mainframe Topics 0
Search our Forums:

Back to Top