View previous topic :: View next topic
|
Author |
Message |
jsaurabh.raj
New User
Joined: 29 Dec 2005 Posts: 2
|
|
|
|
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 |
|
|
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
|
|
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 |
|
|
prasadvrk
Active User
Joined: 31 May 2006 Posts: 200 Location: Netherlands
|
|
|
|
All paras of a section will be executed if you do not exit the section |
|
Back to top |
|
|
priyamnavada
New User
Joined: 24 Dec 2005 Posts: 52 Location: hyderabad
|
|
|
|
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 |
|
|
Craq Giegerich
Senior Member
Joined: 19 May 2007 Posts: 1512 Location: Virginia, USA
|
|
|
|
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 |
|
|
jsaurabh.raj
New User
Joined: 29 Dec 2005 Posts: 2
|
|
|
|
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.
Any other solution left??Please let me know.
regards,
Saurabh |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
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 |
|
|
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
|
|
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.....
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 |
|
|
miggranados
New User
Joined: 12 Jun 2007 Posts: 2 Location: BRASIL
|
|
|
|
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 |
|
|
|