Add Reverse Operation Logic

Guides you through the process of adding logic to the Reverse application that performs the task of reversing input, and then building the project in Visual Studio.

The generated skeleton program, reverse.cbl, contains some basic functionality that is common to any CICS Web service that uses the Channel interface. The Web service:

Add operation logic

To provide the required operation logic, you must code it manually by editing the program.

  1. From the Solution Explorer, double-click reverse.cbl to open it in the COBOL editor.
  2. Declare the following two variables in the working-storage section:
    01 ws-string-len               pic x(4) comp-5.
    01 ws-reversedString-len       pic x(4) comp-5.
  3. Scroll down to the WS-OP-1 paragraph, and replace the comment code between the EXEC CICS GET and the EXEC CICS PUT statements with:
    copy 'revJson.cpy'.
  4. Click File > Save reverse.cbl.
  5. Close the COBOL editor.

Build the ReverseJSON project

  • From the Solution Explorer, right-click the ReverseJSON project; then select Build.