Database Views
To transform the sample tables into the format required by the context validation node in Business Rules, a set of database views is required. The binary tables used by Business Rules cannot be edited directly. The database views provide a way to combine the database tables that the user edited with the Business Rules user interface and the binary tables used by Business Rules at run time.
The other stackable views are not described in this topic, but they would be laid out similarly to the database views for content validation. For more information, see Database Views.
X9_VAL_RECORDS_V database view
The X9_VAL_RECORDS_V view combines the X9 records and error codes tables to produce a list of valid record
types with the error codes to return when the records are found to be out of sequence. The table of error code
fields for context validation in the Context validation table record layout topic is created by
this process. The data in this view is shown in the following table.
| View column | Source table | Source column |
|---|---|---|
| ibmFileFormat | X9_VAL_RECORDS | DATA_TYPE |
| ibmNprRecordType | X9_VAL_RECORDS | RECORD_TYPE |
| ibmValContextError | X9_VAL_RECORDS | CONTEXT_ERROR |
| ibmValRejectLevel | ERROR_CODES | REJECT |
| ibmValOverride | ERROR_CODES | OVERRIDE |
X9_VAL_CONTEXT_GLOBAL_V database view
The X9_VAL_CONTEXT_GLOBAL_V database view creates a list of valid record orders in a transmission. The
resulting data corresponds to the definitions in the required context validation fields. See Content
validation table record layout for the table of required context validation fields.
| View column | Source table | Source column |
|---|---|---|
| ibmFileFormat | X9_VAL_CONTEXT_GLOBAL | DATA_TYPE |
| ibmNprRecordType | X9_VAL_CONTEXT_GLOBAL | RECORD_TYPE |
| ibmValPrecededBy | X9_VAL_CONTEXT_GLOBAL | PRECEDED_BY |