This task shows you how to create a IBM® z/OS® Connect server and configure a connection to a
Db2®.
About this task
This task guides you through the following:
- Creating a IBM z/OS Connect server with
ready-to-use services and an API for the employee Db2 native
REST services.
- Configuring a connection between your IBM z/OS Connect server and Db2.
- Testing the connection to Db2 using the supplied API.
Procedure
-
Enter the following command to create a server:
zosconnect create db2ProjectManager --template=zosconnect:sampleDb2ProjectManagerThe
following artifacts are created:
- An projectManager API archive file, projectManager.aar, in the directory
<WLP_USER_DIR>/servers/db2ProjectManager/resources/zosconnect/apis.
- Three service archive files,
employeeList.sar
,
employeeDetails.sar
, and employeeUpdate.sar
, in the directory
<WLP_USER_DIR>/servers/db2ProjectManager/resources/zosconnect/services.
- A server.xml configuration file in the directory
<WLP_USER_DIR>/servers/db2ProjectManager.
-
Customize the IBM z/OS Connect server.xml
configuration file.
- Update the REST client connection element to define a connection to Db2:
<zosconnect_zosConnectServiceRestClientConnection id="db2Conn" host="localhost" port="1234" />
- If your server and Db2 instance are on different
LPARs, replace the host value
localhost
with the host name or IP address of the
LPAR hosting your Db2 instance.
- Replace the port value
1234
with the port that your Db2 instance is configured to use.
-
Enable security if required by Db2 configuration. For more information, see the Configuring security for a REST client connection to Db2 topic.
- Update the
httpPort
for inbound connections to IBM z/OS Connect in the httpEndpoint
element, if necessary:
<httpEndpoint id="defaultHttpEndpoint" host="*" httpPort="9080" httpsPort="-1"/>
What to do next
Test your newly created server.