SQL packages

An SQL package is an object that contains the control structure produced when the SQL statements in an application program are bound to a remote relational database management system (DBMS).

The DBMS uses the control structure to process SQL statements encountered while running the application program.

SQL packages are created when a relational database name (RDB parameter) is specified on a Create SQL (CRTSQLxxx) command and a program object is created. Packages can also be created using the CRTSQLPKG command.

SQL packages can also be created using the QSQPRCED API. The references to SQL Packages within this topic collection refer exclusively to Distributed Program SQL packages. QSQPRCED uses SQL Packages to provide Extended Dynamic SQL support.

Note: The xxx in this command refers to the host language indicators: CI for the ILE C language, CPPI for the ILE C++ for iSeries™ language, CBL for the COBOL for iSeries language, CBLI for the ILE COBOL language, PLI for the iSeries PL/I language, RPG for the RPG/400 language, and RPGI for the ILE RPG language.
Related reference
Distributed relational database function and SQL
Related information
QSQPRCED