Level: Introductory Aug 2002 This new DB2Build batch utility for DB2 version 7.2 allows you to use the command line to build one or many SQL stored procedures for remote DB2 for OS/390® servers.
 | |
Download Peggy Rader's presentation on this great new tool! (PDF 2.4 MB)
|
|
Important! This download applies to DB2 UDB V7 clients only. Installing this build utility on a DB2 UDB V8 client will result in significant errors that may require you to uninstall and reinstall DB2 V8 UDB. The DB2 UDB Version 8 DB2Build code is included in DB2 UDB V8 FixPak 2.
The DB2Build utility is based on the same infrastructure as the DB2 Stored Procedure Builder and uses the DSNTPSMP build function to carry out build steps on the remote system and report results to the calling client.
A database connection will be made at the start of the processing and disconnected at the end for each invocation of DB2Build. Connections are not held across multiple DB2Build invocations.
The following actions can be issued with the DB2Build batch utility:
DROP
To drop an existing stored procedure, issue the following command:
DB2Build -action drop [other options] [name1] [name2] [name3]
|
This will cause a drop of the procedures specified in the name parameters.
CREATE
To create a stored procedure, issue the following command:
DB2Build -action create [other options] [filename1] [filename2] [filename3]
|
This command will build the stored procedure from the source as specified in the filename parameters. You can also specify a list of source files with each file containing the source for one or more stored procedures. You can use this build command for pre-existing stored procedures and to create brand new stored procedures. If the stored procedure already exists, specify -force true to overwrite it. If you specify -force false the procedure will only be created if it does not already exist.
To create multiple stored procedures from a single source file, use a delimiter to separate each block of stored procedure code in the source file. By default, the "@" character is required as a separator. To assign a different separator, use the separator option:
REBIND
To rebind the package of an existing procedure, issue the following command:
DB2Build -action rebind [other options] [filename1] [filename2] [filename3]
|
This command will rebind the existing stored procedure with a new set of bind options.
ALTER_SOURCE
To rebuild only the source of the stored procedure, issue the following command:
DB2Build -action alter_source [other options] [filename1] [filename2] [filename3]
|
To alter_source for multiple stored procedures from a single source file, use a delimitor to separate each block of stored procedure code in the source file. By default, the @ character is required as a separator. To assign a different separator, use the separator option:
For a complete list of other options and corresponding value types, type the following command:
System requirements
The DB2Build batch utility requires the following prerequisites:
- Windows or Sun Solaris Operating System
- JDK version 1.2 or higher
- DSNTPSMP:
- version 1.15 (PQ45854) or higher for DB2 z/OS versions 6 and 7
- version 1.20 or higher for DB2 z/OS™ version 8
- IBM DB2 Universal Database version 7.2 Stored Procedure Builder on the client
- The DB2 install path must be referenced in the DB2PATH environment variable
Downloads | Description | Name | Size | Download method |
|---|
| Article in PDF format | long-article.pdf | 475 KB | FTP | HTTP |
|---|
| DB2Build batch utility for version 7 | db2build.zip | 1.9 MB | FTP | HTTP |
|---|
| Presentation on the DB2Build batch utility | db2buildpres.pdf | 2.4 MB | FTP | HTTP |
|---|
Rate this content
|