Creating Configuration Files for Access to Db2 on UNIX Using CLI

How to:

Accessing Db2 using CLI requires two configuration files in the ibi/srv77/foc directory. These two configuration files are named edaserve.cfg, which is in the bin subdirectory, and edasprof.prf, which is in the etc subdirectory.

Syntax: How to Configure the edaserve.cfg Configuration File for Access to Db2 Using CLI

The edaserve.cfg file, located in the ibi/srv77/foc/bin directory, must contain the following attributes:

db2_cli = y                 
db2_rel = v       
db2_access = y 

where:

v

Is your release of Db2.

Syntax: How to Configure the edasprof.prf Profile for Access to Db2 Using CLI

In order to access Db2 from FOCUS, you must issue the SET CONNECTION_ATTRIBUTES command. If you place this command in edasprof.prf, it will be issued automatically when FOCUS is invoked. The edasprof.prf file is located in the ibi/srv77/foc/etc directory.

Alternatively, you can issue the SET CONNECTION_ATTRIBUTES command after invoking FOCUS. You must get the appropriate LOCATION, USERNAME, and PASSWORD from your database administrator.

To issue the SET CONNECTION_ATTRIBUTES command automatically when FOCUS is invoked, add the following to the edasprof.prf file:

ENGINE DB2 SET CONNECTION_ATTRIBUTES conname location/username,password

where:

conname

Is a name for the connection.

location

Is the Db2 data source location (DSN name).

username

Is the user ID connecting to Db2.

password

Is the password for the user ID connecting to Db2.


Information Builders