Feedback
Did this article resolve your question/issue?

   

Article

How to retrieve the connection details for DB2 on iSeries / AS400 ?

Information

 
TitleHow to retrieve the connection details for DB2 on iSeries / AS400 ?
URL Name000028707
Article Number000150068
EnvironmentProduct: Connect for ODBC / JDBC driver and ADO.Net provider for DB2
Version: All supported versions
OS: All supported platforms
Database: DB2 on iSeries / AS400
Application: All supported applications
Question/Problem Description
When connecting to a(n incorrect) port number, the driver hangs, times out or returns a connection refused error message.
Where to find the values needed for the driver connection options Collection (COL), Location (LOC), TcpPort (PORT) for DB2 on iSeries / AS400 ?
 
Steps to Reproduce
Clarifying Information
Error Message[DataDirect][ODBC DB2 Wire Protocol driver]Remote Database Not Found: QSYS2
[DataDirect][ODBC DB2 Wire Protocol driver]Connection refused. Verify Host Name and Port Number
Defect Number
Enhancement Number
Cause
Resolution

To display port number :

  1. log in using your terminal TN5250 emulator
  2. type WRKSRVTBLE and search a line like:
    drda                                      xxxx  tcp  

where xxxx is the portnumber : e.g. 446

alternatively:
  1. log in using your terminal TN5250 emulator
  2. Type the command: NETSTAT
  3. choose 3 : work with tcp/ip connection status
  4. type number 5 in front of the line with local port DRDA to display the details
  1. press F14 to display Port numbers
Example output :

System:
Connection identification:                                         
   Remote host name  . . . . . . . . . . . . . . :                  
     Remote internet address . . . . . . . . . . :     *            
     Remote port . . . . . . . . . . . . . . . . :     *            
   Local host name . . . . . . . . . . . . . . . :                  
     Local internet address  . . . . . . . . . . :     *            
     Local port  . . . . . . . . . . . . . . . . :     446          <-----
   Associated user profile . . . . . . . . . . . :   QUSER          
 TCP programming interface information:                             
   State . . . . . . . . . . . . . . . . . . . . :   Listen  
       
 


To display the location name :

  1. log in using your terminal TN5250 emulator
  2. type the command WRKRDBDIRE to display the Location name 'Entry'


Collection name :

usually the collection name is the same as the name of the user (it is a library containing the tables (files) and containing system files like: SYSTABLES, SYSCOLUMNS,..)
Workaround
Notes
Last Modified Date7/18/2019 5:56 PM
Files
Disclaimer The origins of the information on this site may be internal or external to Progress Software Corporation (“Progress”). Progress Software Corporation makes all reasonable efforts to verify this information. However, the information provided is for your information only. Progress Software Corporation makes no explicit or implied claims to the validity of this information.

Any sample code provided on this site is not supported under any Progress support program or service. The sample code is provided on an "AS IS" basis. Progress makes no warranties, express or implied, and disclaims all implied warranties including, without limitation, the implied warranties of merchantability or of fitness for a particular purpose. The entire risk arising out of the use or performance of the sample code is borne by the user. In no event shall Progress, its employees, or anyone else involved in the creation, production, or delivery of the code be liable for any damages whatsoever (including, without limitation, damages for loss of business profits, business interruption, loss of business information, or other pecuniary loss) arising out of the use of or inability to use the sample code, even if Progress has been advised of the possibility of such damages.