Controlling the CICS attachment facility from an application

Use the CICS® attachment facility to access Db2 from CICS application programs.

About this task

You can start and stop the CICS attachment facility from within an application program.

Procedure

To control the CICS attachment facility:

  1. To start the CICS attachment facility, perform one of the following actions:
    • Include the following statement in your application:
      EXEC CICS LINK PROGRAM('DSN2COM0')
    • Use the system programming interface SET DB2CONN for the CICS Transaction Server.
  2. To stop the CICS attachment facility, perform one of the following actions:
    • Include the following statement in your application:
      EXEC CICS LINK PROGRAM('DSN2COM2')
    • Use the system programming interface SET DB2CONN for the CICS Transaction Server.