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 |
I have a program with an Array of 5000 occurences which is being passed from 5 sub levels to the front end screen. Thess 5 programs using each 5*2 = 10 different arrays with size as 5000. This is causing the transaction to utilize more storage consupmtion. I am looking to reduce the storage consumption. As part of that initially i thought Dynamic array may solve my problem. After viewing the comments given i see its same as normal array. IS there any other way we can resolve this issue?
In a COBOL program, 2 tables TABLE1 and TABLE2 are defined that are indexed by INDEX1 and INDEX2 respectively. Can we use INDEX1 with TABLE2 and INDEX2 with TABLE1?
Why would you use find and get rather than to obtain?
What is Pic 9v99 Indicates in COBOL?
0 Answers SwanSoft Technologies,
Suppose, file A has 100 records and file B has 500 records. We want to write records common to both A and B into file C and records which are present only in either A or B into another file D. What should be the logic of Cobol program to achieve this?
7 Answers Bank Of America, Mind Tree,
can I copy book which contain db2 statment in procedure divion?
How do u initialize an array?
Why did you choose to work with ibm mainframe cobol programming?
What is the difference between COMP & COMP-3 ?
I have two questions here. 1. How to read a flat file in reverse order? 2. How to read a VSAM KSDS file in reverse order? In both the cases we donot know the total number of records.
What is the Linkage section? What is the Use and Why the parm length use alway "PARM-LENGTH PIC S9(4) or PIC S9 (4) COMP." any reason?.Please let me know any one... Cheers,Prasad
What is the difference between copy and include in cobol?