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

consider the following progrm statements MOVE 0 TO SW.NO.OF.REC PERFORM PRI-OUT UNTIL SW=1 DISPALY NO.OF.REC STOP RUN PRE-OUT READ IN-FILE AT END MOVE 1 TO SW WRITE OUO-REC FROM IN-REC ADD 1 TO NO.OF REC if the IN-FILE contains 1000 records what value will be displayedafter the PERFORM is over?assume that N0.OF.REC has PIC 9(4) a.1000 b.1001 c.1 d.none of the above since there is a syntex error

4 Answers   TCS,


COMP?

2 Answers  


Can anyone tell me how to handle the array beyond the limit. If we have an array or a table which can handle 5000 records but now we have to compensate 20000 records with the same array? how to handle the situation.

2 Answers  


how to access the file from prodution from changeman tool and to submit a file to production

1 Answers   IBM,


What is the difference between Structured COBOL Programming and Object Oriented COBOL programming?

0 Answers   TryTechnicals Pvt Ltd,






Please let me know how the Eject verb works for page break.. I want to know the code, how it is used.

3 Answers  


What is the default value of DISP parameter?

3 Answers   IBM,


maximum of how many screens we can open in emulator

2 Answers  


what do you mean by copybook? and what is the difference between the copybook which we are using in working storage and procedure division.

3 Answers   HCL, TCS,


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

12 Answers   ACS,


What are the divisions in a cobol program? Which one is the mandatory division among them?

1 Answers  


How can we find out wether to declare the data items like Integer, Char,Comp? If comp types how can we decide wether it is Comp and Comp3.How it is? Please Explain... Cheers.

1 Answers   Syntel,


Categories