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

What is length is cobol?

0 Answers  


Consider the below example call a-test1. -- -- -- a-test1. if a=b perform a-test through a-exit next sentence else if b=c perform c-test through c-exit. if a=d perform d-test through d-exit. a-test. -- -- a-exit. exit. can u tell me what will happen if a=b after looping into a-exit will the control go back to a- test1. will the condition a=d be checked???

5 Answers   IBM,


WORKING-STORAGE SECTION. 01 VAR1 COMP-2 VALUE 0. PROCEDURE DIVISION. MOVE 10.2115 TO VAR1. DISPLAY 'VAR1 =' VAR1. GOBACK. 10.2115 is stored as .10211499999999996E 02 in OS VS Cobol 10.2115 is stored as .10211500000000000E 02 in ecobol. Any reason why?

3 Answers   TCS,


if a pic 9(3) value 354,b pic x(2) value '46' then a)a>b 2)a<b 3)error

8 Answers   Cap Gemini,


Program A (Normal COBBAT) calling a B Program (DB2COBOL, COBBATDB which is using a VSAM file. its a dynamic call. How we will handle VSAM file decleration in our from JCL from where we are running A PGM. And should we have PLAN for A pGM also. if possible can some one post a sample JCL. Thanks for help in advance.

0 Answers   iNautix,






What is a subscript ?

3 Answers  


what is s000 u4087 error? please give the all error codes in cobol,jcl.

0 Answers  


Difference between next and continue clause

4 Answers   Kanbay,


Can we put move statement in COBOL copybook

3 Answers   Global Logic,


What is the maximum length of a field you can define using COMP-3?

4 Answers   Complex System, Infosys,


What is the maximum size of a 01 level item in COBOL I? in COBOL II?

2 Answers   IBM, RBS,


can we read records in a file from botom to top. if possible how can we read

12 Answers   ACS,


Categories