Send messages to a TSO/E address space
You can use this operation to send TSO/E messages to a TSO/E address space.
HTTP method and URI path
PUT /zosmf/tsoApp/tso/<servletKey>?[readReply=true|false]
- zosmf/tsoApp identifies the TSO/E address space services.
- tso informs the service that the request is for a TSO/E address space.
- <servletKey> identifies the TSO/E address space to which the message will be sent.
- [readReply] is an optional parameter that indicates whether the service should send the message and immediately check for a response (default) or just send the message. To immediately check for a response, omit the parameter or set its value to true. Otherwise, set its value to false.
Standard headers
Content-Type: application/json
Custom headers
None.
Request content
{"message-type":{"VERSION":"JSON-version","data-type":"data-value"}}
where:- message-type
- Keyword that identifies the type of TSO/E message. The value can be TSO MESSAGE, TSO PROMPT, or TSO RESPONSE.
- JSON-version
- A four-digit number that identifies the JSON version used to format the message.
- data-type
- Keyword that describes the type of data included in the data-value variable. The value can be DATA, HIDDEN, or ACTION.
Example: {"TSO RESPONSE":{"VERSION":"0100","DATA":"ALLOC DA"}}
Usage considerations
See Usage considerations for the z/OSMF REST services.
In addition, note that the API will attempt to read response TSO/E messages after the input message is sent. If no TSO/E messages are received after a predetermined time period, a timeout indication will be returned.
Required authorizations
Expected response
On completion, the service returns an HTTP response, which includes a status code indicating whether your request completed. Status code 200 indicates success. A status code of 4nn or 5nn indicates that an error has occurred. For more details, see Error handling.
The response also includes a JSON object that contains the TSO/E response messages, or a timeout indication. For more details, see Content type used for HTTP request and response data.
Example
PUT /zosmf/tsoApp/tso/ZOSMFAD-71-aabcaaaf HTTP/1.1
Host: zosmf1.yourco.com
{"TSO RESPONSE":{"VERSION":"0100","DATA":"TIME"}}
HTTP/1.1 200 OK
Date: Thu, 13 Jan 2011 05:39:28 +0000GMT
Connection: close
{"servletKey":"ZOSMFAD-71-aabcaaaf","ver":"0100","tsoData":[{"TSO MESSAGE":
{"VERSION":"0100","DATA":"TIME-12:09:07 PM. CPU-00:00:00 SERVICE-92319
SESSION-00:00:13 OCTOBER 12,2011"}}],"timeout":false}