Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
CONNECT statement in DB2 to connect to a local database.

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
View previous topic :: :: View next topic  
Author Message
red_roses

New User


Joined: 31 Oct 2005
Posts: 27

PostPosted: Mon Sep 18, 2006 10:21 pm    Post subject: CONNECT statement in DB2 to connect to a local database.
Reply with quote

I know that CONNECT is used to connect to a Databse on a remote server.
Can i use CONNECT to connect to a database that is on the same server as the executing process.

I.e. If i use a CONNECT statement to access tables that are a part of the Db2 database on the mainframe. will be execute successfully or fail?

if it executes successfully then what would be the performance considerations? (I am thinking on the lines that since it is not really necessary to execute this statement but i would anyways)
Back to top
View user's profile Send private message

anamikak

New User


Joined: 10 May 2006
Posts: 64
Location: Singapore

PostPosted: Tue Sep 19, 2006 9:07 am    Post subject: Re: CONNECT statement in DB2 to connect to a local database.
Reply with quote

you can use the connect statement to connect to the same server as your application process is running in without encountering an error. When you issue connect statement, the cuurent server special register is set to the name of the server you are trying to connect. So when you connect to the same application server, Db2 checks and finds that the server name has not changed and contues executing normally. I do not think there is any performance considerations associated with this, excepting that there can be only one server to which your application process can be connected at a time.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2 All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts CICS EZASOKET CONNECT using DNS name ankit.jain CICS 1 Tue Jan 16, 2018 7:24 pm
No new posts COBOL - EXIT statement weird behavior anthony.pangestu COBOL Programming 0 Fri Oct 27, 2017 9:57 am
No new posts Moving UDB database to Db2 on z/OS Keith Hooley DB2 4 Wed Sep 27, 2017 12:38 am
No new posts XMITIP sends it out. Can it copy on l... Rommel Dayon Rustia IBM Tools 0 Tue Sep 05, 2017 10:16 am
No new posts WER268A OUTREC STATEMENT : SYNTAX E... frozenblood87 SYNCSORT 12 Sat Aug 26, 2017 9:45 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us