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

A CALLS B, B CALLS C & C CALLS A


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

New User


Joined: 07 Jun 2004
Posts: 9
Location: Bangalore

PostPosted: Fri Jun 11, 2004 12:46 pm
Reply with quote

HAI FRENDZ,

I HAVE A PROBLEM:

A CALLS B, B CALLS C & C CALLS A.

DO WE HAVE ANY COMPILER DIRECTIVE TO PERFORM THIS PROCESS.

BYE,
KALYAN.
Back to top
View user's profile Send private message
mcmillan

Site Admin


Joined: 18 May 2003
Posts: 1210
Location: India

PostPosted: Fri Jun 11, 2004 2:43 pm
Reply with quote

kalyan,

You are trying to call A from C, it's a recursive Call. It's possible in IBM COBOL & ENTERPRISE COBOL, but not in VS COBOL II. There is no Compiler Directives necessary to do so.



In IBM & ENTERPRISE COBOL:

Quote:
A called program can directly or indirectly execute its caller. For example, program X calls program Y, program Y calls
program Z, and program Z then calls program X. This type of call is recursive.

To make a recursive call, you must code the RECURSIVE clause on the PROGRAM-ID paragraph of the recursively
called program. If you try to recursively call a COBOL program that does not have the RECURSIVE clause coded on its
PROGRAM-ID paragraph, a condition is signaled. If the condition remains unhandled, the run unit will end.



IN VS COBOL II:

Quote:

A called program must not directly or indirectly execute its caller (such
as program X calling program Y; program Y calling program Z; and program Z
then calling program X). This is called a recursive call. If you attempt
to execute a recursive call to a COBOL program, the run unit will
terminate abnormally (abend).
Back to top
View user's profile Send private message
Giridharan

New User


Joined: 23 Jun 2004
Posts: 4

PostPosted: Wed Jun 23, 2004 2:46 pm
Reply with quote

Hai Kalyan,

RENT is the compiler option used for this purpose.

Regards,
Giridharan.
Back to top
View user's profile Send private message
gkchakri
Currently Banned

New User


Joined: 07 Jun 2004
Posts: 9
Location: Bangalore

PostPosted: Thu Jul 01, 2004 2:30 pm
Reply with quote

hai Giridharan,

It's quite late to have the reply of the question. But i am truly thank full to you for this thing.

Thankyou,
kalyan.
Back to top
View user's profile Send private message
priya

Moderator


Joined: 24 Jul 2003
Posts: 568
Location: Bangalore

PostPosted: Sat Jul 03, 2004 12:36 am
Reply with quote

Hai,

I disagree your answer giridaran....

RENT option is used to make a program Re Entrant. It's used under CICS and to run the program above line (31 bit).

There is no compiler option necessary to make a program recursive.
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 COBOL ZOS Web Enablement Toolkit HTTP... COBOL Programming 0
No new posts JAVA equivalent for IMS DL/I calls IMS DB/DC 2
No new posts Sending system service calls by AIBTDLI. IMS DB/DC 1
No new posts Scan for Calls to DB2 IBM Tools 10
No new posts Static and Dynamic Calls with DB2 Pro... DB2 6
Search our Forums:

Back to Top