Course Description

This 3-day, hands-on DB2/SQL Programming Introduction training course presents the fundamentals of coding Structured Query Language (SQL) in a DB2/SQL programming environment, including data manipulation, data definition and data control. The basic DB2/SQL components (storage group, tablespace, database, table, index, view, etc.) are defined and basic DB2 utilities are introduced for loading and backing up DB2 data and capturing data statistics. The structure of a DB2/COBOL program and the embedded SQL statements it requires is discussed and efficient coding techniques are presented to ensure optimum use of DB2/SQL application and system resources. Hands-on workshops are used to reinforce concepts.

Pre-requisites

Attendance at our IBM z/OS TSO/ISPF Introduction training course, or equivalent experience.

Who is this course for?

This course is designed for software developers and other technical staff that need to learn SQL and write programs using IBM’s Database 2 (DB2) for z/OS.

Further Training

After some further on-the-job programming experience with DB2, we recommend students attend our
DB2/SQL Programming Intermediate training course to gain higher-level skills in the usage of DB2/SQL.

Course content

DB2 Programming Environment
DB2 Terminology
The DB2 Environments
DB2 Using TSO
DB2 Using IMS
DB2 Using CICS
DB2 Using CAF
DB2 Using DDF
The DB2 Catalog Tables
DB2I & SPUFI
DB2I Primary Options Menu
DB2I Defaults Panels
Using SPUFI
SPUFI DEfaults Panel
SPUFI Edit Panel
SPUFI Panel after EDIT
SPUFI Browse Panel
SPUFI COMMIT & ROLLBACK Panel
SQL & Data Manipulation
Data Manipulation – Data Retrieval
SQL Syntax
SQL Expressions
Numeric Literals
Numeric Operators
String Literals
String Operators
Order of Operations
DML SELECT Statement
ORDER BY Clause
WHERE Clause
BETWEEN Predicate
IN Predicate
IS NULL Predicate
LIKE Predicate
SQL Column Functions
SQL Scalar Functions
NUmeric & Mathematic Functions
Character Functions
Date & Time Functions
Trigonometric Functions
Null Functions
General Functions
Date Calculations
GROUP BY Clause
HAVING Clause
Changing DB2 Data
DML INSERT Statement
DML UPDATE Statement
DML DELETE Statement
DB2 Objects & DDL
Storage Groups
Databases
Tablespaces & Indexspaces
Tables & Pages
Indexes
Views
Aliases
Stored Procedures & Triggers
Plans & Packages
DB2 Utilities
DB2 Utility Control Statement
Db2 Utilities Panels
Embedded SQL
Required Program Areas
SQLCA
The WHENEVER Statement
Singleton SELECT
Changing Data
DB2 CURSOR Processing
FETCH & FETCH Loops
SQLCODE
Changing Data with a CURSOR
A CURSOR-based DB2 COBOL Program
Program Preparation
Overview of Steps Involved
DCLGEN Process
DCLGEN Panel
Program Preparation Panel
Precompile
BIND PLAN
Compile, Link, Run
PLAN Information in DB2 Catalog
NULL Indicators
Null Indicators
Programming Using a View
Creating a VIEW
Using a VIEW