Using the Link3270 samples

CICS® provides sample client programs that use the ECI, EXCI and LINK interfaces to call the Link3270 bridge to run the sample transaction NACT. The main objective of the sample programs is to provide coded examples that you can use to help you write your own client programs. NACT was chosen for this purpose as it has a well documented BMS interface.

The samples are not written to illustrate how a business client should process the data, so the business clients do not perform any special formatting of the data extracted from the user application.

The samples are designed to illustrate the two most common scenarios:

  1. Host Client

    The client program executes on the host system, using LINK or EXCI to drive the user application. In this scenario, the sample programs show how you can divide the client logic into a business-client that is concerned only with the business data and its representation in the client end-user environment, and a bridge-client that builds the bridge messages and manages the communication with the bridge. In this way, you can develop the more complex back-end using CICS , and can make it reusable.

    The LINK and EXCI samples show how this common logic can be shared.

    See Figure 7 for an illustration of the host client.

  2. Workstation Client

    The client program executes on a remote workstation, using ECI to drive the user application. In this scenario, a single sample program is used, combining the business logic in the client environment and the interface to the bridge. In this environment, the programmer needs some, but not extensive, CICS knowledge.

    See Figure 9 for an illustration of the workstation client.

The following sample client programs and copybooks are supplied in source code, in the SDFHSAMP library.

Lang. LINK ECI EXCI Copybook
C
DFH$BRCC
DFH$BRLC
DFH$BREC DFH$BRXC DFH$BRSH
COBOL
DFH0CBRC
DFH0CBRL
DFH0CBRX DFH0CBRA
DFH$BRCC
This is the C language host business client sample, driven by transaction BRCH. DFH$BRCC formats a COMMAREA using the structures defined in the DFH$BRSH header file, to contain the business data that will be passed to the NACT transaction. DFH$BRCC then LINKS to DFH$BRLC ( the C bridge client) , passing the COMMAREA, to perform the following functions: When DFH$BRLC returns with the requested data, DFH$BRCC writes it to TS queue BRCH.
DFH0CBRC
This is the COBOL language host business client sample, driven by transaction BRCO. DFH0CBRC formats a COMMAREA using the structures defined in the DFH0CBRA copybook, to contain the business data that will be passed to the NACT transaction. DFH0CBRC then LINKS to DFH0CBRL, passing the COMMAREA, to perform the following functions: When DFH0CBRL returns with the requested data, DFH0CBRC writes it to TS queue BRCO.
DFH$BRLC/DFH0CBRL
DFH$BRLC and DFH0CBRL LINK to DFHL3270 to drive the NACT transaction, using Link3270 in session mode. They do the following:
DFH$BRXC
This is the C language EXCI business client sample. DFH$BRXC formats a COMMAREA using the structures defined in the DFH$BRSH header file, to contain the business data that will be passed to the NACT transaction. DFH$BRXC then LINKS to DFH$BRLC, using the EXCI interface, passing the COMMAREA, to perform the following functions: When DFH$BRLC returns with the requested data, DFH$BRXC writes it to SYSPRINT.
DFH0CBRX
This is the COBOL language EXCI business client sample. DFH0CBRX formats a COMMAREA using the structures defined in the DFH0CBRA copy book, to contain the business data that will be passed to the NACT transaction. DFH0CBRX then LINKS to DFH0CBRL, using the EXCI interface, passing the COMMAREA, to perform the following functions: When DFH0CBRL returns with the requested data, DFH0CBRX writes it to SYSPRINT.
DFH$BREC

Related concepts
The Link3270 bridge mechanism
Related tasks
Using the Link3270 bridge
The NACT transaction
Setup for the NACT transaction
Running the sample client programs
[[ Contents Previous Page | Next Page Index ]]