Start_With_RPLG

About this workshop

In this workshop you learn how to use the different types of SQL functions from within an RPGLE program.
 
Based on the example programs provided in the course materials, calling the various types of SQL functions from within an RPGLE program is explained, as well as exception handling. 

You will also learn how to find help as well as some tips and tricks for performance, maintenance and readability.

Skills to be learned

  • Learn to execute SQL instructions from within an RPGLE program to retrieve or update data or to execute SQL functions
  • Learn best practices for performance, maintenance and readability

This workshop covers the following topics

  • Introduction to SQLRPGLE : What can you do with SQL in RPGLE
  • Example programs explaining the different possibilities
    • Set options
    • Retrieve 1 row using select into
    • Retrieve 1 value using values into or set
    • Update, insert, delete
    • Use of sqlcode and sqlstate
    • Retrieve multiple rows
    • Use of sql cursor
    • Fetch one by one or multiple rows at once
    • Static sql with use of host variables
    • Dynamic sql with use of parameter markers
    • Handling of null values
    • Get diagnostics 
    • Retrieve error information
    • Retrieve row count
  • Tips and tricks for performance, maintenance and readability
  • Finding help 

Course materials

  • Handouts and presentation 
  • Example programs containing examples for different types of SQL functions

Participants

  • RPG developers

Prerequisites

  • Some programming experience in RPGLE
  • Some experience in using Rational Developer for i
  • Recent version of Access Client Solutions installed on your PC
  • Recent version of Rational Developer for i installed on your PC
  • Connection available to your IBM i environment 

Duration

  • 1 day

Rate

  • 2 days covering workshop and course materials