Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

A CALLS B, B CALLS C & C CALLS A

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
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    Post subject: A CALLS B, B CALLS C & C CALLS A
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: 1203
Location: India

PostPosted: Fri Jun 11, 2004 2:43 pm    Post subject: Re
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    Post subject:
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    Post subject: Thanks
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    Post subject: Re
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    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 Sending system service calls by AIBTDLI. lind sh IMS DB/DC 1 Wed Mar 16, 2016 6:51 pm
No new posts Scan for Calls to DB2 kctechpro2 IBM Tools 10 Fri Sep 04, 2015 11:31 pm
No new posts Static and Dynamic Calls with DB2 Pro... RahulChaudhari DB2 6 Sun Nov 30, 2014 1:37 am
No new posts IMS Calls Vs DB2 Calls shiitiizz All Other Mainframe Topics 5 Fri Jun 06, 2014 12:20 pm
No new posts IMS calls to database. dilip_bangalore IMS DB/DC 3 Mon Sep 23, 2013 1:17 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us