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

DSN RUN versus DB2 call attach


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
jerryte

Active User


Joined: 29 Oct 2010
Posts: 202
Location: Toronto, ON, Canada

PostPosted: Thu Oct 06, 2011 2:50 am
Reply with quote

There are 2 ways I know of to execute a db2 program.
  • DSN RUN command. This will connect to the db2 environment and then execute the program
  • DB2 call attach. This will execute the program first and then a call is made to connect to the db2 environment.

They both achieve the same result but is one better then the other?

What I like about the call attach is that I can see the name of the program, db2 subsystem, and plan right in the JCL. There is also no need to use the IKJEFT01 to establish a tso environment first.

The DSN RUN usually has the program and plan name buried in a pds member which is then read in via SYSTSIN dd.
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Thu Oct 06, 2011 2:57 am
Reply with quote

You will have anyhow, even when using the CAF, to provide some additional parms to identify the DB2 subsystem You want to connect
unless You want to have as many <versions> each one with hardcoded the DB2 subsytem to be used

You might prefer it, but makes life more complicated from the programming side

it is Your responsibility to properly setup the environment, as per
publib.boulder.ibm.com/infocenter/dzichelp/v2r2/index.jsp?topic=%2Fcom.ibm.db2z9.doc.apsg%2Fsrc%2Ftpc%2Fdb2z_programxmpcaf.htm

not to talk about a more complex error recovery

and all the programs have to do it icon_biggrin.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 -> DB2

 


Similar Topics
Topic Forum Replies
No new posts Error while running web tool kit REXX... CLIST & REXX 5
No new posts Call program, directly from panel CLIST & REXX 9
No new posts Batch call online program, EXCI task ... CICS 3
No new posts CSQBGET - Call giving completion code... COBOL Programming 3
No new posts CICS DPL call CICS 6
Search our Forums:

Back to Top