The #FORMAT mapping type consists of the following components:
Table 22. #Format Mapping Type Components
Component | Description |
---|---|
#FORMAT | Indicates that a mapping type of FORMAT is specified in the target member. |
<format mask> | User defined format mask with the following characters used to define the format:
|
<segment delimiter> | The optional segment delimiter defines the character that is used to delimit the segments in the source and target member. For this rule type, the source and target delimiter must be the same. When the segment delimiter is not specified, then the format mask is applied to the entire member independent of any segment specification or delimiter. |
The following is an example that uses all options provided by #FORMAT:
Table 23. #Format Mapping Type Example
Source | Target | Result |
---|---|---|
12345-6789-012-3456ABC-001 | #FORMAT(“???-*-GROUP-AA##?#*X-GROUP”,”-“) Explanation: Take the first three characters of the first segment, take the entire second segment, replace the third segment with the text “GROUP”, prefix the fourth segment with AA, drop the third and fourth characters, keep the fifth character, drop the sixth character, keep ABC and add suffix “X, replace the fifth segment with the text “GROUP”. | 123-6789-GROUP-AA5ABCX-GROUP |