Create Configuration Files for Access to Db2 Using CLI

How to:

Accessing Db2 using CLI requires two configuration files you must place in the concatenation of data sets allocated to DDNAME ERRORS. You can place these members directly in the hlq.CONF.CFG data set or in another data set that you concatenate in front of hlq.CONF.CFG in the allocation for DDNAME ERRORS. These two members are named EDASERVE and FOCPROF.

Syntax: How to Configure the EDASERVE Member for Access to Db2 Using CLI

The EDASERVE member 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 FOCPROF Member 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 FOCPROF, it will be issued automatically when FOCUS is invoked. 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 FOCPROF member:

-SET &CONSTR='location/username,password';       
ENGINE DB2 SET CONNECTION_ATTRIBUTES CON1 &CONSTR       
END                                                     

where:

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