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.
The EDASERVE member must contain the following attributes:
db2_cli = y db2_rel = v db2_access = y
where:
Is your release of Db2.
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:
Is the Db2 data source location (DSN name).
Is the user ID connecting to Db2.
Is the password for the user ID connecting to Db2.
|
Information Builders |