Format: .-(-. .-OFF--. .-)-. >>-SET AUTOCOMMIT--+---+----+-ON---+--+---+-------------------->< |
The SET AUTOCOMMIT command allows you to activate or suppress the execution of SQL COMMIT statements by the Database Services Utility. This command cannot span input records.
In this mode of operation, the only execution of an SQL COMMIT by the utility is at the end-of-program after all control commands have been successfully processed.
ON or OFF must be specified in this command. If you do not supply a SET AUTOCOMMIT command in the input records, the utility operates as if you had issued SET AUTOCOMMIT OFF.
In AUTOCOMMIT ON mode, the Database Services Utility does not run an SQL COMMIT command after the successful processing of these commands:
SQL Statements Database Services Utility Commands
COMMIT COMMENT
CONNECT SET AUTOCOMMIT OFF
LOCK SET ERRORMODE
ROLLBACK SET FORMAT
SET ISOLATION
SET LINECOUNT
SET LINEWIDTH
SET UPDATE STATISTICS
Format: .-(-. .-OFF------. .-)-.
>>-SET ERRORmode--+---+----+-ON-------+--+---+-----------------><
'-CONTINUE-'
|
The SET ERRORMODE command allows you to:
This command cannot span input records. If you do not supply a SET ERRORMODE command in the input records, the utility operates as if you had issued SET ERRORMODE OFF.
Any subsequent command processing errors cause the utility to execute an SQL ROLLBACK statement and enter Database Services Utility error mode processing.
Notes:
When a SET ERRORMODE ON command is processed, the utility initiates error mode processing. While in error mode, the Database Services Utility displays commands in the report or message file listing and performs syntax checking on Database Services Utility commands. No SQL statements or Database Services Utility commands (except SET ERRORMODE OFF or SET ERRORMODE CONTINUE) are executed during error mode processing. Therefore, any errors that result from command execution (for example, SQL syntax errors and data file errors) are not detected.
Database Services Utility error mode processing is also entered when the utility detects a command processing error, and the utility is operating in normal command processing mode. If the processing mode established by a SET ERRORMODE CONTINUE command is in effect, and a command processing error is detected, Database Services Utility error mode processing is entered only when the error is a serious database error.
Notes:
Notes:
To control the logical unit of work after a SET ERRORMODE CONTINUE command is processed, you can use SQL COMMIT statements or the Database Services Utility SET AUTOCOMMIT ON command.
If the Database Services Utility is in error mode when a SET ERRORMODE CONTINUE command is encountered, the Database Services Utility AUTOCOMMIT processing status is set to off.
| Note: | The ERRORMODE setting has an effect on the final Database Services Utility return code. For more information, see Chapter 9, Error Handling and Debugging. |
Format: .-(-. .-CB--. .-)-.
>>-SET FORMAT--+---+----+-CL--+--+---+-------------------------><
'-LO--'
|
This command allows you to identify whether the Database Services Utility should use column or block format, column or list format, or only list format for SQL SELECT statement results.
If the format is not specified, Database Services Utility processing uses column or block format for SQL SELECT statement output. This command cannot span input records.
The SET FORMAT command overrides the formats specified by either a parameter list format control parameter or the default column or block format. This command specification remains in effect until another SET FORMAT command is encountered and successfully processed, or when Database Services Utility processing ends.
Format: .-(-. .-RR--. .-)-.
>>-SET ISOLation--+---+----+-CS--+--+---+----------------------><
'-UR--'
|
This command allows you to control the isolation level used for Database Services Utility processing. Every time the utility is run, the isolation level is initialized to repeatable read (RR). SQL processing through the utility is performed at this isolation level until a SET ISOLATION command is encountered. The utility sets the isolation level to the value specified in the command and processes at this level until another SET ISOLATION command is executed or Database Services Utility processing ends. The other isolation level settings are cursor stability (CS) and uncommitted read (UR). This command cannot span input records.
If you are accessing a non-DB2 Server for VM application server, or if you are using DRDA flow, the isolation level for the Database Services Utility is always set to CS and the SET ISOLATION command has no effect.
Use this setting only when the data is read or when you are the only user authorized to update the data.
Note that data integrity may be compromised because read-only access to uncommitted data is allowed.
This setting applies only to read-only operations (SELECTs, DATAUNLOAD and UNLOAD) against data in public dbspaces with ROW or PAGE level locking. For other operations (UPDATE, DELETE, INSERT, DATALOAD, and LOAD), the rules of CS apply.
For dbspaces with DBSPACE level of locking, the rules of RR apply.
Recommended settings for Database Services Utility processing:
The isolation level used to perform DATALOAD commands or perform RELOAD DBSPACE/TABLE commands with the NEW option is not important.
Regardless of your isolation level setting, all UNLOAD/RELOAD PACKAGE functions are performed with isolation level repeatable read. This does not affect your setting of isolation level when you are performing other functions.
Note that data integrity may be compromised when using UR. UR should only be used when it is not necessary that the data be committed.
Format: >>-SET---------------------------------------------------------->
>-----+-LineCount--(ccc)---+------------------------------+-+--><
| | .-80---. | |
| | +-120--+ | |
| '-LineWidth--(--+-www--+---)---' |
'-LineWidth--(www)---+-----------------------------+--'
| .-60--. |
'-LineCount--(--+-ccc-+---)---'
|
The SET LINECOUNT/LINEWIDTH command allows you to:
This command cannot span input records.
The value www can range from 60 to 256, but cannot be equal to or greater than the logical record length of the Database Services Utility message file.
Notes:
Format: .-UPDATE-. .-(-. .-ON--. .-)-. >>-SET--+--------+--STATISTICS--+---+----+-OFF-+--+---+-------->< |
The SET UPDATE STATISTICS command allows you to control the automatic statistics collection performed during Database Services Utility RELOAD TABLE, RELOAD DBSPACE, and DATALOAD TABLE command processing. This command cannot span input records. If you do not supply a SET UPDATE STATISTICS command in the input records, the utility operates as if you had issued SET UPDATE STATISTICS ON.
The SET UPDATE STATISTICS command is not supported on a non-DB2 Server for VM application server or if you are using DRDA flow.
The Database Services Utility writes message ARI8980I for each table or dbspace loaded by a RELOAD TABLE, RELOAD DBSPACE, or DATALOAD TABLE command. The message informs you that the statistics were collected while the data was loading.
The Database Services Utility writes message ARI8996I and issues an SQL UPDATE STATISTICS statement for each table loaded if you are using the DATALOAD command and when any one of the following is true:
The SQL UPDATE STATISTICS FOR TABLE statement issued by the Database Services Utility must read the whole table to update the internal DB2 Server for VSE & VM statistics for the table. The statistics are updated based on the current contents of the table and dbspace to which the table is assigned. Refer to the DB2 Server for VSE & VM Application Programming manual and the DB2 Server for VSE & VM Database Administration manual for a description of the SQL UPDATE STATISTICS statement processing.
during RELOAD TABLE, RELOAD DBSPACE, and DATALOAD TABLE command processing.
A SET UPDATE STATISTICS OFF remains in effect until a SET UPDATE STATISTICS ON command is processed or until the Database Services Utility is restarted.
| Note: | If tables are loaded by the Database Services Utility RELOAD TABLE, RELOAD DBSPACE, and DATALOAD TABLE commands while SET UPDATE STATISTICS OFF is in effect, you must issue an SQL UPDATE STATISTICS statement for the table or dbspace to update the internal statistics. |
To avoid the processing overhead associated with an SQL UPDATE STATISTICS statement processing, you can suppress the normal Database Services Utility UPDATE STATISTICS when you are using the DATALOAD TABLE command to load a few records into a table that currently contains a larger number of records. See Update Statistics Considerations for details.