WEB OPEN

Open a connection to a server for CICS® as an HTTP client.

Syntax

WEB OPEN

Read syntax diagramSkip visual syntax diagramWEB OPEN URIMAP( data-value)HOSTSESSTOKEN( data-area)

HOST

Read syntax diagramSkip visual syntax diagram HOST( data-value) HOSTLENGTH( data-value) PORTNUMBER( data-value SCHEME( cvda)

Conditions: IOERR, INVREQ, LENGERR, NOTFND, NOTAUTH

Description

WEB OPEN enables an application program, through CICS web support, to open a connection with a specified host on an HTTP server on the Internet. When the connection is open, the application program can make HTTP client requests to the server and receive responses from it.

Options

HOST(data-value)
Specifies the host name on the server to which you want to connect. You can extract this information from a known URL using the WEB PARSE URL command.

HOSTLENGTH(data-value)
Specifies as a fullword binary value, the length of the host name. This information is returned if you use the WEB PARSE URL command to parse a URL.
PORTNUMBER(data-value)
Specifies the port number, as a fullword binary value. You specify the port number only if it is not the default for the specified scheme. For HTTP, the default port number is 80, and for HTTPS, the default port number is 443. Port number information can be extracted from a known URL using the WEB PARSE URL command.
SCHEME(cvda)
Specifies the scheme that is to be used for the connection to the server, which can be with or without SSL. CVDA values are as follows:
HTTP
The HTTP protocol, without SSL. Only HTTP protocol is supported.
SESSTOKEN(data-area)
Returns the session token, an 8-byte binary value that uniquely identifies this application's use of the connection between CICS and the server. The session token must be used on all CICS WEB commands that relate to this connection.

Conditions

16 INVREQ
RESP2 values:
40
Scheme incorrect.
48
The format of the host option is incorrect.
67
The content of the response does not conform to HTTP format. The error is generated because there is a syntax problem.
138
The port number is greater than 65535.
22 LENGERR
RESP2 values:
21
Incorrect host length.