Running application programs using CAF
The call attachment facility (CAF) allows you to customize and control execution environments more extensively than the TSO, z/OS®, or IMS attachment facilities. Programs that run in TSO foreground or TSO background can use either the DSN session or CAF. z/OS batch and started task programs can use only CAF.
About this task
IMS batch applications can also access Db2 databases through CAF, however, this method does not coordinate the commitment of work between the IMS and Db2 subsystems. Using the Db2 DL/I batch support for IMS batch applications is highly recommended.
Procedure
To
use the CAF:
Either link-edit or make
available a load module known as the call attachment language interface,
or DSNALI. Alternatively, you can link-edit with the Universal Language
Interface program (DSNULI).
When the language interface is available, your program can use CAF to connect to Db2 in the following ways:
- DSNALI only: Implicitly, by including SQL statements or IFI calls in your program just as you would any program.
- DSNALI or DSNULI: Explicitly, by writing CALL DSNALI or CALL DSNULI
statements.