Previous Topic Next topic Print topic


Create Interface Fields

We now need to define interface fields to accommodate the returned data. We have already identified and grouped the fields we need on the DEMO92 screen, which simplifies this process a great deal.

  1. From the IMS Screen pane, click and drag the following fields to the Interface Fields pane and drop them there:
    • FLD0015Grp - located under the ELEMENT KEY heading
    • FLD0016Grp - located under the ELEMENT VALUE/DESCRIPTION heading

    Fields that originate as input/output fields are by default created as input fields in their Interface Field equivalents. Therefore, each of these fields is now defined as an input field. However, in this case, we want them to be output fields. We also want to rename each of the fields to something more meaningful. The names we assign here appear as field labels in our generated client.

  2. From the Interface Fields pane, double-click FLD0015Grp.
  3. In the Name field, type ElementKey to rename the field.
  4. Click Output to change the direction of the field.
  5. Click OK.
  6. Repeat steps 2 through 5 for the FLD0016Grp field, renaming it to ElementValue.

Now let's turn our attention to the Mappings pane. The Interface Mapper has automatically generated mappings for these two fields. Notice that the Interface Field column shows the fields with an asterisk appended to the end of each field name. The asterisk tells us that these fields each represent an array and that all occurrences of the field are included.

The COBOL Field column shows the field from the originating IMS screen that corresponds to the interface field we've created. Field names in this column are qualified by the group parent name we assigned when we grouped the fields in the Screen Editor, and also have an asterisk in parentheses appended to them. Again, this asterisk tells us that all fields on the originating screen are included.

The Map column shows us the direction that data travels. Here, because we have defined our interface fields as output fields, data moves from the COBOL fields to the interface fields as is represented by the left-pointing arrow.

Previous Topic Next topic Print topic