z/OS Communications Server: SNA Programming
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


Using a multithread program

z/OS Communications Server: SNA Programming
SC27-3674-00

You should use a multithread design for any VTAM® application program that must communicate concurrently on a number of sessions. This implies the use of asynchronous operations—determining completion of operations either by having VTAM post an ECB or by having it schedule an RPL exit routine.

In a multithread program, the control blocks for each session must be managed efficiently. The control blocks reflect the status of the session (for example, whether the LU has begun to communicate on that session, what address is to be branched to when a requested output operation is completed on that session, or whether the LU has sent in a logoff message for that session). Sample Program 2 in Logic of a more complicated application program, shows the general logic of a multithread program.

You can use multitasking to transfer control between the communication and data processing parts of an application program. See Operating system facilities, for more information on data separation using the multitasking facility. It is also possible for the same routines to be shared among what VTAM perceives as more than one VTAM application program. This arrangement can be used for communicating with two different types of LUs. Two ACBs can be defined in an application program. One kind of LU is associated with control blocks that point to one ACB while another kind of LU is associated with the other ACB. Because VTAM sees each ACB as an application program, each type of LU can have separate logic associated with it, including its own exit routines and its own I/O routines. Data processing parts of the application program, a wait routine, and other routines can be shared.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014