- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - OpenVMS
- >
- recursive activation of PERFORM -problem in Cobol
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-08-2008 10:02 PM
тАО04-08-2008 10:02 PM
recursive activation of PERFORM -problem in Cobol
I have the following problem:
In the code I'm updating is following sections (a lot simplified):
MAIN SECTION.
MAIN_START.
...
PERFORM UNTIL ALL_FINISHED
MOVE 1 TO A_IND
PERFORM 400_GET_ROWS_FROM_TABLE
PERFORM UNTIL A_IND > ROWAMOUNT
PERFORM 600_SORT_ROWS
ADD 1 TO A_IND
END-PERFORM
END-PERFORM
...
MAIN_END.
EXIT PROGRAM.
600_SORT_ROWS SECTION.
600_SORT_ROWS_START.
...
MOVE CUSTOMERID(A_IND) TO INPUT_1
PERFORM 620_GET_COSTOMER_INFO
...
PERFORM UNTIL B_IND > CUSTOMER_RESULT_AMOUNT
IF CUSTOMER_LABEL(CUSTOMER_RESULT_AMOUNT) = 'A1' THEN...
ADD 1 TO B_IND
END-PERFORM
...
When the running of the program hits the 'perform until b_ind', the program crashes with the info below.
I have tried moving the perform in the sub-section to section of it's own, but problem stays.
%COB-F-RECACTPER, recursive activation of PERFORM
%TRACE-F-TRACEBACK, symbolic stack dump follows
image module routine line rel PC abs PC
DEC$COBRTL 0 0000000000000ECC 000000007C356ECC
Cxxx_xx_xxxxxxx_EUR Hxxx_xxxxxxxxxxx_xxxxxx_EUR Hxxx_xxxxxxxxx_xxxxxx_EUR
8387 000000000000F4D4 00000000001FEB74
Cxxx_xx_xxxxxxx_EUR Cxxx_xx_xxxxxxx_EUR Hxxx_xx_xxxxxxx_EUR
1078 0000000000002A58 00000000001D2AE8
Cxxx_xx_xxxxxxx_EUR Cxxx_xx_xxxxxxx_EUR Cxxx_xx_xxxxxxx_EUR
52 000000000000006C 00000000001D006C
Cxxx_xx_xxxxxxx_EUR 0 00000000002D971C 00000000002D971C
PTHREAD$RTL 0 0000000000055FF8 000000007BD13FF8
PTHREAD$RTL 0 0000000000030404 000000007BCEE404
0 FFFFFFFF80275EF4 FFFFFFFF80275EF4
- Tags:
- COBOL
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-08-2008 10:24 PM
тАО04-08-2008 10:24 PM
Re: recursive activation of PERFORM -problem in Cobol
that is already activated due to a previous PERFORM
statement. This constitutes an attempted recursive
activation of the paragraph or section and is illegal in the
COBOL language. The program must execute an EXIT statement
from the paragraph or section before this paragraph or
section can be the subject of a subsequent PERFORM.
User Action: Examine the logic of the program to determine
why an EXIT from the paragraph or section is not being
executed before the subsequent PERFORM of the same paragraph
or section.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-08-2008 11:30 PM
тАО04-08-2008 11:30 PM
Re: recursive activation of PERFORM -problem in Cobol
"the Fortran and COBOL languages are defined in such a way that compilers can make implicit use of static storage, and such compilers do not generate reentrant code; it is difficult to write reentrant code in a nonreentrant language".
If not, post versions of vms, cobol and a complete source listing.
Wim
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-08-2008 11:37 PM
тАО04-08-2008 11:37 PM
Re: recursive activation of PERFORM -problem in Cobol
I have examined the logic of the program for the last 1,5 days now :-) trying to solve this.
System: XMA97, AlphaServer ES45 Model 2B
Cobol : OpenVMS V7.3-2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-09-2008 12:46 AM
тАО04-09-2008 12:46 AM
Re: recursive activation of PERFORM -problem in Cobol
within the 'unlabeled' perform until a_ind,
you perform the section 600_sort_rows and in
this section you do another 'unlabeled' perform until b_ind.
I guess you cant nest 'unlabeled' performs. So, try to make the perform until b_ind a 'named' perform.
Rgds
Marc
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-09-2008 01:04 AM
тАО04-09-2008 01:04 AM
Re: recursive activation of PERFORM -problem in Cobol
I forgot to mention that we are not using threads.
Spent this morning sitting next to the local guru, and we arrived to the conclusion, that the problem is most likely in the subprogram in section 620_GET_COSTOMER_INFO. Maybe the object isn't linked ok or is old, or maybe has some undiscovered problems (legacy code, old as ...).
Thank you for your quick replies, I found this forum only today and this seems the place to read to learn more! I'll see now if the subprogram is the cause of all this.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-09-2008 02:11 AM
тАО04-09-2008 02:11 AM
Re: recursive activation of PERFORM -problem in Cobol
The subprogram is 'giving out' info in 50-size array, and the receiving end was defined to accept only 30. So the extra 20 dissapered into the memory somewhere and caused a bit erratic problems. At least, that's what I'm thinking now.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-09-2008 02:13 AM
тАО04-09-2008 02:13 AM
Re: recursive activation of PERFORM -problem in Cobol
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-09-2008 03:20 AM
тАО04-09-2008 03:20 AM
Re: recursive activation of PERFORM -problem in Cobol
Looks to me like that is a bad program end.
Cobol is (documented!) to ignore that EXIT PROGRAM. Odd and dispicable behaviour in my book, but that's how it is supposed to be.
Change to STOP RUN and try again:
The (uncontrolled) entry into the 600_SORT_ROWS SECTION can lead to anything.
IDENTIFICATION DIVISION.
PROGRAM-ID. my-test.
DATA DIVISION.
WORKING-STORAGE SECTION.
01 RETURN_VAR PIC S9(9) USAGE IS COMP.
PROCEDURE DIVISION.
MY_MAIN SECTION.
MAIN.
PERFORM 600_SORT_ROWS.
DISPLAY "Main done.".
MAIN_END.
EXIT PROGRAM.
DISPLAY "Can not get here?".
600_SORT_ROWS SECTION.
600_SORT_ROWS_START.
DISPLAY "Sort done.".
600_SORT_ROWS_END.
$ cob tmp
$ link tmp
$ run tmp
Sort done.
Main done.
Can not get here?
Sort done.
Hein.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-09-2008 03:41 AM
тАО04-09-2008 03:41 AM
Re: recursive activation of PERFORM -problem in Cobol
We have been ordered to use STOP RUN only in the end of the main prog, and to use EXIT PROGRAM in all modules below.
Anyway, I fixed the problem; my settings were a bit off, so the new, updated subprogram's libraries weren't copied correctly to this module, but were correctly used in the obj of the subprogram which resulted an data overflow.
Thanks again, you all brought light to darkness at very crucial moment ;-)
(Sorry for my undiciplined use of English and especially correct terminology, English is my 3rd language.)