Previous Topic Next topic Print topic


Mappings

A mapping is a designation of a relationship between an application field, such as a COBOL entry point and an interface field. If you have created the interface field by dragging and dropping, a mapping is done for you - the interface field maps to the field you dragged and dropped. For fields that are an array (have an OCCURS clause), all occurrences are automatically mapped by default.

An interface field that you define manually requires that you also define its mapping or mappings manually. You can define more than one mapping for each interface field. For an input field, this means that during execution, data received in the field is moved to all the data items the field is mapped to. For an output field it is meaningless (data from several COBOL fields would be sequentially moved to the one interface field, each value replacing the previous), unless the interface field has an Occurs property. In this case you can specify different values of the subscript in different mappings. Only elementary (non-grouped) interface fields and COBOL fields can be mapped.

If a field you are mapping is an array or part of an array, use an asterisk (*) to show that all occurrences of that field are mapped (default), or define it using a subscript to specify a particular occurrence. For example:

fieldname(*)

or

fieldname(4)

You cannot normally change the field name from the Mapping dialog box because the purpose of the Mappings function is to specify the mappings for a particular interface field. However, if the interface field has the Occurs property, you can edit the field name so as to specify a subscript. Changing anything other than the subscript results in an error.

By default, for an item with the Occurs property, each occurrence is mapped to the corresponding occurrence of the COBOL data item. If the number in the Occurs column does not match the OCCURS clause of the originating data item, a warning message appears before the Mappings dialog box opens. In this case, use the Mappings dialog box to specify mappings for the individual occurrences.

When creating a Web Service service interface, take care not to map an output interface field defined as a string to a COBOL alphanumeric field that can contain a character value that is invalid for a SOAP string. Invalid character values are values less than x"20" except for x"09", x"10" and x"13". If you do create such a mapping, the client program might receive the message: "458 Illegal character in SOAP string".

Previous Topic Next topic Print topic