Substitution variables for the error code detailed description
The detailed description for an error code is used to provide additional information for an error code when it is assigned. Data that is only available at run time can be included in the detailed description by using substitution variables when you configure the detailed description for the error code.
A basic substitution variable for the error code detailed description has the following format.
$(xxx)An optional formatting indicator can be provided for the
substitution variable. The basic substitution variable and the formatting indicator are separated by a colon
as shown in the following
example.$(xxx:format)See
Formatting indicators for the values that can be used for
format.Both Gateway Server and Business Rules Server support variable substitution at run
time. The types of substitution variables for xxx are described in the following list.
- Predefined variable name
- Gateway Server and Business Rules Server have several predefined substitution variable names that return commonly used runtime information. See Gateway Server available variable names and Business Rules Server available variable names for the names of the predefined substitution variables that can be used.
- Data field name
- You can specify the standard data field names that are used in the various Business Rules
workflow components. For example, ibmNprAmount is the data field name for the amount field
of a transaction. The substitution variable to use for this data field is shown in the following
example.
This type of substitution variable applies to Business Rules only.$(ibmNprAmount) - Offset, Length
- This type is used to obtain specific data from the input record that is in the ibmValInputData data field when the error code is assigned. The offset value to use is a one-based index to where the data is located in the input record. The length value is the length of the field in the input record. This type of substitution variable applies to Business Rules collectors only.
- RecordType, Offset, Length
- This type is used to obtain specific data from prior raw data input records that are in the ibmValInputData data field when the error code is assigned. The record type value is the type of the prior record that is to be located in the raw data. The offset value to use is a one-based index to where the data is located in the record type. The length value is the length of the field in the record type. When the record type cannot be found in the input, a blank string is returned. This type of substitution variable applies to Business Rules only.
- PREV, Offset, Length
- This type is used to obtain specific data from a previously processed record. The data is retrieved from a
prior record that was logged with the same error code that is being assigned to the current record. The offset
value to use is a one-based index to where the data is located in the previous record. The length value is the
length of the field in the previous record. As shown in the following example, the word PREV is required. It
is not case-sensitive.
This type of substitution variable applies to Business Rules collectors only.$(PREV,88,7)
Formatting indicators
Any substitution variable can have an optional formatting indicator. The formatting is specified after a
colon, as shown in the following example.
$(xxx:format)When the formatting indicator is not recognized because its syntax is incorrect, Business Rules sets a workflow exception during ingestion and the transmission is not processed. The syntax must be corrected to continue.
The following table shows the available formatting indicators. The indicators are not case-sensitive.
| Formatting indicator | Function |
|---|---|
| PadLCLen | Pads the string to the left. The pad character to use and the total length of the final padded string
are also provided in the formatting indicator.
|
| Trim | Removes both the leading and the trailing blanks. |
| Money | Converts numbers to a US dollar format. It adds commas and a decimal point, but not a dollar sign. If the substitution variable is not numbers, the original value is returned. |
The following table has examples of applying the formatting to values. Blanks in the values are indicated by the ␣ character.
| Formatting indicator | Value before the formatting is applied | Value after the formatting is applied |
|---|---|---|
| PadL010 | 300 | 0000000300 |
| 12345␣␣␣␣␣ | 0000012345 | |
| 123456789123 | 123456789123 | |
| Trim | ␣␣␣aValue␣␣␣ | aValue |
| abc␣␣␣␣␣␣xyz | abc␣␣␣␣␣␣xyz | |
| Money | ␣␣␣␣1234567 | 12,345.67 |
| 0000001234567 | 12,345.67 | |
| abc␣␣␣␣␣␣ | abc␣␣␣␣␣␣ | |
| 0 | 0.00 | |
| 2 | 0.02 | |
| 10␣␣␣␣␣␣␣␣␣␣ | 0.10 |
Gateway Server available variable names
The predefined variable names for Gateway Server are shown in the following table.
| Variable name to use | Description |
|---|---|
| BUSINESS_DATE | The business date for the batch (ICL). It was assigned based on the clearing attributes for the batch (ICL). |
| FILE_NAME | The name of the transmission that is being processed. |
| SECO | The result of looking up the SECO_ID in the ECO_CONNECTION table |
| SECO_ID | The <connectionId> element from the routing file. |
Business Rules Server available variable names
The predefined variable names for Business Rules Server are shown in the following table.
| Variable name to use | Description |
|---|---|
| ACTUAL | This variable is used for errors from the content or the collector validation nodes. For content validation, it returns the field from the raw record that is being validated. For collector validation, it returns the collected value. |
| EXPECTED | This variable is used for errors during the validation of unique collectors that have ordering set to INCREMENTING or INC_START_1. These expected values start with a value, and then each subsequent value must be greater by one. When an error is detected, this variable returns the expected value that is associated with the error code. The expected value is saved only for the first occurrence of an error. |