BTS supports the 3270 bridge function. This means that BTS applications
can be integrated with, and make use of, existing 3270-based applications.
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 28 shows the basic mechanism for running a 3270 transaction
from a BTS application.
- 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 child activity’s completion event causes the parent
(client) activity to be reactivated.
- The client issues a GET CONTAINER command to retrieve the output from
the 3270 transaction.
Figure 29 contains example pseudocode for running a 3270-based
transaction as a BTS activity.
Figure 29. Pseudocode for running a 3270-based transaction as a BTS activity
Client activity |
Bridge exit program |
When DFH-Initial
encode msg-in-buffer
EXEC CICS DEFINE ACTIVITY ('3270-act')
TRANSID('T327') EVENT('3270-Complete')
RESP(data-area) RESP2(data-area) END-EXEC
.
EXEC CICS PUT CONTAINER('Message')
ACTIVITY('3270-act') FROM(msg-in-buffer)
RESP(data-area) RESP2(data-area) END-EXEC
.
EXEC CICS RUN ACTIVITY('3270-act')
ASYNCHRONOUS
RESP(data-area) RESP2(data-area) END-EXEC
.
EXEC CICS RETURN END-EXEC
.
.
When 3270-Complete
EXEC CICS GET CONTAINER('Message')
ACTIVITY('3270-act') INTO(msg-out-buffer)
RESP(data-area) RESP2(data-area) END-EXEC
.
decode msg-out-buffer
EXEC CICS RETURN ENDACTIVITY
|
Init.
pass userdata from the brdata to BRXA
.
.
Bind.
EXEC CICS GET CONTAINER('Message')
INTO(3270-msg-in-buffer)
RESP(data-area) RESP2(data-area) END-EXEC
.
.
Term.
EXEC CICS PUT CONTAINER('Message')
FROM(3270-msg-out-buffer)
RESP(data-area) RESP2(data-area) END-EXEC
.
EXEC CICS RETURN END-EXEC
|
Note that 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.
[[ Contents Previous Page | Next Page Index ]]