what is the diff b/w select stsmt and cursor ?

Answers were Sorted based on User's Feedback



what is the diff b/w select stsmt and cursor ?..

Answer / vinodquestion

Select stmt--> This is DML stmt in sql. With this we can retrieve rows or complete tables from database.

But here in cobol-db2 prog in embededd sql statements it uses. for retrieving rows from tables.

Using this we should retreive only single row from table.(i.e, at where clause)

Cursor stmt--> IF you want to retreive more than one row u need to use this cursors concepts.

IF MY ANSWER IS WRONG CORRECT MY ANSWER>>

Note: Select stmt also used in file accesing situations. i.e, (select file assign to dd1.)

Is This Answer Correct ?    2 Yes 0 No

what is the diff b/w select stsmt and cursor ?..

Answer / smartboy

SELECT is SQL query to retrive rows from table in
relational database.
The COBOL program uses the embedded SQL, In order to
process multiple rows in cobol program CURSOR is used.
CURSOR is basically a contolled structure/ mechanisum by
which we can process the multiple data rows in host
language program.
If you observe the syntax of CURSOR it uses the SELECT
query inside it.

Is This Answer Correct ?    2 Yes 0 No

Post New Answer

More COBOL Interview Questions

Can we move X(7) to S9(7) COMP?

1 Answers  


given the following: 77 A PIC 9V9 VALUE 9.5 77 B PIC 9 VALUE 9. 77 C PIC V9 VALUE 0.8 77 D PIC 9 77 E PIC 9 77 F PIC 9V999 what are the contenta of D E nad F after the following statements are executed: COMPUTE F ROUNDED=A+C/B MULTIPLY A BY C GIVING E ADD B C A GIVING D ROUNDED a.F=9.589 E=8 D=1 b.F=9.589 E=8 D=9 c.F=9.589 E=7 D=9 d.F=9.589 E=7 D=1

5 Answers   Broadridge, TCS,


When the working storage variables get allocated? a.At Compile time b.At starting of the run time c.At end of the run time. d.None of these

6 Answers   Wipro,


How To move a value to an array using move verb?

3 Answers   IBM,


Is It Possible to Update or change in VIEW Mode?

5 Answers   CSC,






Write a program to explain size error.

0 Answers  


) how do u code after getting data?

0 Answers   IBM,


Give some examples of command terminators?

0 Answers  


What will happen if we move SPACES to numeric field and ZEROES to alphabetic field?

2 Answers  


Which is the best IBM mainframe Training Institute in Ameerpet, Hyderabad

35 Answers  


What is the linkage section?

4 Answers  


what is label record is standard or omitted in file description of data division?

3 Answers   IBM, TCS,


Categories