Writing the Link3270 client

To design and write a client program to run an existing CICS® 3270 transaction using the Link3270 bridge you need to:

  1. select a suitable bridge scenario to decide where code needs to be written
  2. analyze the application to understand the business data that flows between the 3270 and the application, so that you can replace it with messages
  3. decide whether you can use the simplified single transaction mode interface or whether you need to use the full session mode interface
  4. Write you client program using the selected scenario and transaction mode, using Link3270 messages to communicate with Link3270.

Select Link3270 client scenarios

The following scenarios describe some common client environments. They show how you can develop your client program to run in the most appropriate environment to make best use of existing skills and experience. These scenarios demonstrate tiered client applications that enable you to divide the logic to make best use of skills and experience. They use some common terms:

Business client
The business client is concerned only with the business data and its representation in the client end-user environment
bridge client
The bridge client builds the bridge messages and manages the communication with the bridge using the Link3270 interface. You can develop the more complex bridge client to run in CICS, using CICS commands, and the business client portion can run in any environment that allows communication with the bridge client. The bridge client can be designed to be reusable.
  1. Host CICS Client

    In this scenario, shown in Figure 7, the programmer has CICS skills and experience, so it is more appropriate to write the Link3270 interface code on CICS.

    You can separate the client logic into a business client, and a bridge client.

    The LINK and EXCI samples show how a client application can be separated in this way and how common logic can be shared in the bridge client. Note that a business client in another CICS region can use DPL to access the bridge client.

  2. CICS Workstation Client

    In this scenario, shown in Figure 8, where a CICS product is installed on the workstation ( such as CICS for Unix) then the client can be a CICS program using LINK to interface with Link3270, or with a host CICS bridge client. In the three tier model the writer of the bridge client needs to have CICS skills, but the business client programmer only needs skills on that platform.

  3. Non - CICS Workstation Client

    In this scenario, shown in Figure 9, the programmer has workstation skills and limited CICS experience. For the two tier scenario, the programmer must have some CICS experience to understand the messages (which involve EXEC CICS instructions).

    The client program executes on a remote workstation, using ECI to drive the user application. A single client program is written, combining the business logic in the client environment and the interface to Link3270.

  4. 3-tier Workstation client

    In this scenario, shown in Figure 10, the workstation business client calls a bridge client in another environment, perhaps to utilize existing skills. For example, a Unix program could send a user-defined XML message to Websphere on OS/390®. A user-written bridge client application in Websphere could then parse the XML message and convert it to a Link3270 message and use an EXCI LINK to call Link3270.

Analyze the 3270 application

You need to analyze the 3270 application programs that form your transaction in order to replace the 3270 input data with messages sent by your client program. You can use the 3270 Bridge Passthrough SupportPak ( See Using the 3270 Bridge Passthrough SupportPak) to drive your applications and log 3270 commands.

3270 programs fall mainly into the following types:

Minimum function BMS
This includes minimum function, SEND TEXT, and ACCUM. Link3270 supports these applications. Bridge clients can be written relatively easily by a CICS programmer.
BMS and little 3270 datastream
A typical example of this type is an application that issues RECEIVE of command line input, and issues a send MAP as output. Link3270 supports these applications. Client applications can be written relatively easily by a CICS programmer.
Mixed BMS and 3270 datastream
A typical example of this type is an application that issues RECEIVE and then RECEIVE MAP FROM. Link3270 supports these applications but the client programs are more difficult to write because MAP information has to be supplied in 3270 datastream format.
Pure 3270 datastream
Typically user-written 3270 datastream where the user has a well-understood fixed 3270 datastream structure. This is supported but the client program is more difficult to program than with BMS. However this is usually the format understood by the programmer of the target application.
Alternative map generators
3270 datastreams are generated dynamically. Link3270 supports these applications but the client programs are more difficult to write because MAP information has to be supplied in 3270 datastream format.
Full function BMS
Including ACCUM, PAGE and PARTITION support. These programs are not supported and will be detected by the load module scanner or the Passthrough tool.

Select operation mode

Link3270 has two modes of operation:

Single transaction mode
This is a 'one-shot' type of request. A single transaction is run, and a single response message returned. The bridge facility is allocated automatically by CICS and deleted at the end of the transaction. This mode is appropriate for inquiry type applications.
Session mode
This mode is appropriate for sequences of transactions where state data is maintained between transactions. In this mode, the client program can request:

Your client program manages the sequence of requests and the creation and deletion of the bridge facility. Note that this is different from the implementation of the START bridge, where the bridge facility is created dynamically.

Related concepts
The Link3270 bridge mechanism
Link3270 programming considerations
Related tasks
Establish Link3270 suitability
Using Link3270 messages
Using Link3270 single transaction mode
Using Link3270 session mode
Calling the Link3270 bridge
Using data conversion with Link3270
Related reference
Link3270 message formats
Link3270 diagnostics
[[ Contents Previous Page | Next Page Index ]]