Problem
When issuing a short-lived or fast-returning TSO command, such as LISTDS or TIME, the TsoCmd.issueCommand() method can enter the message-retrieval loop even though the initial command execution response already contains the completed TSO prompt.
Because the prompt has already been returned, the additional message-retrieval logic unnecessarily sends a sendTsoForReply() request to z/OSMF.
At this point, the host buffer has already been flushed and the TSO interaction has effectively completed. The additional, out-of-order request can cause a terminal protocol violation on the host, resulting in the TSO servlet environment restarting with:
IKJ56602I COMMAND SYSTEM RESTARTING DUE TO ERROR
Proposed Fix
Before entering the message-retrieval loop, determine whether the initial command execution response already contains a completed TSO_PROMPT.
If the prompt is already present, the message-retrieval loop should not issue an additional sendTsoForReply() request.
The command should instead treat the initial response as the completed interaction and return the collected TSO response normally.
Problem
When issuing a short-lived or fast-returning TSO command, such as
LISTDSorTIME, theTsoCmd.issueCommand()method can enter the message-retrieval loop even though the initial command execution response already contains the completed TSO prompt.Because the prompt has already been returned, the additional message-retrieval logic unnecessarily sends a
sendTsoForReply()request to z/OSMF.At this point, the host buffer has already been flushed and the TSO interaction has effectively completed. The additional, out-of-order request can cause a terminal protocol violation on the host, resulting in the TSO servlet environment restarting with:
Proposed Fix
Before entering the message-retrieval loop, determine whether the initial command execution response already contains a completed
TSO_PROMPT.If the prompt is already present, the message-retrieval loop should not issue an additional
sendTsoForReply()request.The command should instead treat the initial response as the completed interaction and return the collected TSO response normally.