This course describes how to create an RPG SQL application using free-form RPG.
The course begins by describing the coding requirements for embedding SQL statements in an RPG program. This includes a discussion on how to detect and handle errors that occur during the processing of an SQL statement. The course then describes the CL command used to compile an RPG program which includes embedded SQL statements.
Next, the course describes how to use an SQL cursor to access the records returned by a query and how to develop an application that executes SQL statements dynamically. This is followed by a description of the SQL statements used to support commitment control.
The course ends with a discussion of SQL application performance and optimization.
Approximate Study Time: 3 hours
After completing this course, you should be able to:
- Code an RPG program with embedded SQL statements
- Detect and handle errors that occur during the processing of an SQL statement
- Use the SQLRPGLE command to compile a program with embedded SQL statements
- Code the SQL statements used to define and manipulate an SQL cursor
- Code an RPG program that executes a dynamic SQL statement
- Use SQL statements to perform commit and rollback operations
- Optimize an SQL application
Embedding SQL Statements in a Free-Form RPG Program
Compiling a Program with Embedded SQL Statements
Using an SQL Cursor to Process Multiple Rows
Developing a Dynamic SQL Application
SQL and Commitment Control
Performance and Optimization Considerations
This course is intended for programmers who will be developing SQL applications in free-form RPG.
This course assumes that you have a basic knowledge of SQL and can code SQL statements. You can satisfy this prerequisite by successfully completing the first course in this series, SQL Fundamentals.
The course also assumes that you are an experienced free-form RPG programmer. You can satisfy this prerequisite by successfully completing the Free-Form RPG Programming series.
© Copyright 2023 Manta Technologies. All Rights Reserved.