About Link3270 sample client programs

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

Table 1. Link3270 sample client programs and copybooks
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 processing:

  • 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

DFH$BREC does the following processing:

  • 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.