what is the diff b/w select stsmt and cursor ?
Answers were Sorted based on User's Feedback
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 |
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 |
Have you code any new programs in COBOL ? What is the functionality of the programs?
can we print comp 3 stmts how ?
What is the output generated by the following code? 01 GRP-I. 05 SUBFLD1 PIC XX VALUE "AB". 05 FILTER PIC X(6) VALUE SPACES. 01 GRP-2 REDEFINED GRP-1. 05 SUB-FLD2 PIC XX. 05 SUB-FLD3 PIC XX. 05 FILTER PIC X(4). IF SUB-FLD1 NOT = SPACES DISPLAY "SUBFLD1" MOVE "ABBCCD" TO GRP-1 IF SUB-FLD3 = SPACES DISPLAY "SPACES" ELSE DISPLAY "SUBFLD3" DISPLAY "END" ELSE DISPLAY "SPACES" DISPLAY "END". (a) SUBFLD1 SUBFLD3 END (b) SPACES END (c) SUBFLD1 END (d) SUBFLD1 SPACES
Which Search verb is equivalent to PERFORM…VARYING?
How do pass the values to the parameters in cobol
In EBCDIC, how would the number 1234 be stored?
What are the different rules to perform a Search?
What are the various section in data division and briefly explain them.
Using string statement.Is coding three destination string from one source string possible in one code?or three codes for every destination string of one source string.?thank you
Which is the default, TEST BEFORE or TEST AFTER for a PERFORM statement?
wht is structured cobol pgm and non structred cobol pgm ?
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.