Interview Questions   Tutorials   Discussions   Programs   

DB2 - What is Call attach facility? How does it work?

asked mar August 21, 2014 12:11 PM  

What is Call attach facility? How does it work?


1 Answers

answered By Mswami   0  
CALL ATTACHMENT FACILITY(CAF): It is an attachment facility which is a part of the DB2 code that allows other programs to connect to and use DB2 to process SQL statements, commands, or instrumentation facility interface (IFI) calls. With the call attachment facility (CAF), your application program can establish and control its own connection to DB2. Programs that run in MVS batch, TSO foreground, and TSO background can use CAF.

The advantages of a program using CAF:

  • Access DB2 from MVS address spaces where TSO, IMS, or CICS do not exist.
  • Access DB2 from multiple MVS tasks in an address space.
  • Access the DB2 IFI.
  • Run when DB2 is down (though it cannot run SQL when DB2 is down).
  • Run with or without the TSO terminal monitor program (TMP).
  • Run without being a subtask of the DSN command processor (or of any DB2 code).  etc...

CAF differs from the previous attach mechanisms in that it does not provide teleprocessing services. CAF is used to manage connections between DB2 and batch and online TSO application programs, without the overhead of the TSO terminal monitor program.

CAF programs can be executed as one of the following:

  • An MVS batch job
  • A started task
  • A TSO batch job
  • An online TSO application
Typically, a control program is created to handle the establishment and termination of the DB2 connection.  Although this module is not required, it is recommended so that you can eliminate the repetitious coding of the tedious tasks associated with connecting, disconnecting, opening, and closing.

CAF programs must be link-edited with the CAF language interface module, DSNALI .
   add comment

Your answer

Join with account you already have



 Write A Tutorials
Online-Classroom Classes

  1 person following this question

  1 person following this tag

  Question tags

Asked 1 year and 1 month ago ago
Number of Views -187
Number of Answers -1
Last updated
2 years and 2 months ago ago

Ready to start your tutorial with us? That's great! Send us an email and we will get back to you as soon as possible!