Update the CWSJSON Enterprise Server Region

Guides you through the process of configuring CWSJSON resources, and installing and verifying those resources.

Start the Server Explorer

The Server Explorer expandable ribbon is visible in Visual Studio on the top left side of the IDE by default when using Enterprise Developer. However, if it is not visible:

  • In Visual Studio, click View > Server Explorer.

Configure CWSJSON resources

To run the invkRevJCICSClientApp Web service requester using the CWSJSON enterprise server region you created in the previous tutorial, you must add the appropriate resources to the startup list and add and configure additional resources required by the CICS program.

Start the CWSJSON enterprise server region
  • On the Server Explorer, right-click CWSJSON; then select Start.
Start Enterprise Server Administration
  • On the Server Explorer, right-click Micro Focus Servers, and then click Administration.

    The Enterprise Server Administration Home page starts in a Visual Studio window.

Start ES Monitor and Control (ESMAC)
  1. After CWSJSON has started, on the Administration Home page, click the Details button located in the Status column for the CWSJSON region.
  2. On the Server > Control page, click ES Monitor & Control.
Add CWSJSONR to the startup list
  1. On the ESMAC menu ribbon, click the Resources drop-down list; then select by Group.
  2. Click Startup.
  3. Click the Details button that corresponds to the DEMOSTRT startup list.
  4. On the CICS STARTUP - DEMOSTRT page, scroll down to the end of the list and type CWSJSONR into the empty field at the bottom; then click Apply.

    As with the previous tutorial, you need to create the CWSJSONR resource group.

Create the CWSJSONR resource group
  1. On the ESMAC menu, click the Groups button located under Resources.
  2. On the CICS Resource Groups page, click New.
  3. In the Name field, type CWSJSONR.
  4. In the Description field, type CICS Web Services JSON Requester Resources; then click Add.
Create resources
The invkRevJCICSClientApp program requires a URIMap resource, a pair of Bundle resources, and a PCT resource used to invoke the Reverse Web service from the Rumba+ TN3270 terminal emulator.
Add URIMap
  1. On the CICS Group CWSJSONR page, click URIMap.
  2. Complete these fields:
    Name reverseR
    Description My CICS Requester URIMap
    Usage Client
    Port 5639
    Host localhost
    Path /cics/services/reverse
  3. Click Add; then click Apply.
  4. Click Group List to return to the CICS Group CWSJSONR page.
Add Bundles
  1. Click Bundle.
  2. Complete these fields:
    Name INVKRVJI
    Description Input bundle to map the data structure to a JSON request
    Bundle Dir $IDE_PROJECT_LOC\invkRevJCICSClientApp\invkRevJInBundle
  3. Click Add; then click Apply.
  4. Click Group List to return to the CICS Group CWSJSONR page.
  5. Click Bundle.
  6. Complete these fields:
    Name INVKRVJO
    Description Output bundle to map the JSON response to a data structure
    Bundle Dir $IDE_PROJECT_LOC\invkRevJCICSClientApp\invkRevJOutBundle
  7. Click Add; then click Apply.
  8. Click Group List to return to the CICS Group CWSJSONR page.
Add PCT
  1. Click PCT.
  2. Complete these fields:
    Name RVRS
    Description CWS transaction to invoke the reverse service
    Program Name invkRevJ
  3. Click Add; then click Apply.
  4. To return to the Administration Home page, click Home at the top of the ESMAC menu.

Install CWSJSON resources

You can install the new resources by stopping and starting the region.

  • From the Server Explorer in Visual Studio , right-click CWSJSON; then select Restart. This stops and then starts the CWSJSON enterprise server region, automatically installing and loading the newly added resources on the startup list.

Verify Resources

After CWSJSON is started, you can verify that the resources you have defined are installed and active.

  1. From the Enterprise Server Administration Home page, start ESMAC for the CWSJSON region, just as you did in the previous section.
  2. On the ESMAC menu, select Active from the drop-down list located under Resources.
  3. On the ESMAC menu, click the WebSvc button. You should see the reverse Web service listed and marked as INSERVICE.
  4. On the ESMAC menu, click Pipeline; then click the Details button that corresponds to JSONPIPE. The Pipeline resource sets the response wait period, identifies the JSON configuration file, and the Web Service directory.
  5. On the ESMAC menu, click URIMap; then click the Details button that corresponds to PIPELINE and /cics/services/reverse.

    Enterprise Server generates URIMAPs to provide CICS with the information it needs to process requests. The name of each generated URIMAP begins with a pounds sterling symbol (£).

    To run your provider CICS Web service, you send a JSON request to an endpoint URL that routes the request to your enterprise server region. The endpoint URL contains a URI value. The incoming request reads the installed URIMAPs to identify the map whose Path value matches the URI value of the endpoint URL. When the correct URIMAP is identified, CICS uses the data defined in the URIMAP, such as the name of the Web Service and its associated Pipeline, to process the request.

  6. Close Enterprise Server Administration.