Creating Options Section of Data File

About Creating the Options Section of the Data File

The Options section lists certain global settings that determine the way the tool  processes the file. Including the Options section in the data file allows you to set different default values for the different sets of transactions.

Note: The Options section of the data file is not mandatory to run the tool successfully.

The Options section can include these settings:

options {
[statusFile = "status-file-name";]
[errorFile = "error-file-name";]
[uprFile = "unprocessed-records-file-name";]
[commit = ("True" | "False");]
[errorHandle = ("Abort" | "Continue");]
[disableAllChecks =("True" |"False");]
[customFuncExec = ("True" | "False");]
[permissionsCheck = ("True" | "False");]
[validValuesCheck = ("True" | "False");]
[keepImportInfo = ("True" | "False");]
[insertorupdate = ("True" | "False");]
[requiredValuesCheck = ("True" | "False");]
}

This table describes the entities in the Options section:

Item Explanation

statusFile

Specifies the name of the status file. The default file name is the name of the data file with the file extension .stat appended to it.

errorFile

Specifies the name of the error file. The default file name is the name of the data file with the file extension .err appended to it.

uprFile

Specifies the name of the unprocessed records file. The default file name is the name of the data file with the file extension *.upr appended to it.

commit

Specifies whether to commit or undo database changes performed in the data transactions.
When the option is set to True, the data import tool authorizes all database changes, otherwise, the tool does not make changes to the database. The commit option is True by default. You can use this option to test your file for errors without actually making any database changes. You can check the validity of the database transactions and the syntax of your data file.

errorHandle

Specifies whether to abort or continue after encountering an error when processing an instruction. The default is Continue.

customFuncExec

Specifies whether to turn on execution of all custom functions during processing. The default is True.

disableAllChecks

Disables all checking. This switch turns off the checking for valid values, primary keys uniqueness, permission, and required values. It overrides the permissionCheck option and the
validValuesCheck option. The default is False.

permissionsCheck

Specifies permission checking. The default is True.

validValuesCheck

Specifies valid values checking. When valid values checking is True, the tool confirms that any inserted or updated values match the enumerated or range values defined for the particular
class property. The tool reports an error if a given value does not correspond to the values defined for the particular class property. The default is True.

keepImportInfo

Retains information such as signature and time stamp when importing data

requiredValuesCheck

Turns off required values validation when processing the data file.

insertorupdate

Performs an insert operation if the object does not exist in the database, otherwise performs modify operation. Default is False.

Guidelines to Write Instructions for Options Section

  1. End each line with a semi colon (;).

  2. You can change these options during data processing by specifying them again in the Options  of the data file:

    • customFuncExec

    • permissionsCheck

    • validValuesCheck

    • keepimportinfo

    • disableAllChecks

  3. All options remain as a block of instructions unless a new option statement changes them.

  4. If you specify the same option in both the command-line options and the Options section, the instructions of the Options section from the data file overrides the command-line options throughout the data processing. 

    Example-1: Typical Options section of a data file:

    options {
    statusFile = "datafile.stat";
    errorFile = "datafile.err";
    errorHandle = "Continue";
    customFuncExec = "False";
    permissionsCheck = "False";
    }
    InsertRandom e_dpt_class {
    s_pmg_name = "EBC/K/YX";
    e_dpt_cmpy_code = "EBC";
    }
    InsertRandom e_dpt_class {
    s_pmg_name = "EBC/KX/RTK";
    e_dpt_cmpy_code = "EBC";
    }

    Example-2: Options settings being changed in the data file:

    options {
    statusFile = "datafile.stat";
    errorFile = "datafile.err";
    errorHandle = "Continue";
    customFuncExec = "False";
    permissionsCheck = "False";
    }
    InsertRandom e_dpt_class {
    s_pmg_name = "EBC/K/YX";
    e_dpt_cmpy_code = "EBC";
    }
    InsertRandom e_dpt_class {
    s_pmg_name = "EBC/KX/RTK";
    e_dpt_cmpy_code = "EBC";
    }
    options {
    customFuncExec = "True";
    }
    InsertRandom A_D_CONVERTER {
    e_prd_ext_code = "RYT 120 003";
    e_prd_ext_rev = "";
    e_prd_internal_code@EXT = "RYT 120 003";
    e_prd_internal_rev@EXT = "";
    e_prd_value_grp = "3";
    e_prd_status = "VE";
    e_prd_func_desig = "";
    e_prd_release_resp = "";
    e_prd_eccn_no = "";
    e_prd_eccn_date = "";
    e_prt_generic_code = "NO CODE";
    e_prt_bus_area = "";
    }