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:
- 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.
- 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:
- Run the NACT search function to obtain an account number from a name.
- Run the NACT display function to obtain account details for the account
number.
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:
- Run the NACT search function to obtain an account number from a name.
- Run the NACT display function to obtain account details for the account
number.
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:
- Allocate the bridge facility
- Format the vectors to send in the Link3270 message
- Call the NACT transaction using the Link3270 bridge
- Return the requested data in the COMMAREA
- Delete the bridge facility
- 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:
- Run the NACT search function to obtain an account number from a name.
- Run the NACT display function to obtain account details for the account
number.
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:
- Run the NACT search function to obtain an account number from a name.
- Run the NACT display function to obtain account details for the account
number.
When DFH0CBRL returns with the requested data, DFH0CBRX writes it to
SYSPRINT.
- DFH$BREC
-
- Allocates the bridge facility
- Sends an ECI request to program DFHL3270 to run NACT and obtain the
menu screen
- Formats a message with BRIV vectors to run the NACT search function to
obtain an account number from a name.
- Sends an ECI request to program DFHL3270 to run the NACT search function.
- Extracts the search output data from the outbound message.
- Sends an ECI request to program DFHL3270 to run NACT and obtain the
menu screen
- Formats a message with BRIV vectors to run the NACT display function to
obtain account details for the account number.
- Extracts the account details from the outbound message.
- Formats a client response using the structures defined in the DFH$BRSH
header file and displays it to the client end-user.
- Deletes the bridge facility

[[ Contents Previous Page | Next Page Index ]]