Application programming for non-HTTP requests

Application programs for non-HTTP requests can use certain elements of the EXEC CICS® WEB programming interface. They may also be non-Web-aware applications, and produce output that is encoded by a converter program.

A pseudoconversational programming model is not suitable for non-HTTP requests. Applications should be designed to receive a single request and provide a single response.

Web-aware applications

If you want to use a Web-aware application to respond to non-HTTP requests, you can use the following CICS API commands:
  • The WEB RECEIVE command can be used to receive a non-HTTP request. If the application is used to respond to both HTTP and non-HTTP requests, you can use the TYPE option on the WEB RECEIVE command to distinguish between the two request types. Note that CICS does not carry out any parsing for a non-HTTP message, and requests that have been divided up for transmission across the network are not automatically assembled. If an analyzer program assembles the request, the results of this are not visible to the CICS WEB API commands.
  • The EXEC CICS DOCUMENT commands can be used to compose a CICS document to form the body of a response.
  • The WEB SEND command can be used to send a response to a non-HTTP client. However, the following options that relate to HTTP-specific actions are not suitable:
    • STATUSCODE and STATUSTEXT. If specified, these are ignored.
    • CLOSESTATUS. If specified, this is ignored.
    • CHUNKING. If specified, this causes an error on the command.
  • The WEB RETRIEVE command can be used to retrieve a CICS document sent in an earlier EXEC CICS WEB SEND command.
Other EXEC CICS WEB commands relate to HTTP requests only, and can result in an INVREQ condition if used with non-HTTP requests.

An application program can specify code page conversion of non-HTTP requests using the WEB RECEIVE command.

Non-Web-aware applications with converter programs

With non-Web-aware applications, you can use a converter program to convert the input from the Web client into a suitable COMMAREA for the application, and to convert the output from the application into HTML to provide the response. If an analyzer program has reconstructed the request after it was divided up for transmission across the network, the results of this can be passed to a converter program.

The following input fields which relate to HTTP requests are undefined in a converter program for non-HTTP requests:
  • The HTTP version
  • The method
  • The path component of the URL
  • The request headers
Converter programs has more information about writing converter programs.