Create an SQL package
SQL packages are permanent objects used to store information related to prepared SQL statements. They
are used by ODBC support when the "extended dynamic" box is checked on a data source.
To create an SQL package:
- In the System i Navigator window, expand the system you want to use.
- Expand Databases.
- Right-click the database you want to use, and select New SQL package.
- On the Create SQL package dialog, specify parameters as necessary.
- Click OK.
Basic parameters
- Specify a Program name. The program name is the name of the program you are creating the SQL package for.
It must be a distributed SQL program that was created using one of the CRTSQLxxx commands.
- Specify a schema name where the program is located. Possible values are *LIBL, *CURLIB, or the specific
schema name where the program is located.
- Specify a Relational database name. The default value is *PGM, which is a parameter on the CRTSQLxxx command
that you used to create the program. You can also specify the name of the relational database where the SQL package is to be
created.
- Specify an RDB user name. The default value is *CURRENT, but you can also specify the user name that is used
for the application requester job.
- Specify an RDB user password. If you specify *NONE, then the user name specified on the RDB user name parameter
is not valid.
- Specify a Default collection name, which is the name to be used for unqualified names of tables, views, indexes,
and SQL packages. Possible values are *PGM, *NONE, or a specified collection name.
- Specify an Object type. You can create the SQL package from the program specified on the PGM parameter (*PGM)
or from the service program specified on the program prompt of the PGM parameter (*SRVPGM).
- Specify a Module list. The SQL package is associated with the module of the bound program. Possible values are
*ALL or a specified module name. You can specify up to 256 modules in the program for which an SQL package is to be created.
Duplicate module names in the same program are allowed.
- Specify a Text description that briefly describes the SQL package and its function. It can be no more than 50
characters and must be enclosed in apostrophes. You can also specify *PGMTXT or *BLANK.
Advanced parameters
For advanced parameters, click Advanced.
- Specify a severity level. Valid values range from 0 through 40. The default value is 10.
- Specify replace if you want to replace an existing SQL package of the same name in the specified schema with
the new SQL package.
- Specify the print file parameter. Possible values are QSYSPRT (the IBM-supplied printer file) or a printer
device file to which the create SQL package error listing is directed.
- Specify the schema where the printer file is located. Possible values are *LIBL, *CURLIB, or a specified
schema name where the printer file is located.