IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

CAF : Just the basics


IBM Mainframe Forums -> Mainframe Interview Questions
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
ChowHan

New User


Joined: 16 Oct 2009
Posts: 15
Location: India

PostPosted: Fri Jul 30, 2010 2:15 am
Reply with quote

Hi,

I was preparing for an interview, and I was thinking what I would say if asked about CAF... I don't know much about the Call Attachment FAcility, so can't claim to know it in detail, just the basics

But here is what I was able to find out thru google, and checking out a few modules on a system someone else is working on (The system I work on has IMS):

1. With CAF, you can execute your Cobol-DB2 module through
EXEC PGM=PGMNAME
you have to give the Subsystem and Plan name in DSNPARM DDNAME ( I guess this could be shop specific, not sure)Also needed is the DSNLOAD library that should be included in the STEPLIB

2. CAF is an alternative to using the IKJEFT1B TSO monitor utility.

3. It uses DSNALI to control the connection to DB2, this is the CAF language interface. Five calls are used :

Quote:
CONNECT :Establishes a connection between the program's MVS address space and DB2

DISCONNECT : Eliminates the connection between the MVS address space and DB2

OPEN : Establishes a thread for the program to communicate with DB2

CLOSE :Terminates the thread

TRANSLATE
Provides the program with DB2 error message information, placing it in the SQLCA

One benefit of using CAF is that it provides explicit control of thread creation. In addition, CAF is more efficient than DSN because of the elimination of overhead required by the TSO TMP, IKJEFT01 (or IKJEFT1B). Another benefit is that a program designed to use CAF can run when DB2 is down. It cannot access DB2 resources, but it can perform other tasks. This capability can be useful when the DB2 processing is optional, parameter driven, or contingent on other parts of the program.

CAF has its drawbacks too, though. For example, CAF requires more complex error handling procedures. DSN automatically formats error messages for connection failures, but CAF returns only a return code and a reason code. Another drawback is that DSN handles the connection automatically, but CAF requires the program to handle the connection. These drawbacks can be eliminated, however, if you modify the CAF interface module used at your site. Note that by modifying the CAF module your shop must support logic that otherwise is provided with DB2 (and supported by IBM).


However the Cobol module I checked did not contain these keywords, I guess these must be inserted during the pre compile phase ?

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


I guess that should be enough to satisfy the interviewer, since I never claimed I am a DB2 resource in any case and have very little(minimal ) experience in DB2 ....

My observations regarding the info above are in bold. Have I missed something obvious or made a huge blooper? I also need some more info on where exactly using CAF would be benefecial as compared to IKJEFT1B for execution.


Just curious about the following:
The modules I saw just accessed a table and accessed the data like any other DB2 module and on a glance, I felt these could have been executed using IKJEFT1B as well (I must say I just looked at Batch modules, not CICS). Would using CAF provide a significant improvement in efficiency for either batch or CICS? Is the overhead from the terminal monitor the only consideration? And is this post too long? icon_eek.gif
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Fri Jul 30, 2010 2:44 pm
Reply with quote

you might like to check these links:

publib.boulder.ibm.com/infocenter/dzichelp/v2r2/index.jsp?topic=/com.ibm.db29.doc.apsg/db2z_invokecaf.htm
publib.boulder.ibm.com/infocenter/dzichelp/v2r2/index.jsp?topic=/com.ibm.db29.doc.apsg/db2z_propertycafconnection.htm
publib.boulder.ibm.com/infocenter/dzichelp/v2r2/index.jsp?topic=/com.ibm.db29.doc.intro/db2z_tsoattachmentfacility.htm
Back to top
View user's profile Send private message
ChowHan

New User


Joined: 16 Oct 2009
Posts: 15
Location: India

PostPosted: Sun Aug 01, 2010 1:03 am
Reply with quote

Thanks Anuj,
I was purposely avoiding the manual because I didn't want to get lost in CAF, so I just referred to Mullins. It was hardly something I expected to be asked, thankfully it wasn't. icon_cool.gif

I will go thru the topic again now, now that I don't have a time constraint....
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Sun Aug 01, 2010 8:26 am
Reply with quote

Good Luck. icon_smile.gif
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> Mainframe Interview Questions

 


Similar Topics
Topic Forum Replies
No new posts DB2 Basics: Demystifying table and ta... DB2 0
No new posts REXX/CLIST Basics CLIST & REXX 10
No new posts MACRO basics TSO/ISPF 15
No new posts Basics on MQ series Java & MQSeries 2
No new posts Basics in DB2 DB2 8
Search our Forums:

Back to Top