Tab navigation
- Overview
- Benefits
- Getting started
- Products
- Support- selected tab,
Tab navigation
- Support
- Code examples
- Articles/white papers
- Redbooks
- Manuals
- Graphical management tools
- Technical info
- Tips and technical papers
Coding examples
This web page contains small programs that are furnished by IBM as simple examples to provide an illustration. These examples have not been thoroughly tested under all conditions. IBM, therefore, cannot guarantee or imply reliability, serviceability, or function of these programs. All programs contained herein are provided to you “AS IS”. THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY DISCLAIMED.
- Sample Database for DB2 for i
- QSQPRCED API (SQL Extended Dynamic)
- DB2 for i blocked insert examples (ODBC/CLI & VB)
- Database Monitor Status Checker
- RPG Database IO with Rational Open Access Example Code (ZIP, 497KB)
DB2 catalog poster and diagram map
Coding examples from “DB2 for i SQL Programmer’s Guide”
- C Language Programming Example
- COBOL Language Programming Example
- PL/I Language Programming Example
- RPG Language Programming Example
Stored Procedure Examples
- SQL Stored Procedure with Result Sets
- SQL Stored Procedure – Index Listing Utility
- PL/I Language Programming Example
- RPG Language Programming Example
External Procedure (C) – SQL Parameter Style
User Defined Function Examples
- Check User authorization UDF (External version)
- Circle Area UDF (SQL & External version)
- Get DB2 for i Table Size (External)
-
RPG UDF Example
External UDTF Example – S/36 Data Access
- UDTF Description (PDF, 159KB)
- UDTF With ScratchPad (RPGLE, 10.7KB)
- UDTF Without ScratchPad (RPGLE, 11.2KB)
External UDTF example - Open List Processing
Trigger Coding Examples
- Before Update Trigger
- After Update Trigger
- After Update Trigger (without null values)
- Trigger with Update
Statistics Manager Examples & Utilities
- CL commands for the Statistics Manager APIs can be found in Document 27792718 of the IBM i Software Knowledge Base
- Procedure for Manual Stats Script Generation
Referential Integrity Coding Examples
Journal-Related Examples & Tools
- Display Journal Bundle Program Examples
- Utilities & Performance Tools
- Remote Journal API Examples (ILE RPG)
-
Note: When using the following examples, use qualified names for the CL commands to prevent potential conflicts with CL Commands that IBM or other vendors may provide in the future.
- Adding a Remote Journal
- Changing a Remote Journal
- Removing a Remote Journal
ILE & RPG examples for the Remote Journal APIs can also be found in the IBM “The System Administrator’s Companion to AS/400 Availability and Recovery”, (SG24-2161).
Please send questions or comments to: rchudb@us.ibm.com.
