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
 
EXIT out of a section without executing the para in fall thr

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

New User


Joined: 29 Dec 2005
Posts: 2

PostPosted: Fri Jun 08, 2007 3:10 am    Post subject: EXIT out of a section without executing the para in fall thr
Reply with quote

hi,

I wish to exit out of a section without executing the para in fall thru.
This is something like this
Perform CA000-Test-section

CA000-Test-Section Section.
-
-
CB000-test2-para.
-

I wish to perform the section but do not wish to perform the CB000-Test2-para following this. Can this be achieved by any means? I cannot use Go back in CA000-Test-Section as I need control at the next line after the perform statement is executed. loooking forward for suggestion/solution.

Regards,
Saurabh
Back to top
View user's profile Send private message

William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3158
Location: Tucson AZ

PostPosted: Fri Jun 08, 2007 3:19 am    Post subject:
Reply with quote

Just declare a paragraph (at the end of the section) called, maybe "CA000-Test-exit" and follow that with the command "EXIT." and when you want out, just go to the exit.
Back to top
View user's profile Send private message
prasadvrk

Active User


Joined: 31 May 2006
Posts: 200
Location: Netherlands

PostPosted: Fri Jun 08, 2007 11:16 am    Post subject:
Reply with quote

All paras of a section will be executed if you do not exit the section
Back to top
View user's profile Send private message
priyamnavada

New User


Joined: 24 Dec 2005
Posts: 52
Location: hyderabad

PostPosted: Fri Jun 08, 2007 4:10 pm    Post subject:
Reply with quote

Perform CA000-Test-section

CA000-Test-Section Section.
-
GO TO CA000-EXIT -----------------DO THIS ONE
CB000-test2-para.
-
-
-

CA000-EXIT. -----------ADD CODE HERE
EXIT.
Back to top
View user's profile Send private message
Craq Giegerich

Senior Member


Joined: 19 May 2007
Posts: 1512
Location: Virginia, USA

PostPosted: Fri Jun 08, 2007 6:06 pm    Post subject:
Reply with quote

Just change CB000-test2-para to a section or add a section name before it. Your perform CA000-test-section will end at the end of CA000-test-section.
Back to top
View user's profile Send private message
jsaurabh.raj

New User


Joined: 29 Dec 2005
Posts: 2

PostPosted: Tue Jun 12, 2007 12:48 am    Post subject: Re: EXIT out of a section without executing the para in fall
Reply with quote

Hi,
Thanks for all your responses. My problem is I cannot make the other para as section as the code is written in such a way that if I make them as section then all the paras below that section comes inside that section, which i don't want. Exiting a section also does not help as the control still goes to the para instead next line from where perform statement is performed. Also I thought of using Perform thru but that's not a standard so I cannot use that as well.
icon_mad.gif

Any other solution left??Please let me know.

regards,
Saurabh
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Tue Jun 12, 2007 1:13 am    Post subject:
Reply with quote

Hello,

I'd suggest you define what you need to do to implement this set of "business rules". So far, this topic appears to focus on things you can't do within the compiler - because of some local restrictions.

I suspect that other programs/applications at your location have been required to provide similar functionality. You might look at how they get around these restrictions.

If you will post what the code needs to do, we may be able to offer some suggestions.

And a question - when the section is performed, does the code know then how much of the section needs to be executed?
Back to top
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3158
Location: Tucson AZ

PostPosted: Tue Jun 12, 2007 1:20 am    Post subject: Re: EXIT out of a section without executing the para in fall
Reply with quote

jsaurabh.raj wrote:
Exiting a section also does not help as the control still goes to the para instead next line from where perform statement is performed.
If I understand what you are trying to say, BULLPUCKY!
Quote:
Any other solution left??Please let me know.

Again..... icon_rolleyes.gif
William Thompson wrote:
Just declare a paragraph (at the end of the section) called, maybe "CA000-Test-exit" and follow that with the command "EXIT." and when you want out, just go to the exit.
Back to top
View user's profile Send private message
miggranados

New User


Joined: 12 Jun 2007
Posts: 2
Location: BRASIL

PostPosted: Thu Jun 14, 2007 8:00 pm    Post subject:
Reply with quote

bom dia...
Analisando seu problema, o que verificamos eh que o paragrafo CB000-test2-para nao esta configurado como uma SECTION. Desta forma, o fluxo normal deste processo eh que CA0000-Test-Section seja executado ateh encontrar um outro paragrafo contendo a clausula SECTION.
Se vc realmente nao quer que CB000-test2-para seja executado na sequencia de CA000-Test_Section, a seguinte alteracao devera ser executada:
de:
CB000-test2-para.
para:
CB000-Test2-para section.
Desta forma nao havera necessidade de se incluir os paragrafos de EXIT na codificacao de seus programas.
Lembre-se:
- Toda SECTION termina quando encontra outra SECTION.

Boa Sorte.

Or to put anoher way......

analyzing this problem, we verify :
the paragraph:
CB000-test2-para.
is not contained in a "SECTION".
The process :
CA0000-Test-Section.
Only goes stop or exit when find another SECTION.
correct this:
from:
CB000-test2-para.
to:
CB000-Test2-para section.

Remember:
All "SECTION" finishes when it finds another "SECTION".
Good Luck.
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 EXIT or RETURN cvnlynn CLIST & REXX 18 Wed Jul 19, 2017 2:50 am
No new posts Executing OO COBOL program invoking J... Virendra Shambharkar COBOL Programming 2 Tue Jan 10, 2017 6:37 pm
No new posts Viewing executing process in NDM .. q... Debb.Brant IBM Tools 0 Wed Dec 14, 2016 10:55 pm
No new posts How to display value of an exit param... lind sh CICS 2 Sun Oct 09, 2016 12:28 pm
No new posts A sample of exit program for exit XMN... lind sh CICS 2 Mon Oct 03, 2016 5:07 pm

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