Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Doubt in Perform ..Thru...

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
pkmurali
Warnings : 1

Active User


Joined: 15 Dec 2005
Posts: 237

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

birdy K

New User


Joined: 05 Mar 2008
Posts: 72
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
Warnings : 1

New User


Joined: 19 Jul 2007
Posts: 22
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

Active Member


Joined: 13 Feb 2004
Posts: 551
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: 1592

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

Global Moderator


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

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
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Doubt in MFS abdulrafi IMS DB/DC 2 Fri Oct 21, 2016 3:09 pm
No new posts How to perform Digest Access Authenti... vasanthz All Other Mainframe Topics 0 Tue Mar 15, 2016 4:47 pm
No new posts Doubt on GETMAIN, FREEMAIN behaviour Arunkumar Chandrasekaran CICS 3 Sun Aug 30, 2015 9:22 pm
No new posts Doubt in using command code O Appu IMS DB/DC 4 Tue Jan 13, 2015 3:14 pm
No new posts Doubt in using command code D and N t... Appu IMS DB/DC 7 Mon Dec 29, 2014 5:52 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us