This Question is Not Answered

1 "correct" answer available (4 pts) 2 "helpful" answers available (2 pts)
2 Replies Last post: Nov 11, 2009 7:27 AM by israc  
Click to view israc's profile   10 posts since
Jul 26, 2009

Nov 4, 2009 12:23 PM

CICS START TRANSACTION with the same TERMINAL ID causes HAVOC


Below is an incident that I have opened with IBM. Is there anyone else using HATS with CICS ?
Talking to our CICS guys I understand that it is common practice to use the CICS START tarnsaction with the same terminal ID

  1. Client logs on to CICS via HATS. If he performs transaction CEOT he sees that his Terminal ID is T001.
  2. Client executes transaction TRNA. TRNA executes Program MAIN1 which performs some logic. The browser shows the normal browser progress bar or hourglass. The HATS debug terminal shows the XSYSTEM clock (Mainframe hourglass).
  3. Program MAIN1 executes the CICS command ג€œSTART TRANSACTIION TRNB TERMID T001ג€ then EXEC CICS RETURN. At this point sometimes the HATS server sends the previous screen back to the browser and the hourglass in the browser ends. It can be seen on the HATS Server Debug terminal that TRNB is still executing .(The mainframe XSYSTEM clock is shown)
  4. When TRNB ends the result can be seen on the HATS Debug terminal but not on the browser.

It can be seen in the trace that was sent to the HATS Support team that the following occurs

At point 3 there is a Null RU with SDI and KRI on which causes the HATS server to send the previous screen back to the browser.

At point 4 BID sequence # ג€¦ is issued and the HATS server terminal is updated but this update never gets to the browser

Suggested Solution

If there is a Null RU with SDI and KRI on then the HATS server should not send anything to the browser until there is a RU containing data.

Click to view RonCraig's profile   21 posts since
Mar 2, 2009
Hi, Israc.

Yes, many HATS customers are running CICS transactions successfully.

I think the issue may arise from a misunderstanding of the communications protocol, and some incomplete information from your CICS programmers.

When one chooses to negotiate for contention resolution for 3270E connections, you are negotiating a contract between the host and the client. This contract says that the host applications will not unlock the keyboard until the host is completely done with its communication. The keyboard unlock will be the agreed-upon signal that the client is now free to send.

This contract is exactly what allows HATS (or other programs) to react so quickly to 3270 host screens. Without this contract, you are forced to use timing rules of thumb and other heuristics to guess when the client is free to send. With this contract, HATS knows for certain that the host application has officially turned over control to the client.

If one's applications return control and then immediately bid for control again, these applications will not operate properly with HATS or any other computer program that is trying to interoperate with them. It is not a problem specific to HATS.

Ignoring a null RU won't work, either, because a null RU is one of the most common ways for signaling the client's turn to send. It is a legitimate part of the communications protocol. If HATS ignored null RUs, you'd immediately cause the opposite problem--many screens that are now operating correctly would signal they are done, but the browser would simply continue to spin waiting. Even within your own shop, suddenly screens that have been working fine with HATS would stop working, and only those that were broken before would have a hope of being okay (though I'm not sure what HATS could do but just wait some amount of time and hope for the best). Actually, the ones that aren't working for you now may continue to fail, only later in the process because after the final transaction is complete, it might send a null RU, and HATS would ignore it.

The CICS programmers are correct that running transactions this way was quite common. They failed to mention, though, that this technique has significant exposures to terminal problems, and prevents the transactions from interoperating properly with other programs. I suspect that like most CICS transactions, nobody expected them to interoperate with anything when they were first written. Now that you have higher expectations of these transactions, though, they need to be altered to "play well with others."

A quick Google search for cics return immediate (the new technique) uncovers lots of information explaining the problems with the old technique. CICS Transaction Server for z/OS

Even your terminal users can cause your transactions to fail if they were to type at the wrong moment: Tips for CICS Application Developers They can even abend your job Send Receive Mode

In short, "Common? Yes. A good idea? Nope."

Perhaps an analogy will help to explain (I think better in analogies):

It is very common practice for men (and some women) to sit in their living rooms on the weekend yelling very rapid (and usually very poor) instructions at the soccer or basketball players on the television. It is a common practice and in this environment it is a harmless one since the video tube isn't expected to react to the instructions being shouted at it.

These CICS applications are the same. They are giving signals that somebody should "take the shot" even when the goal is nowhere in sight. Milliseconds after that, they then scream for the ball to be passed to somebody else. Both instructions cannot be right, but since these applications were only communicating with a dumb terminal green screen, it caused no real harm. The humans using the applications are up to 10.000 times slower than a computer system, and couldn't react to the contradictory instructions even if they tried. In fact, these misleading instructions come so fast the humans are not even aware it is happening. Common, hardly a best practice, but mostly harmless.

This same behavior when moved from the living room onto the ball field, however, is no longer harmless. While it might be common, it cannot be done while you are part of an actual team trying to play together. The results would be, as you point out, havoc. Your teammates will be completely confused and the entire effort will fail.
Bottom Banner