CoreData28 min
DB2 basics
Relational data on z/OS. Familiar SQL, unfamiliar packaging: your SQL is compiled ahead of time and bound into a package before it ever runs.
What you will be able to do
- Explain what BIND does and why it exists
- Read an SQLCODE and act on it
- Recognise a locking problem when you see one
Lessons
- What DB2 for z/OS isDB2 is a relational database that runs as a set of address spaces under z/OS. The SQL is standard enough that anything you know from other databases transfers. What is different…
- Embedded SQL, precompile and BINDOn z/OS, SQL inside a COBOL program is not sent to the database as text at run time. It is extracted at compile time, prepared in advance, and stored in the database as a…
- SQLCODEs and what to do about themAfter every SQL statement, DB2 sets SQLCODE. Zero is success, +100 is 'no row found', anything negative is an error. Knowing eight of them covers most of what you will see.
- Commits, locking and why batch jobs collideDB2 protects data by locking it. Locks are held until you commit. A batch job that updates a million rows without committing holds a million locks, blocks everything else, and…
Track your progress and earn a certificate.
Free account, 194 quiz questions for this subject.