IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

recursive program in vs-cobol


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
muthukumar

New User


Joined: 24 Mar 2004
Posts: 29

PostPosted: Mon Apr 05, 2004 6:59 pm
Reply with quote

I tried writing a recursive program with VS-COBOL II. I got the following error during run time.

IGZ0015S A recursive call was attempted to a program that was already active.

Does this mean VS-COBOL II does not support recursive functionality or else some problem with the functionality of my code.

find the code below
IDENTIFICATION DIVISION.
PROGRAM-ID. COBOL1.
ENVIRONMENT DIVISION.
DATA DIVISION.
WORKING-STORAGE SECTION.
01 WORK-NUM PIC 9(02) VALUE 1.
01 INCREM PIC 9(01) VALUE 5.
PROCEDURE DIVISION.
COMPUTE WORK-NUM = WORK-NUM * INCREM.
COMPUTE INCREM = INCREM - 1
CALL 'COBOL1'.
IF INCREM = 0
DISPLAY ' FACTORIAL ' WORK-NUM
GOBACK.

regards
Muthu
Back to top
View user's profile Send private message
mdtendulkar

Active User


Joined: 29 Jul 2003
Posts: 237
Location: USA

PostPosted: Tue Apr 06, 2004 11:29 am
Reply with quote

Hello muthukumar,

Take a look at the following link for more details and example on recursive programming.
Code:

http://www.naspa.com/PDF/99/T9906004.pdf


Hope this helps

Regards
Mayuresh Tendulkar
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts Replace each space in cobol string wi... COBOL Programming 3
No new posts Using API Gateway from CICS program CICS 0
No new posts COBOL -Linkage Section-Case Sensitive COBOL Programming 1
No new posts COBOL ZOS Web Enablement Toolkit HTTP... COBOL Programming 0
No new posts Calling DFSORT from Cobol, using OUTF... DFSORT/ICETOOL 5
Search our Forums:

Back to Top