Mapping the Request

The following steps create an operation to GET an item from the EXMPCAT table. For additional information refer to IBM z/OS Connect topic regarding Create an Operation to Inquire about an item.

  1. Select the Mapping button > Open Both Mappings next to the GET Method Service button.

    The GET Method displays a menu associated with the Mapping button. An arrow hovers over the Open Both Mappings selection.

    Figure 279. Open Both Mappings
  2. A request tab and response tab will display next to the catlgapi API Editor tab. Select the request tab.

    Request and response tabs with the DK1APIC1-Con

    Figure 280. Request and Response Tabs
  3. Expand the DK1APIC1-Con to display the whole copybook.
  4. This step will assign the API Key. Right-click to select the IN_API_KEY field in the copybook.
    1. Select Add Assign transform.

      The copybook displays. The menu with Add Assign transform displays. A mouse hovers over Add Assign Transform

      Figure 281. Add Assign Transform
    2. In the Properties Panel enter the value API001. A box displays next to the field IN_API_KEY marking it as Assigned.

      The copybook displays with IN_API_KEY marked as assigned. API001 displays in the Properties panel.

      Figure 282. Assign IN_API_KEY
  5. This step will assign the table name. Right-click to select the IN_TABLE_NAME field in the copybook.
    1. Select Add Assign transform.
    2. In the Properties Panel enter the table name EXMPCAT. A box displays next to the field marking it as Assigned.

      The copybook displays with IN_TABLE_NAME marked as assigned. EXMPCAT is the value in the Properties panel.

      Figure 283. Assign Table Name
  6. This step will assign the VTS. Right-click to select the IN_VTS_NAME field in the copybook.
    Note:
    If using a local TSR, this field can be ignored.
    1. Select Add Assign transform.
    2. In the Properties panel enter the name of the VTS-TSR. A box displays next to the field marking it as Assigned.

      The copybook displays with IN_VTS_NAME marked as assigned. VTS2 is the value in the Properties panel.

      Figure 284. Assign VTS Name
  7. Select the following fields in the WS_ROW_HEADER section:
    • IN_OFFSET
    • IN_LIMIT
    • OUT_TOTAL_RECS
    • OUT_RECS_THIS_CALL
    • OUT_REC_SIZE
    • OUT_ERROR_CODE
    • OUT_ERROR_SUB_CODE
    • OUT_RESPONSE_MESSAGE
    • OUT_FILLER
  8. Right click to select Add Remove Transform. A box displays next to the field marking it as Removed.

    All the fields listed have a box marking them as removed.

    Figure 285. Add Remove Transform
  9. Select the following fields associated with the request in the WS_ROW_DATA section:
    • CA_DESCRIPTION
    • CA_DEPARTMENT
    • CA_COST
    • CA_STOCK
    • IN_STOCK
    • ON_ORDER
  10. Select Add Remove Transform. A box displays next to each field marking it as Removed.
  11. In the HTTP Request section, select the itemsID listed as a Path Parameter and drag it to the CA_ITEM_REF field in the WS_ROW_DATA section. A box displays Move between the Path Parameter and the CA_ITEM_REF Request field.

    The copybook is mapped.

    Figure 286. Request Mapping
Note:
The IN_TABLE_NAME and IN_VTS_NAME fields can also be supplied as query parameters.