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.



If a sub program is called from mainprogram.I have opened cursor in main program and Fetch the res..

Answer / shruti

The scope of cursor-name is the source program in which it is defined; that is, the application program submitted to the precompiler. Thus, you can only refer to a cursor by statements that are precompiled with the cursor declaration. For example, a COBOL program called from another program cannot use a cursor that was opened by the calling program

Is This Answer Correct ?    1 Yes 0 No

Post New Answer

More COBOL Interview Questions

What is JOBLIB and STEPLIB in JCL? what is the purpose of using it?

1 Answers  


What is a scope terminator give example?

0 Answers  


how many times PARA-A is performed : PERFORM PARA-A VARYING TIMES-COUNTER FROM 1 BY 1 UNTIL TIMES-COUNTER >0 PARA-A MOVE P TO Q MOVE H TO TIMES COUNTER a.10 b.1 c.11 d.0

4 Answers   TCS,


When search all is used in cobol program without sorted input data?

6 Answers   CGI, Principal Finance,


How do u debug a S0C7 abend? (aswered till we get the field which caused that) After knowing the field which caused that how do u know the record which caused that if it is in production env? (dumb) Ok let us assume that we got to know that 100th record caused that and I wanted to skip only 100th record from the file and process from 101th. How to do that in JCL using SORT? (tried with STOPAFT but ended up dumb when he said smthing else is ther)

3 Answers   IBM,






i have variable record in the 5th, i want to sort from 5th filed ? how ?

2 Answers   TCS,


can u give result for the fallowing example... 05 a pic 9(2) 05 b redifines a pic x(2). move 'xy' to b. display a,b.

10 Answers   IBM,


which is Best IBM Mainframe Training and Placement Institute in Ameerpet Hyderabad

0 Answers  


What is "Call by content" and "call by reference"?

4 Answers   ADP, Syntel,


What is the default value of DISP for temp datasets

5 Answers   IBM,


How many maximum number of procedures can we write in one COBOL program?

5 Answers  


can we use 77 level no for Redefines?if we use give an example?

3 Answers   Mphasis,


Categories