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 an in line perform? When would you use it? Anything else you wish to say about it.

0 Answers  


What is the difference between a subscript and an index in a table definition?

3 Answers   TCS,


What are the functions like c or c++ in cobol?

2 Answers  


sample code for read a 2nd record from last in flatfile how can do?

4 Answers   iNautix,


what is the difference between perform varying and perform until

4 Answers   TCS,






How to Pass table from a cobol program to another cobol program and how to use that table in called program

8 Answers   Patni, SunGard,


Write a program that uses move corresponding.

0 Answers  


How to read a 100 record from a file through cobol?

2 Answers  


C1 C2 C3 are three conditions whose TRUTH values are as folloes. C1-TRUE C2-FALSE C3-TRUE A,B,C are defined as given below A:C1 AND(NOT C2) OR C3 B.(NOT C1) OR (NOT C2 AND NOT C3) C.(C1 OR C2)AND C3 D.C1 AND C2 OR C3 given the above information which of the following statements are valid? a.only A,B and C are TRUE b.only A,C and D are TRUE c.A,B,C and D are TRUE d.only C and D are TRUE

1 Answers   TCS,


What is 88 level used for ?

2 Answers  


I have the file which is having the extension no as records. sample file will look like below. 2310 3410 3256 4350 3781 5408 I need to replace the record which is starting with 3 to 5 (i.e) 3410 to 5410. How can we do it through cobol and cobol-db2 program? I need the possible logic?

5 Answers   RBS,


What is difference between com and com3? Eg. s9(4) so what is the memory it will occupy com and com3.

2 Answers  


Categories