Defaults for SQL processing options

Some SQL statement processing options have default values that are based on values that are specified on the DB2I Application Programming Defaults panels.

The following table shows those options and defaults.

Table 1. IBM-supplied installation default SQL statement processing options. The installer can change these defaults.
Install option Install default Equivalent SQL statement processing option Available SQL statement processing options
STRING DELIMITER quotation mark (") QUOTE APOSTQUOTE
SQL STRING DELIMITER quotation mark (") QUOTESQL APOSTSQLQUOTESQL
DECIMAL POINT IS PERIOD PERIOD COMMAPERIOD
DATE FORMAT ISO DATE(ISO) DATE(ISO|USA| EUR|JIS|LOCAL)
DECIMAL ARITHMETIC DEC15 DEC(15) DEC(15|31)
MIXED DATA NO CCSID(n) CCSID(n)
LANGUAGE DEFAULT COBOL HOST(COBOL) HOST(ASM|C[(FOLD)]| CPP[(FOLD)]|IBMCOB| FORTRAN|PLI)
STD SQL LANGUAGE NO STDSQL(NO) STDSQL(YES|NO|86)
TIME FORMAT ISO TIME(ISO) TIME(IS|USA|EUR| JIS|LOCAL)
Notes: For dynamic SQL statements, another application programming default, USE FOR DYNAMICRULES, determines whether DB2® uses the application programming default or the SQL statement processor option for the following installation options:
  • STRING DELIMITER
  • SQL STRING DELIMITER
  • DECIMAL POINT IS
  • DECIMAL ARITHMETIC
If the value of USE FOR DYNAMICRULES is YES, dynamic SQL statements use the application programming defaults. If the value of USE FOR DYNAMICRULES is NO, dynamic SQL statements in packages or plans with bind, define, and invoke behavior use the SQL statement processor options.

Some SQL statement processor options have default values based on the host language. Some options do not apply to some languages. The following table shows the language-dependent options and defaults.

Table 2. Language-dependent DB2 precompiler options and defaults
HOST value Defaults
ASM APOST1, APOSTSQL1, PERIOD1, TWOPASS, MARGINS(1,71,16)
C or CPP APOST1, APOSTSQL1, PERIOD1, ONEPASS, MARGINS(1,72)
IBMCOB QUOTE2, QUOTESQL2, PERIOD, ONEPASS1, MARGINS(8,72)1
FORTRAN APOST1, APOSTSQL1, PERIOD1, ONEPASS1, MARGINS(1,72)1
PLI APOST1, APOSTSQL1, PERIOD1, ONEPASS, MARGINS(2,72)
SQL or SQLPL APOST1, APOSTSQL1, PERIOD1, ONEPASS, MARGINS(1,72)
Notes:
  1. Forced for this language; no alternative is allowed.
  2. The default is chosen on Application Programming Defaults Panel 1 during installation. The IBM®-supplied installation defaults for string delimiters are QUOTE (host language delimiter) and QUOTESQL (SQL escape character). The installer can replace the IBM-supplied defaults with other defaults. The precompiler options that you specify override any defaults that are in effect.

SQL statement processing defaults for dynamic statements

Start of changeGenerally, dynamic statements use the defaults that are specified during installation. However, if the value of application defaults module parameter DYNRULS is NO, you can use these options for dynamic SQL statements in packages or plans with bind, define, or invoke behavior:End of change

  • COMMA or PERIOD
  • APOST or QUOTE
  • APOSTSQL or QUOTESQL
  • DEC(15) or DEC(31)