Database Guide
If you don't specify a package spec when you first
create a query, you can create one later and add queries to it.
- From the VisualAge Organizer, select Database Package Specs
from the Options menu.

- From the Access Set drop-down list, select an access
set.
- From the Connection Alias drop-down list, select the Connection
specification for your application.
- In the Package Name field, type a package name.
- In the Available Queries selection list, select a query to
precompile, then select >> to move the query to the Included
Queries list.
- Select Save. A package spec must be saved before you
precompile. The last saved version of the package is
precompiled.
- Select Precompile. The query is now prepared and
won't have to be prepared dynamically when you run your
application.
There are several options you can specify for database package
specifications. From the Database Package Specifications window, select
Options. For more information about these options, refer to
the IBM Database 2 Command Reference.

- Create Bind File
- Specifies to create a bind file. Specify this option if you want
your application to bind to databases other than the one to which you are
connected.
- Bind File Name
- Specify a name for the bind file. The file extension should be
.BND. This file can be used to bind your application to other
databases.
- Create Package
- Specifies to create a database package. To run a database
application statically, you must have a database package.
- Package Name
- Specifies a name for the database package.
- Blocking
- Specifies type of record blocking used and how ambiguous cursors are
treated.
- Unambiguous blocking
- Blocking occurs for read-only cursors, those that are not specified as FOR
UPDATE OF, have no static DELETE WHERE CURRENT OF statements, and have no
dynamic statements. Ambiguous cursors are treated as updatable.
- All
- Blocking occurs for read-only cursors, those that are not specified as FOR
UPDATE OF, and for which no static DELETE WHERE CURRENT OF statements are
executed. Ambiguous and dynamic cursors are treated as
read-only.
- No blocking
- No blocking is done on any cursors in the package. Ambiguous
cursors are treated as updatable.
- Format
- Specifies the date and time format used when date and time fields are
assigned to string representations.
- ISO
- International Standards Organization
- Date format: yyyy-mm-dd
- Time format: hh.mm.ss
- Default
- Use the date and time format associated with the country code of the
database.
- EUR
- IBM standard for European form.
- Date format: dd.mm.yyyy
- Time format: hh.mm.ss
- JIS
- Japanese Industrial Standard.
- Date format: yyyy-mm-dd
- Time format: hh:mm:ss
- LOC
- Local form, not necessarily the default country code of the
database.
- USA
- IBM Standard for United States form.
- Date format: mm/dd/yyyy
- Time format: hh:mm xM (AM or PM)
- Isolation
- Determines the isolation level. For more information about
isolation levels, see the IBM Database 2 SQL Reference.
- CS
- Cursor stability
- RR
- Repeatable read
- UR
- Uncommitted read
- Compliance Level
- Specifies whether the precompiled code will be compatible with MIA
specification.
- No compliance required
- Precompiled code is not compatible with MIA specification. However,
this code may have performance benefits at precompile time, compile time, and
run time.
- Comply with MIA standards
- Precompiled code is compatible with MIA specification.
- Validate
- Validates the syntax of the SQL statements in the package
specification. If this option is selected, the package and bind file
are not created.
[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]