We have 3 programms A,B,C.In the middle of the program A
the controls goes to program B and in the middle of the
program B control wants to go program C,after completion of
program C again control comes to program B and again after
completion of program B control comes to program A.How the
process will takes and what are the controls we use for
that process.If it is possible anybody of you explain with
example?

Answers were Sorted based on User's Feedback



We have 3 programms A,B,C.In the middle of the program A the controls goes to program B and in the..

Answer / chakri

Deepak if u want to make control go to program B from
Program A we can do it by using a CALL statement and same
way we can make control go to Program C from Program B . In
Program C we have to code GOBACK instead of STOP RUN so
taht control will return to Program B after the completion
of Program B and similarly we have to code GOBACK in
Program B so that control wil return to Program A but in
Program A we have to code STOP RUN as last statement.

I think its clear for u

Is This Answer Correct ?    17 Yes 0 No

We have 3 programms A,B,C.In the middle of the program A the controls goes to program B and in the..

Answer / shailendra

Hi the first ans will work when you are working with cics
and second one will work when jcl + cobol.

Is This Answer Correct ?    6 Yes 0 No

We have 3 programms A,B,C.In the middle of the program A the controls goes to program B and in the..

Answer / rockish

XCTL may not work.. XCTL is used to transfer the control and
the control will not be returned back..

Is This Answer Correct ?    6 Yes 1 No

We have 3 programms A,B,C.In the middle of the program A the controls goes to program B and in the..

Answer / asmara

LINK and XCTL are helpful for the control flow

Is This Answer Correct ?    5 Yes 3 No

We have 3 programms A,B,C.In the middle of the program A the controls goes to program B and in the..

Answer / suresh ramaiyan

if it is a fully cobol program we can use the following
statement to pass the control to another program, which
will return the control to the next line of calling program.

A -> B -> C
In program A: call 'B'.
In program B: call 'C'.
EXIT PROGRAM.(instead of STOP RUN)
In program C: EXIT PROGRAM.(instead of STOP RUN).

if it is CICS program, we have to user LINK for getting the
control back to the calling program.

Is This Answer Correct ?    2 Yes 1 No

Post New Answer

More COBOL Interview Questions

Hi All, Can anyone tell me how we can MOVE value of a X(19) variable to a S9(17) COMP-3 variable? Answer with an Example will be of great help.

6 Answers   EDS,


What type of SDLC u followed? Why?

0 Answers   IBM,


Write a program to concert an Indexed file into Sequential file?

1 Answers   Covansys,


IDENTIFICATION DIVISION. PROGRAM-ID. MOVEPGM. DATA DIVISION. WORKING-STORAGE SECTION. 01 WS-I PIC 9(2). PROCEDURE DIVISION. A1000-MAIN-PARA. PERFORM PARA-X WITH TEST BEFORE UNTIL WS-I= 5 STOP RUN. PARA-X. DISPLAY "BEST2". I m getting error s722,while executing the program, seems getting in loop, can anybody tell me why

3 Answers  


What do you understand by psb and acb?

0 Answers  






Can we use icetool in cobol program?

3 Answers  


I want ALL jcl ERROR cods

1 Answers  


what is the use of filler in cobol programing?

4 Answers   MAT,


which is faster either static call or dynamic call ? and specify the reasons for it ? reply fast

1 Answers  


If a sub program is called from mainprogram.I have opened cursor in main program and Fetch the result in subprogram ,Is it possible ?If yes please tell me the reason.

1 Answers  


When we code these comp,comp1,comp-2,comp-3 and comp4 values. I know the differnece.I mean when we will prefer if it is new program.Explain in detail with memory examples. Thanks in advance.

1 Answers   CTS,


) How do u handle errors in BMS macro

0 Answers   IBM,


Categories