Connecting to DB2 using Demo Link Service
Host Integration Server includes two off-line demo link connections that enable you to learn how to configure data integration connections to IBM DB2 databases and IBM host file system servers. The demo link connections are based on SNA APPC sessions. The following two topics guide you through using the SNA Manager, Data Access Tool, and Data Source Wizard to sample connectivity to IBM DB2 and host files.
Configuring a Demo Data Source for DB2
In these walkthroughs, you will use SNA Manager to configure a demo link service, connection, and logical units to simulate a connection to IBM DB2 for IBM i. You will use the Data Access Tool and Data Source Wizard to configure and test a data source definition for DB2.
Configuring a Demo SNA Connection for DB2
Click Start, Programs, Host Integration Server, and then click SNA Manager.
The SNA Manager appears.
The SNA Manager window is divided into two parts:Scope pane (folder browser) that offers a tree view of services such as TN3270 and Print, and configuration objects such as pools and users.
Results pane (list item details) that offers a list view of configurable objects with object-specific details such as status.
Double click the SNA Subdomain item in the scope pane, directly below the high-level folder titled “Microsoft SNA Manager”. In a single server subdomain, the SNA Subdomain name is the name of the server.
The SNA Manager displays the following set of folders:Servers
Pools
Configured Users
Workstations
APPC Modes
CPIC Symbolic Names
Double-click the Servers folder in the scope pane. One or more named computer server icons are displayed.
Double-click the server that you want to configure. The SNA Manager displays the following set of folders:
Link Services
Active Users
SNA Service [Inactive]
TN3270 Service [Inactive]
Print Service [Inactive]
Right-click the Link Services folder, click New, and then click Link Service. The Insert Link Service dialog box appears.
In the Select a Link Service to add list, click DEMO SDLC Link Service, and then click Add. The DEMO SDLC Link Service #1 Properties appears.
In the Script File list, click DB2 OLE DB Demo, and then click OK. The Service account credentials dialog appears.
In the Password field, type a password, and then click OK. The SNA Manager displays a new Link Service Name in results pane (“SNADEMO1”).
In the Insert Link Service dialog box, click Finish.
In the scope pane, double-click the SNA Service [Inactive] item. The SNA Manager displays the following set of folders:
Connections
Local APPC LUs
Remote APPC LUs
Right-click the SNA Service [Inactive] item, click All Tasks, and then click IBM i Wizard. The IBM i Configuration Wizard appears.
In the Welcome dialog box, click Next. The SNA Service dialog appears.
In the SNA Service dialog box, click the server that you want to configure, and then click Next. The Connection dialog appears.
In the Connection dialog box, type a name for the connection, such as
DRDADEMO
, and then click Next. The Link Service dialog appears.In the Link Service dialog box, click the SNADEMO1 item, and then click Next. The IBM i Name dialog appears.
In the IBM i Name, verify that the Network name is APPN and the Control Point Name is DRDADEMO, and then click Next. The Link Identification dialog appears.
In the Link Identification dialog box, verify that the PU address (PUADDR) is C1, and then click Next. The Completion dialog appears.
In the Completion dialog box, click Finish. The SNA Manager displays an IBM i Configuration Wizard confirmation dialog.
In the IBM i Configuration Wizard confirmation dialog box, click OK.
Double-click the Connections folder, see the DRDADEMO connection.
Double-click the Remote APPC LUs folder, see the DRDADEMO LU.
Right-click the Local APPC LUs folder, click New, and then click Local LU. The Local APPC LU Properties dialog appears.
In the Local APPC LU Properties dialog box, verify that the Network name is APPN, type LOCAL in the LU alias and LU name fields, and then click OK.
Double-click the Local APPC LUs folder, see the LOCAL LU.
Click the Action menu, and then click Save configuration.
In the scope pane, right-click the SNA Service [Inactive] item, and then click Start. The SNA Manager displays the status of the SNA Service [Active] and DRDADEMO [On Demand] connection.
In the scope pane, verify that the status of the SNA Service is active (SNA Service [Active]) and that the DRDADEMO connection is ready (DRDADEMO [On Demand]).
Configuring a Demo Data Source for DB2
Click Start, Programs, Host Integration Server, and then click Data Access Tool. The Data Access Tool appears.
Click File, and then click New Data Source. The Data Source Wizard appears.
In the Welcome dialog box, click Next. The Data Source dialog appears.
In the Data source platform list, click DB2/400. For Network Transport Library, select SNA LU6.2 (APPC), and then click Next. The APPC Network Connection dialog appears.
In the LOCAL LU alias list, select LOCAL. In the Remote LU alias list, select DRDADEMO. In the Mode name list, select QPCSUPP, and then click Next. The DB2 Database dialog appears.
In the Initial Catalog field, type
OLYMPIA
. In the Package collection field type,PUBS
. In the Default schema field, typePUBS
, and then click Next. The Locale dialog appears.In the Host CCSID list, verify that EBCDIC – U.S./Canada [37] is selected. In the PC code page list, verify that ANSI – Latin I [1252] is selected, and then click Next. The Security dialog appears.
In the Security method list, verify that Interactive sign-on is selected. In the User name field, type SNA. In the Password and Password confirmation fields, type SNA, and then click Save password. The Data Access Wizard displays a Warning dialog.
In the Warning dialog box, click Yes, and then in the Security dialog click Next. The Advanced Options dialog appears.
In the Alternate TP name field, type 0X07F9F9F9, and then click Next. The All Properties dialog appears.
In the All Properties dialog box, click Next. The Validation dialog appears.
Click the Connect button. In the Output pane, see the results. Click the Sample Query button. In the Grid pane, see the results, and then click Next. The Saving Information dialog appears.
In the Data source name field, type DRDADEMO. For the OLE DB or Managed choice, select Universal data link, and then click Next. The Completion dialog appears.
Click Finish. The Data Access Tool displays the DRDADEMO connection in the DB2 OLE DB UDLs folder.
The Data Integration Samples in the SDK include a pre-configured UDL file for use with the DRDADEMO demo link service and connection. See C:\Program Files\Host Integration Server\SDK\Samples\DataIntegration\DRDADEMO.UDL.