XDB
Use this field level rule to tell the system the field has been mapped in the XDB database. Use this rule when you have variable fields which are used on multiple sections.
Note | You should use the XDD, instead of this rule. This rule is included in this version of the system only for legacy system support. |
Syntax
Instead of mapping these identical variable fields, like Name and Address, each time they are used, you can map them once in the XDB database and then map the individual fields to the XDB rule. This tells the system to look in the XDB database for the complete mapping information for those variable fields.
Keep in mind, however, that these fields do not exist in the dictionary:
- SrcFile (source file)
- SrcRec (source record number)
The SrcFile is saved as a number, not an actual file name. It is used in the TblLkup rule and becomes the index to use to find the table you want to look into for this rule.
So, if you want to use the TblLkup rule, you must define this source file variable within the field map definition.
Similarly, to reference a specific source record, you must define SrcRec in the field’s mapping. For example, you may have an overflow detail record which is identified by 1,Detail. For a certain field, however, you want the data from the second detail record to be mapped. In this case, the mapping for this particular field must contain a SrcRec. Otherwise, the data from the first record will be used.
Mapping
You can include an asterisk (*) to tell the system to add a space before it concatenates the search masks. This makes the XDB and token lookup more flexible and lets you use XML for parent/child mapping.
The child can also be another search mask or XPath, instead of just being the rule parameter. To maintain the same search mask for the Child as that shown in the above example, however, you must add an asterisk (*) in front of the Child's data if it was used as a rule parameter.
You must also set up a correct search mask (XPath) syntax if a child's parent references another parent.
Note | The use of an asterisk was added in version 11.0. Prior to this change, the system automatically added a comma for you. To make this work for all implementations, the system cannot assume a comma is always needed. For example, an XML implementation would not want a comma added before the two XPaths are appended together. |
Name |
Parent |
Rule |
Data |
Child1 |
Parent2 |
PrintIf |
*A=Accident:C=Casualty |
Child2 |
Parent1 |
Move_It |
,35,ZZZ |
Parent2 |
Parent1 |
|
,20,ABC |
Parent1 |
|
|
1,HEADREC |
Child1 - 1,HEADREC,20,ABC A=Accident:C=Casualty
Because there is no asterisk in Child2's data, the complete search mask for Child2 becomes:
1,HEADREC,35,ZZZ.
Here is an example for the XML implementation:
Name |
Parent |
Rule |
Data |
Child1 |
Parent2 |
PrintIf |
*A=Accident:C=Casualty |
Child2 |
Parent1 |
Move_It |
/JHI |
Parent1 |
|
|
!/ABC |
Parent2 |
Parent1 |
|
/DEF |
In this example, the mapping for Child1 becomes:
!/ABC/DEF A=Accident:C=Casualty
The mapping for Child2 becomes:
!/ABC/JHI
In addition, you can name a parent within each child. The way you specify this is similar to the way used for token lookup — the Data field contains necessary information. Here is an example:
?Child/Parent
For the XDB rule, the source field name would contain this set up without a question mark. Here is an example:
;0;0;Child/Parent1;0;0;Child;0;20;;XDB;;N;N;N;N;7577;2273;11114;
Name |
Parent |
Rule |
Data |
Child |
Parent1 |
PrintIf |
*A=Accident:C=Casualty |
Child |
Parent2 |
Move_It |
/JHI |
Parent1 |
|
|
!/ABC |
Parent2 |
|
|
!/ABC/DEF |
The mapping for Child/Parent1 is:
!ABC A=Accident:C=Casualty
The mapping for Child/Parent2 is:
!/ABC/DEF/JHI
See also
© Copyright 2020, Oracle and/or its affiliates. All rights reserved. Legal notices.