View previous topic :: View next topic
|
Author |
Message |
gkchakri Currently Banned New User
Joined: 07 Jun 2004 Posts: 9 Location: Bangalore
|
|
|
|
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 |
|
|
mcmillan
Site Admin
Joined: 18 May 2003 Posts: 1210 Location: India
|
|
|
|
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 |
|
|
Giridharan
New User
Joined: 23 Jun 2004 Posts: 4
|
|
|
|
Hai Kalyan,
RENT is the compiler option used for this purpose.
Regards,
Giridharan. |
|
Back to top |
|
|
gkchakri Currently Banned New User
Joined: 07 Jun 2004 Posts: 9 Location: Bangalore
|
|
|
|
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 |
|
|
priya
Moderator
Joined: 24 Jul 2003 Posts: 568 Location: Bangalore
|
|
|
|
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 |
|
|
|