You can
use the DB2UTIL procedure to insert, update, or delete rows in a DB2
table using data from a SAS data set. You can choose one of two methods
of processing: creating an SQL output file or executing directly.
PROC DB2UTIL runs interactively, noninteractively, or in batch mode.
Support for the DB2UTIL
procedure provides compatibility with SAS 5 version of
SAS/ACCESS
Interface to DB2 under
z/OS. It is not added to other
SAS/ACCESS DBMS
interfaces, and enhancement of this procedure for future releases
of
SAS/ACCESS are not guaranteed. It is recommended that you write
new applications by using LIBNAME features.
The DB2UTIL procedure
uses the data in an input SAS data set, along with your mapping specifications,
to generate SQL statements that modify the DB2 table. The DB2UTIL
procedure can perform these functions.
deletes rows from the
DB2 table according to the search condition that you specify.
builds rows for the
DB2 table from the SAS observations, according to the map that you
specify, and inserts the rows.
sets new column values
in your DB2 table by using the SAS variable values that are indicated
in your map.
When you execute the
DB2UTIL procedure, you specify an input SAS data set, an output DB2
table, and how to modify the data. To generate data, you must also
supply instructions for mapping the input SAS variable values to the
appropriate DB2 columns.
In each execution, the
procedure can generate and execute SQL statements to perform one type
of modification only. However, you can also supply your own SQL statements
(except the SQL SELECT statement) to perform various modifications
against your DB2 tables, and the procedure executes them.
For more information
about the types of modifications that are available and how to use
them, see
Modifying DB2 Data. For an example of how to use this procedure, see the
PROC DB2UTIL
example.