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.
- Click
Operation >
New.
- In the
Operation Name field, type
On Error.
- From the
Active Screen drop-down list, click
ACCTSET.ACCTMNU.
- 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.
- Leave the
Transaction ID field blank. This operation does not start a transaction.
- Leave
Create Default Mappings unchecked.
- 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.
- Hover over the fields on the ACCTSET.ACCTMNU screen and identify the location of the MSGM field, located at the bottom of the screen.
- Drag the
MSGM field to the
Interface Fields pane and drop it there.
- 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.
- Click
OK.
- Click
File > Save CICSScreenWS.svi to save the completed On Error operation.
- Close the
Interface Mapper.