Previous Topic: Optimization Messages DisplayNext Topic: Using the Printer Control


SQL Plan Options

CA Datacom/DB has a plan option which allows CA Dataquery to specify the character to be used for the decimal point indicator in decimal, numeric, and floating point literals. CA Dataquery uses the user's profile setting for the decimal point when creating the plan to be used to execute an SQL query.

Therefore, if a user's profile specifies a comma (,) for the decimal point character, this user must use a comma for the decimal point indicator in any literals in all SQL (or DQL) queries. This is a change from Version 8.0 in which SQL only recognized the period (.) as the decimal point character.

To pass SQL plan options to be used by CA Dataquery, you must code the options as CA Dataquery comments beginning on line 1 of the query. Line 1 must have the CA Dataquery comment-begin characters in columns 1 and 2. Immediately following, in column 3, you must enter $DBSQLOPT as shown in the example following, which used */ for CA Dataquery comment-begin characters and /* for CA Dataquery comment-end characters.

 */$DBSQLOPT option=value option=value option=value
             option=value option=value ... /*

Follow each option=value with at least one space. No option=value may be continued from one query line to another, but you may use more than one line to include all of the required option=value statements. The last option=value must be followed by at least one space and the CA Dataquery comment-end characters (/*).

Any options specified in this manner are only used for the current execution of the query in which they are placed.

Following are SQL plan options and values that are significant for CA Dataquery:

DATE=

This option specifies the DATE output format. Valid values for DATE= are ISO, USA, EUR, or JIS. If this option is not specified, or an invalid value is specified, the default value will be taken from the CA Dataquery option table value for the SQL date format.

DECPOINT=

This option specifies if you want a comma (,) to be the decimal point indicator in decimal, numeric, and floating-point literals. Valid values are C or P, C representing the comma (,) and P representing the period (.). The default if the option is not specified or an invalid value is used is the user's profile setting for the decimal point character.

ISOLEVEL=

This option specifies the isolation level, or degree to which a unit of recovery is isolated from the updating operations of other units of recovery. Valid entries are U, C, or R. If not specified, or an invalid value is given, the default is C.

PLNCLOSE=

This option specifies when the plan and URT are closed. Valid entries are T or R. The default is T if not specified or an invalid value is given.

SQLMODE=

This option specifies the mode in which CA Datacom/DB will process the query. Valid entries are ANSI, DATACOM, DB2, or FIPS. Default will be DATACOM when the option is not specified or an incorrect value is given.

STRDELIM=

This option specifies whether you want the string delimiter, used to delimit character string literals in SQL statements to be an apostrophe (') or a quotation mark ("). The escape character, used to enclose delimited SQL identifiers, is the apostrophe if the string delimiter is the quotation mark, or the quotation mark if the string delimiter is the apostrophe. Valid values are A or Q. If the option is not used, or an invalid value is given, the default is the apostrophe (').

TIME=

This option specifies the TIME output format. Valid values for TIME= are ISO, USA, EUR, or JIS. If this option is not specified, or an invalid value is specified, the default value will be taken from the CA Dataquery option table value for the SQL time format.

TIMEMIN=

This option specifies exclusive control wait time in minutes. Valid entries are 0 to 120. If not specified or an incorrect value is given, default is 0. If TIMEMIN is specified, TIMESEC is set to 0.

TIMESEC=

This option specifies the exclusive control wait time limit in seconds. Valid entries are 0 to 120. If not specified, or an incorrect value is given, default is 10. TIMESEC will be set to 0 if TIMEMIN is specified.

WORKSPACE=

Use WORKSPACE= only at the direction of CA Support.

This option specifies an increase in the amount of workspace used at plan execution time. Valid entries are 0 to 128. The default is 0 if not specified or an incorrect value is given.

Note: For a complete list and full details on plan options, see the CA Datacom/DB SQL User Guide.