Previous Topic Next topic Print topic


On Error Operation

Here we will add an operation that provides an error message if something goes wrong during the execution of our service. This is the last operation we need to add to our service interface; therefore, we will also close the Interface Mapper in preparation for deployment.

  1. Click Operation > New.
  2. In the Operation Name field, type On Error.
  3. From the Active Screen drop-down list, click ACCTSET.ACCTMNU.
  4. From the Previous Screen drop-down list, click ACCTSET.ACCTMNU. This sets the operation to execute if the application sends a second consecutive ACCTSET.ACCTMNU screen, indicating an error.
  5. Leave the Transaction ID field blank. This operation does not start a transaction.
  6. Leave Create Default Mappings unchecked.
  7. Click OK. The CICS Screen pane now shows the ACCTSET.ACCTMNU screen.

    We want this operation to output a message indicating an error has occurred. Therefore, we need to identify the error message field on the ACCTSET.ACCTMNU screen.

  8. Hover over the fields on the ACCTSET.ACCTMNU screen and identify the location of the MSGM field, located at the bottom of the screen.
  9. Drag the MSGM field to the Interface Fields pane and drop it there.
  10. In the Interface Fields pane, double-click MSGM and change its name to Msg and its direction to Output.
    Note: It seems logical to name this output field "Message." However, MESSAGE is a COBOL reserved word. We cannot name a field using a reserved word.
  11. Click OK.
  12. Click File > Save CICSScreenWS.svi to save the completed On Error operation.
  13. Close the Interface Mapper.
Previous Topic Next topic Print topic