Portal | IBM Manuals | Downloads | Products | Refer | Info | Programs | JCLs | Forum Rules*| Site Map | Mainframe CD 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index
 
Register
 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index FAQ Search Memberlist Usergroups Profile Log in to check your private messages Log in
 
Doubt in Perform ..Thru...

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> Mainframe COBOL
Author Message
pkmurali
Warnings : 1

Active User


Joined: 15 Dec 2005
Posts: 58

PostPosted: Thu Jul 03, 2008 1:13 pm    Post subject: Doubt in Perform ..Thru...
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
References
birdy K

Active User


Joined: 05 Mar 2008
Posts: 68
Location: chennai

PostPosted: Thu Jul 03, 2008 1:22 pm    Post subject:
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

New User


Joined: 19 Jul 2007
Posts: 5
Location: mumbai

PostPosted: Thu Jul 03, 2008 3:28 pm    Post subject: Reply to: Doubt in Perform ..Thru...
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

Senior Member


Joined: 13 Feb 2004
Posts: 360
Location: Bangalore

PostPosted: Thu Jul 03, 2008 3:35 pm    Post subject:
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: 1508

PostPosted: Thu Jul 03, 2008 6:43 pm    Post subject:
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

Senior Member


Joined: 20 Oct 2006
Posts: 1641
Location: germany

PostPosted: Thu Jul 03, 2008 7:17 pm    Post subject:
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
Display posts from previous:   
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> Mainframe COBOL All times are GMT + 6 Hours
Page 1 of 1