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:
- Populates the request data structure (in
reverI01.cpy) with the content of the DFHWS-DATA container.
- Populates the DFHWS-DATA container with the content of the response data structure (in
reverO01.cpy).
Add operation logic
To provide the required operation logic, you must code it manually by editing the program.
- From the
Solution Explorer, double-click
reverse.cbl to open it in the COBOL editor.
- 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.
- 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'.
- Click
File > Save reverse.cbl.
- Close the COBOL editor.
Build the ReverseJSON project
- From the
Solution Explorer, right-click the
ReverseJSON project; then select
Build.