Running a 3270 transaction from BTS
BTS supports the 3270 bridge function. Therefore, BTS applications can be integrated with, and make use of, existing 3270-based applications. Follow this basic mechanism for running a 3270 transaction from a BTS application.
About this task
Even though BTS activities are not terminal-related (they are never started directly from a terminal), a BTS activity can be implemented by a 3270-based transaction. The bridge exit program is used to put a “BTS wrapper” around the original 3270 transaction.
Figure 1
shows the basic mechanism for running
a 3270 transaction from a BTS application.
Figure 1. Running
a 3270-based transaction as a BTS activity

- A BTS activity, known in bridge terminology as the client , creates data to run a 3270 transaction. It puts the data in a container associated with a child activity.
- The client runs the child activity—which is implemented by the 3270 transaction—asynchronously.
- The BTS XM client identifies that the transaction should use the 3270 bridge and calls the bridge XM client.
- On the 'bind' call to the bridge exit, the bridge exit program
issues a GET CONTAINER command to retrieve the data to run the
3270
transaction.
Note: In a bridge environment, the bridge exit program becomes part of the 3270 transaction. Thus, the exit program does not need to acquire the child activity before issuing the GET CONTAINER command—it is itself part of the child activity.
- The 3270 transaction is run using the retrieved data. Any output data it produces is saved in an output message.
- When the bridge exit program is invoked for termination of the
3270 transaction, it issues:
- A PUT CONTAINER command, to put the output message into a named data-container
- A RETURN command, which causes the child activity to complete.
- The firing of the completion event of the child activity causes the parent (client) activity to be reactivated.
- The client issues a GET CONTAINER command to retrieve the output from the 3270 transaction.
The following table contains example pseudocode for running
a 3270-based transaction as a BTS activity.
| Client activity | Bridge exit program |
|---|---|
|
|
The child activity is implemented by the 3270 transaction and the bridge exit program. All the required BTS commands are issued by the exit program.