RPG IV Programming with Embedded SQL

SQL is playing an ever-increasing role in the IBM i operating system (aka iSeries, AS/400) in enterprise database design, supplanting legacy DDS. This class shows you how to embed SQL statements into your RPG IV programs to combine the best of SQL and RPG IV. It also introduces the concept of SQL stored procedures.

Get a Price Quote


Recommended schedule: 2 days

This class is presented live at your location, anywhere in the world, using your training/conference facilities.

Compare with IBM training courses


Who Should Attend
This class is for existing RPG IV programmers who want to understand embedded SQL programming concepts in an RPG IV environment.


Prerequisites
In order to successfully complete this course, students should have completed the following courses, or have equivalent knowledge/experience:

  • IBM i Concepts and Programming Tools
  • RPG IV and the Integrated Language Environment
  • SQL: Database Design and Access

This class may be combined with the SQL Database Design and Access classes.


What You Will Accomplish
At the end of the course, students will be able to:

  • Incorporate SQL statements into RPG IV programs for simple record selection
  • Use SQL to retrieve sets of records into an RPG IV program
  • Use SQL to perform mass record updates in an RPG IV program
  • Build SQL queries dynamically (“on the fly”) in an RPG IV program

What You Will Receive
Each student receives:

  • Custom printed handout, containing class notes
  • Completion certificate

Course Outline
The class covers these topics:

  • SQL Overview
  • Basic Elements of Embedded SQL
  • Free format RPG IV with Embedded SQL
  • Static vs Dynamic SQL
  • Using Host Variables, Structures
  • Compiling Embedded SQL
  • Error Handling
  • SQL Cursors and Fetch
  • Dynamic SQL
  • Introduction to Stored Procedures
  • Embedded SQL and the Integrated Language Environment

Hands-on Labs

  • Using SELECT INTO
  • Using Static Embedded SQL
  • Using Serial Cursors
  • Single- and Multi-row Updates
  • Using Dynamic Embedded SQL
  • Using Positioned Update and Scrollable Cursors