IBM Support

Extended Mapping IF Conditioning based on a three value evaluation using Sterling Gentran:Server for iSeries

Technical Blog Post


Abstract

Extended Mapping IF Conditioning based on a three value evaluation using Sterling Gentran:Server for iSeries

Body

How to setup an Inbound extended map to evaluate IF conditions based on three values from inbound EDI data?
For example: IF REF01NE (not equal) DP or IA or IT

First, you will need to determine the processing order of the map, by look at the Application sequence report (EBDI053) for Inbound. The mapper writes in the order of the files and the fields within each file.
During Inbound mapping, each application target field map is evaluated, including the alternate maps in sequential order. The mapper will not write over a mapped application field. However, the remaining alternate maps will continue to be evaluated.

There are a couple of ways you can accomplish this type of mapping.

1. You can use a no write file (referred to as a dummy file), or a field that is not being used.
a) Map the first extended map (map 0) to the 'dummy' file, or field using the IF condition logic and save into a Constant-nn.

For example the condition would look like, IF REF/10/500 NE DP or IA. And the constant-nn will have the value of IT.
b) Copy map 0 to map 1.
c) Map the second extended map (map 1) to the application file (field) that will write the record using the IF condition logic.

For example the condition would look like, IF CONSTANT-nn NE IT. The first extended map (map 0) eliminated values DP and IA, which left IT. The second extended map (map 1) eliminates the value of IT.

OR

2. You can utilize a Validation Table to use in the extended map with the IF condition operand VT (validate table). A Validation table evaluates an element to map the value only if it exists in the table.

a) From the Mapping Menu:

Select Option 13 = Tables > 1 = Create and enter the table name, Type = V and Enter. Key in a Description, Standards version, 4 digit Standards Element ID, your Application field Min and Max Length, and the field type > F10 to update. From the example the element ID for REF01 is 0128 and must be defined as ID data type. This information is available from the Work with Standards.

b) From the Work with Tables select Option 11 = Copy Std Codes, and F19 to Copy. This copies all of the valid codes for that element into the validation table.

c) Select Option 12 beside the new validation table and delete the codes that you don't want in there. From our example delete DP, IA, and IT.

d) On the extended map you would validate against that table to write the REF01 to the application field that is not DP, IA, or IT.

For example the condition would look like, IF REF/10/500 VT TABLE NAME. This validates you want to map any value in the REF01, that is not DP, IA, or IT 

 

[{"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Product":{"code":"SS6UY8","label":"Sterling Gentran:Server for iSeries"},"Component":"","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"","Edition":"","Line of Business":{"code":"LOB02","label":"AI Applications"}}]

UID

ibm11122741