Sample callers of utilities stored procedures
You can use the Db2-supplied utilities stored procedures to run Db2 utilities from Db2 application programs by using the SQL CALL statement.
The following utilities stored procedures are supplied with Db2:
- DSNUTILS (deprecated)
- DSNUTILU
- DSNUTILV
When called, the utilities stored procedures perform the following actions:
- Dynamically allocates the specified data sets
- Creates the utility input stream (SYSIN)
- Invokes Db2 utilities (DSNUTILB)
- Deletes all rows currently in the created temporary table (SYSIBM.SYSPRINT)
- Captures the utility output stream (SYSPRINT)
- Puts the output into the created temporary table (SYSIBM.SYSPRINT)
The utilites stored procedures must run as a WLM-managed stored procedure.