0

I started in a project involving Cobol and DB2 on an IBM z/OS host system. The software module documentation makes frequent references to a term called "driving cursor".

Could someone explain this term, if possible in the DB2/Cobol context?

I know the definition of the term SQl cursor as "A database cursor is an object that enables traversal over the rows of a result set. It allows you to process individual row returned by a query."

But what, specifically, is a DRIVING cursor?

thanks.

  • 1
    Given that an internet search for the term turns up your question as the first hit and pretty much nothing else related, and having worked with DB2 and COBOL on and off for 30 years without coming across it, I'd say it's a term specific to your shop. It probably means "the cursor that drives all other processing, much like a master file, you open the cursor, fetch, and then all other processing derives from that fetch." – cschneid Sep 20 '20 at 17:35
  • Just guessing here. When you have a join between tables, one is read first and then for each row found in it, the other tables are accessed. For the purpose of the join the first table is called the "driving table", while the other ones are "secondary tables". Maybe the docs are referrng to the cursor used to access the driving table. – The Impaler Sep 20 '20 at 19:08
  • @cschneid - after consulting with a number of people in my company it appears that you are right: someone started using this term internally and it caught on and established itself in a number of documents. – user11654732 Sep 29 '20 at 00:44

0 Answers0