Start of change

Properties file for the Db2 command line processor

You can use a properties file to set your own defaults for Db2 command line processor properties.

The name of the Db2 command line processor properties file is determined by the setting of the CLPPROPERTIESFILE environment variable. A sample command line processor properties file named clp.properties is in directory /usr/lpp/db2/db2c10/base/samples.

The command line properties file is a text file that contains properties in keyword=value format. When you invoke the Db2 command line processor, the Db2 command line processor loads the properties file. Any changes to the properties file while the Db2 command line processor session is active do not take effect during the session. However, you can temporarily change option values that have a value of OFF or ON during the session with the UPDATE COMMAND OPTIONS command.

The following table lists the keywords and values that you can put in the command line processor properties file.

The following table lists the options and their default values, if the defaults have not been set by a Db2 command line processor properties file. If you specify a blank value for a property, the Db2 command line processor uses the default value.

Table 1. Db2 command line processor option flags
Keyword name Option description Possible values (first value is the default)
DisplaySQLCA Display the contents of the SQLCA after SQL statement execution.
  • OFF
  • ON
  • blank
AutoCommit Automatically commit SQL statements.
  • ON
  • OFF
  • blank
InputFilename Read command input from the file specified by file-name.
  • file-name
  • blank
DisplayOutput Display data and messages on the standard output device.
  • ON
  • OFF
  • blank
StopOnError Stop the Db2 command line processor and exit to the operating system if an error occurs during execution of a statement or command.
  • OFF
  • ON
  • blank
TerminationChar The statement or command termination character:
OFF or blank
The Db2 command line processor handles each line as a complete statement unless the line ends with a space followed by a backslash( \).
ON
Use the semicolon (;) as the statement termination character.
single-character
Use that character as the termination character
  • OFF
  • ON
  • single-character
  • blank
Echo Echo the command text to the standard output device.
  • OFF
  • ON
  • blank
StripHeaders Return data without any headers.
  • OFF
  • ON
  • blank
OutputFilename Store output data and messages in the file specified by file-name.
  • OFF
  • file-name
  • blank
IsolationLevel The SQL statement isolation level CS|RR|RS|UR
  • CS
  • RR
  • RS
  • UR
  • blank
MaxLinesFromSelect The maximum number of rows that are returned from an SQL SELECT statement
  • ALL
  • integer
  • blank
MaxColumnWidth The maximum number of characters in any column that is displayed after execution of:
  • An SQL SELECT statement
  • An SQL CALL statement that returns a result set
  • A Db2 command line processor CATALOG command
  • 500
  • integer
  • blank
connection-alias A string that represents the information that is required in a CONNECT command. The string consists of a connection URL, user ID, and password, separated by commas. The connection URL, user ID and password are defined in CONNECT (Db2 command line processor). Users can specify connection-alias in a CONNECT command to simplify the connection process. None
End of change