Add Operation Logic to invkRev.cbl

Provides instructions for adding logic to the generated invkRev.cbl skeleton program that provides a URI port specification and a means of sending the specification to the enterprise server region.

Add operation logic

The generated skeleton program, invkRev.cbl, contains some basic functionality that is common to any CICS Web service requester. In this case, it:

To provide the program with a URI and port that directs the request to the enterprise server region that is running your Web service provider, you must edit the code.

  1. From the Solution Explorer, double-click invkRev.cbl to open it in the COBOL editor.
  2. In the local-storage section, change the value of ls-uri to:
    "http://localhost:5482/cwsDemo/reverseMe".
  3. In the procedure division, ws-op-1 section, replace the comment code before the exec cics put container statement (******* ...) with:
    move 1                      to myString-occurs
    move 'esaelPeMesreveR'      to myString(1)
  4. After the exec cics get container command for DFHWS-DATA, replace the comment code with following code to send the reversed string back to the terminal:
     exec cics send text
          from(reversedString(1))
          freekb
     end-exec
  5. Save the program and exit the editor.