13.07.2015 Views

SAS/ACCESS 9.2 for Relational Databases: Reference, Fourth Edition

SAS/ACCESS 9.2 for Relational Databases: Reference, Fourth Edition

SAS/ACCESS 9.2 for Relational Databases: Reference, Fourth Edition

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>SAS</strong>/<strong>ACCESS</strong> Interface to DB2 Under z/OS 4 DB2UTIL Statements and Options 503deletes rows from the DB2 table according to the search condition that you specify.INSERTbuilds rows <strong>for</strong> the DB2 table from the <strong>SAS</strong> observations, according to the mapthat you specify, and inserts the rows.UPDATEsets new column values in your DB2 table by using the <strong>SAS</strong> variable values thatare indicated in your map.When you execute the DB2UTIL procedure, you specify an input <strong>SAS</strong> data set, anoutput DB2 table, and how to modify the data. To generate data, you must also supplyinstructions <strong>for</strong> mapping the input <strong>SAS</strong> variable values to the appropriate DB2 columns.In each execution, the procedure can generate and execute SQL statements toper<strong>for</strong>m one type of modification only. However, you can also supply your own SQLstatements (except the SQL SELECT statement) to per<strong>for</strong>m various modificationsagainst your DB2 tables, and the procedure executes them.For more in<strong>for</strong>mation about the types of modifications that are available and how touse them, see “Modifying DB2 Data” on page 505. For an example of how to use thisprocedure, see “PROC DB2UTIL Example” on page 506.DB2UTIL Statements and OptionsThe PROC DB2UTIL statement invokes the DB2UTIL procedure. These statementsare used with PROC DB2UTIL:PROC DB2UTIL ;MAPTO <strong>SAS</strong>-name-1=DB2-name-1 ;RESET ALL|<strong>SAS</strong>-name| COLS;SQL SQL-statement;UPDATE;WHERE SQL-WHERE-clause;ERRLIMIT=error-limit;EXIT;PROC DB2UTIL Statements and OptionsDATA=<strong>SAS</strong>-data-set | <strong>SAS</strong>-data-setspecifies the name of the <strong>SAS</strong> data set that contains the data with which you wantto update the DB2 table. DATA= is required unless you specify an SQL file withthe SQLIN= option.TABLE=DB2-tablenamespecifies the name of the DB2 table that you want to update. TABLE= is requiredunless you specify an SQL file with the SQLIN= option.FUNCTION= D | I | U | DELETE | INSERT | UPDATEspecifies the type of modification to per<strong>for</strong>m on the DB2 table by using the <strong>SAS</strong>data set as input. See Modifying DB2 Data“Modifying DB2 Data” on page 505 <strong>for</strong>a detailed description of this option. FUNCTION= is required unless you specifyan SQL file with the SQLIN= option.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!