SFI's Blog | Ask the Mainframe Software Expert
  Please post your questions here. We will reply promptly.
Most recent questions…
 
 
 
 
 
 
  CMS 3.0 - Service Management for Large Enterprises
  StreamFoundry Services - How we deliver value to Mainframe environments
  StreamFoundry Software Support Options - Support that your Mainframe environment demands
  StreamFoundry Resource Matrix - IBM Mainframe Software Expertise on-demand
  Check out SFI's tapeless VM/Encrypt solution
 
 
 
Home » Blogs » Questions
  User ID:     Password:    
New User? Click Here to Register.  
 
    Search Blogs/Questions:    
Click Here to Post Your Questions.  
Questions under category : DB2 » Batch
 
 
Q : How do I connect to DB2 from batch and what are the implications of each?
Posted : Marc on   February 12, 2009 at 03:42 pm
 
 
Replies to the question.
 
  More / Hide
 

There are three different connection types to DB2 from batch : TSO Background (DSN), Call Attach (CAF), and Recoverable Resource Manager Services attachment facility (RRSAF).

DSN is the most common because IBM uses DSN in most examples.  Abends are obscured with this method makes resolving debugging difficult.  Extra DD statements are required to support batch TSO.  Below is an example job step :

//DSNTEP2  EXEC PGM=IKJEFT01                                                   

//SYSTSPRT DD SYSOUT=*                                                         

//SYSTSIN  DD *                                                                

 DSN SYSTEM(DSNF)                                                              

 RUN PROGRAM(DSNTEP2) PLAN(DSNTEP91)                                           

//SYSPRINT DD SYSOUT=*                                                         

//SYSUDUMP DD SYSOUT=*       

CAF is the second most common and attachment to DB2 is performed within the programming by calling DB2 supplied routines and passing DB2 subsystem and plan name information.  Clients usually create an installation specific routine and pass this information using a PARM statement or input DD.  A program using CAF is called using PGM= within JCL like most other batch routines. 

RRSAF is the newest connection type and the most robust.  It requires that RRS be active on the LPAR.  Like CAF, clients usually create an installation specific routine and pass this information using a PARM statement or input DD and the program called using PGM= within JCL like most other batch routines.

 

 
 
Posted : krishna on  February 16, 2009 at 09:20 am

There are three different connection types to DB2 from batch : TSO Background (DSN), Call Attach (CAF), and Recoverable Resource Manager Services attachment facility (RRSAF).

DSN is the most common because IBM uses DSN in most examples.  Abends are obscured with this method makes resolving debugging difficult.  Extra DD statements are required to support batch TSO.  Below is an example job step :

//DSNTEP2  EXEC PGM=IKJEFT01                                                   

//SYSTSPRT DD SYSOUT=*                                                         

//SYSTSIN  DD *                                                                

 DSN SYSTEM(DSNF)                                                              

 RUN PROGRAM(DSNTEP2) PLAN(DSNTEP91)                                           

//SYSPRINT DD SYSOUT=*                                                         

//SYSUDUMP DD SYSOUT=*       

CAF is the second most common and attachment to DB2 is performed within the programming by calling DB2 supplied routines and passing DB2 subsystem and plan name information.  Clients usually create an installation specific routine and pass this information using a PARM statement or input DD.  A program using CAF is called using PGM= within JCL like most other batch routines. 

RRSAF is the newest connection type and the most robust.  It requires that RRS be active on the LPAR.  Like CAF, clients usually create an installation specific routine and pass this information using a PARM statement or input DD and the program called using PGM= within JCL like most other batch routines.

 

 
 
 
Post a Reply.
Comments :
Bold Italics Clear  
    Note: Please use shift+enter to insert new line.
 
 
 
--------------------------------------------------------------------------------------------------------------------------------------------------------------------
The System z Health Check
 
Subscribe to the SFI Newsletter
Enter Your E-Mail:
 
 
 
  © 2005-15 StreamFoundry Inc. | E-Mail : inquiries@streamfoundry.com | Call us: 617.877.4728